Skip to content

ATS-CRM-ENT-002Establish an organization and its hierarchy

Markdown

ATS-CRM-ENT-002

Establish an organization and its hierarchy

Markdown
  • DocumentProposed

KindAcceptance test setProduct areaCRMModuleEntitiesRevision1

Read atservices-crm a8d1364freact-console baf6dae3

Coverage

  • Rule covered
  • Transition covered
  • Validation covered
  • Permission covered
  • Edge gap: FND-CRM-ENT-072
  • Failure covered
  • Boundary covered
  • Concurrency covered
  • Invariant covered
  • Interaction covered

Test Scenarios

19 scenarios proving CAP-CRM-ENT-002; 10 bound to an existing test.

01 Name required and limited; notes limitedboundaryapinegativetest
Proves
BR-CAP-CRM-ENT-002-01 INV-DOM-CRM-ENT-002-01
Preconditions
No additional setup is required.
Steps
Create without a name; with 201 characters; with notes of 10,001.
Expected
400 naming name or notes; 200 characters accepted.
Data
No additional fixtures.
Bound to
Source
services-crm:modules/entities/tests/integration/services/persistence/organizations.field-rules.integration.spec.js#refuses a name of 201 characters, naming name
02 Client ids preserved, others mintedboundaryapitest
Proves
BR-CAP-CRM-ENT-002-02
Preconditions
No additional setup is required.
Steps
Create with and without an id, and with an id breaking the grammar.
Expected
The id; a UUIDv7; 400 naming the characters allowed.
Data
No additional fixtures.
Bound to
Source
services-crm:modules/entities/tests/e2e/organizations.e2e.spec.js#keeps the id the body named, which is no UUIDv7
03 Organization numbers have their own counter with recoveryinvariantapitest
Proves
BR-CAP-CRM-ENT-002-03 INV-DOM-CRM-ENT-002-02
Preconditions
Prepare a seed handing out a taken number.
Steps
Create organizations.
Expected
10000 first; the highest plus one after a collision; contacts' seed untouched.
Data
Use number_seeds.
Bound to
Source
services-crm:modules/entities/tests/integration/services/persistence/organizations.integration.spec.js#saves the organization under the highest number plus one, 4001
04 an unknown type is a conflictvalidationapinegativetest
Proves
BR-CAP-CRM-ENT-002-04 INV-DOM-CRM-ENT-002-12
Preconditions
No additional setup is required.
Steps
Create with a type the workspace lacks.
Expected
409.
Data
No additional fixtures.
Bound to
Source
services-crm:modules/entities/tests/e2e/organization-types.e2e.spec.js#refuses an organization of a type the tenant does not have (409), and the delete of a type an organization has (409)
05 a foreign parent is a conflictboundaryapinegativetest
Proves
BR-CAP-CRM-ENT-002-05 INV-DOM-CRM-ENT-002-03
Preconditions
No additional setup is required.
Steps
Create naming a parent of another workspace.
Expected
409.
Data
No additional fixtures.
Bound to
Source
services-crm:modules/entities/tests/e2e/organizations.e2e.spec.js#answers 409 for a parent the tenant does not have
06 Loops are rejected at every depth, including racing movesconcurrencybrowsernegativetest
Proves
BR-CAP-CRM-ENT-002-06 INV-DOM-CRM-ENT-002-04
Preconditions
Prepare a three-level hierarchy.
Steps
Make it its own parent; move the top under its child and its grandchild; race two opposite moves.
Expected
Each rejected; the first racing move preserved.
Data
No additional fixtures.
Bound to
Source
services-crm:modules/entities/tests/integration/db/organizations.table.integration.spec.js#refuses putting the top under its grandchild by organizations_parent_not_descendant
07 Ancestry is computed on every readruleapitest
Proves
BR-CAP-CRM-ENT-002-07
Preconditions
Prepare a chapter under a region under a national body.
Steps
Read the chapter; move the region; read again; send ancestry back.
Expected
Ancestors nearest first and the top; new ancestry without saving the chapter; sent ancestry ignored.
Data
No additional fixtures.
Bound to
Source
services-crm:modules/entities/tests/integration/services/persistence/organizations.integration.spec.js#answers the descendant, never saved again, its ancestry under the new parent
08 Status is a closed list and inactive organizations leave pickersvalidationbrowsernegativetest
Proves
BR-CAP-CRM-ENT-002-08 INV-DOM-CRM-ENT-002-05
Preconditions
Prepare an active and an inactive organization.
Steps
Write status "archived"; open a picker.
Expected
Rejected; the inactive one not offered and still readable.
Data
No additional fixtures.
Bound to
Source
react-console:acceptance/crm/playwright/journeys/organizations/CRM-ACC-0117.spec.ts#CRM-ACC-0117
09 Website and domain name derive each otherruleapitest
Proves
BR-CAP-CRM-ENT-002-09
Preconditions
No additional setup is required.
Steps
Save a website only; a domain only; a website that is not a URL.
Expected
Domain without protocol or www; http www website; nothing derived.
Data
No additional fixtures.
Bound to
Source
services-crm:modules/entities/tests/unit/db/organization-domain-name.spec.js#derives the domain name without the protocol or the www prefix
10 a logo that cannot be saved rejects the savefailureapinegativetest
Proves
BR-CAP-CRM-ENT-002-10
Preconditions
Prepare an organization with a logo.
Steps
Update naming a file that cannot be saved.
Expected
400 naming the logo field; the old logo preserved.
Data
No additional fixtures.
Bound to
Source
services-crm:modules/entities/tests/integration/services/persistence/organizations.integration.spec.js#refuses the update as ObjectInvalid, naming the logo field
11 an organization duplicate block requires a reasoned overridepermissionapinegativeproposed
Proves
BR-CAP-CRM-ENT-002-11
Preconditions
Prepare a blocking organization duplicate rule and callers with and without the override key.
Steps
Try the matching create with confirmation alone, with an unauthorized reasoned override, and with an authorized reasoned override.
Expected
Only the authorized reasoned request creates an organization, and its override is recorded.
Data
Use one matching organization.
Source
FND-CRM-ENT-029
12 Change organization standing without changing identitytransitionapiproposed
Proves
BR-CAP-CRM-ENT-002-08 BR-CAP-CRM-ENT-004-01
Preconditions
A newly created organization is active and its current version is known.
Steps
Save inactive status, then active status, then duplicate status, reading each result at its current version.
Expected
The record keeps its identity and number; each read reflects the requested standing.
Data
Run-owned records and configuration in an isolated workspace.
Source
services-crm:modules/entities/tests/integration/db/organizations.table.integration.spec.js#refuses a status outside the closed list by organizations_status_check
13 Move a branch and rediscover its peopleinteractionapiproposed
Proves
BR-CAP-CRM-ENT-002-07 BR-CAP-CRM-ENT-003-04
Preconditions
Two roots, a child organization and a current affiliate under the child exist.
Steps
Move the child to the other root; read its ancestry and discover people below each root.
Expected
The child’s new ancestry and the two root populations agree with the moved structure.
Data
Run-owned records and configuration in an isolated workspace.
Source
services-crm:modules/entities/tests/integration/services/persistence/organizations.integration.spec.js#answers the descendant, never saved again, its ancestry under the new parent; services-crm:modules/entities/tests/integration/services/persistence/contacts.queries.integration.spec.js#includes a contact whose affiliation in effect to an organization of the walk is not its primary one (M2-D3)
14 Save organizational contact points with the bodyinteractionapiproposed
Proves
BR-CAP-CRM-ENT-002-01 BR-CAP-CRM-ENT-005-03
Preconditions
A named organization has two usable phone purposes.
Steps
Create it with one phone in each purpose and read its contact points.
Expected
The organization and its typed phones are readable as one saved aggregate.
Data
Run-owned records and configuration in an isolated workspace.
Source
services-crm:modules/entities/tests/integration/services/persistence/organizations.field-rules.integration.spec.js#refuses a name of 201 characters, naming name; services-crm:modules/entities/tests/integration/services/persistence/contacts.integration.spec.js#refuses two numbers of the same type
15 Refuse an invalid organization custom valueinteractionapiproposed
Proves
BR-CAP-CRM-ENT-002-01 BR-CAP-CRM-ENT-008-03
Preconditions
An organization definition has a numeric custom field.
Steps
Create a named organization with invalid numeric text, then correct the value and retry with a fresh unused identity.
Expected
The invalid request creates no organization; the corrected request stores the declared numeric value.
Data
Run-owned records and configuration in an isolated workspace.
Source
services-crm:modules/entities/tests/integration/services/persistence/organizations.field-rules.integration.spec.js#refuses a name of 201 characters, naming name; services-crm:modules/entities/tests/e2e/contacts-custom-fields.e2e.spec.js#refuses yes for a yes/no field: no truthiness
16 Establish a body under role policyinteractionapiproposed
Proves
BR-CAP-CRM-ENT-002-04 BR-CAP-CRM-ENT-012-02
Preconditions
An organization classification requires one holder of a selected role.
Steps
Create an organization using that classification and read its initial compliance.
Expected
The new organization has the initial zero-holder violation and creation submits no notice.
Data
Run-owned records and configuration in an isolated workspace.
Source
services-crm:modules/entities/tests/e2e/organization-types.e2e.spec.js#refuses an organization of a type the tenant does not have (409), and the delete of a type an organization has (409); services-crm:modules/entities/tests/integration/services/organizations/compliance/organization-compliance.integration.spec.js#with a type that holds it to rules: not in compliance, every rule with a minimum violated (it has no contact yet)
17 Keep a parent until its child is removedinteractionapiproposed
Proves
BR-CAP-CRM-ENT-002-05 BR-CAP-CRM-ENT-014-05
Preconditions
A parent organization has one otherwise deletable child.
Steps
Try deleting the parent; remove the child, then retry deleting the parent.
Expected
The first delete preserves both records; the later parent delete succeeds once the child no longer references it.
Data
Run-owned records and configuration in an isolated workspace.
Source
services-crm:modules/entities/tests/e2e/organizations.e2e.spec.js#answers 409 for a parent the tenant does not have; services-crm:modules/entities/tests/e2e/organizations.e2e.spec.js#answers 409 to a delete while the contact is affiliated with it
18 Prevent deletion of a classification held by a bodyinteractionapiproposed
Proves
BR-CAP-CRM-ENT-002-04 BR-CAP-CRM-ENT-018-03
Preconditions
An organization uses a workspace classification.
Steps
Try to delete the classification, then read the organization and classification.
Expected
The referenced classification remains and the organization keeps its classification identity.
Data
Run-owned records and configuration in an isolated workspace.
Source
services-crm:modules/entities/tests/e2e/organization-types.e2e.spec.js#refuses an organization of a type the tenant does not have (409), and the delete of a type an organization has (409); services-crm:modules/entities/tests/e2e/address-types.e2e.spec.js#says which records keep the type when it refuses the delete
19 Exercise every declared authority independentlypermissionapinegativeproposed
Proves
BR-CAP-CRM-ENT-003-07 BR-CAP-CRM-ENT-003-09
Preconditions
An eligible record and configuration fixture exist for each operation; the caller can reach only the run’s workspace.
Steps
For each declared permission, execute its matching operation with that permission, then without it while retaining the other required grants. Read affected records after every refused mutation.
Expected
The authorized case reaches the operation; the missing-grant case is refused and preserves saved data. Record access alone does not authorize the other declared actions.
Data
Run-owned records and configuration in an isolated workspace.
Source
services-crm:aws/crm.service.ts:ApplicationPermissions; services-crm:modules/entities/aws/api/entities.routes.ts

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.