Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.


Info

This guide is based on Jira built-in automation functionality.

...

Info

You will need to modify the regular expression if you have custom checklist statuses for checked items. For example, if you have a custom status named "finished", replace "x|done|skipped" with "x|done|skipped|finished".

...

"Save checklist data to Jira custom fields" option must be enabled in Issue Checklist Global Settings

Guide

  1. Go to Automation listing page (it is either Project settings > Automation or Jira Settings > System > Automation rules) and press Create rule button:



  2. On the New trigger page, Select Field value changed option:

    Image Modified

  3. On the Field value changed page select Checklist Text in the first list and then select Edit issue in the second list. Next, press Save button:

    Image Modified

  4. On the Add component page select New condition option:

    Image Modified

  5. One the New condition page select if / else block option:

    Image Modified

  6. On the If block page press Add conditions... link and next select Advanced compare condition:

    Image Modified


  7. On the next If block page enter following details in the form:
    1. {{issue.customfield_10268}}
    2. contains regular expression
    3. (?m)^\*\s+\[(x|done|skipped)\]\s+Test

    Where:
    (1) customfield_10268 is an ID of Checklist Text custom field that you must replace with value from your Jira. Read how to find custom field ID.
    (2) Test is a text/summary of checklist item that we want to test for checked status (replace it with summary of your checklist item).

    Image Modified

    Press Save when finished.

  8. On the New component page select New action option:

    Image Modified

  9. On the New action page select Edit issue option:

    Image Modified

  10. On the Edit issue page select Label field from the dropdown, change form option to Add/remove values and provide a label that you want to add to an issue:

    Image Modified Image Modified Image Modified

    Press Save when ready.

  11. On the Add component page select Add else option:

    Image Modified

  12. On the Else block page press Add conditions... link and next select Advanced compare condition:

    Image Modified

  13. On the next Else block page enter following details in the form:
    1. {{issue.customfield_10268}}
    2. contains regular expression
    3. (?m)^\*\s+\[(?!x|done|skipped).*\]\s+Test

    Where:
    (1) customfield_10268 is an ID of Checklist Text custom field. Read how to find custom field ID.
    (2) Test is a text/summary of checklist item that we want to test for unchecked status.

    Please note that the regular expression from point (c) differs from the one in (7c)

    Image Modified

    Press Save when finished.

  14. On the New component page select New action option:

    Image Modified 

  15. On the New action page select Edit issue option:



  16. On the Edit issue page select Label field from the dropdown, change form option to Add/remove values and provide a label that you want to remove from an issue:

    Image Modified Image Modified Image Modified

    Press Save when ready.

  17. The rule configuration is complete. Provide a name for the rule and press Turn it on button:

    Image Modified

  18. Test the setup and enjoy (smile)

    1. Go to any issue page, add "Test" item and:
      1. check the Test item to notice label "Test_checked" added to issue
      2. uncheck the Test item to notice label "Test_checked" removed from the issue
      3. check/uncheck other items to notice that label "Text_checked" is not affected

    Image Modified


Info
titleTip

In point 12 you can skip clicking Add conditions... link and jump directly to point 14. This way label "Test_checked" will be removed not only when Test item becomes unchecked but also when it is deleted.

...