I have a rule that is triggered when an issue is created. Is it possible to use a Related issue condition that checks to see if the current issue contains a “is cloned by” link and if so, the rule will continue?
I can get this to work if I just check that Related Issues are present but was hoping I could narrow the type of linked issues to the 'is cloned by' type.
Thank you, Bill
yes you should be able to do this with a related issues condition and smart-values.
This works for me:
It depends a bit on how your issue link types are set up. You may have to replace "clones" with the exact name you see on the issue link on the cloned issue.
Hi Andreas, Thank you for the suggestion. I had tried that before and did so again but unfortunately it did not work for me.
The beginning of my rule looks like this.
The first condition passes but the audit log shows the linked issue condition did not match.
I believe my linked issue condition component looks like yours:
In my last test, the rule runs when RKTEST-172 is created (by another rule). RKTEST-172 has a 'is cloned by' link to RKTEST-171. This link was created immediately prior by the previous rule. RKTEST-171 links look like this so a 'clones' link is present:
System Issue Linking is configured like this:
From what I have here, can you tell why this doesn't work for me?
Thank you, Bill
In your trigger for this rule, did you tick the box 'run this rule immediately' in 'More options' by any chance?
If so, can you try to remove that and try this again?
Jira's events system is a bit of a mess, in the sense that it will send the create issue event, *before* the issue may have been indexed or the issue link has been established properly. So if this rule executes immediately you may be seeing a timing issue where the condition isn't yet true.
The other way to verify this is to:
Thank you for the reply. I was wondering if this might be a timing issue in JIRA but wasn’t sure in that the following related issue conditions work:
1) If I simply check that Linked Issues Are present
2) If Linked Issues match JQL "Clone on Done" = "Yes" and Status = "Done" and resolved >= -1m
So, only checking for a specific type of linked issue fails. Actually, if I try and reference any smart values in the JQL it fails. Maybe that’s a clue.
I do not have the execute immediately flag ticked. I just tried changing the rule to manually executed and unfortunately, the same thing happens…no actions performed despite the existence of the linked issue.
For now, my #2 JQL condition above is a workaround to narrow the scope of determining if the rule should be executed and this should be appropriate 99% of the time. So, I’ll go with it unless you can think of something else.
Again, I greatly appreciate your time and suggestions with this, Bill
Hey Atlassian community, I help lead engineering at Sentry, an open-source error-tracking and monitoring tool that integrates with Jira. We started using Jira Software Cloud internally last year, a...
Connect with like-minded Atlassian users at free events near you!Find a group
Connect with like-minded Atlassian users at free events near you!
Unfortunately there are no AUG chapters near you at the moment.Start an AUG