- {
if (val.hasOwnProperty('q')) {
let selectedTypeGroup: GroupTypeUI;
- const selectedTypeGroupName =
- this.filterService.getConditionFromQuery(val.q, 'typegroup.name');
- if (selectedTypeGroupName) {
- selectedTypeGroup =
- this.groupTypes.find(g => g.name === selectedTypeGroupName);
+ if (val['q'].includes('boardContextId')) {
+ //filter service getConditionFromQuery returns undefined for non AND operations
+ let selectedTypeGroupId = this.filterService.getConditionFromQuery(val.q, 'boardContextId');
+ if (selectedTypeGroupId === undefined) {
+ selectedTypeGroupId = this.filterService.queryToFlat(val.q)[0].value;
+ }
+ if (selectedTypeGroupId) {
+ selectedTypeGroup =
+ this.groupTypes.find(g => g.id === selectedTypeGroupId);
+ }
+ } else {
+ const selectedTypeGroupName =
+ this.filterService.getConditionFromQuery(val.q, 'typegroup.name');
+ if (selectedTypeGroupName) {
+ selectedTypeGroup =
+ this.groupTypes.find(g => g.name === selectedTypeGroupName);
+ }
}
if (selectedTypeGroup && !selectedTypeGroup.selected) {
this.store.dispatch(new GroupTypeActions.SelectType(selectedTypeGroup));
@@ -154,15 +177,6 @@ export class GroupTypesComponent implements OnInit, OnDestroy {
} else {
this.showCompleted = '';
}
-
- // If it's a board view then check for board context ID
- if (val.hasOwnProperty('boardContextId')) {
- const selectedTypeGroup: GroupTypeUI =
- this.groupTypes.find(g => g.id === val.boardContextId);
- if (selectedTypeGroup) {
- this.store.dispatch(new GroupTypeActions.SelectType(selectedTypeGroup));
- }
- }
})
);
}
diff --git a/src/app/components_ngrx/iteration-list-entry/iteration-list-entry.component.html b/src/app/components_ngrx/iteration-list-entry/iteration-list-entry.component.html
index 4dabdd74c..52c7e0cc4 100644
--- a/src/app/components_ngrx/iteration-list-entry/iteration-list-entry.component.html
+++ b/src/app/components_ngrx/iteration-list-entry/iteration-list-entry.component.html
@@ -47,7 +47,7 @@