Skip to content

CAP-MBR-STR-004Close units or remove units without retained dependencies

Markdown

CAP-MBR-STR-004

Close units or remove units without retained dependencies

Markdown
  • DocumentDraft
  • Product intentProposed
  • ImplementationObserved

KindCapabilityProduct areaMembershipModuleOrganizational Structure, Membership Configuration and TermsRevision1

Read atservices-membership 5994c270react-console baf6dae3

The Formal Contract

The narrative above explains; the sections below are authoritative — the rules, scenarios and tests this document binds.

Outcomes
Closed units remain available for historical interpretation.Removal is refused while retained records depend on the unit.
Surfaces
api

Controls

34 controls apply, from the corpus control catalogue.

TC-AVL-002 TC-AVL-003 TC-AZ-001 TC-AZ-002 TC-AZ-003 TC-AZ-004 TC-AZ-005 TC-AZ-006 TC-CHG-001 TC-CHG-002 TC-CHG-003 TC-CHG-004 TC-CRY-001 TC-CRY-002 TC-CRY-003 TC-DAT-001 TC-DAT-004 TC-DAT-007 TC-IAM-001 TC-IAM-002 TC-IAM-004 TC-IAM-005 TC-LOG-001 TC-LOG-002 TC-LOG-003 TC-LOG-004 TC-PI-001 TC-PI-003 TC-PI-005 TC-SEC-001 TC-SEC-004 TC-TEN-001 TC-TEN-002 TC-TEN-003

Permissions

KeyChecked atScope
membership.structure.manageapitenant
membership.application.accessapitenant

Business Rules

7 rules, 6 to be proved before approval. A rule's product intent is derived from its origin: 0 confirmed by a product decision, the rest inheriting this capability's proposed.

IdRuleKindEnforced atProvenance
01must prove
Proposed
Deactivation retains a unit’s children, placement, history, links and finance records, leaves child statuses unchanged and prevents new children and member affiliations.
no proof recorded yet
lifecycleservicetest
services-membership:modules/structure/tests/integration/services/tree/unit-merge.integration.spec.ts#the tree edits affiliations bind › delete and deactivate › deactivates it instead
02must prove
Proposed
Repeated deactivation leaves an inactive unit unchanged, rejects merged units and checks a version only when one is supplied.
no proof recorded yet
lifecycleserviceobserved
03
Proposed
Unit reactivation has no operation, and detail replacement discards a submitted status.
lifecycleapi, serviceobserved
04must prove
Proposed
Any retained member affiliation, including an ended affiliation, prevents unit deletion.
no proof recorded yet
validationservicetest
services-membership:modules/structure/tests/integration/services/tree/unit-merge.integration.spec.ts#the tree edits affiliations bind › delete and deactivate › refuses to delete a unit a closed affiliation names, 409 unit_has_affiliations with the count
05must prove
Proposed
Current children, retained history naming the unit as parent, organization links, dues products and merged units naming it as survivor prevent deletion.
no proof recorded yet
validationservicetest
services-membership:tests/e2e/structure-api.e2e.spec.ts#the structure API, end to end in process › refuses to delete a unit in use, 409 unit_in_use
06must prove
Proposed
Deletion is refused with the referencing constraint when a program, membership identity or application still depends on the unit.
no proof recorded yet
validationservice, databasetest
services-membership:tests/e2e/database-refusals.e2e.spec.ts#mistakes only the database catches, through the API › DEF-MBR-0084: a structure delete a program’s reference blocks › refuses deleting a unit a program is owned by 409 unit_in_use, and keeps it
07must prove
Proposed
Removing an unreferenced unit also removes its own parent history, current tree pairs, custom values and financial settings.
no proof recorded yet
lifecycleservice, databasetest
services-membership:modules/structure/tests/unit/services/tree-edits.spec.ts#the tree edits › delete › deletes a unit no affiliation and nothing else names

Scenarios

IdGivenWhenThenProvenance
01A closed chapter retains past member affiliations.Staff retire the chapter through deactivation.Its placement and history remain, but new affiliations are blocked.test
services-membership:tests/acceptance/structure/MBR-ACC-0020.acceptance.ts#MBR-ACC-0020 deactivating a chapter freezes it, and there is no way back

Edge Cases

IdGivenWhenThenProvenance
02A chapter loses its only child through a correction effective on the first placement day.Staff remove the otherwise unreferenced chapter.Removal succeeds because the current history row no longer names that chapter as a parent.documented

The Markdown files under specs/ in rhythmsoftware/rhythm-v2-docs are the canonical source of truth. This reader is a generated, read-only projection of them.