From 20f61baf03c1e1264b94a430a64442338fcc02f2 Mon Sep 17 00:00:00 2001 From: kolaente Date: Tue, 29 Aug 2023 12:45:05 +0200 Subject: [PATCH] fix(quick actions): search for tasks within a project when specifying a project with quick add magic --- src/components/quick-actions/quick-actions.vue | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/src/components/quick-actions/quick-actions.vue b/src/components/quick-actions/quick-actions.vue index 8a948767ca..18b24963e7 100644 --- a/src/components/quick-actions/quick-actions.vue +++ b/src/components/quick-actions/quick-actions.vue @@ -149,12 +149,12 @@ function closeQuickActions() { const foundProjects = computed(() => { const {project, text, labels, assignees} = parsedQuery.value - + if (project !== null) { return projectStore.searchProject(project ?? text) .filter(p => Boolean(p)) } - + if (labels.length > 0 || assignees.length > 0) { return [] } @@ -352,7 +352,8 @@ function filtersToParams(filters: Filter[]) { function searchTasks() { if ( searchMode.value !== SEARCH_MODE.ALL && - searchMode.value !== SEARCH_MODE.TASKS + searchMode.value !== SEARCH_MODE.TASKS && + searchMode.value !== SEARCH_MODE.PROJECTS ) { foundTasks.value = [] return @@ -386,6 +387,7 @@ function searchTasks() { if (projectName !== null) { const project = projectStore.findProjectByExactname(projectName) + console.log({project}) if (project !== null) { addFilter('project_id', project.id, 'equals') }