From 2de60ee9df5b7a1d976e1b6463657833c6f0c2b8 Mon Sep 17 00:00:00 2001 From: Jens Ulferts Date: Thu, 3 Mar 2016 16:25:30 +0100 Subject: [PATCH] correclty call v3 with filters and sortBy --- .../api-work-packages/api-work-packages.service.ts | 11 +++++++++-- 1 file changed, 9 insertions(+), 2 deletions(-) diff --git a/frontend/app/components/api/api-work-packages/api-work-packages.service.ts b/frontend/app/components/api/api-work-packages/api-work-packages.service.ts index 6f3acc9478..ca4caaca39 100644 --- a/frontend/app/components/api/api-work-packages/api-work-packages.service.ts +++ b/frontend/app/components/api/api-work-packages/api-work-packages.service.ts @@ -49,11 +49,18 @@ export class ApiWorkPackagesService { } protected queryAsV3Params(offset:number, pageSize:number, query:api.ex.Query) { + + const v3Filters = _.map(query.filters, (filter) => { + const newFilter = {}; + newFilter[filter.name] = {operator: filter.operator, values: filter.values}; + return newFilter; + }); + const params = { offset: offset, pageSize: pageSize, - filters: [query.filters], - sortBy: query.sort_criteria, + filters: [v3Filters], + sortBy: [query.sort_criteria], }; if (query.group_by) {