Apps Outside of CA Agile Central

Deprecation Warning! The content below is only applicable for use within deprecated 1.x versions of CA Agile Central's App SDK. Use of the components or code on this page is not supported. To develop custom apps in our current environments, please see App SDK 2.0 documentation.

When you create new apps, it is more efficient to create an HTML file on your desktop computer and open that file with your browser instead of cutting and pasting the code into a custom app tab each time that you update the code. If you want to run an app outside of CA Agile Central, you need to replace the SDK include with the fully qualified URL. For example:

<script src="https://[server]/apps/[version]/sdk.js"></script>

[server] is rally1.rallydev.com, trial.rallydev.com, sandbox.rallydev.com, and so on, and [version] is the App SDK version (1.21, 1.22,..).

Finally, the hangman variables (__WORKSPACE_OID__,  ___PROJECT_OID__, ...) are not accessible when you run the app outside of CA Agile Central. You can still instantiate a new CA Agile CentralDataSource as shown in the example below. However, any queries will rely on your default workspace and project or the first workspace or project listed alphabetically (if no default workspace or project is set). Alternatively, you can supply an actual workspace and project ObjectID in place of the hangman variables. By default, when you run the app outside of CA Agile Central, the project scope up will default to false and project scope down will default to true.

new rally.sdk.data.CA Agile CentralDataSource("__WORKSPACE_OID__",
               "__PROJECT_OID__",
            "__PROJECT_SCOPING_UP__",
               "__PROJECT_SCOPING_DOWN__")

The following is an example of an app configured to run outside of CA Agile Central.

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html>
<head>
   <title>User Stories By Iteration Example</title>
   <script type="text/javascript" src="https://rally1.rallydev.com/apps/1.26/sdk.js"></script>
   <script type="text/javascript">

     var rallyDataSource = null;
     var iterDropdown = null;
     var table = null;

     function showUserStoriesTable(results) {
       if(table) {
table.destroy();
       }

       var rankIx = 1;
       for (var i=0; i < results.stories.length; i++, rankIx++) {
         results.stories[i].Ranking = rankIx; // to get 1 through N rankings...
       }

       var tableConfig = {
         columnKeys : ['Ranking', 'FormattedID', 'Name' ],
         columnHeaders: ['Ranking', 'FormattedID', 'Name' ],
         columnWidths : ['60px', '80px', '360px']
       };
       table = new rally.sdk.ui.Table(tableConfig);
       table.addRows(results.stories);
       table.display(document.getElementById('stories'));
     }

     function onIterationSelected() {
       document.getElementById('stories').innerHTML = "";
       var queryConfig = {
         key : 'stories',
         type : 'hierarchicalrequirement',
         fetch: 'Rank,FormattedID,Name',
         query: '(Iteration.Name = "' + iterDropdown.getSelectedName() + '")',
         order: 'Rank'
       };
      rallyDataSource.findAll(queryConfig, showUserStoriesTable);
     }

     function onLoad() {
       rallyDataSource = new rally.sdk.data.CA Agile CentralDataSource("__WORKSPACE_OID__",
                                  "__PROJECT_OID__",
                                 "__PROJECT_SCOPING_UP__",
                                 "__PROJECT_SCOPING_DOWN__")
       var iterConfig = {label : ""};
       iterDropdown = new rally.sdk.ui.IterationDropdown(iterConfig, rallyDataSource);
      iterDropdown.display(document.getElementById("iterationDiv"), onIterationSelected);
     }

     rally.addOnLoad(onLoad);
   </script>

</head>
<body>
   <div>
     <div style="margin-left: 20px; margin-bottom: 5px; font-weight: bold;">Select Iteration</div>
     <div id="iterationDiv"></div>
   </div>
   <br/><br/>
   <div id="stories"></div>
</body>
</html>

フィードバック

ヘルプをお求めですか?CA Agile Central コミュニティは、セルフサービスとサポートのワンストップ ショップです。CA Agile Central サポートにフィードバックを送信したり、答を見つけたり、他のユーザとのコラボレーションには CA Agile Central コミュニティ にご参加ください。