Skip to content

Commit

Permalink
can ignore project scope
Browse files Browse the repository at this point in the history
  • Loading branch information
tyrjo committed Oct 26, 2018
1 parent 19fdbcc commit a8e94f0
Show file tree
Hide file tree
Showing 5 changed files with 15 additions and 29 deletions.
10 changes: 5 additions & 5 deletions deploy/Ugly.txt

Large diffs are not rendered by default.

4 changes: 2 additions & 2 deletions package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "query-counter",
"version": "1.1.0",
"version": "1.1.2",
"scripts": {
"debug": "grunt debug",
"debug:watch": "nodemon --exec grunt debug",
Expand All @@ -9,7 +9,7 @@
"deploy-debugsdk:watch": "nodemon --exec grunt deploy-debugsdk"
},
"dependencies": {
"@agile-central-technical-services/utils-ancestor-pi-app-filter": "^2.1.0",
"@agile-central-technical-services/utils-ancestor-pi-app-filter": "^2.1.2",
"@agile-central-technical-services/utils-file-utils": "^1.0.0"
},
"devDependencies": {
Expand Down
11 changes: 0 additions & 11 deletions src/javascript/Settings.js
Original file line number Diff line number Diff line change
Expand Up @@ -6,17 +6,6 @@ Ext.define('Rally.technicalservices.querycounter.Settings', {

var items = [];

items.push({
id:'searchAllProjects',
name:'searchAllProjects',
fieldLabel: 'Scope Across Workspace',
labelAlign: 'left',
xtype:'rallycheckboxfield',
labelWidth: 150,
margin: 10,
hidden: !config.showSearchAllProjects
});

items.push({
name:'countVariables',
fieldLabel: null,
Expand Down
13 changes: 5 additions & 8 deletions src/javascript/app.js
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,6 @@ Ext.define("TSQueryCounter", {
query: '( ObjectID > 0 )',
id: 'storyCount'
}],
searchAllProjects: false,
html: 'Defects: {defectCount} or Stories: {storyCount}<br/><br/><em>Use the gear to make App Settings...</em>'
}
},
Expand All @@ -56,7 +55,7 @@ Ext.define("TSQueryCounter", {
exportButton.on('click', this._onExport, this);
this._validateSettings();

var ancestorFilterPlugin = Ext.create('Utils.AncestorPiAppFilter', {
this.ancestorFilterPlugin = Ext.create('Utils.AncestorPiAppFilter', {
ptype: 'UtilsAncestorPiAppFilter',
pluginId: 'ancestorFilterPlugin',
settingsConfig: {
Expand All @@ -79,7 +78,7 @@ Ext.define("TSQueryCounter", {
},
}
});
this.addPlugin(ancestorFilterPlugin);
this.addPlugin(this.ancestorFilterPlugin);
},

_onExport: function() {
Expand Down Expand Up @@ -215,7 +214,7 @@ Ext.define("TSQueryCounter", {
}
}

var ancestorFilter = this.getPlugin('ancestorFilterPlugin').getFilterForType(artifactType);
var ancestorFilter = this.ancestorFilterPlugin.getFilterForType(artifactType);
if (ancestorFilter) {
filters = filters.and(ancestorFilter);
}
Expand Down Expand Up @@ -321,14 +320,12 @@ Ext.define("TSQueryCounter", {
},

searchAllProjects: function() {
var searchAllProjects = this.getSetting('searchAllProjects');
return this.isMilestoneScoped() && searchAllProjects;
return this.ancestorFilterPlugin.getIgnoreProjectScope();
},

getSettingsFields: function() {
return Rally.technicalservices.querycounter.Settings.getFields({
width: this.getWidth(),
showSearchAllProjects: this.isMilestoneScoped()
width: this.getWidth()
});
}

Expand Down
6 changes: 3 additions & 3 deletions yarn.lock
Original file line number Diff line number Diff line change
Expand Up @@ -2,9 +2,9 @@
# yarn lockfile v1


"@agile-central-technical-services/utils-ancestor-pi-app-filter@^2.1.0":
version "2.1.0"
resolved "https://registry.yarnpkg.com/@agile-central-technical-services/utils-ancestor-pi-app-filter/-/utils-ancestor-pi-app-filter-2.1.0.tgz#a2417a0aa43cce28f6c0cc34a7f3d6a898f6e2bf"
"@agile-central-technical-services/utils-ancestor-pi-app-filter@^2.1.2":
version "2.1.2"
resolved "https://registry.yarnpkg.com/@agile-central-technical-services/utils-ancestor-pi-app-filter/-/utils-ancestor-pi-app-filter-2.1.2.tgz#f7f4c81f3f6ad2a162bb54451d67406015d04b0b"

"@agile-central-technical-services/utils-file-utils@^1.0.0":
version "1.0.0"
Expand Down

0 comments on commit a8e94f0

Please sign in to comment.