javascript - Creating a table with results of two findall calls using Rally SDK 1.33 -


i recreate rally's iteration summary app. therefore, able display information defects, iterations, etc... in 1 ui component. currently, have 2 tables (one displaying results of findall defects, 1 displaying results of findall iterations). way have 1 findall results both of these? or there way access results of multiple findall calls in 1 rally ui component (meaning 1 table able display results of findall(s) iterations , associated defects)? thank you

here full example of appsdk 1.33 app makes 2 queries, , builds single table of 2 different artifacts, defects , stories based on selection in iteration dropdown:

user stories iteration example

<script type="text/javascript" src="https://rally1.rallydev.com/apps/1.33/sdk.js"></script> <script type="text/javascript">      rallydatasource = null;     iterdropdown    = null;      function showtable(results) {         (var i=0; < results.stories.length; i++) {     results.stories[i].project = results.stories[i].project.name         }          var tableconfig = {             columnkeys   : ['formattedid', 'name', 'schedulestate', 'project' ],             columnwidths : ['80px','80px', '80px','80px']         };         var table = new rally.sdk.ui.table(tableconfig);         table.addrows(results.stories);     table.addrows(results.defects);         table.display(document.getelementbyid('mytable'));     }      function oniterationselected() {         document.getelementbyid('mytable').innerhtml = "";     var queryconfig = [];               queryconfig[0] = {             type : 'hierarchicalrequirement',             key  : 'stories',             fetch: 'formattedid,name,project,schedulestate',             query: '(iteration.name = "' + iterdropdown.getselectedname() + '")',             order: 'rank'         };      queryconfig[1] = {             type : 'defect',             key  : 'defects',             fetch: 'formattedid,name,project,schedulestate',             query: '(iteration.name = "' + iterdropdown.getselectedname() + '")',             order: 'rank'         };          rallydatasource.findall(queryconfig, showtable);     }      function onload() { //use valid oids          rallydatasource = new rally.sdk.data.rallydatasource('111111',                                                              '22222',                                                              'false',                                                              'true');         var iterconfig = {label : ""};         iterdropdown = new rally.sdk.ui.iterationdropdown(iterconfig, rallydatasource);         iterdropdown.display(document.getelementbyid("iterationdiv"), oniterationselected);     }      rally.addonload(onload); </script> 

select iteration

there example of placeholder query in appsdk 1.x documentation. little harder imagine single table populated defects , iterations - 2 objects different share table meaningfully. iteration summary app mention not have single table them - iterations listed there in separate dropdown field. meaningfully combines data defects , test cases - similar app above shows defects , stories.


Comments

Popular posts from this blog

ios - UICollectionView Self Sizing Cells with Auto Layout -

node.js - ldapjs - write after end error -

DOM Manipulation in Wordpress (and elsewhere) using php -