HIGH story-proxy-bulk-activity-registration-coordinator-003 8 pts

User Story

As a Coordinator
I want to be warned when a proxy activity I am about to register appears to already exist for a peer mentor
So that I can avoid creating duplicate records that would inflate statistics and cause compliance issues with Bufdir reporting

Acceptance Criteria

  • Given a peer mentor already has an activity registered for today of type 'Individual follow-up', when a coordinator registers the same type for the same mentor on the same date, then a duplicate warning dialog appears before saving
  • Given the duplicate warning dialog is shown, when I view it, then I can see both the existing record and the new record side by side with all relevant fields
  • Given the duplicate warning dialog is shown, when I choose 'Cancel', then the form stays open and no record is created
  • Given the duplicate warning dialog is shown, when I choose 'Register anyway', then both records are saved and an audit note is attached to the new record indicating it was a confirmed duplicate override
  • Given bulk registration with 10 mentors where 3 already have matching records, when I proceed, then the system warns me about the 3 duplicates before performing the batch insert for the remaining 7
  • Given I confirm a duplicate override, when the record is saved, then the proxy audit logger records the coordinator's decision and timestamp for compliance review

Business Value

Duplicate activity records directly undermine the credibility of Bufdir reports, which are used to justify grant funding. NHF specifically flagged duplicate registration as a risk when multiple coordinators manage overlapping rosters. By catching duplicates at the point of entry — before they pollute the database — the system protects the accuracy of all downstream reporting and prevents coordinators from inadvertently committing reporting errors that could trigger funding audits.