Skip to content

Commit

Permalink
Merge pull request #1 from RallyTechServices/optimizeFilters
Browse files Browse the repository at this point in the history
query by iteration dates only, fix from date picker width
  • Loading branch information
tyrjo authored Jan 10, 2019
2 parents d856ff1 + 219a6c4 commit dd41903
Show file tree
Hide file tree
Showing 4 changed files with 42 additions and 26 deletions.
11 changes: 10 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,11 @@

A version the built-in Release Tracking board with additional filters.

Features are plotted into every iteration where that feature has a scheduled story.
Iterations across projects are assumed to be the same if they share the same start and end
date as the current projet's iterations. Iteration name is explicitly NOT used to work around
a query that sometimes causes a timeout with certain data.

## Test Plan
### List of Features
* PASS - Shows all features in current project
Expand All @@ -24,10 +29,14 @@ A version the built-in Release Tracking board with additional filters.
* PASS - List of stories specific to iteration
* PASS - Iterations shown are specific to current project (by name and date)
* PASS - Iterations from current project merged with matching name+dates of other projects
* Non-timeboxed page shows date range
* PASS - Non-timeboxed page shows date range
* Release filtered page
* PASS - Showns only Features assigned to Release
* Milestone filtered page
* PASS -Shows only Features directly assigned to selected Milestone (not indirect due to story assigned to milestone)
* Iteration filtered page
* PASS - Shows only features with stories in selected iteration
* PASS - Shows "Unscheduled"

### Board of features

Expand Down
12 changes: 6 additions & 6 deletions deploy/Ugly.txt

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "release-tracking-with-filters",
"version": "1.0.0",
"version": "1.0.1",
"scripts": {
"debug": "grunt debug",
"debug:watch": "nodemon --exec grunt debug",
Expand Down
43 changes: 25 additions & 18 deletions src/javascript/app.js
Original file line number Diff line number Diff line change
Expand Up @@ -80,7 +80,7 @@ Ext.define("release-tracking-with-filters", {
fieldLabel: Constants.START_DATE,
labelWidth: 120,
labelCls: 'date-label',
//minWidth: 200,
minWidth: 200,
margin: '0 10 0 0',
listeners: {
scope: this,
Expand All @@ -94,6 +94,7 @@ Ext.define("release-tracking-with-filters", {
id: 'end-date-picker',
fieldLabel: Constants.END_DATE,
labelWidth: 30,
minWidth: 200,
labelCls: 'date-label',
margin: '0 10 0 0',
listeners: {
Expand Down Expand Up @@ -407,18 +408,29 @@ Ext.define("release-tracking-with-filters", {
_onGridLoad: function(grid) {
var store = grid.getGridOrBoard().getStore();
var root = store.getRootNode();
var queries = _.map(root.childNodes, function(pi) {
return {
property: this.lowestPiTypeName,
operator: '=',
value: pi.get('_ref')
}
}, this);
// If there are no PIs, then explicitly filter out all stories
this.storiesFilter = Rally.data.wsapi.Filter.or(queries) || Rally.data.wsapi.Filter.and({
property: 'ObjectID',
value: 0
});

if (root.childNodes && root.childNodes.length) {
var oids = _.map(root.childNodes, function(pi) {
return pi.get('ObjectID');
}, this).join(',');

// Performance may be better by using 'in' instead of a collection of ORs
var query = Ext.create('Rally.data.wsapi.Filter', {
property: this.lowestPiTypeName + '.ObjectID',
operator: 'in',
value: oids
})

// If there are no PIs, then explicitly filter out all stories
this.storiesFilter = query;
}
else {
// If there are no PIs, then explicitly filter out all stories
this.storiesFilter = Rally.data.wsapi.Filter.and({
property: 'ObjectID',
value: 0
});
}

// Only consider direct Feature children (not nested stories)
this.storiesFilter = this.storiesFilter.and({
Expand Down Expand Up @@ -486,7 +498,6 @@ Ext.define("release-tracking-with-filters", {
});
return {
xtype: 'rallycardboardcolumn',
//value: iteration.get('Name'),
columnHeaderConfig: {
headerTpl: headerTemplate,
cls: 'cardboard-column-header'
Expand All @@ -496,10 +507,6 @@ Ext.define("release-tracking-with-filters", {
getStoreFilter: function() {
// Don't return this column 'value' as a filter
return [{
property: 'Iteration.Name',
value: iteration.get('Name')
},
{
property: 'Iteration.StartDate',
value: iteration.get('StartDate')
},
Expand Down

0 comments on commit dd41903

Please sign in to comment.