Forums

Articles
Create
cancel
Showing results for 
Search instead for 
Did you mean: 

Transition next work item to ready when previous work item completes based on rank order

Sean Still November 7, 2025

I want to use automation to transition an item based on this logic and I'm having a hard time building the right trigger.

When a work item transitions to Done, transition the next work item to Ready based on rank order.

5 answers

0 votes
Trudy Claspill
Community Champion
November 7, 2025

Hello @Sean Still 

Rank is not a simple numeric value. It is a hash of multiple characters (letters and numbers, and maybe symbols) that can be interpreted only internally by Jira. It is also a global value, not specific to a project or subset of issues. Rank uses the Lexorank algorithm. It is intended only for use internally in Jira, not for direct external consumption.

It is not supported for use in a JQL query like

rank > {a specific issue's current rank}

What you might be able to do in your automation is:

1. Use a Lookup Issues action to run a JQL to retrieve the issues ordered by rank. You would have to determine the appropriate JQL; i.e. a JQL from the board that contains the issues of interest.

2. Iterate over the results until you find the issue that matches the one triggered the rule.

3. Keep iterating through the list until you find the first item with its status set to the status that precedes Ready.

4. Transition that issue to Ready

 

I haven't tried this out to work out all the details. At this point I'm just throwing out an idea.

Sean Still November 7, 2025

Thanks! Good advice!

 

0 votes
Matteo Vecchiato
Community Champion
November 7, 2025

Hi @Sean Still ,

Thank you for your post.

This is the automation that could do what you need, it search the work items in backlog status ordered by Rank:

image.png

Hope it helps

Trudy Claspill
Community Champion
November 7, 2025

@Matteo Vecchiato 

To what value are you setting your variable kkey?

How does this rule get the issue ranked after the trigger issue?

John Funk
Community Champion
November 7, 2025

Exactly - you have to tell it to get the first work item from what gets returned. 

Matteo Vecchiato
Community Champion
November 7, 2025

Sorry, I didn't mention the smart value associated:

image.png

Sean Still November 7, 2025

Thanks Matteo, this is excellent!

Trudy Claspill
Community Champion
November 7, 2025

@Matteo Vecchiato 

I don't see how your solution gets the next ranked issue relative to the trigger issue. Your solution seems to assume that the trigger issue would've been the first ranked item prior to being completed. While that is possible, it is also possible that it was not.

@Sean Still can you add more details about the ranking of your items? Would the trigger issue be the highest ranked item at the time it was completed? Do you want to transition

  1. the highest ranked item that is in a status that can transition to Ready, or
  2. the first item ready to transition that is ranked lower than the trigger issue?
Sean Still November 7, 2025

I've got some testing to do but it looks like it's working as intended!!!!!

 

Like John Funk likes this
John Funk
Community Champion
November 7, 2025

Number 1 was my understanding in how I crafted by response. 

@Matteo Vecchiato  - Did you test this and get the results you were expecting? 

Matteo Vecchiato
Community Champion
November 7, 2025

@John Funk : yes, I tested it

 @Trudy Claspill it is essential the change of status. The Jql search by rank on the "pending" work items, not in the following work item, as in the initial question.

 

Like John Funk likes this
0 votes
Bill Sheboy
Rising Star
Rising Star
Rising Stars are recognized for providing high-quality answers to other users. Rising Stars receive a certificate of achievement and are on the path to becoming Community Leaders.
November 7, 2025

Hi @Sean Still 

Without seeing your current rule and audit log details for context...I hypothesize you could do this with dynamic regular expression search and variables, and a helper variable for the get() function, although it is not simple.  This would be easier if the list's get() function could directly take a nested filter or a variable.

Please first consider how your team selects work as "Ready" because it may be easier to just drag-and-drop the item when the board / backlog are already ordered by Rank.

 

If you still want to try this with an automation rule, here is an outline of the relevant steps:

  1. rule is triggered on work item transitioned to Done
  2. using the Lookup Work Items action with JQL to gather the possible next work items, plus the one that just finished, ordered by Rank ASC
  3. expand the lookup result into a variable of the keys and list {{index}} values, with delimiters
  4. build a dynamic regular expression in another variable to find your trigger item's key in the list from #3, using the same delimiters
  5. use #4 to filter the list from #3 with the match() function, getting the index needed, storing that in a variable
  6. use a condition to confirm there are any items in the lookup after the trigger one
  7. create an empty variable, named varNull, to help do the math with the list's get() function
  8. with the lookup result from #2, call the get() function with a the number variable from #5 incremented, and prefixed with the length of varNull; this solves the typing problem

Like I stated, this is not simple to accomplish :^)

 

Kind regards,
Bill

 

PS: The above approach works even when the just-finished work item is in the middle of the list of candidates to go next.  It does not require selecting the first one in the list.  When you always want the first one, regardless of relative position to the just-finished one, the approach using the first function on the lookup results is better and simpler.

 

Sean Still November 7, 2025

Thanks Bill!

 

Like Bill Sheboy likes this
0 votes
Anthony Morais
Rising Star
Rising Star
Rising Stars are recognized for providing high-quality answers to other users. Rising Stars receive a certificate of achievement and are on the path to becoming Community Leaders.
November 7, 2025

Hi @Sean Still 

When you say "next work item," would that be the child item?
Please attach a screenshot of the automation rule and logs for a better analysis.


Regards,
Anthony

Sean Still November 7, 2025

I appreciate you responding. Standard level 0 work item.  Screenshot 2025-11-07 134556.pngScreenshot 2025-11-07 134626.png

0 votes
John Funk
Community Champion
November 7, 2025

Hi Sean,

Can you share what you have so far for the rule? 

The only way I can think of might work would be to do a lookupIssues with a JQL to get the work items currently in status X with an Order by Rank ASC. Then use a condition to get the first value. Totally shooting from the hip on that, but otherwise not sure how you could do it outside of creating a custom field would have a numerical value and you would get the min or max. 

Sean Still November 7, 2025

Thanks John, I responded to Anthony with some screen shots

John Funk
Community Champion
November 7, 2025

I don't think that JQL is ever going to work. 

 

Sean Still November 7, 2025

I didn't have any confidence in it but needed a place to start

John Funk
Community Champion
November 7, 2025

True  :-)

Try that Rule from Matteo  - that's what I was referencing to do. But you have to get the .0 work item to be the first one in the list. 

Suggest an answer

Log in or Sign up to answer
DEPLOYMENT TYPE
CLOUD
PRODUCT PLAN
PREMIUM
PERMISSIONS LEVEL
Product Admin
TAGS
AUG Leaders

Atlassian Community Events