Page tree
Skip to end of metadata
Go to start of metadata

You are viewing an old version of this page. View the current version.

Compare with Current View Page History

Version 1 Next »

Creating validator template

  1. Log in as a user with the JIRA Administrators global permission.
    Choose  > Issues. Select Workflows > Validator Templates to open the Validator Templates page.
    (info) Tip: Use Keyboard shortcutg + g + start typing validator templates
  2. Click the Add Template button. Dialog displays the Template's Name and Description fields. 
  3. Also you can insert a message for users that will be displayed when validation would fail
  4. Fill in the fields and confirm with Add button
    (info) Note that newly created template is inactive as default

 

Adding Validators to Validator Template

  1. To define your template you need to add desired validators.
    Select 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
  2. Unique feature of our plugin is that you can construct complex validation rules by grouping simple validators in logical groups - the same as in 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 validator template

  1. Log in as a user with the JIRA Administrators global permission.
  2. Choose   > Issues. Select Workflows > Validator Templates to open the Validator Templates page.
    (info) Tip: Use Keyboard shortcutg + g + start typing validator templates
  3. Click the Edit Template button.

Executing 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:

 

  1. Log in as a user with the JIRA Administrators global permission.
    Choose   > Issues. Select Workflows > Workflows to open the workflows page.
    (info) Tip: Use Keyboard shortcutg + g + start typing workflows
  2. As soon as you will have all workflows listed you have to select one of them and click Edit button in Operations section. You will be redirected to Edit Worklow page where you can see all the transitions that take place
  3. Click desired transition and than choose which of the worfklow elements you want to extend (conditions, validator, post functions) with a predefined template by clicking Add validator
  4. From the list of validators choose Run Validator Templates option and confirm with Add button
  5. Choose desired earlier created pre-defined template and add those parameters to your validator.
  6. Your template will be added to the list of validators that will be run for this particular transition.

Disabling template

Once your template is active you can always disabled it.

  1. Log in as a user with the JIRA Administrators global permission.
  2. Choose   > Issues. Select Workflows > Validator Templates to open the Validator Templates page.
    (info) Tip: Use Keyboard shortcutg + g + start typing validator templates
  3. Click the Edit Template button.

Importing templates

  1. Log in as a user with the JIRA Administrators global permission.
    Choose   > Issues. Select Workflows > Validator Templates to open the Validator Templates page.
    (info) Tip: Use Keyboard shortcutg + g + start typing validator templates
  2. Click the Import button.
  3. Choose XML file you want to upload and than accept your choice with Import button.

Exporting templates

Already created templates can be exported any time to XML file to your drive. In order to do so:

  1. Log in as a user with the JIRA Administrators global permission.
  2. Choose   > Issues. Select Workflows > Validator Templates to open the Validator Templates page.
    (info) Tip: Use Keyboard shortcutg + g + start typing validator templates
  3. Select template that you want to be exported and click Edit in Operations section
  4. As soon as you choose Export button, your template will be downloaded.

Customizing Validation error message

Each validator template allows you to define your own validation error message. It makes templates very useful for end users, as they can see friendly information in their own language. E.g. if your JIRA is used by german, spanish or korean users, you can define your own validation error message.

When you create new validator template please fill out field "Fail Validation Message". It's simple! It's also possible to add all messages from failed underlying validators by ticking "Include message from validators" option.


If you want to change your validation error message, please Edit template button then click button located next to template name.


Logical operators in validations

Greate advantage of using Validator templates is possibility to execute validators in logical sequence same way as JIRA originally allows for conditions.

Creating grouped validators is as easy as doing it with conditions. Just click icon.


Inversing validation result

 Templates allow you to "inverse" validation result. It causes that any failed validator will be treated as passed and vice versa. This option is especially useful when you look for a way to run "except-type" validation like "Field have to be empty".

 To inverse a validator result add the validator to template then click inversion button located in action bar.

Inversion indicator is displayed next to validator name. You can easily find all inversed validators when editing a template

When validator is inversed you can see it as above. It's marked with inversion indicator.

  • No labels