|
3 | 3 | <head> |
4 | 4 | <title>Custom Grid with Deep Export</title> |
5 | 5 | <!-- (c) 2015 Rally Software Development Corp. All Rights Reserved. --> |
6 | | - <!-- Build Date: Fri May 18 2018 10:21:38 GMT-0600 (MDT) --> |
| 6 | + <!-- Build Date: Wed Aug 15 2018 12:11:02 GMT-0600 (MDT) --> |
7 | 7 |
|
8 | 8 | <script type="text/javascript"> |
9 | | - var APP_BUILD_DATE = "Fri May 18 2018 10:21:38 GMT-0600 (MDT)"; |
10 | | - var CHECKSUM = 34251012870; |
| 9 | + var APP_BUILD_DATE = "Wed Aug 15 2018 12:11:02 GMT-0600 (MDT)"; |
| 10 | + var CHECKSUM = 35081721478; |
11 | 11 | </script> |
12 | 12 |
|
13 | 13 | <script type="text/javascript" src="/apps/2.1/sdk.js"></script> |
@@ -877,6 +877,11 @@ Ext.define("custom-grid-with-deep-export", { |
877 | 877 | allowExpansionStateToBeSaved: false, |
878 | 878 | enableAddNew: true, |
879 | 879 |
|
| 880 | + onTimeboxScopeChange: function(newTimeboxScope) { |
| 881 | + this.callParent(arguments); |
| 882 | + this._buildStore(); |
| 883 | + }, |
| 884 | + |
880 | 885 | launch: function () { |
881 | 886 | this.fetchPortfolioItemTypes().then({ |
882 | 887 | success: function(portfolioItemTypes){ |
@@ -912,7 +917,11 @@ Ext.define("custom-grid-with-deep-export", { |
912 | 917 | this.down('#display_box').removeAll(); |
913 | 918 | } |
914 | 919 |
|
915 | | - var filters = this.getSetting('query') ? Rally.data.wsapi.Filter.fromQueryString(this.getSetting('query')) : []; |
| 920 | + var filters = this.getSetting('query') ? [Rally.data.wsapi.Filter.fromQueryString(this.getSetting('query'))] : []; |
| 921 | + var timeboxScope = this.getContext().getTimeboxScope(); |
| 922 | + if (timeboxScope && timeboxScope.isApplicable(store.model)) { |
| 923 | + filters.push(timeboxScope.getQueryFilter()); |
| 924 | + } |
916 | 925 | this.logger.log('_addGridboard', store); |
917 | 926 |
|
918 | 927 |
|
@@ -1055,12 +1064,14 @@ Ext.define("custom-grid-with-deep-export", { |
1055 | 1064 | if (grid.currentCustomFilter && grid.currentCustomFilter.filters){ |
1056 | 1065 | filters = grid.currentCustomFilter.filters; |
1057 | 1066 | } |
1058 | | - if (query){ |
1059 | | - if (filters && filters.length > 0){ |
1060 | | - return filters.and(filters, Rally.data.wsapi.Filter.fromQueryString(query)); |
1061 | | - } else { |
1062 | | - return Rally.data.wsapi.Filter.fromQueryString(query); |
1063 | | - } |
| 1067 | + |
| 1068 | + if (query) { |
| 1069 | + filters.push(Rally.data.wsapi.Filter.fromQueryString(query)); |
| 1070 | + } |
| 1071 | + |
| 1072 | + var timeboxScope = this.getContext().getTimeboxScope(); |
| 1073 | + if (timeboxScope && timeboxScope.isApplicable(grid.getGridOrBoard().store.model)) { |
| 1074 | + filters.push(timeboxScope.getQueryFilter()); |
1064 | 1075 | } |
1065 | 1076 | return filters; |
1066 | 1077 | }, |
|
0 commit comments