Our team is trying to create a JIRA built-in test case management tool. So we created two issue types called Test Run and Test cases.
We have also created a new field called Test category where you can select multi-values from a dropdown list.
We wanted to create an automation rule where if the Test category field is updated by a user for the Test Run, it should link all Test cases having the same value.
Sample:
User updates the Test category field of QA-1 with issue type "Test Run" with the values Twist.
Automation rule should link issues TC-1, TC-2, TC-3 with issue type "Test cases" to QA-1 as TC-1, TC-2, TC-3 all have values "Twist" in their Test category field.
Here's a sample flow but with hard-coded values:
`{{#jql}}issuetype = “Test case” and “Test category” = Twist{{/jql}}`
Hi @E R
Something like this should work:
---
This is a dynamic version of your rule - the {{triggerissue.Test Category}} smart value populates the JQL query with the value found in the trigger issue, rather than needing it hardcoded into multiple IF/ELSE rules.
Once the Branch finds all relevant Test Cases, you can then execute the action against each of the TC issues to link them back to the Test Run.
---
Let us know if this helps :)
Ste
Thanks Ste, you're a legend. It works fine!
On a another note, some of the "Test Category" values have a "/" character in them which I didn't realise is a reserved JQL character. Hence, we get an error like this:
QA-1: "((issuetype = "Test Case" and "Test Category" = Twist/Shout) AND (key != QA-1)) AND (project in (10001))" - Error in the JQL Query: The character '/' is a reserved JQL character. You must enclose it in a string or use the escape '\u002f' instead.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi @E R
The error message is suggesting how to fix that: put quotation marks around the value.
In your rule, that would be this:
issuetype = "Test Case" AND "Test Category" = "{{triggerIssue.Test Category}}"
Kind regards,
Bill
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi @E R
Bill's right - you can add the quotation marks where it's more than one word without special characters, which will box in the query.
Give it a try, and let us know if it rectifies the issue :)
Ste
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.