We are building a JIRA Agile external integration where we need to use the rank of an issue on an Agile board to drive some business logic. The new Agile 6.6 rank custom field is fieldtype 'lexorank', and formatted strangely (e.g. 1|hyi4w0: )
I've read that that the '1|' prefix encodes the lexorank "bucket" and is used in "rebalancing" operations.
What about the rest of the encoding?
How can I convert the encoding to an integer that I can use in my business logic?
Hi, you would not need to decode the lexo rank field to determine the rank of the issue in the board. The value of the lexo rank is calculated by ordering the issues on the board lexicographically(dictionary order). As @Tom Jackson has pointed out. There are 3 buckets used in the process of lexicographically sorting the issues in the JIRA, hence the 1|, 2| and 3|. The rest of the characters and symbols are the product of the sort itself.
So if you need to order the issues they way it looks on the board in JIRA, you have to apply order by caluse to the lexo rank field/ sort this in your code. Ideally both in the database order by clause and the array.sort functions of any coding language orders your string alphabetically.
If you spend enough time as a Jira admin - whether you are managing a single, mid-sized instance, a large enterprise one or juggling multiple instances at once - you will eventually find yourself in ...
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!
Unfortunately there are no AUG chapters near you at the moment.Start an AUG
We're bringing product updates and pro tips on teamwork to ten cities around the world.Save your spot