feat(tasks): allow filtering for reminders, assignees and labels with Typesense

This commit is contained in:
kolaente 2023-08-29 10:52:25 +02:00
parent 748651447a
commit d0e3062bee
Signed by untrusted user: konrad
GPG Key ID: F40E70337AB24C9B
1 changed files with 15 additions and 0 deletions

View File

@ -286,6 +286,21 @@ func (t *typesenseTaskSearcher) Search(opts *taskSearchOptions) (tasks []*Task,
for _, f := range opts.filters {
if f.field == "reminders" {
f.field = "reminders.reminder"
continue
}
if f.field == "assignees" {
f.field = "assignees.username"
continue
}
if f.field == "labels" || f.field == "label_id" {
f.field = "labels.id"
continue
}
filter := f.field
switch f.comparator {