fix: use UUID as ticket id instead of ticketNumber

ticketNumber (e.g. TK-2026-296691) was being used as id, causing
GET /api/tickets/{id} to 404 on upstream Gongdan API which expects UUID.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
This commit is contained in:
gongzhiyong
2026-04-08 15:33:28 +08:00
co-authored by Claude Opus 4.6
parent 6423750f08
commit 72f581355c
+2 -1
View File
@@ -42,7 +42,8 @@ def _map_priority(raw: str) -> str:
def _transform_ticket(t: dict) -> dict:
"""Transform a Gongdan ticket to the frontend TicketData shape."""
return {
"id": t.get("ticketNumber", t.get("id", "")),
"id": t.get("id", ""),
"ticketNumber": t.get("ticketNumber", ""),
"title": t.get("description", "")[:120] or "No description",
"status": _map_status(t.get("status", "")),
"priority": _map_priority(t.get("priority", "")),