Activity Flagging
Feature Detail
Description
This feature allows coordinators and admins to flag individual activity registrations that require follow-up, contain suspicious data, or are under investigation without immediately rejecting them. Flagged activities remain in the system but are visually distinguished and excluded from approved reporting exports until resolved. The flagging mechanism supports duplicate detection as required by NHF, where the same activity could be registered by multiple coordinators across different local associations.
User Flow
Analysis
Flagging provides a non-destructive way to quarantine questionable data without losing it, which is critical when coordinators need to investigate before making a final decision. NHF specifically requires duplicate detection across their 1,400 local associations, where the same peer mentor activity could be submitted by different coordinators. Without a flagging mechanism, coordinators must either approve potentially duplicate entries or reject them outright, both of which carry risk. Flagging also supports audit trail requirements, as investigators can annotate records with reasons and track resolution history, demonstrating due diligence to Bufdir auditors.
Flag state is stored as an enum column on the activities table alongside a nullable flag_reason text field and flagged_by foreign key. The admin portal renders flagged activities with a distinct visual indicator in the activity list and detail views. A dedicated flagged activities filter view allows coordinators to triage outstanding flags efficiently. The duplicate detection logic performs a query on activities sharing the same contact_id, activity_type, and date within a configurable time window, surfacing potential duplicates as suggested flags. Resolving a flag transitions the activity back to pending review, routing it through the standard approval flow.
Components (37)
Shared Components
These components are reused across multiple features
Service Layer (9)
Data Layer (12)
Infrastructure (7)
User Stories
No user stories have been generated for this feature yet.