Skip to content

Commit bab0916

Browse files
authored
Merge pull request #2 from RallyTechServices/master
bug fixes and add tags to filter options.
2 parents 04460e9 + 12b3c42 commit bab0916

File tree

5 files changed

+45
-12
lines changed

5 files changed

+45
-12
lines changed

deploy/App.txt

Lines changed: 23 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -3,11 +3,11 @@
33
<head>
44
<title>Custom Grid with Deep Export</title>
55
<!-- (c) 2015 Rally Software Development Corp. All Rights Reserved. -->
6-
<!-- Build Date: Thu Apr 13 2017 13:59:10 GMT-0600 (MDT) -->
6+
<!-- Build Date: Tue May 23 2017 15:16:51 GMT-0600 (MDT) -->
77

88
<script type="text/javascript">
9-
var APP_BUILD_DATE = "Thu Apr 13 2017 13:59:10 GMT-0600 (MDT)";
10-
var CHECKSUM = 32677813024;
9+
var APP_BUILD_DATE = "Tue May 23 2017 15:16:51 GMT-0600 (MDT)";
10+
var CHECKSUM = 33370645756;
1111
</script>
1212

1313
<script type="text/javascript" src="/apps/2.1/sdk.js"></script>
@@ -267,6 +267,11 @@ Ext.define('Rally.technicalservices.HierarchyExporter',{
267267
var data = [];
268268
Ext.Array.each(column_keys, function(key){
269269
var val = obj[key];
270+
console.log('column-key', key, obj);
271+
if (key === "Parent"){
272+
val = obj[key] || obj['PortfolioItem'];
273+
}
274+
270275
if (val){
271276
if (reHTML.test(val)){
272277
val = val.replace('<br>','\r\n');
@@ -359,10 +364,17 @@ Ext.define('Rally.technicalservices.HierarchyExporter',{
359364
var field = c.dataIndex || null;
360365
if (field){
361366
var data = recData[field];
367+
368+
if (field === "Parent"){
369+
data = recData[field] || recData["PortfolioItem"];
370+
}
371+
362372
if (Ext.isObject(data)){
363373
if (data._tagsNameArray && data._tagsNameArray.length > 0) {
364374
var names = _.pluck(data._tagsNameArray, 'Name');
365375
rec[field] = names.join(',');
376+
} else if (data.FormattedID){
377+
rec[field] = data.FormattedID + ": " + data._refObjectName;
366378
} else {
367379
rec[field] = data._refObjectName;
368380
}
@@ -748,8 +760,9 @@ Ext.override(Rally.ui.inlinefilter.PropertyFieldComboBox, {
748760
* @cfg {String[]} whiteListFields
749761
* field names that should be included from the filter row field combobox
750762
*/
751-
defaultWhiteListFields: ['Milestones']
763+
defaultWhiteListFields: ['Milestones','Tags']
752764
});
765+
753766
(function () {
754767
var Ext = window.Ext4 || window.Ext;
755768

@@ -910,6 +923,10 @@ Ext.define("custom-grid-with-deep-export", {
910923
modelNames: this.modelNames,
911924
inlineFilterPanelConfig: {
912925
quickFilterPanelConfig: {
926+
whiteListFields: [
927+
'Tags',
928+
'Milestones'
929+
],
913930
defaultFields: [
914931
'ArtifactSearch',
915932
'Owner',
@@ -1105,12 +1122,12 @@ Ext.define("custom-grid-with-deep-export", {
11051122
}
11061123
];
11071124
},
1108-
1125+
11091126
_launchInfo: function() {
11101127
if ( this.about_dialog ) { this.about_dialog.destroy(); }
11111128
this.about_dialog = Ext.create('Rally.technicalservices.InfoLink',{});
11121129
},
1113-
1130+
11141131
isExternal: function(){
11151132
return typeof(this.getAppId()) == 'undefined';
11161133
},

deploy/Ugly.txt

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,10 +3,10 @@
33
<head>
44
<title>Custom Grid with Deep Export</title>
55
<!-- (c) 2015 Rally Software Development Corp. All Rights Reserved. -->
6-
<!-- Build Date: Thu Apr 13 2017 13:59:11 GMT-0600 (MDT) -->
6+
<!-- Build Date: Tue May 23 2017 15:16:51 GMT-0600 (MDT) -->
77

88
<script type="text/javascript">
9-
var APP_BUILD_DATE = "Thu Apr 13 2017 13:59:11 GMT-0600 (MDT)";
9+
var APP_BUILD_DATE = "Tue May 23 2017 15:16:51 GMT-0600 (MDT)";
1010
var CHECKSUM = [%= checksum %];
1111
</script>
1212

src/javascript/app.js

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -82,6 +82,10 @@ Ext.define("custom-grid-with-deep-export", {
8282
modelNames: this.modelNames,
8383
inlineFilterPanelConfig: {
8484
quickFilterPanelConfig: {
85+
whiteListFields: [
86+
'Tags',
87+
'Milestones'
88+
],
8589
defaultFields: [
8690
'ArtifactSearch',
8791
'Owner',
@@ -277,12 +281,12 @@ Ext.define("custom-grid-with-deep-export", {
277281
}
278282
];
279283
},
280-
284+
281285
_launchInfo: function() {
282286
if ( this.about_dialog ) { this.about_dialog.destroy(); }
283287
this.about_dialog = Ext.create('Rally.technicalservices.InfoLink',{});
284288
},
285-
289+
286290
isExternal: function(){
287291
return typeof(this.getAppId()) == 'undefined';
288292
},

src/javascript/utils/hierarchy-exporter.js

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -89,6 +89,11 @@ Ext.define('Rally.technicalservices.HierarchyExporter',{
8989
var data = [];
9090
Ext.Array.each(column_keys, function(key){
9191
var val = obj[key];
92+
console.log('column-key', key, obj);
93+
if (key === "Parent"){
94+
val = obj[key] || obj['PortfolioItem'];
95+
}
96+
9297
if (val){
9398
if (reHTML.test(val)){
9499
val = val.replace('<br>','\r\n');
@@ -181,10 +186,17 @@ Ext.define('Rally.technicalservices.HierarchyExporter',{
181186
var field = c.dataIndex || null;
182187
if (field){
183188
var data = recData[field];
189+
190+
if (field === "Parent"){
191+
data = recData[field] || recData["PortfolioItem"];
192+
}
193+
184194
if (Ext.isObject(data)){
185195
if (data._tagsNameArray && data._tagsNameArray.length > 0) {
186196
var names = _.pluck(data._tagsNameArray, 'Name');
187197
rec[field] = names.join(',');
198+
} else if (data.FormattedID){
199+
rec[field] = data.FormattedID + ": " + data._refObjectName;
188200
} else {
189201
rec[field] = data._refObjectName;
190202
}

src/javascript/utils/overrides.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -21,5 +21,5 @@ Ext.override(Rally.ui.inlinefilter.PropertyFieldComboBox, {
2121
* @cfg {String[]} whiteListFields
2222
* field names that should be included from the filter row field combobox
2323
*/
24-
defaultWhiteListFields: ['Milestones']
25-
});
24+
defaultWhiteListFields: ['Milestones','Tags']
25+
});

0 commit comments

Comments
 (0)