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.
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.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
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
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
To what value are you setting your variable kkey?
How does this rule get the issue ranked after the trigger issue?
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Sorry, I didn't mention the smart value associated:
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
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
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
I've got some testing to do but it looks like it's working as intended!!!!!
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Number 1 was my understanding in how I crafted by response.
@Matteo Vecchiato - Did you test this and get the results you were expecting?
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
@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.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
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.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
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
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
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.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
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.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.