From 23af946b588953a988e23b52d0668abae539f401 Mon Sep 17 00:00:00 2001 From: xarmian Date: Tue, 7 Apr 2026 19:26:59 +0000 Subject: [PATCH] fix: make item ref parsing case-insensitive (BUG-22) Uppercase the input in parseItemRef() so "task-5", "Task-5", and "TASK-5" all resolve correctly. Fixes CLI lookups, API resolution, and search matching for item references. --- internal/store/items.go | 2 ++ 1 file changed, 2 insertions(+) diff --git a/internal/store/items.go b/internal/store/items.go index 4f1fbe3c..06471315 100644 --- a/internal/store/items.go +++ b/internal/store/items.go @@ -290,7 +290,9 @@ func (s *Store) ResolveItemIncludeDeleted(workspaceID, slugOrRef string) (*model // parseItemRef parses "PREFIX-123" into ("PREFIX", 123, true). // Returns false if the string is not a valid item ref. +// Case-insensitive: "task-5", "Task-5", and "TASK-5" all parse to ("TASK", 5, true). func parseItemRef(s string) (string, int, bool) { + s = strings.ToUpper(s) idx := strings.LastIndex(s, "-") if idx <= 0 || idx == len(s)-1 { return "", 0, false