We have a new documentation site. Please go here to see the latest.

Add Label When a Given Checklist Item Completed

This rule adds a label to indicate that a specific checklist item has been completed.

 

Limitations

  • You will need to modify the regular expressions if you have custom checklist statuses.

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

Modifications

This example uses the Field value changed trigger. You can modify the rule to use another trigger such as Issue transitioned. Do not use the generic Issue updated trigger because when a label is added to the issue, an “issue updated” event is sent by Jira which may make the automation rule run repeatedly.

Add Label When a Given Checklist Item Completed

  1. Ensure the Save local checklist items to Jira custom fields global setting is enabled.

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

  3. Click Create rule.

  4. Select the Field value changed trigger and click Save.

  5. Select Checklist Text in the first dropdown list and then select Edit issue in the second dropdown list. Click Save.

  6. Click New condition and select If / else block.

  7. Click Add conditions... and select Advanced compare condition.

  8. Enter the following:

    1. {{issue.Checklist Text}}

    2. contains regular expression

    3. (?m)^\*\s+\[(x|done|skipped)\]\s+Test Where Test is the text/summary of the checklist item that will trigger the label.

       

  9. Select New action.

  10. Select Edit issue and select Labels as the field to be edited.

  11. Click on the to the right of the fields dropdown and select Add/remove values.

  12. Enter the text of the label you want to add. This is the label that will be added if the corresponding checkbox is checked. Click Save.

     

  13. Click Add else.

  14. Click Add conditions... and select Advanced compare condition.
    Alternatively, you can skip this step and go directly to step 16. In this case, the label "Test_checked" will be removed not only when Test item becomes unchecked, but also if it is deleted.

  15. Enter the following:

    1. {{issue.Checklist Text}}

    2. contains regular expression

    3. (?m)^\*\s+\[(?!x|done|skipped).*\]\s+Test Note that this expression differs from the one in step 8c.

  16. Select New action.

  17. Select Edit issue and select Labels as the field to be edited.

  18. Click on the to the right of the fields dropdown and select Add/remove values.

  19. Enter the text of the label you want to remove. This will remove the label if the corresponding checkbox is not checked. Click Save.

  20. Name the rule and click Turn it on.