I want to use Groovy script for a Condition to be able to tell whether/not a specific transition has ever been run on the given issue. Is there a way to iterate through the issue's transition history? Looking at the status history is not what I'm after.
So, if transition "XYZ" has ever been fired on this issue, then Condition = true.
Hi @Montana Fox ,
I don't think it is possible. You are able to get information about source and target status from the history, but not which transition exactly has been used.
But maybe you can create some custom field for your condition and post function for this specific transition, which changes this custom field's value? Then you should be able to distinguish, whether the specific transition has been used.
Yes, you can do this with Scriptrunner, as it can get to the os_<table> data and hence find the id of a transition that was executed.
But it would be painful to code for, and quite a heavy load, and given that a condition can execute up to four times for every display of an issue, it's likely to load your Jira server so heavily that you will spend several days fielding "Jira is to slow to use" questions until you give up and remove it.
A Condition that looks at the status change history would be far more simple to code for, way more performant, and probably be of more use (humans really don't care about what tranisition was used, but they do care that "status changed from X to Y")
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