From e9e8e52dee870fffd4249f6461bc7f02ade824d7 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Oliver=20G=C3=BCnther?= Date: Thu, 22 Mar 2018 15:46:47 +0100 Subject: [PATCH] Use the parent filter --- frontend/app/components/api/api-v3/api-v3-filter-builder.ts | 2 +- .../wp-relations-hierarchy.directive.ts | 6 ++++++ .../wp-relations-hierarchy.template.html | 3 +-- 3 files changed, 8 insertions(+), 3 deletions(-) diff --git a/frontend/app/components/api/api-v3/api-v3-filter-builder.ts b/frontend/app/components/api/api-v3/api-v3-filter-builder.ts index 386949eda1..39d61469f3 100644 --- a/frontend/app/components/api/api-v3/api-v3-filter-builder.ts +++ b/frontend/app/components/api/api-v3/api-v3-filter-builder.ts @@ -34,7 +34,7 @@ export interface ApiV3Filter { export class ApiV3FilterBuilder { - private filters:ApiV3Filter[] = []; + public filters:ApiV3Filter[] = []; public add(name:string, operator:FilterOperator, values:any):this { let newFilter:ApiV3Filter = {}; diff --git a/frontend/app/components/wp-relations/wp-relations-hierarchy/wp-relations-hierarchy.directive.ts b/frontend/app/components/wp-relations/wp-relations-hierarchy/wp-relations-hierarchy.directive.ts index bf66bdde91..8ede674046 100644 --- a/frontend/app/components/wp-relations/wp-relations-hierarchy/wp-relations-hierarchy.directive.ts +++ b/frontend/app/components/wp-relations/wp-relations-hierarchy/wp-relations-hierarchy.directive.ts @@ -40,6 +40,12 @@ export class WorkPackageRelationsHierarchyController { public canModifyHierarchy = !!this.workPackage.changeParent; public canAddRelation = !!this.workPackage.addRelation; + public childrenQueryProps = { + filters: JSON.stringify([{ parent: { operator: '=', values: [this.workPackage.id] } }]), + 'columns[]': ['id', 'type', 'subject'], + showHierarchies: false + }; + constructor(protected $scope:ng.IScope, protected $rootScope:ng.IRootScopeService, protected $q:ng.IQService, diff --git a/frontend/app/components/wp-relations/wp-relations-hierarchy/wp-relations-hierarchy.template.html b/frontend/app/components/wp-relations/wp-relations-hierarchy/wp-relations-hierarchy.template.html index 9c67249c35..64f06aa04b 100644 --- a/frontend/app/components/wp-relations/wp-relations-hierarchy/wp-relations-hierarchy.template.html +++ b/frontend/app/components/wp-relations/wp-relations-hierarchy/wp-relations-hierarchy.template.html @@ -21,8 +21,7 @@ -