CRITICAL story-coordinator-activity-approval-coordinator-004 8 pts

User Story

As a Coordinator
I want to edit specific fields of a submitted activity registration while providing a mandatory correction reason, without deleting the original record
So that So that inaccurate registrations can be fixed for Bufdir reporting accuracy while maintaining a complete, immutable audit trail of every change for compliance and accountability purposes

Acceptance Criteria

  • Given a coordinator opens a pending or flagged registration, when they tap 'Correct', then the Correction Request Widget opens with all editable fields pre-populated with current values
  • Given the correction widget is open, when the coordinator modifies any field, then the 'Save Correction' button remains disabled until the mandatory Correction Reason field contains at least 10 characters
  • Given the coordinator submits a correction, when the Correction Validation Service detects a constraint violation (e.g., duration exceeds maximum for activity type), then an inline validation error is shown and save is blocked
  • Given all validation passes and the correction is saved, when the database write completes, then the original values, new values, correction reason, coordinator ID, and timestamp are all stored in the correction history record atomically
  • Given a correction is saved, when the registration detail is viewed by any authorized user, then the correction history section shows the full change log with reasons and timestamps
  • Given the coordinator saves a correction, when the registration status updates, then it transitions to 'corrected' and any downstream workflows (e.g., reimbursement amounts) are recalculated with the new values

Business Value

Data quality in activity registration is the critical prerequisite for Bufdir grant compliance. Inaccurate registrations submitted by peer mentors — wrong dates, wrong activity types, inflated expense amounts — must be correctable without deletion to preserve historical integrity. The mandatory correction reason field creates the auditable trail required for NHF and HLF to respond to Bufdir audits. This feature directly replaces the error-prone manual process of coordinators editing Word forms and re-entering data in Excel aggregations.