Skip to content

Add Event Archivation Functionality #27

@ivanskv2000

Description

@ivanskv2000

Goal:
Introduce soft archiving for events — to allow hiding outdated or deprecated events without deleting them permanently.

Behavior

  • Each event has an is_archived: boolean flag
  • Archived events:
    • Are excluded by default from all API endpoints (unless explicitly requested)
    • Can be restored (unarchived) later
    • Are displayed in a visually distinct way in the UI
    • Cannot be edited unless unarchived

Backend Tasks

  • Add is_archived field (default false) to Event model
  • Update all event-related endpoints to exclude archived events by default:
    • GET /events
    • Forbid updating archived events on PUT /events
    • Forbid adding an archived event on POST /events
  • Add query parameter include_archived=true to GET /events
  • Add endpoint(s) for:
    • POST /events/{id}/archive
    • POST /events/{id}/unarchive

Frontend Tasks

  • Add “Archive” button in event detail view (same style as Delete, with confirmation modal)
  • Add “Unarchive” button for archived event cards
  • Show “archived” label/badge on archived events
  • Disable editing of archived events
  • Add toggle or filter in event list: All | Active | Archived (TBC)
  • Optional: dim or gray out archived events in the list (if shown)

Notes

  • Archiving should be soft: no data is lost
  • This feature helps preserve historical context without cluttering the UI or analytics

Metadata

Metadata

Assignees

Labels

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions