Understanding Jira Workflow Validators
In Jira, Workflow Validators are rules that defines conditions that must be met before a transition can be executed. Validators help ensure that the necessary criteria are fulfilled before an issue moves from one status to another within a workflow.
If enabled, Vansah Test Management for Jira provides a simple integration which can be used with Jira Workflow Validators or Conditions.
Continue to learn how to incorporate Test Case results for your Advanced Jira workflow management.
Types of Validators
Jira offers several built-in validators.
It is recommended you use the Regular Expression Check Validator option with Vansah.
Integrating Vansah with Jira Workflow Validators
Integrating Vansah Test Cases with Jira workflow validators can enhance the validation process by leveraging the Overall Test Result for Test Cases against a Jira Issue. This will allow your workflow transitions to validate if Test Cases linked to a Jira Issue have achieved the necessary Test Status. For example all Test Cases have “Passed“.
Here’s how you can achieve this integration:
1) Enable Jira Workflow Validator for Vansah:
- Request your Jira Admin to enable Jira Workflow Validator integration from Vansah App settings in your Jira workspace.
- From your Jira menu go to Apps > Vansah
- Enable “Jira Workflow Validator Support”
2) Configure the Vansah Custom Field (Vansah TR Status) by associating it to the required Screens/Projects.
Click on Vansah TR Status to navigate to the Jira Custom Field screen.
3) Linking Test Cases to a Jira Issue:
- Ensure that your Test Cases in Vansah are linked to the relevant Jira issues.
- Execute your Test Case/s against the Jira Issue.
- This linkage allows Vansah to calculate the Overall Test Case result against the Jira issue.
4) Configuring Jira Workflow Validator for each Transition:
- Access Workflow Settings: Go to your Jira project, then navigate to the project settings and locate the “Workflows” section.
- Edit Workflow: Edit the workflow and locate the transition for which you want to add the validator.
If you want to ensure All Test Cases have Passed before you allow the Jira Issue to transition to a new state i.e.: TESTING -> DONE you will need to add the Validator against the transition in the workflow and ensure that the Vansah TR Status field = Passed.
Since Vansah Test Management for Jira will automatically calculate the Test Result status of the linked Test Cases against the Issue, the custom field value (Vansah TR Status) will automatically be set according to the following rules.
- No-Test-Cases = No test cases are linked to the Issue
- Untested = No test results for any test cases
- Passed = 100% coverage and all Test Cases are Passing
- Passed-In-Progress = 1 or more Test Cases remain outstanding. Test Cases executed are Passing
- Failed = 100% coverage and all Test Cases are Failing.
- Failed-In-Progress = 1 or more Test Cases remain outstanding. Test Cases executed are Failing.
- N/A = 100% coverage and all Test Cases have a result = N/A
- N/A-In-Progress = 1 or more Test Cases remain outstanding. Test Cases executed have a result = N/A.
Having the Validator configured to be “Passed” as shown below would mean the workflow transition can only occur when all Linked Test Cases have Passed.
So in this example if a user attempts to transition the Issue to “Done” Jira will trigger the Validator rule above and if the field value does not equal to Passed then the user will be shown the message below:
In this example we will only allow a Jira Issue to Transition to the next State if All Test Cases have Passed. However if the Issue does not have any Linked Test Cases then it will be allowed to Transition.
To do this you will need to add the Validator against the transition in the workflow and ensure that the Vansah TR Status field = (Passed|No-Test-Cases)
In this example we will only allow a Jira Issue to Transition to the next State if All Test Cases have Passed OR the current Tested Cases are Passing.
This means you may have Tested some of the Linked Test Cases and they are currently Passing, hence why the progress may be Passed-In-Progress.
To do this you will need to add the Validator against the transition in the workflow and ensure that the Vansah TR Status field = (Passed|Passed-In-Progress)