mirror of
https://github.com/MODSetter/SurfSense.git
synced 2026-06-26 21:39:43 +02:00
refactor: deduplicate issue type names in JiraToolMetadataService
This commit is contained in:
parent
d9eb080d53
commit
68f1a7c5ce
1 changed files with 9 additions and 5 deletions
|
|
@ -149,11 +149,15 @@ class JiraToolMetadataService:
|
||||||
for p in raw_projects
|
for p in raw_projects
|
||||||
]
|
]
|
||||||
raw_types = await asyncio.to_thread(jira_client.get_issue_types)
|
raw_types = await asyncio.to_thread(jira_client.get_issue_types)
|
||||||
issue_types = [
|
seen_type_names: set[str] = set()
|
||||||
{"id": t.get("id"), "name": t.get("name")}
|
issue_types = []
|
||||||
for t in raw_types
|
for t in raw_types:
|
||||||
if not t.get("subtask", False)
|
if t.get("subtask", False):
|
||||||
]
|
continue
|
||||||
|
name = t.get("name")
|
||||||
|
if name not in seen_type_names:
|
||||||
|
seen_type_names.add(name)
|
||||||
|
issue_types.append({"id": t.get("id"), "name": name})
|
||||||
raw_priorities = await asyncio.to_thread(jira_client.get_priorities)
|
raw_priorities = await asyncio.to_thread(jira_client.get_priorities)
|
||||||
priorities = [
|
priorities = [
|
||||||
{"id": p.get("id"), "name": p.get("name")}
|
{"id": p.get("id"), "name": p.get("name")}
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue