Skip to content

CAP-CRM-ACT-011Complete, cancel and reopen work with clear attribution

Markdown

CAP-CRM-ACT-011

Complete, cancel and reopen work with clear attribution

Markdown
  • DocumentDraft
  • Product intentProposed
  • ImplementationObserved

KindCapabilityProduct areaCRMModuleActivities, Follow-ups and Task WorkRevision2

Read atservices-crm a8d1364freact-console baf6dae3

The Formal Contract

The narrative above explains; the sections below are authoritative — the rules, scenarios and tests this document binds.

Outcomes
Recorded closing actor and timeClosed details protected from ordinary editsStale lifecycle actions refused
Surfaces
consoleapi
Preconditions
The task is present and has no full update lock.
Intent sources
services-crm:docs/milestones/CRM-M8-activities-and-tasks.md#D-52

Controls

21 controls apply, from the corpus control catalogue.

TC-AZ-001 TC-AZ-002 TC-AZ-003 TC-AZ-004 TC-AZ-006 TC-DAT-001 TC-DAT-002 TC-DAT-003 TC-LOG-001 TC-LOG-002 TC-LOG-003 TC-LOG-004 TC-LOG-005 TC-PI-001 TC-PI-003 TC-PI-005 TC-PRV-001 TC-PRV-002 TC-TEN-001 TC-TEN-002 TC-TEN-003

Permissions

KeyChecked atScope
crm.tasks.updateapitenant
crm.tasks.updateconsoletenant

Business Rules

12 rules, 10 to be proved before approval. A rule's product intent is derived from its origin: 1 confirmed by a product decision, the rest inheriting this capability's proposed.

IdRuleKindEnforced atProvenance
01must prove
Proposed
Open, Waiting for someone else and Deferred remain work in progress, while Completed and Cancelled are closed; ordinary edits move only among the open statuses.
no proof recorded yet
lifecycleservice, databasetest
services-crm:modules/tasks/tests/unit/services/tasks/lifecycle.spec.js#allows an open task to move to any of the three open statuses
02must prove
Proposed
Completion and cancellation use their dedicated actions and cannot be performed by a general task edit.
no proof recorded yet
lifecycleservicetest
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
03must prove
Proposed
Completion and cancellation record the actor and time, retaining those stamps only for the corresponding closed status.
no proof recorded yet
invariantservice, databasetest
services-crm:modules/tasks/tests/e2e/tasks.e2e.spec.js#completes the task, stamping who finished it and when
04must prove
Proposed
Switching between Completed and Cancelled requires reopening first.
no proof recorded yet
lifecycleservicetest
services-crm:modules/tasks/tests/unit/services/tasks/lifecycle.spec.js#refuses a cancelled task, asking for the reopen that would make it possible
05must prove
Proposed
A person cannot repeat completion of a completed task or cancellation of a cancelled task.
no proof recorded yet
validationservicetest
services-crm:modules/tasks/tests/e2e/tasks.e2e.spec.js#answers 409 to completing a task that is already completed
06must prove
Proposed
Reopening a closed task sets Open and removes closing stamps; reopening work already in an open status is refused.
no proof recorded yet
lifecycleservice, databasetest
services-crm:modules/tasks/tests/integration/services/persistence/tasks.integration.spec.js#reopens it as open, whatever status it was in before it closed
07must prove
Proposed
General edits to a closed task are rejected even when the requested values are unchanged.
no proof recorded yet
lifecycleservicetest
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
08must prove
Confirmed
Complete, Cancel and Reopen require the version read and reject a stale version.
no proof recorded yet
validationapi, servicetest
services-crm:modules/tasks/tests/e2e/tasks.e2e.spec.js#answers 409 to the reopen sent at the version the completion moved on from
09
Proposed
Closing a task preserves its holder and queue membership.
policyservicetest
services-crm:modules/tasks/tests/integration/services/persistence/tasks.integration.spec.js#leaves the assignment and the queue alone: completing is not releasing
10must prove
Proposed
Lifecycle refusals include a problem code and explanatory message, but other task refusals do not uniformly include codes.
no proof recorded yet
policyservicetest
11must prove
Proposed
Only a signed-in user or registered service principal can close a task.
no proof recorded yet
permissionservicetest
12
Proposed
A closed task’s console fields are disabled and Reopen is the available state-changing action.
policyconsoletest
react-console:components/tasks/__tests__/task-detail-sheet.test.tsx#disables every field, so a finished task cannot be quietly edited

Scenarios

IdGivenWhenThenProvenance
01One editor completed a task while another retained its earlier version.Submit Reopen from the stale version.The task stays completed and the action reports a conflict.test
services-crm:modules/tasks/tests/e2e/tasks.e2e.spec.js#leaves the task completed, as the first person left it

Edge Cases

IdGivenWhenThenProvenance
02The task is completed.Attempt an unchanged general edit, cancellation and reassignment.Each action is rejected until reopening permits it.test

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.