Skip to main content
Skip table of contents

Transition Work Item When an Indicated Checklist Complete

These rules are made to run on work items that have multiple checklists. They allow you to transition a work item when checklist items (all items or all mandatory items) on a given checklist are complete.

Limitations

If you are using Checklists for Jira ENTERPRISE , note that this rule will not respond to, and cannot update items in Global Checklists. The rule is uses the Checklist Text custom field. Global Checklists are not saved to the custom field and therefore cannot be referenced by the automation rule.

Notes

If you are using this rule in a team-managed project, you first need to add the Checklist Text custom field to the project. To add the field to a project:

  1. Navigate to Project settings > Fields.

  2. Click Add field.

  3. Select the Checklist Text.

  4. Click Add 1 field.

Modifications

This example uses the Field valued changed trigger. You can modify the rule to use another trigger. Do not use the generic Work item updated trigger because when a checklist item status changes, an “Work item updated” event is sent by Jira which may make the automation rule run repeatedly.

Transition work item When All Items on Given Checklist Complete

  1. Ensure the Sync checklists to Custom Fields global setting is enabled.

  2. Navigate to Project Settings > Automation (or Jira Settings > System > Automation rules).

  3. Click Create rule.

  4. Select Field valued changed trigger and Checklist Text as the field to be monitored. Click Next.

    image-20241128-210258.png

  5. Click New Condition and select Smart value condition.

  6. Enter the smart value {{fieldChange.toString}} on the First value field.

  7. Select exactly matches regular expression in the condition dropdown.

  8. Enter

CODE
(?m)(\n|.)*(# Name of Checklist|--- Name of Checklist)(\n(\* |---|>>)(?!\[(in progress|open|yes|)]).*$)+(\n#.*|\Z)(\n|.)*

for the Regular expression, substituting the name of the indicated checklist. You will also need to modify the expression if you are using custom statuses.

image-20241128-220053.png

  1. Next, add another Condition and select Smart value condition.

  2. Enter the smart value {{fieldChange.fromString}} on the First value field.

  3. Select does not match regular expression in the condition dropdown.

  4. Enter

CODE
(?m)(\n|.)*(# Name of Checklist|--- Name of Checklist)(\n(\* |---|>>)(?!\[(in progress|open|yes|)]).*$)+(\n#.*|\Z)(\n|.)*
  1. for the Regular expression, substituting the name of the indicated checklist. You will also need to modify the expression if you are using custom statuses.

    image-20241128-220855.png

  2. Click Next.

  3. Click New action and select Transition work item.

  4. Select the Destination status and click Next.

    image-20241128-221236.png

  5. Name the rule and click Turn it on.

Transition work item When All Mandatory Items on Given Checklist Complete

  1. Ensure the Sync checklists to Custom Fields global setting is enabled.

  2. Navigate to Project Settings > Automation (or Jira Settings > System > Automation rules).

  3. Click Create rule.

  4. Select Field valued changed trigger and Checklist Text as the field to be monitored. Click Next.

  5. Click New condition and select advanced compare condition.

  6. Enter the custom field ID for the first value {{issue.Checklist Text}}

  7. Select contains regular expression in the condition dropdown.

  8. Enter (\n|.)*(# Name of the Checklist|--- Name of the Checklist)(\n(\* |---|>>)(?!\[(in progress|open|yes|)] ).*$)+(\n#.|\Z)(\n|.)*
    for the Regular expression, substituting in the name of the indicated checklist. You will also need to modify the expression if you are using custom statuses.

  9. Click Next.

  10. Click New action and select Transition work item.

  11. Select the Destination status and click Next.

  12. Name the rule and click Turn it on.

JavaScript errors detected

Please note, these errors can depend on your browser setup.

If this problem persists, please contact our support.