From 764bc15d49bef7ad938c8a3c8e2d2dd4b4760376 Mon Sep 17 00:00:00 2001 From: kolaente Date: Tue, 21 Nov 2023 18:35:33 +0100 Subject: [PATCH] fix(filter): allow filtering for "project" --- pkg/models/task_collection_filter.go | 3 +++ 1 file changed, 3 insertions(+) diff --git a/pkg/models/task_collection_filter.go b/pkg/models/task_collection_filter.go index 6eabd3fee..d285c60e2 100644 --- a/pkg/models/task_collection_filter.go +++ b/pkg/models/task_collection_filter.go @@ -147,6 +147,9 @@ func getTaskFiltersByCollections(c *TaskCollection) (filters []*taskFilter, err // Cast the field value to its native type var reflectValue *reflect.StructField + if filter.field == "project" { + filter.field = "project_id" + } reflectValue, filter.value, err = getNativeValueForTaskField(filter.field, filter.comparator, value) if err != nil { return nil, ErrInvalidTaskFilterValue{