I am trying to write javascript to list all stories assigned to a specifi iteration. I want to display the epic name that the US is a child of. I am writing this in javascript with the goal to display the info in Confluence. I have all other attributes I need displaying as expected. The js is below.
var config = { columns: [ {key: 'FormattedIDLink', header: 'ID'}, {key: 'Name', header: 'Name'}, {key: 'OwnerName', header: 'Owner'}, {key: 'ScheduleState', header: 'Schedule State'}, {key: 'PlanEstimate', header: 'Plan Est'}, {key: 'Blocked', header: 'Blocked'}, {key: 'EpicName', header: 'Parent Epic'}],
type: "hierarchicalrequirement",
fetch: "Name,FormattedID,Owner,ScheduleState,PlanEstimate,Blocked,Parent",
query: '(Iteration.Name = "Sprint 15")', };
var table = new rally.sdk.ui.Table(config, rallyDataSource);
table.addEventListener(table.getValidEvents().onDataRetrieved, function(t, args)
{
rally.forEach(args.items, function(item)
{
item.FormattedIDLink = new rally.sdk.ui.basic.Link({"item":item}); item.OwnerName = item.Owner ? item.Owner._refObjectName : "";
item.EpicName = item.Epic ? item.Epic.Name : "";
item.Blocked = item.Blocked ? "<img src='
https://rally1.rallydev.com/slm/js-lib/rui/builds/rui/resources/css/images/cardboard/blocked-active-icon.png'>":"<img src='
https://rally1.rallydev.com/slm/js/rally/resources/images/blocked-icon-white.png'>";item.NameTextBox = new rally.sdk.ui.basic.TextBox( {value:item.Name, rememberValue:false});
item.ScheduleStateDropdown = new rally.sdk.ui.basic.Dropdown( {items: {Backlog:"Backlog", Defined:"Defined", "In-Progress":"In-Progress",Completed:"Completed", Accepted:"Accepted"}, defaultValue: item.ScheduleState, rememberSelection:false}) }); });