From f0f6b68526cbcc48fed8f4fbd722dfd4ba5680c3 Mon Sep 17 00:00:00 2001 From: Jan Date: Mon, 12 Feb 2024 18:39:32 +0100 Subject: [PATCH] hotfix: task source optional (#34) Co-authored-by: Jan --- src/components/TaskSearcher.js | 14 ++++++++------ 1 file changed, 8 insertions(+), 6 deletions(-) diff --git a/src/components/TaskSearcher.js b/src/components/TaskSearcher.js index 41c9dee..b9476a1 100644 --- a/src/components/TaskSearcher.js +++ b/src/components/TaskSearcher.js @@ -17,7 +17,7 @@ import { fetchTasks } from '../actions'; import trimBusinessEvent from '../utils/trimBusinessEvent'; function TaskSearcher({ - rights, contribution, entityId, + rights, contribution, entityId, showFilters = true, }) { const history = useHistory(); const modulesManager = useModulesManager(); @@ -94,12 +94,14 @@ function TaskSearcher({ value: false, filter: 'isDeleted: false', }, - source: { + }; + if (contribution?.taskSource) { + filters.source = { value: contribution.taskSource, filter: `source: "${contribution.taskSource}"`, - }, - }; - if (entityId !== null && entityId !== undefined) { + }; + } + if (entityId) { filters.entityId = { value: entityId, filter: `entityId: "${entityId}"`, @@ -120,7 +122,7 @@ function TaskSearcher({ return (