Merge pull request #812 from makeplane/fix/parent_issue_search

fix: parent issue search
This commit is contained in:
Vamsi Kurama 2023-04-14 16:55:20 +05:30 committed by GitHub
commit bc7fab96c3
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -221,6 +221,10 @@ class IssueSearchEndpoint(BaseAPIView):
issue = Issue.objects.get(pk=issue_id)
issues = issues.filter(
~Q(pk=issue_id), ~Q(pk=issue.parent_id), parent__isnull=True
).exclude(
pk__in=Issue.objects.filter(parent__isnull=False).values_list(
"parent_id", flat=True
)
)
if blocker_blocked_by == "true" and issue_id:
issues = issues.filter(blocker_issues=issue_id, blocked_issues=issue_id)