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.
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.
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
I appreciate you responding. Standard level 0 work item.
Thanks John, I responded to Anthony with some screen shots
I don't think that JQL is ever going to work.
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:
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.
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:
Hope it helps
I didn't have any confidence in it but needed a place to start
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.
@Matteo Vecchiato
To what value are you setting your variable kkey?
How does this rule get the issue ranked after the trigger issue?
Exactly - you have to tell it to get the first work item from what gets returned.
Sorry, I didn't mention the smart value associated:
Thanks! Good advice!
Thanks Bill!
It looks like you're new here. Sign in or register to get started.