Workflow Conditions for Work Items

This topic documents the workflow Conditions available for configuring the workflow for Work Items. In the workflow configuration, one or more Conditions may be applied to a workflow Action, and/or to one or more workflow Functions for an Action. When specified for an Action, if the Condition's terms are not satisfied, then the Action is blocked, and the Work Item cannot transition to the target status. When when specified for a Function, the Function will not be run if the Condition's terms are not satisfied, which may in turn block the Action, preventing the status transition. For procedural information, see Configure Work Item Workflow.

Related topics:

ApprovalState

Tests whether all Work Item approvals have a specific workflow status.

Parameter:

CommonApprovalState

The status value to be tested for — approved or waiting, for example.

If omitted, the condition testes whether all approvals have the approved workflow status.

AtLeastOneApprovedAndNooneDisapproved

Tests that at least one user has logged approval of the Work Item, AND that no user has logged disapproval. This condition has no parameters.

FieldNonEmpty

Tests whether a Work Item field is empty or non-empty. Field is empty if it is missing, or if its value is null, or it is an empty collection, or an empty text (including Rich Text), or false Boolean value.

Parameters:

field.name

The field ID of the Work Item field to check.

negate

Possible values: true or false. Default value: false.

If true, the condition will be passed if the field is empty. If false, the condition will be passed if the field is non-empty.

LinkedWorkItem

Checks, that there is at least one linked or backlinked item, optionally with a specific link role, and/or Work Item type.

Parameters:

link.role

Optional. The link role to check for, to satisfy the condition. Value is the ID of a configured link role.

target.work.item.type

Optional. The type of linked Work Item to check for to satisfy the condition. Value is the ID of a configured Work Item type.

backlink

Optional. Values: true or false. If true, then backlinks are also checked.

LinkedWorkItemsStatus

Traverses incoming and outgoing links of defined roles, and passes if all target Work Items have one of the valid statuses.

Parameters:

back.link.roles

Comma-separated list of link roles of incoming links to check for, to satisfy the condition.

link.roles

Comma-separated list of link roles of outgoing links to check for, to satisfy the condition.

valid.states

Comma-separated list of statuses. Parsed linked Work Items must all have one of these statuses in order for this condition to be satisfied.

LinkedWorkItemsType

Checks that there is a linked or backlinked Work Item. Optionally, required link role and target Work Item type may be specified.

Parameters:

backlink

Optional. Valid values: true or false. Default: false.

link.role

Optional. ID of the link role that the linked item must have for this condition to be satisfied. Example: implements.

target.work.item.types

Optional. ID of the Work Item type that the linked item must have for this condition to be satisfied. Example: requirement.

RoleCondition

Checks a list of user roles that users must have in order to satisfy this condition, and consequently invoke the Work Item Action.

Parameter:

roles

Comma separated list of role names. A user invoking the workflow Action must have at least one of the specified roles.

ScriptCondition

Evaluates whether or not a specific workflow Action is available, or whether a specific workflow Function will run, according to the return value of a custom script. For details, please see Scripted Workflow Functions and Conditions > Script Condition.