mirror of
https://github.com/makeplane/plane.git
synced 2026-07-13 22:09:12 +02:00
[WEB-4557] fix: remove intake work item from work item search (#3733)
This commit is contained in:
committed by
GitHub
parent
1e6640cb4b
commit
52ccc99067
@@ -13,6 +13,7 @@ from rest_framework.request import Request
|
||||
from .base import BaseAPIView
|
||||
from plane.db.models import Issue, ProjectMember, IssueRelation
|
||||
from plane.utils.issue_search import search_issues
|
||||
from plane.db.models.intake import IntakeIssueStatus
|
||||
|
||||
|
||||
class IssueSearchEndpoint(BaseAPIView):
|
||||
@@ -143,6 +144,16 @@ class IssueSearchEndpoint(BaseAPIView):
|
||||
project__archived_at__isnull=True,
|
||||
project__deleted_at__isnull=True,
|
||||
)
|
||||
.filter(
|
||||
Q(issue_intake__isnull=True)
|
||||
| Q(
|
||||
issue_intake__status__in=[
|
||||
IntakeIssueStatus.ACCEPTED.value,
|
||||
IntakeIssueStatus.REJECTED.value,
|
||||
IntakeIssueStatus.DUPLICATE.value,
|
||||
]
|
||||
)
|
||||
)
|
||||
.filter(deleted_at__isnull=True)
|
||||
.filter(state__is_triage=False)
|
||||
.exclude(archived_at__isnull=False)
|
||||
|
||||
@@ -44,15 +44,6 @@ class IntakeIssueStatus(models.IntegerChoices):
|
||||
ACCEPTED = 1
|
||||
DUPLICATE = 2
|
||||
|
||||
|
||||
class IntakeIssueStatus(models.IntegerChoices):
|
||||
PENDING = -2
|
||||
REJECTED = -1
|
||||
SNOOZED = 0
|
||||
ACCEPTED = 1
|
||||
DUPLICATE = 2
|
||||
|
||||
|
||||
class IntakeIssue(ProjectBaseModel):
|
||||
intake = models.ForeignKey(
|
||||
"db.Intake", related_name="issue_intake", on_delete=models.CASCADE
|
||||
|
||||
Reference in New Issue
Block a user