Skip to content

CAP-MBR-MEM-007Maintain dated chapter and section affiliations

Markdown

CAP-MBR-MEM-007

Maintain dated chapter and section affiliations

Markdown
  • DocumentDraft
  • Product intentConfirmed
  • ImplementationPartially observed

KindCapabilityProduct areaMembershipModuleMemberships, Applications and Membership BillingRevision1

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
Dated affiliations support chapter and ancestor rosters.Affiliation operations apply configured eligibility and count restrictions.Dues-bearing changes identify the purchase route that must handle the charge.
Surfaces
consoleportalapi
Constraints
A term-creation request accepts at most twenty named affiliations.
Intent sources
services-membership:README.md#2026-10-18 — Final acceptanceservices-membership:docs/migrations/membership-core/README.md#P2b: the merge with the structure module and the unit-bound parts

Controls

37 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-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-002 TC-DAT-003 TC-DAT-007 TC-IAM-001 TC-IAM-002 TC-IAM-004 TC-IAM-005 TC-LOG-002 TC-LOG-003 TC-LOG-004 TC-LOG-005 TC-PI-001 TC-PI-003 TC-PI-005 TC-PRV-001 TC-PRV-002 TC-SEC-001 TC-SEC-004 TC-TEN-001 TC-TEN-002 TC-TEN-003 TC-TEN-004

Permissions

KeyChecked atScope
membership.affiliations.manageapirecord
membership.members.readapirecord

Business Rules

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

IdRuleKindEnforced atProvenance
01must prove
Confirmed
Only affiliation-bound programs accept units on their terms or through subsequent affiliation additions.
no proof recorded yet
validationservice, databasetest
services-membership:tests/acceptance/affiliations/MBR-ACC-0263.acceptance.ts#MBR-ACC-0263: Ending a member's only chapter is refused, a cancelled term's chapters cannot be touched, and a program that does not bind by affiliation refuses chapters twice over
02must prove
Confirmed
A selected unit must be active, permit member affiliation through its type, and have a type allowed by the effective program and package rules.
no proof recorded yet
validationserviceobserved
services-membership:modules/memberships/services/affiliations/affiliation-operations.ts:requireAffiliableUnit, refuseUnlessValid
03must prove
Confirmed
Counts stay within each type’s maximum across the term and meet its minimum from the operation’s effective day, with package counts overriding program counts.
✓ A Regular package allowing one to three chapters accepts Atlanta and Savannah.✗ Ending the only required chapter is rejected for failing the minimum.
no proof recorded yet
invariantservicetest
services-membership:modules/memberships/tests/unit/unit-rules.spec.ts#refuses fewer affiliations of a type than its minimum from the day the operation takes effect
04must prove
Confirmed
Unless multiple primaries are permitted, each type has at most one primary on a date; an addition without an explicit choice becomes primary only if none of that type is primary on its start day.
no proof recorded yet
invariantserviceobserved
05must prove
Confirmed
A term cannot hold overlapping affiliations to the same unit.
no proof recorded yet
invariantservice, databasetest
services-membership:modules/memberships/tests/integration/services/affiliations.integration.spec.ts#refuses the same unit twice on a day of a term (affiliation_overlap)
06must prove
Confirmed
Direct staff or officer additions and transfers into a unit with an active package-specific or catch-all dues product are refused with the required Commerce amendment kind.
no proof recorded yet
policyservicetest
services-membership:modules/memberships/tests/integration/services/affiliations.integration.spec.ts#refuses to add a chapter that sells dues for the package, naming the Commerce amendment (requires_amendment)
07must prove
Confirmed
New staff terms use their named units from the term start; later terms with omitted affiliations inherit eligible active units held at the previous end, while an explicit empty list still faces the minimum rules.
origin: RS-1115 (services-membership:docs/migrations/membership-core/README.md#P2b)
no proof recorded yet
policyserviceobserved
services-membership:modules/memberships/services/affiliations/affiliation-operations.ts:writeTermAffiliations, carriedAffiliations; modules/memberships/services/operations/staff-operations.ts:addTerm
08must prove
Confirmed
Ending defaults to yesterday and must shorten the current span; the day immediately before its start withdraws the row unless a later transfer continues it, while an earlier end date is invalid.
no proof recorded yet
lifecycleserviceobserved
09must prove
Confirmed
Making a row primary clears overlapping same-type primary rows for their whole spans unless multiple primaries are allowed.
no proof recorded yet
lifecycleserviceobserved
services-membership:modules/memberships/services/affiliations/affiliation-operations.ts:losingPrimaryOf, setPrimaryAffiliation
10must prove
Confirmed
Ending, transferring or changing the primary designation requires the current version of the affected affiliation row; additions do not submit an affiliation version.
no proof recorded yet
validationserviceobserved
services-membership:modules/memberships/services/affiliations/affiliation-operations.ts:addAffiliationSchema, lockAffiliation
11must prove
Confirmed
An affiliation addition waits for a concurrent unit merge holding the unit lock and then rejects a unit whose committed status is merged.
no proof recorded yet
invariantservice, databasetest
services-membership:modules/memberships/tests/integration/services/affiliation-add-concurrency.integration.spec.ts#waits for a merge in flight and is then refused, because the unit it read is merged
12must prove
Confirmed
Unit rosters apply dated affiliations and optional descendants from the requested date’s tree, returning a matching member only once.
no proof recorded yet
calculationservicetest
services-membership:tests/e2e/s05-multiple-chapters.e2e.spec.ts#returns Jo once in the Southeast Zone, Eastern Region and National rosters
13must prove
Confirmed
The product should accept a reduction that restores compliance after a package maximum is tightened below existing holdings.
no proof recorded yet
policyserviceunknown
14must prove
Confirmed
The product should expose member chapter changes under the configured portal allowance while leaving staff free of that member-only restriction.
no proof recorded yet
policyserviceunknown

Scenarios

IdGivenWhenThenProvenance
01Jo has a national membership affiliated to Atlanta and Savannah, with Atlanta primary.Read chapter and ancestor rosters on a date covered by those affiliations.Both chapters and their ancestors include Jo once per roster, while the unrelated Western Region excludes her.observed
02Savannah has an active dues product for Jo’s Regular package.A coordinator requests a direct addition to Jo’s term.The refusal identifies the amendment needed to handle the chapter change and dues together.test
services-membership:tests/acceptance/affiliations/MBR-ACC-0266.acceptance.ts#MBR-ACC-0266: A chapter that charges dues for the member's package cannot be added or moved into from the console, until its dues product is switched off

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.