LØRDAG
2026-12-05

Too many projects, too many ideas, too few hours — one learning a day anyway

A name is not a key

What I found. A task got assigned to a member who had already left the club, and nobody was told. Two active members shared a name.

The lookup behind every assignment matched on id or name, fetched a single row, with no ordering and no filter for active membership. The app sends the name and draws the name back, so the database’s own row order had the last word and no human could see which of the two had been picked. When the winning row belonged to a former member, the notification query — which does filter on active — found nobody to notify. The task had an owner, and no one had the task.

Now: id first, otherwise the name among active members only. Two matches is a refusal, not a guess.