allocateWorkItemToSelf

This method allocates a work item to the current user.

The work item being allocated must have a current state of Offered. After allocation, the work item’s state changes to Allocated in the current user’s work item list, and the work item is removed from the work item list of all other users to whom it was being offered.

This method has two signatures: one to allocate a single work item, and one to allocate multiple work items.

Syntax

allocateWorkItemToSelf(id,
                       version);
allocateWorkItemToSelf(workItems);

Parameters

  • id - (integer) A work item ID, identifying the work item to allocate to the current user.
  • version - (integer) Specifies the version number of the work item you want to allocate. The version number indicates how many times the work item has changed state. The version number starts at 0 when the work item is created, and is incremented by one each time it changes state.
  • workItems - (Array<Objects>) These identify the work items to be allocated. Each Object in the array must have the following properties, identifying an existing work item (see above for definitions):
    • workItemId (integer)
    • workItemVersion (integer)

Returns

none