fix(quick actions): search for tasks within a project when specifying a project with quick add magic
This commit is contained in:
parent
4e6b99544e
commit
20f61baf03
@ -149,12 +149,12 @@ function closeQuickActions() {
|
|||||||
|
|
||||||
const foundProjects = computed(() => {
|
const foundProjects = computed(() => {
|
||||||
const {project, text, labels, assignees} = parsedQuery.value
|
const {project, text, labels, assignees} = parsedQuery.value
|
||||||
|
|
||||||
if (project !== null) {
|
if (project !== null) {
|
||||||
return projectStore.searchProject(project ?? text)
|
return projectStore.searchProject(project ?? text)
|
||||||
.filter(p => Boolean(p))
|
.filter(p => Boolean(p))
|
||||||
}
|
}
|
||||||
|
|
||||||
if (labels.length > 0 || assignees.length > 0) {
|
if (labels.length > 0 || assignees.length > 0) {
|
||||||
return []
|
return []
|
||||||
}
|
}
|
||||||
@ -352,7 +352,8 @@ function filtersToParams(filters: Filter[]) {
|
|||||||
function searchTasks() {
|
function searchTasks() {
|
||||||
if (
|
if (
|
||||||
searchMode.value !== SEARCH_MODE.ALL &&
|
searchMode.value !== SEARCH_MODE.ALL &&
|
||||||
searchMode.value !== SEARCH_MODE.TASKS
|
searchMode.value !== SEARCH_MODE.TASKS &&
|
||||||
|
searchMode.value !== SEARCH_MODE.PROJECTS
|
||||||
) {
|
) {
|
||||||
foundTasks.value = []
|
foundTasks.value = []
|
||||||
return
|
return
|
||||||
@ -386,6 +387,7 @@ function searchTasks() {
|
|||||||
|
|
||||||
if (projectName !== null) {
|
if (projectName !== null) {
|
||||||
const project = projectStore.findProjectByExactname(projectName)
|
const project = projectStore.findProjectByExactname(projectName)
|
||||||
|
console.log({project})
|
||||||
if (project !== null) {
|
if (project !== null) {
|
||||||
addFilter('project_id', project.id, 'equals')
|
addFilter('project_id', project.id, 'equals')
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user