fix(db): auto-unassign done tickets on sprint close
sprint stop now clears assigned_to on all done tickets in the closing sprint. Agents don't clean up after themselves — this was causing 5 bookkeeping warnings every sprint. Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
This commit is contained in:
@@ -369,6 +369,16 @@ def cmd_stop(args):
|
||||
done = done + auto_closed
|
||||
incomplete = [t for t in incomplete if t["status"] not in picked_up_statuses]
|
||||
|
||||
# Unassign all done tickets in this sprint (agents don't clean up after themselves)
|
||||
conn = get_connection(load_config())
|
||||
conn.execute(
|
||||
"UPDATE tickets SET assigned_to=NULL WHERE sprint_id=? AND status='done' AND assigned_to IS NOT NULL",
|
||||
(sprint["id"],)
|
||||
)
|
||||
unassigned = conn.total_changes
|
||||
conn.commit()
|
||||
conn.close()
|
||||
|
||||
# Complete the sprint
|
||||
conn = get_connection(load_config())
|
||||
conn.execute(
|
||||
|
||||
Reference in New Issue
Block a user