Issue Checklist for Jira is now Checklist for Jira. New name, same great app. Please go here to see our new documentation site.
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
Ensure the Save local checklist items to Jira custom fields global setting is enabled.
Navigate to Project Settings > Automation (or Jira Settings > System > Automation rules).
Click Create rule.
Select the Field value changed trigger and click Save.
Select Checklist Text in the first dropdown list and then select Edit issue in the second dropdown list. Click Save.
Click New condition and select If / else block.
Click Add conditions... and select {{Smart value}} condition.
Enter the following:
{{issue.Checklist Text}}
contains regular expression
(?m)^\*\s+\[(x|done|skipped)\]\s+Test
Where Test is the text/summary of the checklist item that will trigger the label.
Select New action.
Select Edit issue and select Labels as the field to be edited.
Click on the … to the right of the fields dropdown and select Add/remove values.
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.
Click Add else.
Click Add conditions... and select {{Smart value}} 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.Enter the following:
{{issue.Checklist Text}}
contains regular expression
(?m)^\*\s+\[(?!x|done|skipped).*\]\s+Test
Note that this expression differs from the one in step 8c.
Select New action.
Select Edit issue and select Labels as the field to be edited.
Click on the … to the right of the fields dropdown and select Add/remove values.
Enter the text of the label you want to remove. This will remove the label if the corresponding checkbox is not checked. Click Save.
Name the rule and click Turn it on.