You can prevent the Jira issue from transition to the next state if not all Smart Checklist items are checked.
...
Go to Workflows
Choose one that you want to add validation to and click Edit
Choose transition and click on "Validators" link
Add Validator
Choose "Smart Checklist Completed Validator"
Click Add - new Validator will be saved
Then Publish this changed workflow
...
You can add a validator that verifies if only certain items have been checked off before allowing the transition.
...
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 |