diff --git a/internal/api/api.go b/internal/api/api.go index 94c46d1..ca86a91 100644 --- a/internal/api/api.go +++ b/internal/api/api.go @@ -50,6 +50,7 @@ type Ticket struct { FlagError *string `json:"flag_error"` StartedAt *string `json:"started_at"` // first move into In Progress; drives the timebox countdown (TL-506) DoneAt *string `json:"done_at"` + CreatedAt string `json:"created_at"` // shown on the ticket (TL-887) UpdatedAt string `json:"updated_at"` // an edit draft checks it before resending (TL-599) // where it sits in the tree (TL-514): the ticket it's a sub-ticket of, its own sub-tickets, and // an epic's progress over them; only the single-ticket endpoint fills these diff --git a/internal/i18n/de.go b/internal/i18n/de.go index 33d0249..46e820b 100644 --- a/internal/i18n/de.go +++ b/internal/i18n/de.go @@ -2,6 +2,7 @@ package i18n // de is German: English text → its translation. A missing entry shows the English (i18n_test finds it). var de = map[string]string{ + "created %s": "erstellt %s", // TL-887 // notifications (TL-886) "Notifications": "Benachrichtigungen", "N %d unread": "N %d ungelesen", diff --git a/internal/i18n/es.go b/internal/i18n/es.go index 48810d2..f7c0822 100644 --- a/internal/i18n/es.go +++ b/internal/i18n/es.go @@ -2,6 +2,7 @@ package i18n // es is Spanish: English text → its translation. A missing entry shows the English (i18n_test finds it). var es = map[string]string{ + "created %s": "creado %s", // TL-887 // notifications (TL-886) "Notifications": "Notificaciones", "N %d unread": "N %d sin leer", diff --git a/internal/i18n/fr.go b/internal/i18n/fr.go index 396491a..988a03d 100644 --- a/internal/i18n/fr.go +++ b/internal/i18n/fr.go @@ -2,6 +2,7 @@ package i18n // fr is French: English text → its translation. A missing entry shows the English (i18n_test finds it). var fr = map[string]string{ + "created %s": "créé %s", // TL-887 // notifications (TL-886) "Notifications": "Notifications", "N %d unread": "N %d non lues", diff --git a/internal/i18n/nl.go b/internal/i18n/nl.go index 977685e..0eb408f 100644 --- a/internal/i18n/nl.go +++ b/internal/i18n/nl.go @@ -2,6 +2,7 @@ package i18n // nl is Dutch: English text → Nederlands. A missing entry shows the English (i18n_test finds it). var nl = map[string]string{ + "created %s": "aangemaakt %s", // TL-887 // notifications (TL-886) "Notifications": "Meldingen", "N %d unread": "N %d ongelezen", diff --git a/internal/i18n/pt.go b/internal/i18n/pt.go index ef7bb81..c57e025 100644 --- a/internal/i18n/pt.go +++ b/internal/i18n/pt.go @@ -2,6 +2,7 @@ package i18n // pt is Brazilian Portuguese: English text → its translation. A missing entry shows the English (i18n_test finds it). var pt = map[string]string{ + "created %s": "criado %s", // TL-887 // notifications (TL-886) "Notifications": "Notificações", "N %d unread": "N %d não lidas", diff --git a/internal/i18n/tlh.go b/internal/i18n/tlh.go index 6735ef9..cbbaeb8 100644 --- a/internal/i18n/tlh.go +++ b/internal/i18n/tlh.go @@ -2,6 +2,7 @@ package i18n // tlh is Klingon, for fun: English text → its translation. A missing entry shows the English (i18n_test finds it). var tlh = map[string]string{ + "created %s": "%s chenmoHlu’", // TL-887 // notifications (TL-886) "Notifications": "De’ chu’mey", "N %d unread": "N %d De’ chu’ laDbe’lu’", diff --git a/internal/ui/app_test.go b/internal/ui/app_test.go index c350caf..e1b5a5b 100644 --- a/internal/ui/app_test.go +++ b/internal/ui/app_test.go @@ -54,7 +54,8 @@ func fakeAPI(t *testing.T) (*Client, *[]string) { return map[string]any{"id": "t2", "key": "TL-2", "title": "Idea", "project_id": "p1"} } return map[string]any{"id": "t1", "key": "TL-1", "title": "Fix login", "description": "Login fails", "type": "bug", "priority": "urgent", "estimate": "3", - "project_id": "p1", "board_id": "b1", "board_name": "Web", "column_id": "c1", "column_name": "To do", "updated_at": ticketUpdated, "due_date": ticketDue} + "project_id": "p1", "board_id": "b1", "board_name": "Web", "column_id": "c1", "column_name": "To do", "updated_at": ticketUpdated, "due_date": ticketDue, + "created_at": "2026-10-20T09:30:00Z"} } board := map[string]any{"id": "b1", "name": "Web", "project_id": "p1", "style": "sprints", "estimate_scale": "fibonacci", "columns": []map[string]any{ {"id": "c1", "name": "To do", "tickets": []any{ticket("t1")}}, @@ -1761,3 +1762,10 @@ func TestByPriority(t *testing.T) { t.Fatalf("s again: %q %v", v.sort, v.items) } } + +// A ticket says when it was created, in local time (TL-887). +func TestTicketShowsWhenItWasCreated(t *testing.T) { + a, _ := start(t) + press(a, "t", "TL-1", "enter") + expect(t, a, "Fix login", "created "+when("2026-10-20T09:30:00Z")) +} diff --git a/internal/ui/views.go b/internal/ui/views.go index 7d8883d..d67b2b1 100644 --- a/internal/ui/views.go +++ b/internal/ui/views.go @@ -1098,6 +1098,9 @@ func (v *ticketView) detail(a *app) string { if t.Done { meta = append(meta, ok.Render(T("done"))) } + if t.CreatedAt != "" { + meta = append(meta, F("created %s", when(t.CreatedAt))) // local time (TL-887) + } b.WriteString(muted.Render(strings.Join(meta, " · ")) + "\n") if line := flagLine(t, v.flag); line != "" { b.WriteString(line + "\n")