mirror of
https://github.com/hcengineering/platform.git
synced 2025-04-13 03:40:48 +00:00
UBERF-4560: filter out spaces that are archived for kanban (#4147)
Signed-off-by: Vyacheslav Tumanov <me@slavatumanov.me>
This commit is contained in:
parent
7b5fdb67c2
commit
8db7bc4475
@ -87,7 +87,9 @@
|
||||
resultQuery = mergeQueries(p, query)
|
||||
})
|
||||
|
||||
$: queryNoLookup = getCategoryQueryNoLookup(resultQuery)
|
||||
$: queryNoLookup = getCategoryQueryNoLookup(
|
||||
mergeQueries(resultQuery, activeSpaces.length > 0 ? { space: { $in: activeSpaces } } : {})
|
||||
)
|
||||
const lookup: Lookup<Task> = {
|
||||
...(options?.lookup ?? {}),
|
||||
space: task.class.Project,
|
||||
@ -119,9 +121,10 @@
|
||||
|
||||
let fastDocs: DocWithRank[] = []
|
||||
let slowDocs: DocWithRank[] = []
|
||||
|
||||
let activeSpaces: Ref<Project>[] = []
|
||||
const docsQuery = createQuery()
|
||||
const docsQuerySlow = createQuery()
|
||||
const activeSpaceQuery = createQuery()
|
||||
|
||||
let fastQueryIds = new Set<Ref<DocWithRank>>()
|
||||
|
||||
@ -136,7 +139,16 @@
|
||||
...getCategoryQueryProjection(client.getHierarchy(), _class, queryNoLookup, viewOptions.groupBy)
|
||||
}
|
||||
}
|
||||
|
||||
$: activeSpaceQuery.query(
|
||||
task.class.Project,
|
||||
{
|
||||
archived: false
|
||||
},
|
||||
(res) => {
|
||||
activeSpaces = res.map((r: Project) => r._id)
|
||||
},
|
||||
{ projection: { _id: 1 } }
|
||||
)
|
||||
$: docsQuery.query(
|
||||
_class,
|
||||
queryNoLookup,
|
||||
|
Loading…
Reference in New Issue
Block a user