high complexity extracted Organization Management Confidence: 100%
3
Components
4
Shared
0
User Stories
Yes
Analyzed

Description

Multi-Organization Hierarchy models and manages the layered organizational structures that NHF and similar organizations require, where activities must be attributed to the correct level across national associations, regions, and local associations. Admins define parent-child relationships between organizations and local units, control how activity data rolls up across hierarchy levels, and configure duplicate-detection rules to prevent the same activity from being claimed at multiple levels simultaneously.

Sources & reasoning

Line 109 states NHF has 1,400 local associations with a hard requirement that activity attribution across levels be supported. Line 107 adds duplicate-registration detection across coordinator levels. NHF is a Phase 1 launch organization (line 323), making the hierarchy model an MVP requirement.

  • docs/source/likeperson.md · line 109
    Bredest organisasjonsstruktur: 12 landsforeninger, 9 regioner, 1 400 lokallag - aktivitetsfordeling mellom ledd må støttes.
  • docs/source/likeperson.md · line 107
    Duplikatvarsling: Fange opp når samme aktivitet registreres av flere koordinatorer.

Analysis

Business Value

NHF operates across 12 national associations, 9 regions, and 1,400 local associations, making a flat organization model entirely inadequate for correct activity attribution and Bufdir reporting. Without hierarchy support, data cannot be attributed to the appropriate organizational level, breaking both internal analytics and government reporting. The duplicate-activity detection requirement - where coordinators at different levels register the same activity - is only solvable with an explicit hierarchy model. Supporting multi-level structures is therefore a hard prerequisite for NHF adoption, a flagship launch organization.

Implementation Notes

The org_hierarchies table stores parent-child relationships between organizations with depth constraints enforced by the API to prevent cycles. The local_associations table represents sub-units within organizations. Roll-up queries use recursive CTEs on the hierarchy graph. The admin UI renders a tree view of the hierarchy with reordering controls that include a keyboard-accessible alternative for WCAG compliance. Duplicate activity detection runs at write time using the hierarchy graph to identify overlapping registrations across levels. API-layer cycle detection prevents malformed hierarchies from reaching the database.

User Stories

No user stories have been generated for this feature yet.