Versions Compared

Key

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

Global Checklists are currently in BETA and will be available in Issue Checklist for Jira

Status
colourBlue
titleenterprise
once released. Contact our support team if you are Issue Checklist for Jira
Status
colourBlue
titlePro
user and you would like to participate in the Beta.

Note
  • This validator will only work in Company-managed/Classic projects.

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

    Status
    colourBlue
    titleENTERPRISE
    .

You can also validate to ensure that a specific item in the a Local checklist is complete by using the R egular Regular Expression Check validator.

To set the validator:

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

  2. Navigate to Project Settings > Workflows

  3. Click the pencil icon to edit the workflow.

    Image Added

  4. Select Diagram mode and click on the transition where you want to add the validator.

  5. Click on Validators.

    Image Added
  6. Click Add validator.

    Image Added
  7. Select the Regular Expression Check validator and click Add.

    Image Added
  8. Select Checklist Text as the field to evaluate.

  9. Enter the appropriate expression.

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

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

      Code Block
      (?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

      Code Block
      \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

      Code Block
      (?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

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

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

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

        Code Block
        (?s)^(?=.*\*\s+\[done|skipped\]).*$
    6. Image Added

  10. Click Add again to confirm creation of the validator.

  11. Click Publish draft to save the changes.

    Image Added
  12. Test the validator by attempting to transition an issue which does not meet the criteria. The transition will fail.

...