I have a rule automation set up in my project that creates a test ticket in the Zephyr project
I am trying to set it up so if I transition the same statuses again the rule will not create another linked issue if it already exists
New test ticket has the following naming convention for the summary field . The goal of step 4 below is to not create the Zephyr test if there is already a linked ticket
{{Issue.key}} - {{Issue.Summary}}
Workflow
Step #4
Your JQL is missing "" around the text you want the search for, and I would do a specific search like this:
summary ~ "\"{{issue.key}} - {{issue.summary}}\""
By using "\" \"" the search will only be for that phrase, not any of the words.
I made that update but it still creates another linked issue
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Yes, and...to the suggestions from @Mikael Sandberg
I sometimes find that related work items condition with links and JQL produces inconsistent results when checking for the absence of work items. My hypothesis is we do not how the rule implements those two checks together for linking and the JQL, thus it may not be what was intended.
As an alternative building on Mikael's suggested change to the JQL with the exact match syntax, I recommend using the Lookup Work Items action to take better control of the rule steps. For example, with changes to your rule steps:
issue IN linkedIssues("{{issue.key}}")
AND summary ~ "\"{{issue.key}} - {{issue.summary}}\""
AND issueType = Test
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.
Thanks Bill
It run successfully but it didn't create a Ticket in the Zephyr project
Work item transitioned
09/03/2025, 17:03:55
xxx-63858: Test zephyr new approach
Quality Assurance
Work item fields condition
09/03/2025, 17:03:55
The following work items passed:
xxx-63858
Work item fields condition
09/03/2025, 17:03:55
The following work items passed:
xxx-63858
Lookup work items
09/03/2025, 17:03:55
A search during custom value definition found no work items.
{{smart values}} condition
09/03/2025, 17:03:55
The following work items did not match the condition:
xxx-63858
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Thanks for that information, @Stephen Johnston
Let's try a couple of things...
In your rule, before the lookup action, use the Log action to write that dynamic JQL expression directly to the log. That will help confirm what it contains when the rule runs.
With that JQL in hand, and using your example work item from the trigger, try to run that JQL standalone (outside the rule) to check if it is accurate.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
@Bill Sheboy Log shows "\"XXX-63858 - Test zephyr new approach\""
I am wondering is my issue due to the new test ticket being created is in a different project?
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Yes, that is likely the problem if your rule scope (in the details at the top) is single-project:
Single-project scope rules can create (or clone) work items into other projects, but they cannot see them in any other way.
The rule will need to change to multiple-project or global scope, depending upon what is needed for your scenario. Please discuss this with your Jira Site / Product Admin as they will need to make the change from the global automation area.
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.