Validate for a Specific Checklist Item

Issue Checklist for Jira is now Checklists for Jira. New name, same great app. Please go here to see our new documentation site.

Validate for a Specific Checklist Item

You can validate for a specific item on local checklists only. This validator will not check Global Checklists created in Checklists for Jira ENTERPRISE.

Validation Rule

You can validate to ensure that a specific item on a Local checklist is complete by using a Regular Expression Check validation rule.
Ensure the Sync checklists to Custom Fields global setting is enabled.

  1. Open the Workflow editor:

    1. In Company-managed spaces, navigate to Space settings > Workflows and click on Edit workflow.

    2. On Team-managed spaces, navigate to Space settings > Work types and select the appropriate work type. Then click on the Edit workflow button.

      TeamManaged.png

       

  2. Select the transition where you want to add the rule and click on the Rules + sign.

    Plus.png



  3. Click on Validate details and select Validate a field.

    Select.png
  4. Click Select.

  5. Complete the form:

    1. Value that field Matches regular expression

    2. For this field Checklist Text

    3. Expression

      1. To check that a checklist item called first item is complete

        (?ms).*^\*\s+\[(x|done|skipped)\]\s+first item.*
      2. To check that two items, called first item and second item are complete

        (?ms).*^\*\s+\[(x|done|skipped)\]\s+first item.*^\*\s+\[(x|done|skipped)\]\s+second item.*
      3. To check that an item in a given position (4th) on the list is complete

        \A(\*.*\r?\n){3}\*\s+\[(x|done|skipped)]\s+(.*\r?\n?)*\Z

        The example above will block the transition if the fourth item in the list is incomplete. To block transition if Nth item is incomplete, change the 3 in the expression above to N - 1.
        Note that this expression cannot be used to validate for the first item in the list, and that the list must contain at least N items. If you want to validate for more than one position in the list, you will need to create separate validators for each position.

      4. To check that there are no items in an Open status

        (?s)^(?!.*\*\s+\[open\]).*$
      5. The following regular expressions can be used to make the transition require at least one checked item, and optionally to require that checklist has at least one item. The expressions can work with or without statuses. If you use custom statuses, you will need to adjust the expressions.

        1. Statuses disabled, allow empty checklist

          (?s)^(?!.*\*\s+\[.*?\])|(?=.*\*\s+\[x\]).*$
        2. Statuses disabled, require at least one item

          (?s)^(?=.*\*\s+\[x\]).*$
        3. Statuses enabled, allow empty checklist

          (?s)^(?!.*\*\s+\[.*?\])|(?=.*\*\s+\[done|skipped\]).*$
        4. Statuses enabled, require at least one item

          (?s)^(?=.*\*\s+\[done|skipped\]).*$
  6. Click Add.

    Add.png
  7. Click Update workflow to save the changes.

    UpWf.png



Regular Expressions Resources

  • RegexLearn includes a detailed tutorial, a cheat sheet, and a playground where you can practice/test your regular expressions

  • QuickRef.Me has a nicely formatted Regex cheat sheet

  • Regex 101 provides a great environment for developing and testing Regex

  • Generative AI tools, including the Atlassian Intelligence available in Confluence Premium and Enterprise, can create Regex expressions

  • This article includes examples of using Regex in Jira

Troubleshooting Validators