---
id: ATS-CRM-ACT-010
scope: CAP-CRM-ACT-010
product_area: crm
module: activities-tasks
revision: 3
status: proposed
approved_by: null
approved_at: null
source_sha:
  services-crm: a8d1364f1dd44b723bb5f9acba12f983e9ec8d69
  react-console: baf6dae382d6f41dce976c7f848667ccc37e076f
  rhythm-v2-docs: 18a49edf30ee6bda18b159b65a2b91e093ea713d
scenarios:
- id: ATS-CRM-ACT-010-01
  title: Reject missing or excessive task text
  level: api
  proves:
  - BR-CAP-CRM-ACT-010-01
  preconditions: A valid task type exists.
  steps: Create with missing, blank and 501-character titles and a 20,001-character description.
  expected: Each invalid field is identified and no task is created.
  negative: true
  data_needs: Each run creates and isolates the records it needs.
  bound_to:
  - services-crm:modules/tasks/tests/integration/services/persistence/tasks.integration.spec.js#refuses
    a create whose title is blank, naming the field
  - services-crm:modules/tasks/tests/integration/services/persistence/tasks.integration.spec.js#refuses
    a create whose title is longer than 500 characters, naming the field
  - services-crm:modules/tasks/tests/integration/services/persistence/tasks.integration.spec.js#refuses
    a create whose description is longer than 20000 characters, naming the field
  - services-crm:modules/tasks/tests/e2e/tasks.e2e.spec.js#answers 400 for a task with no title
  - services-crm:modules/tasks/tests/integration/db/tasks.table.integration.spec.js#refuses a title that
    is blank
  - TST-CRM-ACT-025
  - TST-CRM-ACT-015
  - TST-CRM-ACT-017
  provenance: test
  source: services-crm:modules/tasks/tests/integration/services/persistence/tasks.integration.spec.js#refuses
    a create whose title is blank, naming the field
  category: boundary
  binding_scope: Each registered suite contributes the assertions named by the retained file bindings;
    a compound scenario can require several suites. Conformance remains unverified.
- id: ATS-CRM-ACT-010-02
  title: Require an existing task classification
  level: api
  proves:
  - BR-CAP-CRM-ACT-010-02
  preconditions: The workspace can be addressed for task creation.
  steps: Create without a type and with an unknown type.
  expected: Both requests fail validation.
  negative: true
  data_needs: Each run creates and isolates the records it needs.
  bound_to:
  - services-crm:modules/tasks/tests/e2e/tasks.e2e.spec.js#answers 400 for a task with no type, since
    every task is of some kind
  - services-crm:modules/tasks/tests/e2e/tasks.e2e.spec.js#answers 400 for a task type the tenant does
    not have
  - services-crm:modules/tasks/tests/integration/db/tasks.table.integration.spec.js#refuses a task with
    no type at all, which Rhythm 1.0 required too
  - TST-CRM-ACT-015
  - TST-CRM-ACT-017
  provenance: test
  source: services-crm:modules/tasks/tests/e2e/tasks.e2e.spec.js#answers 400 for a task with no type,
    since every task is of some kind
  category: validation
  binding_scope: Each registered suite contributes the assertions named by the retained file bindings;
    a compound scenario can require several suites. Conformance remains unverified.
- id: ATS-CRM-ACT-010-03
  title: Prevent creation in a closed status
  level: api
  proves:
  - BR-CAP-CRM-ACT-010-03
  preconditions: A valid task type is available.
  steps: Create directly as Completed.
  expected: The refusal points to the closing action.
  negative: true
  data_needs: Each run creates and isolates the records it needs.
  bound_to:
  - services-crm:modules/tasks/tests/integration/services/persistence/tasks.integration.spec.js#refuses
    a create in a closed status, naming the operation that does close a task
  - services-crm:modules/tasks/tests/e2e/tasks.e2e.spec.js#answers 400 for a task created already completed,
    since a task is created open
  - TST-CRM-ACT-025
  - TST-CRM-ACT-015
  provenance: test
  source: services-crm:modules/tasks/tests/integration/services/persistence/tasks.integration.spec.js#refuses
    a create in a closed status, naming the operation that does close a task
  category: transition
  binding_scope: Each registered suite contributes the assertions named by the retained file bindings;
    a compound scenario can require several suites. Conformance remains unverified.
- id: ATS-CRM-ACT-010-04
  title: Apply task defaults and retain task date
  level: api
  proves:
  - BR-CAP-CRM-ACT-010-04
  preconditions: A task type exists.
  steps: Create without priority or task date, then replace without task date.
  expected: The task starts Open at Normal priority with today’s workspace date, which replacement preserves.
  negative: false
  data_needs: Each run creates and isolates the records it needs.
  bound_to:
  - services-crm:modules/tasks/tests/integration/services/persistence/tasks.integration.spec.js#dates
    a task today, in the tenant's calendar, when the create gives no task date
  - services-crm:modules/tasks/tests/integration/services/persistence/tasks.integration.spec.js#opens
    a task at normal priority when the create says neither
  - react-console:acceptance/crm/playwright/journeys/cross-application/CRM-ACC-0712.spec.ts#CRM-ACC-0712
  - TST-CRM-ACT-025
  - TST-CRM-ACT-056
  provenance: test
  source: services-crm:modules/tasks/tests/integration/services/persistence/tasks.integration.spec.js#dates
    a task today, in the tenant's calendar, when the create gives no task date
  category: rule
  binding_scope: Each registered suite contributes the assertions named by the retained file bindings;
    a compound scenario can require several suites. Conformance remains unverified.
- id: ATS-CRM-ACT-010-05
  title: Reject impossible due days
  level: api
  proves:
  - BR-CAP-CRM-ACT-010-05
  preconditions: A valid task type is available.
  steps: Create work due on February 30.
  expected: The response identifies the invalid due-date field.
  negative: true
  data_needs: Each run creates and isolates the records it needs.
  bound_to:
  - services-crm:modules/tasks/tests/e2e/tasks.e2e.spec.js#answers 400 naming the field for a due date
    that is not a day of the calendar
  - TST-CRM-ACT-015
  provenance: test
  source: services-crm:modules/tasks/tests/e2e/tasks.e2e.spec.js#answers 400 naming the field for a due
    date that is not a day of the calendar
  category: validation
  binding_scope: Each registered suite contributes the assertions named by the retained file bindings;
    a compound scenario can require several suites. Conformance remains unverified.
- id: ATS-CRM-ACT-010-06
  title: Discard supplied due time while keeping its day
  level: browser
  proves:
  - BR-CAP-CRM-ACT-010-06
  preconditions: A valid task type is available.
  steps: Submit a due date containing a time component.
  expected: Creation succeeds and the stored due value contains only its calendar day.
  negative: false
  data_needs: Each run creates and isolates the records it needs.
  bound_to:
  - react-console:acceptance/crm/playwright/journeys/cross-application/CRM-ACC-0712.spec.ts#CRM-ACC-0712
  - TST-CRM-ACT-056
  provenance: test
  source: react-console:acceptance/crm/playwright/journeys/cross-application/CRM-ACC-0712.spec.ts#CRM-ACC-0712
  category: boundary
  binding_scope: Each registered suite contributes the assertions named by the retained file bindings;
    a compound scenario can require several suites. Conformance remains unverified.
- id: ATS-CRM-ACT-010-07
  title: Reject local references outside the workspace
  level: api
  proves:
  - BR-CAP-CRM-ACT-010-07
  preconditions: Another workspace owns contact, organization, type and queue fixtures.
  steps: Create tasks referencing each fixture.
  expected: Each foreign reference fails and no task is retained.
  negative: true
  data_needs: Each run creates and isolates the records it needs.
  bound_to:
  - services-crm:modules/tasks/tests/integration/services/persistence/tasks.integration.spec.js#refuses
    a contact the tenant does not have
  - services-crm:modules/tasks/tests/integration/services/persistence/tasks.integration.spec.js#refuses
    an organization the tenant does not have
  - services-crm:modules/tasks/tests/integration/services/persistence/tasks.integration.spec.js#refuses
    a queue the tenant does not have
  - services-crm:modules/tasks/tests/integration/services/persistence/tasks.integration.spec.js#refuses
    a task of this tenant that would name the other tenant’s task type
  - services-crm:modules/tasks/tests/integration/services/persistence/tasks.integration.spec.js#writes
    no task at all for a create it refused
  - TST-CRM-ACT-025
  provenance: test
  source: services-crm:modules/tasks/tests/integration/services/persistence/tasks.integration.spec.js#refuses
    a contact the tenant does not have
  category: validation
  binding_scope: Each registered suite contributes the assertions named by the retained file bindings;
    a compound scenario can require several suites. Conformance remains unverified.
- id: ATS-CRM-ACT-010-08
  title: Preserve work after related-record deletion
  level: api
  proves:
  - BR-CAP-CRM-ACT-010-08
  preconditions: A task refers to a contact and organization.
  steps: Delete both related records.
  expected: The task remains with both local references cleared.
  negative: false
  data_needs: Each run creates and isolates the records it needs.
  bound_to:
  - 'services-crm:modules/tasks/tests/integration/db/tasks.table.integration.spec.js#keeps the task: the
    work outlives the record it was about'
  - services-crm:modules/tasks/tests/integration/db/tasks.table.integration.spec.js#clears the contact
    it was about
  - services-crm:modules/tasks/tests/integration/db/tasks.table.integration.spec.js#clears the organization
    it was about
  - react-console:acceptance/crm/playwright/journeys/cross-application/CRM-ACC-0719.spec.ts#CRM-ACC-0719
  - TST-CRM-ACT-017
  - TST-CRM-ACT-063
  provenance: test
  source: 'services-crm:modules/tasks/tests/integration/db/tasks.table.integration.spec.js#keeps the task:
    the work outlives the record it was about'
  category: transition
  binding_scope: Each registered suite contributes the assertions named by the retained file bindings;
    a compound scenario can require several suites. Conformance remains unverified.
- id: ATS-CRM-ACT-010-09
  title: Reserve external task references within each workspace
  level: api
  proves:
  - BR-CAP-CRM-ACT-010-09
  preconditions: A task already holds an external reference.
  steps: Reuse that reference locally and in another workspace.
  expected: Local reuse fails and the other workspace can use it.
  negative: true
  data_needs: Each run creates and isolates the records it needs.
  bound_to:
  - services-crm:modules/tasks/tests/integration/services/persistence/tasks.integration.spec.js#refuses
    a second task of the tenant with an external id another task holds (DEF-CRM-0719)
  - services-crm:modules/tasks/tests/integration/services/persistence/tasks.integration.spec.js#lets another
    tenant’s task hold an external id this tenant’s task holds
  - TST-CRM-ACT-025
  provenance: test
  source: services-crm:modules/tasks/tests/integration/services/persistence/tasks.integration.spec.js#refuses
    a second task of the tenant with an external id another task holds (DEF-CRM-0719)
  category: invariant
  binding_scope: Each registered suite contributes the assertions named by the retained file bindings;
    a compound scenario can require several suites. Conformance remains unverified.
- id: ATS-CRM-ACT-010-10
  title: Preserve partial edits and reject stale replacement
  level: api
  proves:
  - BR-CAP-CRM-ACT-010-10
  preconditions: A saved task has a current version and optional details.
  steps: Patch one field, replace using an older version and submit a mismatched task reference.
  expected: The patch preserves other fields, stale replacement conflicts and the mismatched reference
    fails.
  negative: true
  data_needs: Each run creates and isolates the records it needs.
  bound_to:
  - services-crm:modules/tasks/tests/e2e/tasks.e2e.spec.js#and leaves what the patch said nothing about
    as it was
  - services-crm:modules/tasks/tests/e2e/tasks.e2e.spec.js#then, when the version is off, refuses the
    change (409)
  - services-crm:modules/tasks/tests/e2e/tasks.e2e.spec.js#then, when the id is wrong, refuses the change
    (400)
  - services-crm:modules/tasks/tests/integration/services/persistence/tasks.integration.spec.js#refuses
    a replacement at a version the row has moved past, and leaves the row as it was
  - TST-CRM-ACT-015
  - TST-CRM-ACT-025
  provenance: test
  source: services-crm:modules/tasks/tests/e2e/tasks.e2e.spec.js#and leaves what the patch said nothing
    about as it was
  category: concurrency
  binding_scope: Each registered suite contributes the assertions named by the retained file bindings;
    a compound scenario can require several suites. Conformance remains unverified.
- id: ATS-CRM-ACT-010-11
  title: Apply task update and deletion locks
  level: api
  proves:
  - BR-CAP-CRM-ACT-010-11
  preconditions: Separate tasks have full and deletion-only locks.
  steps: Try prohibited editing and deletion.
  expected: The relevant locks cause refusals and preserve the records.
  negative: true
  data_needs: Each run creates and isolates the records it needs.
  bound_to:
  - services-crm:modules/tasks/tests/e2e/tasks.e2e.spec.js#refuses deleting a task locked against deletes
  - services-crm:modules/tasks/tests/e2e/tasks.e2e.spec.js#refuses changing a task locked against updates
  - services-crm:modules/tasks/tests/integration/services/persistence/tasks.integration.spec.js#refuses
    the delete of a locked task, and leaves it in the table
  - TST-CRM-ACT-015
  - TST-CRM-ACT-025
  provenance: test
  source: services-crm:modules/tasks/tests/e2e/tasks.e2e.spec.js#refuses deleting a task locked against
    deletes
  category: failure
  binding_scope: Each registered suite contributes the assertions named by the retained file bindings;
    a compound scenario can require several suites. Conformance remains unverified.
- id: ATS-CRM-ACT-010-12
  title: Restrict deletion to administrator API use
  level: browser
  proves:
  - BR-CAP-CRM-ACT-010-12
  preconditions: A task and Standard User caller are available.
  steps: Inspect console actions and attempt deletion through the API.
  expected: The console exposes no delete action and the API requires deletion authority.
  negative: false
  data_needs: Each run creates and isolates the records it needs.
  bound_to:
  - react-console:acceptance/crm/playwright/journeys/cross-application/CRM-ACC-0707.spec.ts#CRM-ACC-0707
  - react-console:acceptance/crm/playwright/journeys/cross-application/CRM-ACC-0716.spec.ts#CRM-ACC-0716
  - TST-CRM-ACT-051
  - TST-CRM-ACT-060
  provenance: test
  source: react-console:acceptance/crm/playwright/journeys/cross-application/CRM-ACC-0707.spec.ts#CRM-ACC-0707
  category: permission
  binding_scope: Each registered suite contributes the assertions named by the retained file bindings;
    a compound scenario can require several suites. Conformance remains unverified.
- id: ATS-CRM-ACT-010-13
  title: Task progress and routing appear in the related timeline
  category: interaction
  level: api
  proves:
  - BR-CAP-CRM-ACT-010-10
  - BR-CAP-CRM-ACT-011-03
  - BR-CAP-CRM-ACT-012-01
  - BR-CAP-CRM-ACT-005-02
  preconditions: An open task concerns a contact and belongs to a queue.
  steps: Assign a colleague, edit its title, complete it and read the task and both timeline sections.
  expected: The latest title and assignment persist with completion attribution; the task moves from Upcoming
    to History.
  negative: false
  data_needs: Run-owned records in an isolated workspace; fixed clock for calendar checks.
  bound_to: []
  provenance: proposed
  source: 'services-crm:modules/tasks/services/persistence/tasks.ts:updateTask; services-crm:modules/tasks/tests/e2e/tasks.e2e.spec.js#completes
    the task, stamping who finished it and when; services-crm:modules/tasks/tests/e2e/tasks.e2e.spec.js#stamps
    who holds the task, who gave it to them and when; services-crm:modules/activities/tests/integration/services/persistence/activities.queries.integration.spec.js#lists
    the upcoming soonest first: the overdue scheduled activity, then open tasks and scheduled activities
    in time order'
  exercises:
  - CAP-CRM-ACT-010
  - CAP-CRM-ACT-011
  - CAP-CRM-ACT-012
  - CAP-CRM-ACT-005
  related:
  - CAP-CRM-ACT-011
  - CAP-CRM-ACT-012
  - CAP-CRM-ACT-005
- id: ATS-CRM-ACT-010-14
  title: Persist task from Open to Deleted
  category: transition
  level: api
  proves:
  - INV-DOM-CRM-ACT-003-02
  - INV-DOM-CRM-ACT-003-10
  - INV-DOM-CRM-ACT-003-12
  preconditions: Run-owned task has Open standing. Neither supported lock is set; deletion accepts no
    read version.
  steps: A caller requests task deletion. Read the resulting record and affected projections after commit.
  expected: The resulting task has Deleted standing. The task row is removed; enabled attention resolves
    any overdue item within the deletion transaction.
  negative: false
  data_needs: Run-owned records in an isolated workspace; fixed clock for calendar checks.
  bound_to: []
  provenance: proposed
  source: services-crm:modules/tasks/tests/e2e/tasks.e2e.spec.js#refuses deleting a task locked against
    deletes
  state_model: STATE-CRM-ACT-002
  transition:
    from: open
    to: deleted
    trigger: A caller requests task deletion.
- id: ATS-CRM-ACT-010-15
  title: Persist task from Completed to Deleted
  category: transition
  level: api
  proves:
  - INV-DOM-CRM-ACT-003-02
  - INV-DOM-CRM-ACT-003-10
  - INV-DOM-CRM-ACT-003-12
  preconditions: Run-owned task has Completed standing. Neither supported lock is set; deletion accepts
    no read version.
  steps: A caller requests task deletion. Read the resulting record and affected projections after commit.
  expected: The resulting task has Deleted standing. The task row is removed; enabled attention resolves
    any overdue item within the deletion transaction.
  negative: false
  data_needs: Run-owned records in an isolated workspace; fixed clock for calendar checks.
  bound_to: []
  provenance: proposed
  source: services-crm:modules/tasks/services/persistence/tasks.ts:deleteTask
  state_model: STATE-CRM-ACT-002
  transition:
    from: completed
    to: deleted
    trigger: A caller requests task deletion.
- id: ATS-CRM-ACT-010-16
  title: Persist task from Waiting for someone else to Deleted
  category: transition
  level: api
  proves:
  - INV-DOM-CRM-ACT-003-02
  - INV-DOM-CRM-ACT-003-10
  - INV-DOM-CRM-ACT-003-12
  preconditions: Run-owned task has Waiting for someone else standing. Neither supported lock is set;
    deletion accepts no read version.
  steps: A caller requests task deletion. Read the resulting record and affected projections after commit.
  expected: The resulting task has Deleted standing. The task row is removed; enabled attention resolves
    any overdue item within the deletion transaction.
  negative: false
  data_needs: Run-owned records in an isolated workspace; fixed clock for calendar checks.
  bound_to: []
  provenance: proposed
  source: services-crm:modules/tasks/services/persistence/tasks.ts:deleteTask
  state_model: STATE-CRM-ACT-002
  transition:
    from: waiting_for_someone_else
    to: deleted
    trigger: A caller requests task deletion.
- id: ATS-CRM-ACT-010-17
  title: Persist task from Deferred to Deleted
  category: transition
  level: api
  proves:
  - INV-DOM-CRM-ACT-003-02
  - INV-DOM-CRM-ACT-003-10
  - INV-DOM-CRM-ACT-003-12
  preconditions: Run-owned task has Deferred standing. Neither supported lock is set; deletion accepts
    no read version.
  steps: A caller requests task deletion. Read the resulting record and affected projections after commit.
  expected: The resulting task has Deleted standing. The task row is removed; enabled attention resolves
    any overdue item within the deletion transaction.
  negative: false
  data_needs: Run-owned records in an isolated workspace; fixed clock for calendar checks.
  bound_to: []
  provenance: proposed
  source: services-crm:modules/tasks/services/persistence/tasks.ts:deleteTask
  state_model: STATE-CRM-ACT-002
  transition:
    from: deferred
    to: deleted
    trigger: A caller requests task deletion.
- id: ATS-CRM-ACT-010-18
  title: Persist task from Cancelled to Deleted
  category: transition
  level: api
  proves:
  - INV-DOM-CRM-ACT-003-02
  - INV-DOM-CRM-ACT-003-10
  - INV-DOM-CRM-ACT-003-12
  preconditions: Run-owned task has Cancelled standing. Neither supported lock is set; deletion accepts
    no read version.
  steps: A caller requests task deletion. Read the resulting record and affected projections after commit.
  expected: The resulting task has Deleted standing. The task row is removed; enabled attention resolves
    any overdue item within the deletion transaction.
  negative: false
  data_needs: Run-owned records in an isolated workspace; fixed clock for calendar checks.
  bound_to: []
  provenance: proposed
  source: services-crm:modules/tasks/services/persistence/tasks.ts:deleteTask
  state_model: STATE-CRM-ACT-002
  transition:
    from: cancelled
    to: deleted
    trigger: A caller requests task deletion.
evidence:
- 'services-crm at a8d1364f1dd44b723bb5f9acba12f983e9ec8d69: scenario sources, executable assertions and
  local dependency boundaries are inspected.'
- 'react-console at baf6dae382d6f41dce976c7f848667ccc37e076f: scoped component tests and browser journey
  assertions are inspected.'
coverage:
  rule: covered
  transition: covered
  validation: covered
  permission: covered
  edge: 'gap: FND-CRM-ACT-056'
  failure: covered
  boundary: covered
  concurrency: covered
  invariant: covered
  interaction: covered
coverage_obligations:
  finding: FND-CRM-ACT-056
  unproved_rules:
  - BR-CAP-CRM-ACT-010-13
  permission_matrix:
    keys:
    - crm.tasks.read
    - crm.tasks.create
    - crm.tasks.update
    - crm.tasks.delete
    remaining: Complete allow/refuse combinations, including each console guard and each API operation.
  execution_note: Covered means a scenario is specified; it does not mean that scenario has executed or
    every variant has an executable binding.
related_coverage:
- capability: CAP-CRM-ACT-011
  scenarios:
  - ATS-CRM-ACT-010-13
  finding: FND-CRM-ACT-056
- capability: CAP-CRM-ACT-012
  scenarios:
  - ATS-CRM-ACT-010-13
  finding: FND-CRM-ACT-056
- capability: CAP-CRM-ACT-005
  scenarios:
  - ATS-CRM-ACT-010-13
  finding: FND-CRM-ACT-056
permission_coverage:
- key: crm.tasks.read
  finding: FND-CRM-ACT-056
  note: The finding covers unproved operation and surface combinations; a permission-category scenario
    is not a complete permission matrix.
- key: crm.tasks.create
  finding: FND-CRM-ACT-056
  note: The finding covers unproved operation and surface combinations; a permission-category scenario
    is not a complete permission matrix.
- key: crm.tasks.update
  finding: FND-CRM-ACT-056
  note: The finding covers unproved operation and surface combinations; a permission-category scenario
    is not a complete permission matrix.
- key: crm.tasks.delete
  finding: FND-CRM-ACT-056
  note: The finding covers unproved operation and surface combinations; a permission-category scenario
    is not a complete permission matrix.
---

# Record and maintain a piece of work: Capability Test Specification

## Coverage

Category coverage counts specified proof. Unbound cases remain proposed; registered assertions do not establish a passing run.

| Rule | Proof Scenario Or Finding |
|---|---|
| `BR-CAP-CRM-ACT-010-01` | `ATS-CRM-ACT-010-01` |
| `BR-CAP-CRM-ACT-010-02` | `ATS-CRM-ACT-010-02` |
| `BR-CAP-CRM-ACT-010-03` | `ATS-CRM-ACT-010-03` |
| `BR-CAP-CRM-ACT-010-04` | `ATS-CRM-ACT-010-04` |
| `BR-CAP-CRM-ACT-010-05` | `ATS-CRM-ACT-010-05` |
| `BR-CAP-CRM-ACT-010-06` | `ATS-CRM-ACT-010-06` |
| `BR-CAP-CRM-ACT-010-07` | `ATS-CRM-ACT-010-07` |
| `BR-CAP-CRM-ACT-010-08` | `ATS-CRM-ACT-010-08` |
| `BR-CAP-CRM-ACT-010-09` | `ATS-CRM-ACT-010-09` |
| `BR-CAP-CRM-ACT-010-10` | `ATS-CRM-ACT-010-10`, `ATS-CRM-ACT-010-13` |
| `BR-CAP-CRM-ACT-010-11` | `ATS-CRM-ACT-010-11` |
| `BR-CAP-CRM-ACT-010-12` | `ATS-CRM-ACT-010-12` |
| `BR-CAP-CRM-ACT-010-13` | `FND-CRM-ACT-056` |

## Interactions With Related Capabilities

An open task concerns a contact and belongs to a queue. Assign a colleague, edit its title, complete it and read the task and both timeline sections.

The interaction scenario names the capabilities and rules it exercises. The coverage finding retains incomplete permission combinations and failure variants.
