Detect and Resolve Duplicate Activity Registrations Across Chapters
When a peer mentor belongs to multiple chapters or when coordinators use proxy registration, the same activity can be registered multiple times across chapter boundaries. The hierarchy system must include a duplicate activity detector that cross-references activity records using the cross-chapter activity query component, flags probable duplicates for admin review, and allows the admin to mark one as canonical while suppressing the others. The detection must respect organizational boundaries enforced by RLS policies.
User Story
Acceptance Criteria
- Given activities have been registered across multiple chapters, when the duplicate detector runs, then it surfaces records where the same peer mentor, date, activity type, and approximate duration appear in more than one chapter's activity log
- Given a duplicate set is detected, when I open the duplicate review interface, then I see a side-by-side comparison of the duplicate records including which coordinator submitted each
- Given I review a duplicate pair, when I mark one record as the canonical version, then the other is flagged as a duplicate and excluded from statistics and Bufdir aggregations
- Given a resolution has been applied, when I view statistics for the affected chapter, then the activity count correctly reflects only the canonical record
- Given the duplicate detector has not been run recently, when I trigger a manual scan from the admin portal, then results appear within 30 seconds for datasets up to 10,000 activity records
Business Value
Duplicate activity records directly inflate Bufdir grant reporting figures, which is a compliance and funding risk. For NHF with 1,400 local chapters and complex multi-chapter membership, duplicate registrations are a systemic and foreseeable problem. Early detection and resolution maintains data integrity and protects the organizations' credibility with Bufdir and other funders.
Components
- Duplicate Activity Detector infrastructure
- Cross-Chapter Activity Query data
- Hierarchy Admin Portal Screen ui
- Access Scope Service service
- RLS Policy Manager infrastructure
- Hierarchy Service service
- Organization Unit Repository data