Skip to content

ATS-CRM-ENT-014Remove records and their owned information

Markdown

ATS-CRM-ENT-014

Remove records and their owned information

Markdown
  • DocumentProposed

KindAcceptance test setProduct areaCRMModuleEntitiesRevision1

Read atservices-crm a8d1364freact-console baf6dae3

Coverage

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

Test Scenarios

13 scenarios proving CAP-CRM-ENT-014; 6 bound to an existing test.

01 Only administrators deletepermissionbrowsernegativetest
Proves
BR-CAP-CRM-ENT-014-01
Preconditions
Prepare a standard user and an administrator.
Steps
Attempt contact and organization deletion through the API with standard and administrator callers. Open the contact’s actions as the standard caller.
Expected
The standard caller’s API deletion is refused and the records remain readable. Administrator API deletion succeeds for eligible records. The standard caller has no administrator archive action.
Data
Use personas by tier.
Bound to
Source
react-console:acceptance/crm/playwright/journeys/contacts/CRM-ACC-0046.spec.ts#CRM-ACC-0046
02 a contact delete takes everything it owns and preserves its historytransitionapitest
Proves
BR-CAP-CRM-ENT-014-02
Preconditions
Prepare a contact with one of each collection and a primary e-mail.
Steps
Delete it; read it; delete again; create another with its e-mail; read its history.
Expected
Gone with every element; 404; 404; accepted; history marked deleted.
Data
No additional fixtures.
Bound to
Source
services-crm:modules/entities/tests/integration/services/persistence/contacts.integration.spec.js#removes every owned element with it, the foreign keys cascading
03 Deleting a spouse clears the linkinteractionapitest
Proves
BR-CAP-CRM-ENT-014-03
Preconditions
Prepare a contact named as another's spouse.
Steps
Delete it.
Expected
The other contact's spouse cleared and its version moved under the system.
Data
No additional fixtures.
Bound to
Source
services-crm:modules/entities/tests/integration/services/persistence/contacts.integration.spec.js#bumps the version of that contact and stamps the system, not the caller that deleted (M1-D6)
04 Locks refuse a deletefailurebrowsernegativetest
Proves
BR-CAP-CRM-ENT-014-04
Preconditions
Prepare a contact locked against deletes; one with a locked element; an organization with a locked address.
Steps
Delete each.
Expected
Rejected naming the lock or element; nothing removed.
Data
No additional fixtures.
Bound to
Source
services-crm:modules/entities/tests/integration/services/persistence/contacts.integration.spec.js#refuses the delete as IllegalOperation, naming the element that is locked
05 Organizations others depend on cannot be deletedvalidationbrowsernegativetest
Proves
BR-CAP-CRM-ENT-014-05 INV-DOM-CRM-ENT-002-10
Preconditions
Prepare a parent with a child; an organization a contact is tied to, and one only an ended affiliation names.
Steps
Delete each; delete the leaf; delete after the contact has gone.
Expected
409 naming child organizations or contacts; deleted; deleted.
Data
No additional fixtures.
Bound to
Source
services-crm:modules/entities/tests/e2e/organizations.e2e.spec.js#answers 409 to a delete while the contact is affiliated with it
06 a deleted record's files are retiredtransitionapitest
Proves
BR-CAP-CRM-ENT-014-06
Preconditions
Prepare a contact with a photo.
Steps
Delete it; run the cleanup; roll back another delete.
Expected
Detached in the delete; moved to the deleted folder; still attached after the rollback.
Data
No additional fixtures.
Bound to
Source
services-crm:modules/entities/tests/integration/services/assets/retire-entity-assets.integration.spec.js#detaches the photo in the delete's own transaction
07 Owner-deletion rules apply when switched onedgeunitnegativetest
Proves
BR-CAP-CRM-ENT-014-07
Preconditions
Prepare the switch off, then on, and a restricting association.
Steps
Delete the owner.
Expected
No statement while off; on, a refusal maps to a conflict and rolls back the delete.
Data
No additional fixtures.
Source
services-crm:modules/entities/tests/unit/services/persistence/endpoint-deletions.spec.js#never runs a statement when it is off
08 A refused delete retains the locked aggregateinvariantapinegativeproposed
Proves
BR-CAP-CRM-ENT-014-04 BR-CAP-CRM-ENT-015-05
Preconditions
A person has several contact points and one element carrying a deletion lock.
Steps
Attempt deletion and reread the person, its contact points and its affiliations.
Expected
The lock refusal leaves the aggregate readable with all original owned information.
Data
Run-owned records and configuration in an isolated workspace.
Source
services-crm:modules/entities/tests/integration/services/persistence/contacts.integration.spec.js#refuses the delete as IllegalOperation, naming the element that is locked
09 Removing a holder changes organizational coverageinteractionapiproposed
Proves
BR-CAP-CRM-ENT-012-04 BR-CAP-CRM-ENT-014-02
Preconditions
An organization’s minimum is met by one contact’s effective role.
Steps
Delete that person; process its deletion reaction and read the organization.
Expected
The person is gone and recalculation records the resulting missing holder.
Data
Run-owned records and configuration in an isolated workspace.
Source
services-crm:modules/entities/tests/integration/services/organizations/compliance/compliance-change-events.integration.spec.js#a contact saved with the notes DISABLE_CONTACT_ROLE_COMPLIANCE_CHECK: nothing (its delete still records); services-crm:modules/entities/tests/integration/services/persistence/contacts.integration.spec.js#removes every owned element with it, the foreign keys cascading
10 Archive does not erase deletion dependenciesinteractionapiproposed
Proves
BR-CAP-CRM-ENT-013-08 BR-CAP-CRM-ENT-014-05
Preconditions
An archived organization still has an ended person affiliation.
Steps
Attempt organization deletion and read the retained affiliation.
Expected
Deletion is refused and the ended relationship still identifies the archived body.
Data
Run-owned records and configuration in an isolated workspace.
Source
services-crm:modules/entities/tests/integration/services/persistence/organizations.archive.integration.spec.js#keeps the ended affiliation naming the organization's id, with its name and its archive instant; services-crm:modules/entities/tests/e2e/organizations.e2e.spec.js#answers 409 to a delete while the contact is affiliated with it
11 Unlock the blocking element before deletioninteractionapiproposed
Proves
BR-CAP-CRM-ENT-014-04 BR-CAP-CRM-ENT-015-06
Preconditions
A person has an element carrying a deletion lock and an administrator has delete and unlock authority.
Steps
Try deleting; release the specific element lock at the current version; retry deletion.
Expected
The first attempt retains the person; the audited release allows deletion if no other dependency blocks it.
Data
Run-owned records and configuration in an isolated workspace.
Source
services-crm:modules/entities/tests/integration/services/persistence/contacts.integration.spec.js#refuses the delete as IllegalOperation, naming the element that is locked; services-crm:modules/entities/tests/integration/services/persistence/record-locks.integration.spec.js#refuses an element id the organization does not have, releasing nothing
12 Deleted-record history survives the ordinary recordinteractionapiproposed
Proves
BR-CAP-CRM-ENT-014-02 BR-CAP-CRM-ENT-016-02
Preconditions
A person has saved revisions and an authorized history reader.
Steps
Delete the person; read its ordinary record and its timeline.
Expected
The ordinary read is not found while history remains readable and identifies the deleted subject.
Data
Run-owned records and configuration in an isolated workspace.
Source
services-crm:modules/entities/tests/integration/services/persistence/contacts.integration.spec.js#removes every owned element with it, the foreign keys cascading; services-crm:modules/entities/tests/e2e/organizations-history.e2e.spec.js#answers a caller with the history key but no read of organizations 404, as the organization itself would
13 Exercise every declared authority independentlypermissionapinegativeproposed
Proves
BR-CAP-CRM-ENT-014-01
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.