Skip to content

Commit ac7e06d

Browse files
committed
fix(platform-objects): label the Setup app's nav_assignment_rules entry in en, zh-CN, ja-JP and es-ES
plugin-sharing contributes nav_assignment_rules to the Setup app at runtime; check:app-nav-i18n requires a label for every runtime-merged nav id in every locale file of the app's translations. Claude-Session: https://claude.ai/code/session_016WV4d14C8K4gMehVb6jBvA Co-authored-by: Claude <noreply@anthropic.com>
1 parent 24f6b3e commit ac7e06d

5 files changed

Lines changed: 6 additions & 0 deletions

File tree

‎.changeset/30066-organization-assignment-rules.md‎

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,7 @@
33
'@objectstack/objectql': minor
44
'@objectstack/plugin-sharing': minor
55
'@objectstack/cli': minor
6+
'@objectstack/platform-objects': minor
67
---
78

89
feat(objectql,plugin-sharing): an organization authors its own assignment rules in Setup, as `sys_assignment_rule` records
@@ -16,6 +17,7 @@ Until now only a package could declare an assignment rule, so routing new record
1617
- **`@objectstack/plugin-sharing`**: a new object, `sys_assignment_rule`. One row is one rule: when a new record of the chosen object matches the condition (a CEL expression over `record`, empty for every record), it goes to a queue or to one person, and a queue target may pick a member by `round_robin` or `least_loaded` (which needs its open-work expression, `load`). Each row belongs to one organization (`organization_id` is required). The table's save guard refuses, naming each field at fault: a name that is not snake_case or that a package rule already holds (one name means one rule); an object that does not exist or whose records have no owner; an entry shape the stack schema refuses for a declared rule; a condition or open-work expression the engine cannot compile; a person who is not an active member of the organization; a rule that would land in no organization. A boot report logs, at `error`, an organization's rule whose name a later-installed package now declares. Setup gains an "Assignment Rules" entry beside Queues.
1718
- **`@objectstack/objectql`**: the engine evaluates an object's organization rules first, ascending by `sort_order` and then by name, and the rules packages declare as the fallback; the first match decides. A user target, from either source, now owns the record only while the user is an active member of the record's organization and is not banned. One that no longer resolves leaves the record ownerless, the way a queue that no longer resolves does, and is logged once; the insert is never refused. When an organization's rules cannot be read, its new records are written as they stood rather than routed by the package rules its own would have overtaken. New exports for the save guard: `ASSIGNMENT_RULE_OBJECT`, `assignmentExpressionRefusals`, `organizationMemberStanding`.
1819
- **`@objectstack/spec`**: `PLATFORM_PROVIDED_OBJECT_NAMES` lists `sys_assignment_rule` under `plugin-sharing`, and the `AssignmentRuleSchema` documentation says how the two sources combine. No key, shape or validation changes.
20+
- **`@objectstack/platform-objects`**: the Setup app labels the new "Assignment Rules" navigation entry in English, Chinese, Japanese and Spanish.
1921
- **`@objectstack/cli`**: the organization-ownership inventory lists `sys_assignment_rule`, so `os migrate organization-ownership` plans it instead of refusing it as an uninventoried platform table.
2022

2123
Upgrading: a package rule whose entry names a user id (the `assignment-rule-user-target` lint warning) stops assigning in an organization where that user is not a member; the engine logs the lapse once per rule, user and organization. Route such a rule to a queue whose members are positions.

‎packages/platform-objects/src/apps/translations/en.ts‎

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -93,6 +93,7 @@ export const en: TranslationData = {
9393
nav_record_shares: { label: 'Record Shares' },
9494
nav_queues: { label: 'Queues' },
9595
nav_queue_members: { label: 'Queue Members' },
96+
nav_assignment_rules: { label: 'Assignment Rules' },
9697
// `nav_sso_providers` is contributed by `@objectstack/plugin-auth` only
9798
// when the external-IdP RP is wired (`OS_SSO_ENABLED`, or the cloud
9899
// per-env `planAllowsSso`), so it is the one Setup entry

‎packages/platform-objects/src/apps/translations/es-ES.ts‎

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -63,6 +63,7 @@ export const esES: TranslationData = {
6363
nav_record_shares: { label: 'Registros Compartidos' },
6464
nav_queues: { label: 'Colas' },
6565
nav_queue_members: { label: 'Miembros de Colas' },
66+
nav_assignment_rules: { label: 'Reglas de Asignación' },
6667
// Conditionally contributed by `@objectstack/plugin-auth` (only when an
6768
// external IdP is wired), so `check:app-nav-i18n` cannot see it — see
6869
// the rationale in `en.ts` (#6659). Wording matches this locale's

‎packages/platform-objects/src/apps/translations/ja-JP.ts‎

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -63,6 +63,7 @@ export const jaJP: TranslationData = {
6363
nav_record_shares: { label: 'レコード共有' },
6464
nav_queues: { label: 'キュー' },
6565
nav_queue_members: { label: 'キューメンバー' },
66+
nav_assignment_rules: { label: '割り当てルール' },
6667
// Conditionally contributed by `@objectstack/plugin-auth` (only when an
6768
// external IdP is wired), so `check:app-nav-i18n` cannot see it — see
6869
// the rationale in `en.ts` (#6659). Wording matches this locale's

‎packages/platform-objects/src/apps/translations/zh-CN.ts‎

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -63,6 +63,7 @@ export const zhCN: TranslationData = {
6363
nav_record_shares: { label: '记录共享' },
6464
nav_queues: { label: '队列' },
6565
nav_queue_members: { label: '队列成员' },
66+
nav_assignment_rules: { label: '分配规则' },
6667
// Conditionally contributed by `@objectstack/plugin-auth` (only when an
6768
// external IdP is wired), so `check:app-nav-i18n` cannot see it — see
6869
// the rationale in `en.ts` (#6659). Wording matches this locale's

0 commit comments

Comments
 (0)