Skip to content

Commit

Permalink
fix: project issue search endpoint (#729)
Browse files Browse the repository at this point in the history
  • Loading branch information
pablohashescobar committed Apr 6, 2023
1 parent 687b05d commit 6be7754
Showing 1 changed file with 6 additions and 3 deletions.
9 changes: 6 additions & 3 deletions apiserver/plane/api/views/search.py
Original file line number Diff line number Diff line change
Expand Up @@ -217,9 +217,12 @@ def get(self, request, slug, project_id):
project__project_projectmember__member=self.request.user,
)

if parent == "true":
issues = issues.filter(parent__isnull=True)
if blocker_blocked_by and issue_id:
if parent == "true" and issue_id:
issue = Issue.objects.get(pk=issue_id)
issues = issues.filter(
~Q(pk=issue_id), ~Q(pk=issue.parent_id), parent__isnull=True
)
if blocker_blocked_by == "true" and issue_id:
issues = issues.filter(blocker_issues=issue_id, blocked_issues=issue_id)

return Response(
Expand Down

0 comments on commit 6be7754

Please sign in to comment.