kolaente and kolaente
a61e594952
fix(tasks): prevent duplicate task_positions rows and stale identifiers
...
A task could end up with more than one task_positions row for the same
(task_id, project_view_id): rapid/concurrent creation raced the
check-then-insert paths, and the create path could insert a position that
a triggered RecalculateTaskPositions had already persisted for the new
task. The table had no unique constraint, so the duplicates were stored
silently (#2844 ).
In the table view this made the LEFT JOIN on task_positions emit the task
twice; getTasksForProjects enriched only the map entry, so the duplicate
slice row kept an empty identifier and rendered as "#N" instead of
"PREFIX-N" (#2725 ).
- Add a unique index on task_positions(task_id, project_view_id) via a
dedup migration (mirrors the task_buckets fix in 20250624092830) plus the
unique(task_view) struct tag so fresh installs get it too.
- Harden the create path: only queue a position insert when one does not
already exist for the task+view, and dedupe within the batch.
- Dedupe the task slice returned by getTasksForProjects by id, returning
the enriched entry, so duplicate position rows can never surface a task
twice or with a missing identifier.
Fixes #2844
Fixes #2725
2026-06-17 21:16:41 +00:00
..
2025-06-10 12:18:38 +02:00
2025-06-10 12:18:38 +02:00
2025-06-10 12:18:38 +02:00
2025-06-10 12:18:38 +02:00
2025-06-10 12:18:38 +02:00
2025-06-10 12:18:38 +02:00
2025-06-10 12:18:38 +02:00
2025-08-13 11:05:05 +02:00
2025-06-10 12:18:38 +02:00
2025-06-10 12:18:38 +02:00
2025-06-10 12:18:38 +02:00
2025-06-10 12:18:38 +02:00
2025-06-10 12:18:38 +02:00
2025-06-10 12:18:38 +02:00
2025-06-10 12:18:38 +02:00
2025-06-10 12:18:38 +02:00
2025-06-10 12:18:38 +02:00
2025-06-10 12:18:38 +02:00
2025-06-10 12:18:38 +02:00
2025-06-10 12:18:38 +02:00
2025-06-10 12:18:38 +02:00
2025-06-10 12:18:38 +02:00
2025-06-10 12:18:38 +02:00
2025-06-10 12:18:38 +02:00
2025-06-10 12:18:38 +02:00
2025-06-10 12:18:38 +02:00
2025-06-10 12:18:38 +02:00
2025-06-10 12:18:38 +02:00
2025-06-10 12:18:38 +02:00
2025-06-10 12:18:38 +02:00
2025-06-10 12:18:38 +02:00
2025-06-10 12:18:38 +02:00
2025-06-10 12:18:38 +02:00
2025-06-10 12:18:38 +02:00
2025-06-10 12:18:38 +02:00
2025-06-10 12:18:38 +02:00
2025-06-10 12:18:38 +02:00
2025-06-10 12:18:38 +02:00
2025-06-10 12:18:38 +02:00
2025-06-10 12:18:38 +02:00
2025-06-10 12:18:38 +02:00
2025-06-10 12:18:38 +02:00
2025-06-10 12:18:38 +02:00
2025-06-10 12:18:38 +02:00
2025-06-10 12:18:38 +02:00
2025-06-10 12:18:38 +02:00
2025-06-10 12:18:38 +02:00
2025-06-10 12:18:38 +02:00
2025-06-10 12:18:38 +02:00
2025-06-10 12:18:38 +02:00
2025-06-10 12:18:38 +02:00
2025-06-10 12:18:38 +02:00
2025-06-10 12:18:38 +02:00
2025-06-10 12:18:38 +02:00
2025-06-10 12:18:38 +02:00
2025-06-10 12:18:38 +02:00
2025-06-10 12:18:38 +02:00
2025-06-10 12:18:38 +02:00
2025-06-10 12:18:38 +02:00
2025-06-10 12:18:38 +02:00
2025-06-10 12:18:38 +02:00
2025-06-10 12:18:38 +02:00
2025-06-10 12:18:38 +02:00
2025-06-10 12:18:38 +02:00
2025-06-10 12:18:38 +02:00
2025-06-10 12:18:38 +02:00
2025-06-10 12:18:38 +02:00
2025-06-10 12:18:38 +02:00
2025-06-10 12:18:38 +02:00
2025-06-10 12:18:38 +02:00
2025-06-10 12:18:38 +02:00
2025-06-10 12:18:38 +02:00
2025-06-10 12:18:38 +02:00
2025-06-10 12:18:38 +02:00
2025-06-10 12:18:38 +02:00
2025-06-10 12:18:38 +02:00
2025-06-10 12:18:38 +02:00
2025-06-10 12:18:38 +02:00
2025-06-10 12:18:38 +02:00
2025-06-10 12:18:38 +02:00
2025-06-10 12:18:38 +02:00
2025-06-10 12:18:38 +02:00
2025-06-10 12:18:38 +02:00
2025-06-10 12:18:38 +02:00
2025-06-10 12:18:38 +02:00
2025-06-10 12:18:38 +02:00
2025-06-10 12:18:38 +02:00
2025-06-10 12:18:38 +02:00
2025-06-10 12:18:38 +02:00
2025-06-10 12:18:38 +02:00
2025-06-10 12:18:38 +02:00
2025-06-10 12:18:38 +02:00
2025-06-10 12:18:38 +02:00
2025-06-10 12:18:38 +02:00
2025-06-10 12:18:38 +02:00
2025-06-10 12:18:38 +02:00
2025-06-10 12:18:38 +02:00
2025-06-10 12:18:38 +02:00
2025-06-10 12:18:38 +02:00
2025-06-10 12:18:38 +02:00
2025-06-10 12:18:38 +02:00
2025-06-10 12:18:38 +02:00
2026-02-24 14:29:49 +01:00
2025-06-10 12:18:38 +02:00
2025-08-03 13:25:32 +02:00
2025-06-25 11:12:24 +02:00
2025-08-13 11:05:05 +02:00
2026-01-05 22:30:10 +01:00
2025-11-28 15:57:54 +00:00
2025-11-27 15:14:42 +01:00
2026-02-24 14:29:49 +01:00
2026-02-25 10:30:25 +01:00
2026-02-24 14:29:49 +01:00
2026-02-24 14:29:49 +01:00
2026-03-23 16:45:50 +00:00
2026-02-25 12:15:28 +01:00
2026-03-27 23:05:04 +00:00
2026-04-15 10:32:37 +00:00
2026-05-01 14:44:10 +00:00
2026-04-11 20:44:28 +00:00
2026-04-20 18:55:06 +00:00
2026-05-19 10:35:43 +02:00
2026-06-08 13:54:09 +00:00
2026-06-17 21:16:41 +00:00
2026-04-15 10:32:37 +00:00