What are the templates?
Templates are reusable sets of conditions, validators and post functions. They're defined once and can be used as many times as it's necessary. One template can be used in one or more transitions across many workflows. There are some extra features brought to JIRA with condition and validator templates, they are:
- Condition result inversion
- Validator result inversion
- Logical operators in workflow validators (similar to conditions)
- Customized validation error messages (one for whole set of validators)
- Templates usage tracking across workflows and transitions
- Templates diagnostics to find incorrectly configured condtions, validators and post functions
- Nested templates support (using template-in-template)
Validators Templates
Executing templates
Templates are just definitions that have to be executed in specific workflow transitions. Running a template is possible by adding special condition/validator/post function to a transition. It doesn't matter how many elements is in template, you need to add only one element to execute whole template.
If template is changed and published all workflow transitions reflects the change immediately.
Updating templates
Please note that single template can be used many times, so editing it once can affect many transitions where the template is used. To avoid interrupting user work when editing a template we use publishing technique same as in JIRA workflows. Do not forget to publish your changes.