Skip to content

Commit 0885347

Browse files
authored
Merge pull request #24 from RallyCommunity/fix_feature
Fix hardcoded lowest level pi named feature
2 parents 0e38aba + 6c423e9 commit 0885347

File tree

13 files changed

+1711
-139
lines changed

13 files changed

+1711
-139
lines changed

.gitignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
node_modules/

App-debug.html

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,7 @@
3131
Rally.launchApp('Rally.apps.releasetracking.ReleaseTrackingApp', {
3232
name:"Release Tracking Board",
3333
parentRepos:"",
34-
version:"1.0.2"
34+
version:"1.0.3"
3535
});
3636
}, true);
3737
</script>

deploy/App-external.html

Lines changed: 7 additions & 7 deletions
Large diffs are not rendered by default.

deploy/App-uncompressed.html

Lines changed: 32 additions & 62 deletions
Original file line numberDiff line numberDiff line change
@@ -512,7 +512,7 @@
512512
xtype: 'rallygrid',
513513
model: 'User Story',
514514
headerCls: 'leftright-header-text',
515-
columnCfgs: ['FormattedID', 'Name', 'Feature', 'Plan Estimate', 'Iteration', 'Release', 'Project', 'Owner'],
515+
columnCfgs: ['FormattedID', 'Name', config.lowestLevelPi, 'Plan Estimate', 'Iteration', 'Release', 'Project', 'Owner'],
516516
pagingToolbarCfg: {
517517
pageSizes: [5, 10, 15]
518518
},
@@ -594,7 +594,7 @@
594594
//
595595
var store = Ext.create('Rally.data.wsapi.Store', {
596596
model: 'UserStory',
597-
fetch: ['FormattedID', 'Name', 'Feature', 'Release', 'Iteration', 'Project', 'Owner'],
597+
fetch: ['FormattedID', 'Name', this._getLowestLevelPIFieldName(), 'Release', 'Iteration', 'Project', 'Owner'],
598598
filters: filters,
599599
autoLoad: true,
600600
pageSize: 5
@@ -608,14 +608,19 @@
608608
//filters: filters,
609609
store: store,
610610
title: 'User Stories Assigned to Later Releases or Iteration',
611-
width: 800
611+
width: 800,
612+
lowestLevelPi: this._getLowestLevelPIFieldName()
612613
}).show();
613614
},
614615

616+
_getLowestLevelPIFieldName: function() {
617+
return this.lowestLevelPi.split('/')[1];
618+
},
619+
615620
_filterPopover: function(record) {
616621
return [
617622
{
618-
property: 'Feature.Release.Name',
623+
property: this._getLowestLevelPIFieldName() + '.Release.Name',
619624
operator: '=',
620625
value: record.Release.Name
621626
},
@@ -1011,7 +1016,8 @@
10111016
width: undefined,
10121017
displayTitle: 'Pie',
10131018
config: {
1014-
context: null
1019+
context: null,
1020+
lowestLevelPi: 'portfolioitem/feature'
10151021
},
10161022

10171023
initComponent: function() {
@@ -1060,7 +1066,7 @@
10601066
this._childChartData = [];
10611067

10621068
this.store = Ext.create('Rally.data.wsapi.artifact.Store', {
1063-
models: ['PortfolioItem/Feature'],
1069+
models: [this.lowestLevelPi],
10641070
fetch: ['UserStories', 'PreliminaryEstimate', 'Value', 'FormattedID', 'State[Ordinal;Name]', 'LeafStoryCount', 'Name',
10651071
'PlannedEndDate', 'PlannedStartDate', 'ActualStartDate', 'ActualEndDate', 'PercentDoneByStoryPlanEstimate', 'PercentDoneByStoryCount'],
10661072
filters: [this.context.getTimeboxScope().getQueryFilter()],
@@ -1078,13 +1084,14 @@
10781084
_loadChildCollections: function() {
10791085
var records = this.store.getRange();
10801086
var promises = [];
1087+
var piField = this.lowestLevelPi.split('/')[1];
10811088
_.each(records, function(record) {
10821089
if (record.get('UserStories') && record.get('UserStories').Count) {
10831090
var store = Ext.create('Rally.data.wsapi.Store', {
10841091
model: 'UserStory',
1085-
fetch: ['FormattedID', 'Name', 'ScheduleState', 'Blocked', 'BlockedReason', 'Feature'],
1092+
fetch: ['FormattedID', 'Name', 'ScheduleState', 'Blocked', 'BlockedReason', piField],
10861093
filters: [{
1087-
property: 'Feature',
1094+
property: piField,
10881095
value: record.get('_ref')
10891096
}, {
10901097
property: 'DirectChildrenCount',
@@ -1654,8 +1661,6 @@
16541661
alias:'widget.statsbanneriterationprogressdialog',
16551662
requires: [
16561663
'Rally.apps.releasetracking.statsbanner.IterationProgressDialogChartToggle',
1657-
//'Rally.apps.releasetracking.statsbanner.iterationprogresscharts.BurndownChart',
1658-
//'Rally.apps.releasetracking.statsbanner.iterationprogresscharts.CumulativeFlowChart',
16591664
'Rally.apps.releasetracking.statsbanner.iterationprogresscharts.PieChart',
16601665
'Rally.ui.carousel.Carousel'
16611666
],
@@ -1668,7 +1673,8 @@
16681673
height: 650,
16691674
closable: true,
16701675
store: null,
1671-
context: null
1676+
context: null,
1677+
lowestLevelPi: 'portfolioitem/feature'
16721678
},
16731679
layout: {
16741680
type: 'vbox',
@@ -1686,14 +1692,7 @@
16861692
var chartHeight = 570;
16871693

16881694
this.callParent(arguments);
1689-
//this.toggle = this.add({
1690-
//xtype: 'iterationprogressdialogcharttoggle',
1691-
//startingIndex: this.startingIndex,
1692-
//listeners: {
1693-
//toggle: this._toggleButtonClick,
1694-
//scope: this
1695-
//}
1696-
//});
1695+
16971696
this.carousel = this.add({
16981697
xtype: 'rallycarousel',
16991698
showDots: false,
@@ -1703,22 +1702,9 @@
17031702
xtype: 'statsbannerpiechart',
17041703
width: chartWidth,
17051704
height: chartHeight,
1706-
context: this.context
1705+
context: this.context,
1706+
lowestLevelPi: this.lowestLevelPi
17071707
}
1708-
//{
1709-
//xtype: 'statsbannerburndownchart',
1710-
//width: chartWidth,
1711-
//height: chartHeight,
1712-
//context: this.context,
1713-
//store: this.store
1714-
//},
1715-
//{
1716-
//xtype: 'statsbannercumulativeflowchart',
1717-
//width: chartWidth,
1718-
//height: chartHeight,
1719-
//context: this.context,
1720-
//store: this.store
1721-
//}
17221708
],
17231709
startingIndex: this.startingIndex,
17241710
listeners: {
@@ -1767,8 +1753,6 @@
17671753
alias:'widget.statsbanneriterationprogress',
17681754
requires: [
17691755
'Rally.ui.carousel.Carousel',
1770-
//'Rally.apps.releasetracking.statsbanner.iterationprogresscharts.BurndownChart',
1771-
//'Rally.apps.releasetracking.statsbanner.iterationprogresscharts.CumulativeFlowChart',
17721756
'Rally.apps.releasetracking.statsbanner.iterationprogresscharts.MinimalPieChart',
17731757
'Rally.apps.releasetracking.statsbanner.iterationprogresscharts.PieChart',
17741758
'Rally.apps.releasetracking.statsbanner.IterationProgressDialog',
@@ -1777,7 +1761,8 @@
17771761

17781762
config: {
17791763
context: null,
1780-
store: null
1764+
store: null,
1765+
lowestLevelPi: 'portfolioitem/feature'
17811766
},
17821767

17831768
currentChartDisplayed: 0,
@@ -1823,24 +1808,6 @@
18231808
context: this.context,
18241809
store: this.store
18251810
}
1826-
//{
1827-
//xtype: 'statsbannerburndownchart',
1828-
//width: 150,
1829-
//height: 63,
1830-
//minimalMode: true,
1831-
//clickHandler: boundClickHandler,
1832-
//context: this.context,
1833-
//store: this.store
1834-
//},
1835-
//{
1836-
//xtype: 'statsbannercumulativeflowchart',
1837-
//width: 150,
1838-
//height: 63,
1839-
//minimalMode: true,
1840-
//clickHandler: boundClickHandler,
1841-
//context: this.context,
1842-
//store: this.store
1843-
//}
18441811
];
18451812

18461813
_.each(this.carouselItems, function(carouselItem) {
@@ -1874,7 +1841,8 @@
18741841
Ext.create('Rally.apps.releasetracking.statsbanner.IterationProgressDialog', {
18751842
startingIndex: currentIndex,
18761843
store: this.store,
1877-
context: this.context
1844+
context: this.context,
1845+
lowestLevelPi: this.lowestLevelPi
18781846
});
18791847
},
18801848

@@ -2060,11 +2028,12 @@
20602028

20612029
config: {
20622030
context: null,
2063-
expanded: true
2031+
expanded: true,
2032+
lowestLevelPi: 'portfolioitem/feature'
20642033
},
20652034

20662035
items: [
2067-
{xtype: 'statsbannerplannedvelocity', unitLabel: 'feature points'},
2036+
{xtype: 'statsbannerplannedvelocity', unitLabel: 'points'},
20682037
{xtype: 'statsbannertimeboxend'},
20692038
{xtype: 'statsbannerestimatedstories'},
20702039
{xtype: 'statsbanneraccepted', byCount: false},
@@ -2100,7 +2069,7 @@
21002069

21012070
//var tbs = this.context.getTimeboxScope();
21022071
this.store = Ext.create('Rally.data.wsapi.artifact.Store', {
2103-
models: ['PortfolioItem/Feature'],
2072+
models: [this.lowestLevelPi],
21042073
fetch: [
21052074
'Name',
21062075
'PercentDoneByStoryCount', 'PercentDoneByStoryPlanEstimate',
@@ -2165,6 +2134,7 @@
21652134
flex: 1,
21662135
context: this.context,
21672136
store: this.store,
2137+
lowestLevelPi: this.lowestLevelPi,
21682138
listeners: {
21692139
ready: this._onReady,
21702140
scope: this
@@ -2346,6 +2316,7 @@
23462316
itemId: 'statsBanner',
23472317
context: this.getContext(),
23482318
margin: '0 0 5px 0',
2319+
lowestLevelPi: this.piTypes[0],
23492320
listeners: {
23502321
resize: this._resizeGridBoardToFillSpace,
23512322
scope: this
@@ -2507,7 +2478,6 @@
25072478
xtype: 'rallytreegrid',
25082479
store: gridStore,
25092480
columnCfgs: this._getGridColumns(),
2510-
model: 'UserStory',
25112481
showSummary: true,
25122482
summaryColumns: this._getSummaryColumnConfig(),
25132483
plugins: [],
@@ -2552,7 +2522,7 @@
25522522
},
25532523

25542524
_getGridColumns: function (columns) {
2555-
var result = ['FormattedID', 'Name', 'PercentDoneByStoryPlanEstimate', 'PreliminaryEstimate', 'ScheduleState', 'PlanEstimate', 'Blocked', 'Iteration', 'Owner', 'Discussion'];
2525+
var result = ['FormattedID', 'Name', 'State', 'PercentDoneByStoryPlanEstimate', 'PreliminaryEstimate', 'ScheduleState', 'PlanEstimate', 'Blocked', 'Iteration', 'Owner', 'Discussion'];
25562526

25572527
if (columns) {
25582528
result = columns;
@@ -2600,7 +2570,7 @@
26002570
Rally.launchApp('Rally.apps.releasetracking.ReleaseTrackingApp', {
26012571
name:"Release Tracking Board",
26022572
parentRepos:"",
2603-
version:"1.0.2"
2573+
version:"1.0.3"
26042574
});
26052575

26062576
});

0 commit comments

Comments
 (0)