chore: filter out the removed cycle from issue detail (#6138)
This commit is contained in:
parent
fe43300aa7
commit
b6ab853c57
1 changed files with 4 additions and 6 deletions
|
|
@ -445,12 +445,10 @@ class IssueViewSet(BaseViewSet):
|
||||||
.select_related("workspace", "project", "state", "parent")
|
.select_related("workspace", "project", "state", "parent")
|
||||||
.prefetch_related("assignees", "labels", "issue_module__module")
|
.prefetch_related("assignees", "labels", "issue_module__module")
|
||||||
.annotate(
|
.annotate(
|
||||||
cycle_id=Case(
|
cycle_id=Subquery(
|
||||||
When(
|
CycleIssue.objects.filter(issue=OuterRef("id")).values("cycle_id")[
|
||||||
issue_cycle__cycle__deleted_at__isnull=True,
|
:1
|
||||||
then=F("issue_cycle__cycle_id"),
|
]
|
||||||
),
|
|
||||||
default=None,
|
|
||||||
)
|
)
|
||||||
)
|
)
|
||||||
.annotate(
|
.annotate(
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue