How can I copy the value of Scripted Field to a Global Rank field?

We have a scripted field, which calculates the business value for us.

Now we want to use this field to rank our backlog, but as it is not a global rank field, we can't create sprints anymore (Error: "The board must be ordered by rank in order to add a sprint").

A workaround would be to copy the Scripted Field value to a Global Rank field.

How can we do this and as the global rank field is not a string, which conversion would I need to apply?

Thank you for your help!

2 answers

1 accepted

Accepted Answer
1 vote

Steve is right, ranking uses a system called "lexorank".  You can't just jam in any old "value" in there.  Same as you can't just take a string and jam it into a user field and expect it to be a user.  Wrong format and incompatible.

You'll have to write code that will work out where in the ranking each issue should be placed (i.e. you need to know which issues are immediately above and blow it) and then work out the rank object from there.  Then do the indexing and rebalancing as well.  Have a look at https://confluence.atlassian.com/jirakb/lexorank-management-779159218.html to start getting a feel for how much "fun" that could be.

A better option would probably to use the JIRA API to manage it, but even that's not particularly simple - last time I looked at this, it was https://docs.atlassian.com/jira-software/6.7.12/com/atlassian/greenhopper/manager/lexorank/LexoRankManager.html but I don't know if you still have to handle the balancing, indexing etc.

I don't think you're going to be able to manage this. The Rank field is not meant to be managed, it has it's own code that allows you to rank issues relative to each other. The Rank field stores values as lexical values, and anyone outside of the developers likely will not be able to parse the format. It appears as a value like so: 0|i004hf:vzm

Suggest an answer

Log in or Sign up to answer
Community showcase
Posted Sep 18, 2018 in Jira

What modern development practices are at the heart of how your team delivers software?

Hey Community mates! Claire here from the Software Product Marketing team. We all know software development changes rapidly, and it's often tough to keep up. But from our research, we've found the h...

27,077 views 2 7
Join discussion

Atlassian User Groups

Connect with like-minded Atlassian users at free events near you!

Find a group

Connect with like-minded Atlassian users at free events near you!

Find my local user group

Unfortunately there are no AUG chapters near you at the moment.

Start an AUG

You're one step closer to meeting fellow Atlassian users at your local meet up. Learn more about AUGs

Groups near you