I need to be able to prevent a workflow transition based on the status of a linked ticket.
Main ticket is of one issue type and has a linked ticket of another issue type.
Transition of Main ticket from status A to status B should be allowed ONLY if the linked ticket is in the "Done" status.
I have tried utilizing the "Validation of linked issues" validator, properly (at least it looks right to me) setting up all the properties of the validator.
The result is: Moving the Main ticket from status A to B (as explained above) when the linked ticket is NOT in "Done" is not allowed by the validator (works as expected).
HOWEVER - Moving the Main ticket from status A to B when the linked ticket IS "Done" is also not being allowed by the validator (does NOT work as expected).
What am I missing? (I tried the same with "Condition" > same results)
If you have a scripting app, such as ScriptRunner or JMWE, you can use a validator script like we have done.
//Outward links, where we'll find any "is linked to PCE" links
def issueLinks = ComponentAccessor.getIssueLinkManager().getOutwardLinks(issue.getId())
def numClosedPceIssues = 0
//Inward links, where we'll find any "is request for project" links
def inwardIssueLinks = ComponentAccessor.getIssueLinkManager().getInwardLinks(issue.getId())
def numProjectIssues = 0
//check outward links for "is linked to PCE" links
for(IssueLink i in issueLinks)
//want only PCE links
if(i.getIssueLinkType().getName() == "PCE")
linkedObject = i.getDestinationObject()
//want only PCE issues with resolution of Complete
if(linkedObject.getIssueType().getName() == "PCE" && linkedObject.getResolution()?.getName() == "Complete")
//if there are no linked closed PCEs, check inward links for "is request for project" links
if(numClosedPceIssues == 0)
for(IssueLink i in inwardIssueLinks)
//want only Project links
if(i.getIssueLinkType().getName() == "Project Portfolio Link")
linkedObject = i.getSourceObject()
//want only Project issues
if(linkedObject.getIssueType().getName() == "Project")
return numClosedPceIssues > 0 || numProjectIssues > 0
Just got it to work with the native Validator!!
it was a matter of setting up the right "direction" for the properties.
The key was to set up the "Issue link types" to the target ticket for which I want to check the status and indicate the "done" status.
I'm pretty sure I've tried that combination before, but who knows. It suddenly "started" working.
Thanks to all who read and thought about my question. :)
We’re excited to introduce external collaboration for Confluence, now available in early access. It is available to preview for Confluence Cloud Premium and Enterprise customers. (If you're not on ...
Connect with like-minded Atlassian users at free events near you!Find an event
Connect with like-minded Atlassian users at free events near you!
Unfortunately there are no Community Events near you at the moment.Host an event
You're one step closer to meeting fellow Atlassian users at your local event. Learn more about Community Events