---
id: ATS-CRM-ACT-011
scope: CAP-CRM-ACT-011
product_area: crm
module: activities-tasks
revision: 2
status: proposed
approved_by: null
approved_at: null
source_sha:
  services-crm: a8d1364f1dd44b723bb5f9acba12f983e9ec8d69
  react-console: baf6dae382d6f41dce976c7f848667ccc37e076f
scenarios:
  - id: ATS-CRM-ACT-011-01
    title: Evaluate ordinary task status transitions
    level: unit
    proves:
      - BR-CAP-CRM-ACT-011-01
    preconditions: All task statuses are available to the lifecycle decision.
    steps: Evaluate each possible ordinary edit transition.
    expected: Open-to-open transitions succeed and closed-boundary transitions fail.
    negative: true
    data_needs: Each run creates and isolates the records it needs.
    bound_to:
      - >-
        services-crm:modules/tasks/tests/unit/services/tasks/lifecycle.spec.js#allows
        an open task to move to any of the three open statuses
      - >-
        services-crm:modules/tasks/tests/unit/services/tasks/lifecycle.spec.js#decides
        every operation from every status, so no move is left unanswered
      - >-
        services-crm:modules/tasks/tests/integration/services/persistence/tasks.integration.spec.js#moves
        a task between open statuses
    provenance: test
    source: >-
      services-crm:modules/tasks/tests/unit/services/tasks/lifecycle.spec.js#allows
      an open task to move to any of the three open statuses
  - id: ATS-CRM-ACT-011-02
    title: Require explicit closing actions
    level: api
    proves:
      - BR-CAP-CRM-ACT-011-02
    preconditions: An open task is saved.
    steps: Replace its status with Completed or Cancelled.
    expected: The service refuses and names the appropriate action.
    negative: true
    data_needs: Each run creates and isolates the records it needs.
    bound_to:
      - >-
        services-crm:modules/tasks/tests/unit/services/tasks/lifecycle.spec.js#refuses
        an update that would complete the task, naming the operation that would
        have worked
      - >-
        services-crm:modules/tasks/tests/unit/services/tasks/lifecycle.spec.js#refuses
        an update that would cancel the task the same way
      - >-
        services-crm:modules/tasks/tests/integration/services/persistence/tasks.integration.spec.js#refuses
        a replacement that would complete the task, naming the operation that
        would
    provenance: test
    source: >-
      services-crm:modules/tasks/tests/unit/services/tasks/lifecycle.spec.js#refuses
      an update that would complete the task, naming the operation that would
      have worked
  - id: ATS-CRM-ACT-011-03
    title: Attribute closing and clear stamps on reopen
    level: api
    proves:
      - BR-CAP-CRM-ACT-011-03
    preconditions: An open task can be completed and cancelled.
    steps: 'Complete, reopen and cancel it.'
    expected: 'Closing stamps identify actor and time, and reopening clears prior stamps.'
    negative: false
    data_needs: Each run creates and isolates the records it needs.
    bound_to:
      - >-
        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#cancels it
        afterwards, stamping who decided that and when
      - >-
        services-crm:modules/tasks/tests/integration/db/tasks.table.integration.spec.js#refuses
        a completed task with no stamps
      - >-
        services-crm:modules/tasks/tests/integration/db/tasks.table.integration.spec.js#refuses
        a completion stamp on a task that is not completed, so a reopen leaves
        no trace
    provenance: test
    source: >-
      services-crm:modules/tasks/tests/e2e/tasks.e2e.spec.js#completes the task,
      stamping who finished it and when
  - id: ATS-CRM-ACT-011-04
    title: Require reopening between closed statuses
    level: unit
    proves:
      - BR-CAP-CRM-ACT-011-04
    preconditions: Completed and Cancelled tasks are available.
    steps: Cancel the completed task and complete the cancelled task.
    expected: Both refuse with reopening guidance.
    negative: true
    data_needs: Each run creates and isolates the records it needs.
    bound_to:
      - >-
        services-crm:modules/tasks/tests/unit/services/tasks/lifecycle.spec.js#refuses
        a cancelled task, asking for the reopen that would make it possible
      - >-
        services-crm:modules/tasks/tests/unit/services/tasks/lifecycle.spec.js#refuses
        a completed task, asking for the reopen that would make it possible
      - >-
        services-crm:modules/tasks/tests/integration/services/persistence/tasks.integration.spec.js#refuses
        cancelling a completed task, asking for the reopen first
    provenance: test
    source: >-
      services-crm:modules/tasks/tests/unit/services/tasks/lifecycle.spec.js#refuses
      a cancelled task, asking for the reopen that would make it possible
  - id: ATS-CRM-ACT-011-05
    title: Reject repeated user completion
    level: api
    proves:
      - BR-CAP-CRM-ACT-011-05
    preconditions: The task is already completed.
    steps: Complete it again as a person.
    expected: The action returns Conflict.
    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 409 to
        completing a task that is already completed
      - >-
        services-crm:modules/tasks/tests/integration/services/persistence/tasks.integration.spec.js#refuses
        completing a task that is already completed
    provenance: test
    source: >-
      services-crm:modules/tasks/tests/e2e/tasks.e2e.spec.js#answers 409 to
      completing a task that is already completed
  - id: ATS-CRM-ACT-011-06
    title: Restore Open and remove completion attribution
    level: api
    proves:
      - BR-CAP-CRM-ACT-011-06
    preconditions: A deferred task was completed.
    steps: Reopen it and separately try reopening an already open task.
    expected: >-
      The closed task returns to Open without closing stamps; the other request
      fails.
    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#reopens
        it as open, whatever status it was in before it closed
      - >-
        services-crm:modules/tasks/tests/integration/services/persistence/tasks.integration.spec.js#clears
        the completion stamps on the reopen, so nothing says it is done
      - >-
        services-crm:modules/tasks/tests/e2e/tasks.e2e.spec.js#answers 409 to
        reopening a task that is not closed
      - >-
        services-crm:modules/tasks/tests/unit/services/tasks/lifecycle.spec.js#refuses
        a deferred task too: deferred is still a task somebody will do
    provenance: test
    source: >-
      services-crm:modules/tasks/tests/integration/services/persistence/tasks.integration.spec.js#reopens
      it as open, whatever status it was in before it closed
  - id: ATS-CRM-ACT-011-07
    title: Prevent ordinary edits to closed work
    level: api
    proves:
      - BR-CAP-CRM-ACT-011-07
    preconditions: A task is cancelled.
    steps: Submit its general replacement.
    expected: The response conflicts and requires reopening.
    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 409 to
        replacing a cancelled task, which is reopened first
      - >-
        services-crm:modules/tasks/tests/unit/services/tasks/lifecycle.spec.js#refuses
        an update of a completed task even where the status is left alone
      - >-
        react-console:acceptance/crm/playwright/journeys/cross-application/CRM-ACC-0708.spec.ts#CRM-ACC-0708
    provenance: test
    source: >-
      services-crm:modules/tasks/tests/e2e/tasks.e2e.spec.js#answers 409 to
      replacing a cancelled task, which is reopened first
  - id: ATS-CRM-ACT-011-08
    title: Guard lifecycle actions with the read version
    level: api
    proves:
      - BR-CAP-CRM-ACT-011-08
    preconditions: A task was completed after an earlier read.
    steps: >-
      Reopen with the earlier version and send closing actions without a
      version.
    expected: >-
      The stale action conflicts, missing versions fail validation and the saved
      status remains.
    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 409 to
        the reopen sent at the version the completion moved on from
      - >-
        services-crm:modules/tasks/tests/e2e/tasks.e2e.spec.js#answers 400
        naming sys_version to a reopen, a cancel and a complete that name no
        version
      - >-
        services-crm:modules/tasks/tests/unit/api/task-api-mapper.spec.js#refuses
        a body that names no version, as ObjectInvalid naming sys_version
      - >-
        react-console:acceptance/crm/playwright/journeys/cross-application/CRM-ACC-0693.spec.ts#CRM-ACC-0693
    provenance: test
    source: >-
      services-crm:modules/tasks/tests/e2e/tasks.e2e.spec.js#answers 409 to the
      reopen sent at the version the completion moved on from
evidence:
  - >-
    Pinned service assertions and proposed proof cases are identified in the
    scenario sources and bindings.
  - >-
    Pinned console assertions and proposed proof cases are identified in the
    scenario sources and bindings.
---

# Complete, cancel and reopen work with clear attribution: Acceptance Test Set

## Coverage

Bound scenarios identify existing assertions; unbound scenarios remain proposed proof. Static inspection does not establish a passing execution.

| Rule | Proof Scenario Or Gap |
|---|---|
| `BR-CAP-CRM-ACT-011-01` | `ATS-CRM-ACT-011-01` |
| `BR-CAP-CRM-ACT-011-02` | `ATS-CRM-ACT-011-02` |
| `BR-CAP-CRM-ACT-011-03` | `ATS-CRM-ACT-011-03` |
| `BR-CAP-CRM-ACT-011-04` | `ATS-CRM-ACT-011-04` |
| `BR-CAP-CRM-ACT-011-05` | `ATS-CRM-ACT-011-05` |
| `BR-CAP-CRM-ACT-011-06` | `ATS-CRM-ACT-011-06` |
| `BR-CAP-CRM-ACT-011-07` | `ATS-CRM-ACT-011-07` |
| `BR-CAP-CRM-ACT-011-08` | `ATS-CRM-ACT-011-08` |
| `BR-CAP-CRM-ACT-011-10` | no scenario: `FND-CRM-ACT-028` |
| `BR-CAP-CRM-ACT-011-11` | no scenario: `FND-CRM-ACT-028` |
