Create
cancel
Showing results for 
Search instead for 
Did you mean: 
Sign up Log in

Next challenges

Recent achievements

  • Global
  • Personal

Recognition

  • Give kudos
  • Received
  • Given

Leaderboard

  • Global

Trophy case

Kudos (beta program)

Kudos logo

You've been invited into the Kudos (beta program) private group. Chat with others in the program, or give feedback to Atlassian.

View group

It's not the same without you

Join the community to find out what other Atlassian users are discussing, debating and creating.

Atlassian Community Hero Image Collage

How can I use groovy script to see if a specific transition has occurred on an issue?

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.

2 answers

0 votes
Hana Kučerová Community Leader Dec 10, 2020

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.

0 votes

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")

Suggest an answer

Log in or Sign up to answer
DEPLOYMENT TYPE
SERVER
VERSION
7.2.7
TAGS

Community Events

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

Events near you