Skip to content

CAP-CRM-ACT-012Assign shared work and claim it from a queue

Markdown

CAP-CRM-ACT-012

Assign shared work and claim it from a queue

Markdown
  • DocumentDraft
  • Product intentProposed
  • ImplementationInconsistent

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
Attributable assignmentOne successful claimant for queued workQueue position retained on release
Surfaces
consoleapi
Preconditions
The task remains open and permits updates.
Intent sources
services-crm:docs/milestones/CRM-M8-activities-and-tasks.md#E-10

Controls

23 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-002 TC-PI-003 TC-PI-005 TC-PRV-001 TC-PRV-002 TC-TEN-001 TC-TEN-002 TC-TEN-003 TC-TEN-004

Permissions

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

Business Rules

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

IdRuleKindEnforced atProvenance
01must prove
Proposed
Assignment records the assigning actor and time, preserves the original stamps when the holder is unchanged, and clears them when assignment is removed.
no proof recorded yet
invariantservice, databasetest
services-crm:modules/tasks/tests/e2e/tasks.e2e.spec.js#stamps who holds the task, who gave it to them and when
02must prove
Proposed
A task may have a holder, queue, both or neither, and queue membership carries its entry time for arrival ordering.
no proof recorded yet
invariantservice, databasetest
services-crm:modules/tasks/tests/integration/db/tasks.table.integration.spec.js#refuses a queue with no moment, so no task sits in a queue in no order
03must prove
Proposed
Changing queues records a new entry time, while edits within the same queue retain the earlier place.
no proof recorded yet
calculationservicetest
services-crm:modules/tasks/tests/integration/services/persistence/tasks.integration.spec.js#moves a task to another queue and re-stamps when it entered, so it joins the back of that one
04must prove
Proposed
The assignment action can change the holder and queue together but rejects closed tasks.
no proof recorded yet
policyservicetest
services-crm:modules/tasks/tests/integration/services/persistence/tasks.integration.spec.js#refuses an assignment of a closed task, asking for the reopen first
05must prove
Proposed
Assignments reject stale versions when one is supplied; without a version, the last assignment takes effect.
no proof recorded yet
validationapi, servicetest
services-crm:modules/tasks/tests/e2e/tasks.e2e.spec.js#answers 409 for an assignment at a version the task has moved past
06must prove
Proposed
A holder must have a valid Rhythm user identifier, and a service principal cannot hold work.
no proof recorded yet
validationapi, service, databasetest
services-crm:modules/tasks/tests/e2e/tasks.e2e.spec.js#answers 400 for an assignee that is not a Rhythm user id
07must prove
Proposed
The product should check workspace membership and task eligibility with Platform; assignment currently validates identifier syntax only.
no proof recorded yet
validationservicetest
08must prove
Proposed
A queued open task without a holder can be claimed, and simultaneous attempts produce one winner with the others informed of the holder.
no proof recorded yet
invariantservice, databasetest
09must prove
Proposed
An unqueued task with no role offer must be assigned; claims are rejected for closed tasks and full update locks.
no proof recorded yet
validationserviceobserved
10must prove
Proposed
Release clears the holder while preserving the queue position, is available to any caller with update authority, and rejects a task with no holder.
no proof recorded yet
policyservicetest
services-crm:modules/tasks/tests/integration/services/persistence/tasks.integration.spec.js#leaves the task in its queue, in the place it had: a release is not a re-queue
11
Proposed
Claim requires a signed-in user, while release can be performed by an authorized service because it sets no new holder.
permissionservicetest
12must prove
Proposed
Inactive queues still permit task creation and claims.
no proof recorded yet
policyservicetest
13
Proposed
The console shows Claim for open unassigned queued work and Release for open assigned queued work, subject to task update permission.
permissionconsoletest
react-console:lib/tasks/types.test.ts#is offered on an open task waiting unclaimed in a queue

Scenarios

IdGivenWhenThenProvenance
01Membership services has two waiting tasks.Claim the earlier task, release it and claim it again.Its queue entry position does not change.test
02Three workers target the same queued task.Deliver their claims concurrently.One worker becomes holder and the other attempts identify that holder.test

Edge Cases

IdGivenWhenThenProvenance
03A valid-looking user reference belongs to another customer.Assign a task to that reference.Assignment succeeds despite selector exclusion, and no holder display name is resolved.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.