diff --git a/.changeset/bu-subtree-docstring-attribution.md b/.changeset/bu-subtree-docstring-attribution.md new file mode 100644 index 0000000000..cb882b8962 --- /dev/null +++ b/.changeset/bu-subtree-docstring-attribution.md @@ -0,0 +1,22 @@ +--- +"@objectstack/spec": patch +"@objectstack/platform-objects": patch +--- + +docs: fix `business_unit` sharing-rule docstrings that still attributed the BU subtree expansion to the narrow recipient (#8098) + +#7807 (PR #8097, `9b519815`) narrowed the `business_unit` sharing-rule +recipient to expand exactly one unit's members, moving the subtree walk onto +`unit_and_subordinates`. Two docstrings never got the memo: +`IBusinessUnitGraphService` in `packages/spec/src/contracts/sharing-service.ts` +and the `sys_business_unit` object definition in +`packages/platform-objects/src/identity/sys-business-unit.object.ts`. Both +still said `recipient_type='business_unit'` sharing rules were driven by the +subtree walk. Both now name `unit_and_subordinates` as the subtree consumer, +with `business_unit` as the narrow (single-unit) one. + +These are comment-only corrections — the `IBusinessUnitGraphService` +docstring surfaces in `@objectstack/spec`'s built `dist/**/*.d.ts` hover, and +the `sys_business_unit` docstring surfaces in +`@objectstack/platform-objects`'s built `dist/**/*.d.ts` hover; no runtime or +authoring behaviour changes. diff --git a/packages/platform-objects/src/identity/sys-business-unit.object.ts b/packages/platform-objects/src/identity/sys-business-unit.object.ts index 8359592564..895902c986 100644 --- a/packages/platform-objects/src/identity/sys-business-unit.object.ts +++ b/packages/platform-objects/src/identity/sys-business-unit.object.ts @@ -14,7 +14,8 @@ import { ObjectSchema, Field } from '@objectstack/spec/data'; * structure works identically regardless of value. * * Drives: - * - `recipient_type='business_unit'` sharing rules + * - `recipient_type='unit_and_subordinates'` sharing rules (subtree walk); + * `business_unit` expands only the one named unit's members * - `bu:` approver prefix in the approval engine * - Report rollups and manager chains in CRM/PM apps * diff --git a/packages/spec/src/contracts/sharing-service.ts b/packages/spec/src/contracts/sharing-service.ts index bf0320a649..1d46bfd925 100644 --- a/packages/spec/src/contracts/sharing-service.ts +++ b/packages/spec/src/contracts/sharing-service.ts @@ -562,7 +562,8 @@ export interface ITeamGraphService { * * Walks `parent_business_unit_id` to expand a department into the union of * its members and all descendant members. Drives: - * - `recipient_type='business_unit'` sharing rules + * - `recipient_type='unit_and_subordinates'` sharing rules (this subtree + * walk); `business_unit` expands only the one named unit's members * - `bu:` approver prefix in the approval engine * - report rollups, manager chains, and similar org-aware logic */