Skip to content

ATS-CRM-ACT-003Correct or delete an activity with protection against stale edits: Capability Test Specification

Markdown

ATS-CRM-ACT-003

Correct or delete an activity with protection against stale edits: Capability Test Specification

Markdown
  • DocumentProposed

KindAcceptance test setProduct areaCRMModuleActivities, Follow-ups and Task WorkRevision3

Read atservices-crm a8d1364freact-console baf6dae3rhythm-v2-docs 18a49edf

Coverage

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

Test Scenarios

18 scenarios proving CAP-CRM-ACT-003; 8 bound to an existing test.

01 Reject stale edits and missing versionsconcurrencyapinegativetest
Proves
BR-CAP-CRM-ACT-003-01
Preconditions
An activity has advanced to its second version.
Steps
Replace and patch using the first version, then omit the patch version.
Expected
Stale requests conflict, the missing version fails validation, and the saved record remains.
Data
Each run creates and isolates the records it needs.
Bound to
services-crm:modules/activities/tests/e2e/activities.e2e.spec.js#refuses a replace of a version it has moved on from: 409
services-crm:modules/activities/tests/e2e/activities.e2e.spec.js#refuses a patch at a version the activity has moved on from: 409
services-crm:modules/activities/tests/e2e/activities.e2e.spec.js#refuses a patch that names no version: 400 naming sys_version
Source
services-crm:modules/activities/tests/e2e/activities.e2e.spec.js#refuses a replace of a version it has moved on from: 409
02 Preserve unnamed fields in a partial editruleapitest
Proves
BR-CAP-CRM-ACT-003-02
Preconditions
A meeting contains all optional details.
Steps
Change only its subject, then explicitly clear its end.
Expected
The first patch changes only subject and the next clears only end.
Data
Each run creates and isolates the records it needs.
Bound to
services-crm:modules/activities/tests/e2e/activities.e2e.spec.js#leaves every property the patch omits as it was: duration, end, body, external id, owner and links
services-crm:modules/activities/tests/e2e/activities.e2e.spec.js#clears a property the patch sets to null, and only that one
Source
services-crm:modules/activities/tests/e2e/activities.e2e.spec.js#leaves every property the patch omits as it was: duration, end, body, external id, owner and links
03 Reject incomplete replacement before writingvalidationapinegativetest
Proves
BR-CAP-CRM-ACT-003-03
Preconditions
The saved meeting includes duration.
Steps
Replace without duration, then with complete replacement content.
Expected
The incomplete request identifies duration without changing the record; the complete request succeeds.
Data
Each run creates and isolates the records it needs.
Bound to
services-crm:modules/activities/tests/e2e/activities.e2e.spec.js#refuses a replacement missing a property: 400 naming it
services-crm:modules/activities/tests/e2e/activities.e2e.spec.js#changes nothing when it refuses the incomplete replacement
services-crm:modules/activities/tests/e2e/activities.e2e.spec.js#accepts a complete replacement, where null clears: 200, the end is gone
Source
services-crm:modules/activities/tests/e2e/activities.e2e.spec.js#refuses a replacement missing a property: 400 naming it
04 Match replacement links to retained recordsinteractionapitest
Proves
BR-CAP-CRM-ACT-003-04
Preconditions
An activity links two contacts.
Steps
Retain one contact and replace the other with an organization.
Expected
The retained link survives, the removed link disappears and the new link is created.
Data
Each run creates and isolates the records it needs.
Bound to
services-crm:modules/activities/tests/integration/services/persistence/activities.integration.spec.js#replaces the links as a set on update, keeping the row of a record still linked
Source
services-crm:modules/activities/tests/integration/services/persistence/activities.integration.spec.js#replaces the links as a set on update, keeping the row of a record still linked
05 Keep deactivated selections while correcting historyedgeapitest
Proves
BR-CAP-CRM-ACT-003-05
Preconditions
A saved activity’s type and outcome are deactivated.
Steps
Correct its subject and attempt to move another activity to the inactive type.
Expected
Correction retains the earlier selections; the new selection fails.
Data
Each run creates and isolates the records it needs.
Bound to
Source
services-crm:modules/activities/tests/integration/services/persistence/activities.integration.spec.js#keeps an inactive type on an activity that already has it
06 Enforce an activity full lockfailureapinegativetest
Proves
BR-CAP-CRM-ACT-003-06
Preconditions
The activity is locked against updates and deletes.
Steps
Try replacement and deletion.
Expected
Both operations conflict without changing the activity.
Data
Each run creates and isolates the records it needs.
Bound to
Source
services-crm:modules/activities/tests/integration/services/persistence/activities.integration.spec.js#refuses a locked activity
07 Delete an activity and its local relationshipstransitionapinegativetest
Proves
BR-CAP-CRM-ACT-003-07
Preconditions
An activity links two records.
Steps
Delete it, read it and delete it again.
Expected
The activity and links are absent; later read and deletion return Not Found.
Data
Each run creates and isolates the records it needs.
Bound to
services-crm:modules/activities/tests/e2e/activities.e2e.spec.js#deletes it: 200, and a read afterwards is 404, as is a second delete
Source
services-crm:modules/activities/tests/integration/services/persistence/activities.integration.spec.js#removes the activity and its links
08 Allow activity deletion at user tierpermissionbrowsertest
Proves
BR-CAP-CRM-ACT-003-08
Preconditions
A Standard User can access a colleague’s activity.
Steps
Delete the activity and attempt contact deletion.
Expected
Activity deletion succeeds and contact deletion lacks authority.
Data
Each run creates and isolates the records it needs.
Bound to
Source
react-console:acceptance/crm/playwright/journeys/cross-application/CRM-ACC-0717.spec.ts#CRM-ACC-0717
09 Correction settles files and history under the access guardinteractionapiproposed
Proves
BR-CAP-CRM-ACT-003-01 BR-CAP-CRM-ACT-004-03 BR-CAP-CRM-ACT-006-02 BR-CAP-CRM-ACT-019-04
Preconditions
An unlocked interaction has two prepared files and a current revision.
Steps
As an updater, correct the subject and remove one file; read the revision and remaining attachments. Repeat a correction with a read-only caller.
Expected
The successful correction has one revision and the retained file; the forbidden correction changes neither content, files nor history.
Data
Run-owned records in an isolated workspace; fixed clock for calendar checks.
Source
services-crm:modules/activities/tests/e2e/activities.e2e.spec.js#refuses a replace of a version it has moved on from: 409; services-crm:modules/activities/tests/integration/services/persistence/activities.integration.spec.js#keeps an attachment sent back unchanged, and removes one left out; services-crm:modules/activities/services/persistence/activities.ts:recordedStampsOf; services-crm:modules/activities/tests/e2e/activities.e2e.spec.js#refuses a create to a caller who may only read activities: 403
10 Persist interaction from Scheduled to Completedtransitionapiproposed
Proves
INV-DOM-CRM-ACT-001-04 INV-DOM-CRM-ACT-001-07 INV-DOM-CRM-ACT-001-10 INV-DOM-CRM-ACT-001-11
Preconditions
Run-owned interaction has Scheduled standing. The read version matches, updates are unlocked, and the proposed values satisfy the type’s field requirements.
Steps
An ordinary edit chooses completed as the interaction status. Read the resulting record and affected projections after commit.
Expected
The resulting interaction has Completed standing. The database refreshes status on the interaction’s links and captures the committed revision. The interaction appears in history and must satisfy any required completion duration and result.
Data
Run-owned records in an isolated workspace; fixed clock for calendar checks.
Source
services-crm:modules/activities/services/activities/field-modes.ts:fieldModeProblems
11 Persist interaction from Scheduled to Cancelledtransitionapiproposed
Proves
INV-DOM-CRM-ACT-001-04 INV-DOM-CRM-ACT-001-07 INV-DOM-CRM-ACT-001-10 INV-DOM-CRM-ACT-001-11
Preconditions
Run-owned interaction has Scheduled standing. The read version matches, updates are unlocked, and the proposed values satisfy the type’s field requirements.
Steps
An ordinary edit chooses cancelled as the interaction status. Read the resulting record and affected projections after commit.
Expected
The resulting interaction has Cancelled standing. The database refreshes status on the interaction’s links and captures the committed revision. The interaction appears in history without completion-only requirements.
Data
Run-owned records in an isolated workspace; fixed clock for calendar checks.
Source
services-crm:modules/activities/services/persistence/activities.ts:updateActivity
12 Persist interaction from Completed to Scheduledtransitionapiproposed
Proves
INV-DOM-CRM-ACT-001-04 INV-DOM-CRM-ACT-001-07 INV-DOM-CRM-ACT-001-10 INV-DOM-CRM-ACT-001-11
Preconditions
Run-owned interaction has Completed standing. The read version matches, updates are unlocked, and the proposed values satisfy the type’s field requirements.
Steps
An ordinary edit chooses scheduled as the interaction status. Read the resulting record and affected projections after commit.
Expected
The resulting interaction has Scheduled standing. The database refreshes status on the interaction’s links and captures the committed revision. The interaction appears in upcoming items; completion-only requirements no longer apply.
Data
Run-owned records in an isolated workspace; fixed clock for calendar checks.
Source
services-crm:modules/activities/services/persistence/activities.ts:updateActivity
13 Persist interaction from Completed to Cancelledtransitionapiproposed
Proves
INV-DOM-CRM-ACT-001-04 INV-DOM-CRM-ACT-001-07 INV-DOM-CRM-ACT-001-10 INV-DOM-CRM-ACT-001-11
Preconditions
Run-owned interaction has Completed standing. The read version matches, updates are unlocked, and the proposed values satisfy the type’s field requirements.
Steps
An ordinary edit chooses cancelled as the interaction status. Read the resulting record and affected projections after commit.
Expected
The resulting interaction has Cancelled standing. The database refreshes status on the interaction’s links and captures the committed revision. The interaction appears in history without completion-only requirements.
Data
Run-owned records in an isolated workspace; fixed clock for calendar checks.
Source
services-crm:modules/activities/services/persistence/activities.ts:updateActivity
14 Persist interaction from Cancelled to Scheduledtransitionapiproposed
Proves
INV-DOM-CRM-ACT-001-04 INV-DOM-CRM-ACT-001-07 INV-DOM-CRM-ACT-001-10 INV-DOM-CRM-ACT-001-11
Preconditions
Run-owned interaction has Cancelled standing. The read version matches, updates are unlocked, and the proposed values satisfy the type’s field requirements.
Steps
An ordinary edit chooses scheduled as the interaction status. Read the resulting record and affected projections after commit.
Expected
The resulting interaction has Scheduled standing. The database refreshes status on the interaction’s links and captures the committed revision. The interaction appears in upcoming items; completion-only requirements no longer apply.
Data
Run-owned records in an isolated workspace; fixed clock for calendar checks.
Source
services-crm:modules/activities/services/persistence/activities.ts:updateActivity
15 Persist interaction from Cancelled to Completedtransitionapiproposed
Proves
INV-DOM-CRM-ACT-001-04 INV-DOM-CRM-ACT-001-07 INV-DOM-CRM-ACT-001-10 INV-DOM-CRM-ACT-001-11
Preconditions
Run-owned interaction has Cancelled standing. The read version matches, updates are unlocked, and the proposed values satisfy the type’s field requirements.
Steps
An ordinary edit chooses completed as the interaction status. Read the resulting record and affected projections after commit.
Expected
The resulting interaction has Completed standing. The database refreshes status on the interaction’s links and captures the committed revision. The interaction appears in history and must satisfy any required completion duration and result.
Data
Run-owned records in an isolated workspace; fixed clock for calendar checks.
Source
services-crm:modules/activities/services/activities/field-modes.ts:fieldModeProblems
16 Persist interaction from Scheduled to Deletedtransitionapiproposed
Proves
INV-DOM-CRM-ACT-001-04 INV-DOM-CRM-ACT-001-07 INV-DOM-CRM-ACT-001-10 INV-DOM-CRM-ACT-001-11
Preconditions
Run-owned interaction has Scheduled standing. Neither deletion nor update-and-deletion protection is set; deletion does not require a read version.
Steps
A caller requests removal. Read the resulting record and affected projections after commit.
Expected
The resulting interaction has Deleted standing. The interaction’s owned links and file entries are removed, and released files are submitted for cleanup. Import matching references are dropped and the committed deletion is captured in history.
Data
Run-owned records in an isolated workspace; fixed clock for calendar checks.
Source
services-crm:modules/activities/tests/integration/services/persistence/activities.integration.spec.js#removes the activity and its links
17 Persist interaction from Completed to Deletedtransitionapiproposed
Proves
INV-DOM-CRM-ACT-001-04 INV-DOM-CRM-ACT-001-07 INV-DOM-CRM-ACT-001-10 INV-DOM-CRM-ACT-001-11
Preconditions
Run-owned interaction has Completed standing. Neither deletion nor update-and-deletion protection is set; deletion does not require a read version.
Steps
A caller requests removal. Read the resulting record and affected projections after commit.
Expected
The resulting interaction has Deleted standing. The interaction’s owned links and file entries are removed, and released files are submitted for cleanup. Import matching references are dropped and the committed deletion is captured in history.
Data
Run-owned records in an isolated workspace; fixed clock for calendar checks.
Source
services-crm:modules/activities/services/persistence/activities.ts:deleteActivity
18 Persist interaction from Cancelled to Deletedtransitionapiproposed
Proves
INV-DOM-CRM-ACT-001-04 INV-DOM-CRM-ACT-001-07 INV-DOM-CRM-ACT-001-10 INV-DOM-CRM-ACT-001-11
Preconditions
Run-owned interaction has Cancelled standing. Neither deletion nor update-and-deletion protection is set; deletion does not require a read version.
Steps
A caller requests removal. Read the resulting record and affected projections after commit.
Expected
The resulting interaction has Deleted standing. The interaction’s owned links and file entries are removed, and released files are submitted for cleanup. Import matching references are dropped and the committed deletion is captured in history.
Data
Run-owned records in an isolated workspace; fixed clock for calendar checks.
Source
services-crm:modules/activities/services/persistence/activities.ts:deleteActivity

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.