From 39d5706381679f29f32e5d74046b76f5fb6df653 Mon Sep 17 00:00:00 2001 From: Kyle Morse Date: Thu, 17 Jan 2019 11:54:32 -0700 Subject: [PATCH 1/3] Fix hardcoded feature name and custom field copying --- App-debug.html | 2 +- App.js | 8 +++++--- deploy/App-external.html | 4 ++-- deploy/App-uncompressed.html | 10 ++++++---- deploy/App.html | 4 ++-- package.json | 2 +- 6 files changed, 17 insertions(+), 13 deletions(-) diff --git a/App-debug.html b/App-debug.html index 60d91ee..261e870 100644 --- a/App-debug.html +++ b/App-debug.html @@ -17,7 +17,7 @@ Rally.launchApp('CustomApp', { name:"portfolio-item-copy", parentRepos:"", - version:"1.0.1" + version:"1.0.2" }); }, true); diff --git a/App.js b/App.js index e0e7ab6..d34897e 100644 --- a/App.js +++ b/App.js @@ -103,7 +103,9 @@ Ext.define('CustomApp', { success: function(requiredFields) { app.requiredFields = requiredFields; // make sure required fields are part of the settings: - Ext.apply(app.fieldsToCopy, requiredFields); + _.each(_.keys(app.fieldsToCopy), function(type) { + app.fieldsToCopy[type] = _.uniq(app.fieldsToCopy[type].concat(requiredFields[type])); + }); if ( Ext.Array.contains( requiredFields.hierarchicalrequirement, 'Release' )) { this.down('#release-label').setText('Default Release:'); @@ -447,9 +449,9 @@ Ext.define('CustomApp', { xtype: 'rallyfieldpicker', autoExpand: true, alwaysExpanded: false, - modelTypes: ['PortfolioItem/Feature'], + modelTypes: ['PortfolioItem'], margin: '10px 0 10px 0', - fieldLabel: 'Feature Fields', + fieldLabel: 'Portfolio Item Fields', _shouldShowField: function(field) { //console.log(field.name, field); var attr = field.attributeDefinition; diff --git a/deploy/App-external.html b/deploy/App-external.html index 2bf95ec..8005322 100644 --- a/deploy/App-external.html +++ b/deploy/App-external.html @@ -8,13 +8,13 @@