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 component(s) and/or code on this page is not supported. To develop custom apps within our current environments, please see App SDK 2.0 documentation.

When creating 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 the code is updated. 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 running the app outside of CA Agile Central.  You can still instantiate a new CA Agile CentralDataSource as seen 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 running outside CA Agile Central, 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>

Feedback

Need more help? The CA Agile Central Community is your one-stop shop for self-service and support. To submit feedback or cases to CA Agile Central Support, find answers, and collaborate with others, please join us in the CA Agile Central Community.