CRITICAL story-multi-org-membership-handling-organization-administrator-005 8 pts
8
Story Points
Critical
Priority
Multi-Organization Membership Handling
Feature

User Story

As a Organization Administrator
I want the system to automatically detect when a peer mentor is about to submit an activity that closely matches a record already registered under one of their other affiliated organizations, and surface a warning before the submission is finalized
So that So that double-counting of activities across organizational boundaries is prevented, ensuring Bufdir grant reports reflect accurate and deduplicated activity data

Acceptance Criteria

  • Given a peer mentor registers an activity with the same activity type, contact, and date as an existing record under a different affiliated organization, when the Duplicate Report Prevention Service evaluates the submission, then a duplicate warning is surfaced to the user before finalization
  • Given a duplicate warning is raised, when the administrator reviews the audit log, then they can see the original record, the duplicate candidate, the matched fields, and the confidence score
  • Given a peer mentor acknowledges a duplicate warning and chooses to proceed, when the activity is submitted, then it is logged with a 'confirmed-duplicate-override' flag for administrator review
  • Given an Organization Administrator reviews the duplicate detection log, when they view a flagged item, then they can see the full context of both records and take action to merge, reject, or approve the newer submission
  • Given the Duplicate Report Prevention Service queries across affiliated organizations, when performing deduplication checks, then only data explicitly permitted by the Membership RLS Policy is accessed — no broader cross-organization data leakage occurs

Business Value

Double-reporting is a documented compliance and funding risk for NHF, where inaccurate Bufdir grant reports can trigger audits and funding disputes. Automated duplicate detection directly addresses this identified pain point, eliminating the need for manual cross-check reconciliation and protecting the integrity of grant applications across all affiliated lokallag.