Versions Compared

Key

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

You can prevent the Jira issue from transition to the next state if not all Smart Checklist items are checked.

...

  1. Go to Workflows

  2. Choose one that you want to add validation to and click Edit

  3. Choose transition and click on "Validators" link

  4. Add Validator

  5. Choose "Smart Checklist Completed Validator"

  6. Click Add - new Validator will be saved

  7. Then Publish this changed workflow

...

Tip

If you want to know how to display "Show Checklist progress" on Agile boards read Progress on Agile Board

Validate if certain items are completed

You can add a validator that verifies if certain items have been checked off before allowing the transition.

Let’s imagine, you have the following checklist:

...

The Checklists custom field will contain the following string:

Code Block
# Definition of Done
+ Code produced (all to do items in code completed)
> Code commented, checked in and run against current version in source control
~ Code reviewed
> @Peer reviewed (or produced with pair programming)
> meeting development standards
- Builds without errors
- Unit tests written and passing
- Deployed to system test environment and passed system tests
- Acceptance criteria met
> Passed UAT (User Acceptance Testing)
> signed off as meeting requirements by@ProductOwner
- Any build/deployment/configuration changes implemented/documented/communicated
- Relevant documentation/diagrams produced and/or updated

Using Scripted (Groovy) Validator you can check if all items with the text 'Code reviewed' and 'Unit tests are written and passing' are done:

Code Block
def checklist = issue.get("customfield_10113");
if (!checklist) {
  return true;
}
def checklistItems = checklist.split('\n').findAll({ it -> it.matches("^[-|+|~].*")});
for (item in checklistItems) {
  if (!item.startsWith("+") && (item.contains("Code reviewed") || item.contains("Unit tests written and passing"))) {
	return false;
  }
}
return true;

...

Info

For any questions or feature requests contact us: smartchecklist@railsware.com