forked from github/plane
chore: sequence id search in the issue search (#3807)
This commit is contained in:
parent
58e0170cac
commit
aba170dbde
@ -9,11 +9,11 @@ from plane.db.models import Issue
|
|||||||
|
|
||||||
|
|
||||||
def search_issues(query, queryset):
|
def search_issues(query, queryset):
|
||||||
fields = ["name", "sequence_id"]
|
fields = ["name", "sequence_id", "project__identifier"]
|
||||||
q = Q()
|
q = Q()
|
||||||
for field in fields:
|
for field in fields:
|
||||||
if field == "sequence_id" and len(query) <= 20:
|
if field == "sequence_id" and len(query) <= 20:
|
||||||
sequences = re.findall(r"[A-Za-z0-9]{1,12}-\d+", query)
|
sequences = re.findall(r"\b\d+\b", query)
|
||||||
for sequence_id in sequences:
|
for sequence_id in sequences:
|
||||||
q |= Q(**{"sequence_id": sequence_id})
|
q |= Q(**{"sequence_id": sequence_id})
|
||||||
else:
|
else:
|
||||||
|
Loading…
Reference in New Issue
Block a user