mirror of
https://github.com/MODSetter/SurfSense.git
synced 2026-04-25 00:36:31 +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
|
||||
]
|
||||
raw_types = await asyncio.to_thread(jira_client.get_issue_types)
|
||||
issue_types = [
|
||||
{"id": t.get("id"), "name": t.get("name")}
|
||||
for t in raw_types
|
||||
if not t.get("subtask", False)
|
||||
]
|
||||
seen_type_names: set[str] = set()
|
||||
issue_types = []
|
||||
for t in raw_types:
|
||||
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)
|
||||
priorities = [
|
||||
{"id": p.get("id"), "name": p.get("name")}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue