EF UserTasks safe search: title/summary/reference/taskType still collation-cased (Tags fixed in #8111)
Author: sfmskywalkerCreated Sep 15, 2026Updated Sep 15, 2026
Labelsbugpersistenceprio lowelsa 3testtriaged
Problem
After #8111 / PR #8146, EF tag search is explicitly case-insensitive (Tags.Any(t => t.ToLower().Contains(tag))) to match InMemory/VNext. Title, summary, reference, and task type still use raw Contains(value), which follows the database collation.
InMemory and VNext use StringComparison.OrdinalIgnoreCase for every safe-search field. On case-sensitive providers (notably PostgreSQL default), search=approve can miss title Approve invoice on EF while matching on InMemory/VNext — portable worklist search is not equivalent.
Evidence
- Contract / FR-032: safe search over title, summary, reference, tags, task type (case-insensitive in reference InMemory)
- InMemory:
InMemoryUserTaskRepository.MatchesSearch— all fieldsOrdinalIgnoreCase - VNext:
VNextUserTaskRepository.Matches— same ignore-case for those fields + tags - EF:
EFCoreUserTaskRepository.ApplySafeSearch— Tags useToLower(); Title/Summary/Reference/TaskType useContains(value)only - Conformance
SafeSearchByTagReturnsOnlyTheMatchingTaskasserts tag case fold (PRIORITY-ESCALATION) but does not assert title/summary case fold - Note: REST already documents that title sort/cursors are collation-nonportable; that does not excuse search semantic drift
Proposal
- Make EF title/summary/reference/taskType search case-insensitive in a provider-portable way (same spirit as the Tags
ToLowerpath — e.g. compare lowercased columns/expressions, or EF.Functions.ILike where already used elsewhere in the repo). Prefer the smallest change that matches InMemory/VNext substring semantics. - Extend conformance: title
Approve invoice,search=approveandsearch=APPROVEboth return the task on InMemory, Sqlite EF, and VNext (and keep existing tag cases).
Notes for triage
Milestone left unset for Elsa 3 Issue Triage / Elsa 3 Crew Lead. Soft proposal: 3.9 Backlog — Triage/Crew Lead decide (leftover from #8111 Tags fix; not a re-file of Tags omission).
Source: elsa-workflows/elsa-core