Tinker
Resources
Agent logs
Agent memories
Agent sessions
Agent terminal logs
Agents
Comments
Epics
Projects
Proposals
Tickets
Avo user
Resources
Agent logs
Agent memories
Agent sessions
Agent terminal logs
Agents
Comments
Epics
Projects
Proposals
Tickets
Avo user
Home
Epics
Implement ticket archival system with cascade and auto-archive
Edit
Implement ticket archival system with cascade and auto-archive
Cancel
Save
Title
*
Project
*
Choose an option
alpha
tinker
Create new project
Description
Add ticket archiving functionality to hide completed work from main views while preserving historical data. ## Requirements ### 1. Archive Behavior - **Manual**: Users can explicitly archive tickets with `done` or `cancelled` status - **Auto-archive**: Tickets with `cancelled` status are automatically archived - Only `done` and `cancelled` statuses can be archived (all others should reject archive attempts) ### 2. Cascading Archive Logic - When an **epic is archived**: ALL its subtasks are also archived - When a **subtask is archived**: Check if all siblings are archived → if yes, also archive the parent epic - **Vice-versa**: When an epic is unarchived, optionally unarchive subtasks (user choice) ### 3. Database Schema Add dedicated columns (following pattern different from projects which use JSONB): - `archived` boolean (default: false, indexed) - `archived_at` timestamp (nullable) ### 4. Model Changes (Ticket) - Add `archived?`, `archive!`, `unarchive!` methods - Add `active` scope (excluding archived) - Add validation: only `done` or `cancelled` tickets can be archived - Add `before_update` callback to auto-archive `cancelled` tickets - Add cascade logic for epic/subtask relationships ### 5. MCP Tools Add to `/rails/agent-bridge.go`: - `archive_ticket(ticket_id)` - archive a single ticket - `archive_tickets(ticket_ids: array)` - archive multiple tickets at once - `list_archived_tickets(filters?)` - list only archived tickets (same filters as list_tickets) - `unarchive_ticket(ticket_id)` - unarchive a ticket ### 6. API Changes - Update `/api/v1/tickets` index: add `include_archived` filter (default: false) - Update MCP `handle_list_tickets`: add `include_archived` filter - Update TicketSerializer to expose `archived` and `archived_at` ### 7. UI Changes - **Kanban**: Remove `cancelled` status from the board (they're auto-archived anyway) - **Kanban**: Add "Show Archived" toggle to view archived tickets - **Avo**: Add "Archive" action for tickets with done/cancelled status - **Dashboard counts**: Exclude archived from all ticket counts ### 8. Query Updates Update all ticket listing queries to exclude archived by default: - `ProjectSerializer#open_ticket_count` - `DashboardController#kanban` - `McpController#handle_get_status` - `McpController#handle_list_tickets` - Any scopes that return active tickets ## Acceptance Criteria - [ ] Migration adds `archived` and `archived_at` columns to tickets table - [ ] `cancelled` tickets are automatically archived via callback - [ ] Manual archive rejects non-done/non-cancelled tickets with validation error - [ ] Archiving an epic archives all its subtasks - [ ] Archiving all subtasks of an epic archives the epic - [ ] MCP tools `archive_ticket`, `archive_tickets`, `list_archived_tickets`, `unarchive_ticket` work - [ ] API respects `include_archived` filter parameter - [ ] Kanban board no longer shows `cancelled` column - [ ] Kanban board has "Show Archived" toggle that works - [ ] Avo admin has Archive/Unarchive actions - [ ] All ticket counts/queries exclude archived by default - [ ] Tests cover cascade logic and auto-archive behavior
Avo
· © 2026 AvoHQ ·
v3.27.0
Close modal
Are you sure?
Yes, I'm sure
No, cancel