Define rule conditions

Conditions determine the circumstances under which a rule runs. This topic describes how to define conditions for a rule.

This task is part of a larger task for creating rules. For details, see Set up rules.

To define a condition:

  1. When creating or editing a rule, click the Condition tab. Only one condition can be defined. The condition can be a complex condition.

  2. Select a field, or special circumstance, for the condition.

    In the Field box, select a field on which to base the condition, or a special circumstance.

    Special circumstances include: 

    Edit Mode

    The condition is based on whether the current entity existed already and is now being edited, or if the current entity is new.

    • To check if new: Edit mode = New

    • To check if existing: Not(Edit mode = New) 

    User Roles The condition is based on whether a user has a specific role.
    Count fields You can create rules based on counts of related entities, such as the number of commits, number of related user stories, and so on.
    Enabled Workspaces If you are creating a rule on the space level, you can specify that the rule only run for certain workspaces.

    Start typing a field name in the corresponding box to search and select from a list.

  3. In the Operator box, select an operator.

    Depending on the field, different operators are available. For example, date fields display different operators from text fields.

    You can set conditions that assess the original value of a field (when the entity was first accessed) or the current value of a field (because you may have changed the field value since the entity was initially accessed).

    • To base the condition on the original value, select an operator under the heading Original in the operator drop-down list.

    • To base the condition on the current value, select an operator under the heading Current in the operator drop-down list.

    In addition to typical operators (=, <, >, and so on), some fields support special operators, such as:

    contains

    Checks if the field contains the values you select from a list.

    include

    Checks if the User's Group contains the user groups you select from a list.

    is empty

    Checks if the field is empty.

    is modified

    Checks if the field is modified from its original value. This operator is not available for new entities.

  4. In the next box, enter a value. You can enter a value or select one or more values from a list. If you select multiple values, they are connected with an Or statement.

  5. If necessary, add additional expressions to the condition by choosing AND or OR in the Gate box and clicking .

    As you build the condition, a textual representation of the condition is displayed in the Description box.

    You cannot save the rule if there are errors. Errors include syntax errors, such as an unclosed set of parentheses, or context errors, such as a referenced user-defined field or form being deleted.

  6. Click OK.

Next steps: