Excerpt Table of Contents maxLevel 2 minLevel 2 absoluteUrl true style square
Creating a validator template
- Log in as a user with the
- Jira Administrators global permission.
Choose > Issues. Select Workflows > Validator Templates to open the Validator Templates page.
Tip:
- Use a Keyboard shortcut: g + g + start typing validator templates
- Click the Add Template button.
- The dialog displays the Template's Name and Description fields.
- You can also insert a message for users that will be displayed when validation would fail.
- Fill in the fields and confirm
- with the Add button.
Note that a newly created template is inactive
Adding Validators to Validator Template
- by default.
Panel | ||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
| ||||||||||||||
|
Adding validators to a validator template
- To define your template you need to add desired validators.
Select the Add Validator button to open the list of available validators to choose from. Click on the chosen one and confirm it with the Add button - Unique The unique feature of our plugin is that you can construct complex validation rules by grouping simple validators in logical groups - , the same as inwith conditions templates. In order to do so, you need to change any validator into a group by clicking the 'Add grouped validator' icon for the validator:
Editing a validator template
- Log in as a user with the JIRA Jira Administrators global permission.
- Choose to to open the Validator Templates page.
Tip: Use Use a Keyboard shortcut: g + g + start typing validator templates > Issues. Select Workflows > Validator Templates - Click the Edit Template button.
Executing a validator template
Executing a template means nothing more than adding a template to the chosen transition in a workflow. In order to do so you have to:
- Log in as a user with the JIRA Jira Administrators global permission.
Choose > Issues. Select Workflows > Workflows to to open the workflows page.
Tip: Use Use a Keyboard shortcut: g + g + start typing workflows - As soon as you will have all workflows listed, you have to select one of them and click click the Edit button in the Operations section. You will be redirected to the Edit Worklow Workflow page where you can see all the transitions that take place
- Click the desired transition and than then choose which of the worfklow workflow elements you want to extend (conditions, validator, validators or post functions) with a predefined template by clicking Add validator.
- From the list of validators choose the Run Validator Templates option and confirm with with the Add button.
- Choose desired earlier created pre-defined template any previously created predefined template you want and add those parameters to your validator.
- Your template will be added to the list of validators that will be run for this particular transition.
Disabling a template
Once your template is active you can always disabled disable it.
- Log in as a user with the JIRA Jira Administrators global permission.
- Choose to to open the Validator Templates page.
Tip: Use Use a Keyboard shortcut: g + g + start typing validator templates > Issues. Select Workflows > Validator Templates - Click the Edit Template button.
Importing templates
- Log in as a user with the JIRA Jira Administrators global permission.
Choose > Issues. Select Workflows > Validator Templates to to open the Validator Templates page.
Tip: Use Use a Keyboard shortcut: g + g + start typing validator templates - Click the Import button.
- Choose the XML file you want to upload and than then accept your choice with the Import button.
Exporting templates
Already created templates can be exported at any time to the XML file to your drive. In order to do so:
- Log in as a user with the JIRA Jira Administrators global permission.
- Choose to to open the Validator Templates page.
Tip: Use Use a Keyboard shortcut: g + g + start typing validator templates. > Issues. Select Workflows > Validator Templates - Select the template that you want to be exported and click Edit in the Operations section.
- As soon as you choose choose the Export button, your template will be downloaded.
Customizing
Validationa validation error message
Each validator template allows you to define your own validation error message. It makes templates very useful for end-users , as what they can see is the user-friendly information in their own language. E.g. if your JIRA if Jira is used by germanGerman, spanish Spanish or korean Korean users, you they can define your their own validation error message.
When you create a new validator template please fill out field in the "Fail Validation Message"field. It's simple! It's also possible to add all messages from failed underlying validators by ticking the "Include message from validators" option.
If you want to change your validation error message, please click the Edit template button and then click the button located next to the template's name.
Logical operators in
validationsvalidators
Greate A great advantage of using Validator templates is the possibility to execute validators in a logical sequence in the same way as JIRA Jira originally allows to do it for conditions.
Creating grouped validators is as easy as doing it with conditions. Just click the icon.
Inversing the validation result
Templates allow you to "inverse" a validation result. It causes that As a result, any failed validator will be treated as passed and vice versathe other way round. This option is especially useful when you look for a way to run the "except-type" validation like similar to the "Field have to be empty".
To inverse, a validator result add the a validator to a template then click the inversion button located in the action bar.
The inversion indicator is displayed next to the validator's name. You can easily find all inversed validators when editing a template. |
When a validator is inversed you can see it as shown above. It's marked with the inversion indicator.