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.
Enabling this feature also allows Vansah to update each Jira Issue with a real time Test Result status which can be used for project reporting and management.
Continue to learn how to incorporate Test Case Results for your Jira Issues.
Types of Jira 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 Top header menu go to Apps > Vansah
Click on Configure
Enable “Jira Workflow Validator Support”
You may choose to enable Child issue Test Result Status option. If enabled Vansah will determine the overall Test Result status of an Epic based on its Child Issues. This means the Epic Test Result status will consider Test Cases directly linked to it along with all Child Issues overall Test Result status combined.
2) Configure the Vansah Custom Field (Vansah TR Status) by associating it to the required Screens/Projects.
NOTE: If you decide to not use the default custom field Vansah TR Status you may select any other custom field from the list. Vansah will use the selected field instead of the default custom field created by the Vansah App.
Alternatively you may choose to rename the custom field created by Vansah.
Click on the selected field 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.
5) Optional: Setting the default Test Result status for new Jira Issues
You can configure your Jira instance so that new issues automatically receive a default Vansah Test Result Status for Jira Issues, even if they don’t have any test cases linked.
By default if you have Jira Workflow Validator enabled for Vansah, the Issue status field to manage the overall Test Result will automatically be set as 'No-Test-Cases' for new Jira Issues.
To update click on the field named "Vansah TR Status" or whatever field appears in the window.
Now click Edit Default Value
From the dropdown, choose a valid Test Result Status (e.g. N/A etc.) If the default Result does not appear ensure that it is enabled first under options.
Click Set Default.
Understanding Test Result Value Options
By default, Vansah provides a predefined set of result values for the Test Result Status field. You may choose to add custom result values to this field; however, it is essential to retain the mandatory values listed in the table below.
If you add your own result values, Vansah will respect these customizations only if no Test Cases are linked to the Issue. Once Test Cases are linked, Vansah will automatically update the Test Result Status field based on test execution outcomes, overriding any manual changes.
Result | Purpose | Mandatory |
No-Test-Cases | Indicates that no Test Cases are currently linked to the Jira Issue. | Yes |
Untested | Indicates that all Test Cases linked to the Jira Issue are in an untested state. | Yes |
Passed | Indicates that all Test Cases linked to the Jira Issue have been executed and passed successfully. | Yes |
Passed-In-Progress | Indicates that some Test Cases linked to the Jira Issue have passed, while at least one remains untested. | Yes |
Failed | Indicates that all Test Cases linked to the Jira Issue have been executed and failed. | Yes |
Failed-In-Progress | Indicates that some Test Cases linked to the Jira Issue have failed, while at least one remains untested. | Yes |
N/A | Indicates that all Test Cases linked to the Jira Issue have been marked as Not Applicable (N/A).
| Yes |
N/A-In-Progress | Indicates that some Test Cases linked to the Jira Issue are marked as Not Applicable (N/A), while at least one remains untested. | Yes |
Some examples when using Jira Workflow Validator and Vansah
Transition only on PASSED
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.
See below:
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: