Are you in the loop? Keep up with the latest by making sure you're subscribed to Community Announcements. Just click Watch and select Articles.

×
Create
cancel
Showing results for 
Search instead for 
Did you mean: 
Sign up Log in
Celebration

Earn badges and make progress

You're on your way to the next level! Join the Kudos program to earn points and save your progress.

Deleted user Avatar
Deleted user

Level 1: Seed

25 / 150 points

Next: Root

Avatar

1 badge earned

Collect

Participate in fun challenges

Challenges come and go, but your rewards stay with you. Do more to earn more!

Challenges
Coins

Gift kudos to your peers

What goes around comes around! Share the love by gifting kudos to your peers.

Recognition
Ribbon

Rise up in the ranks

Keep earning points to reach the top of the leaderboard. It resets every quarter so you always have a chance!

Leaderboard

ScriptRunner Issue Picker Field, Sort the selectable Issues on a Custom Field Value

David Harkins
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.
Oct 19, 2023

We have a requirement to sort the displayed issues on a multiple issue picker field.

I've attempted adding the sort the customised JQL but still sorts be created / key with the newest at the top.

We are wanting to sort the displayed selectable issues on a custom field which contains numbers, so that the highest number is as at the top.

we already have the custom fields displayed.

renderOptionHtml = { String displayValue, Issue issue, Closure<String> highlight ->
    OutputFormatter.markupBuilder {
        i('Service Rank: ' + issue.getCustomFieldValue(OurFields.serviceRankField))
        mkp.yield(' - ')
        mkp.yieldUnescaped(displayValue)
    }
}

2 answers

1 vote
Peter-Dave Sheehan
Community Leader
Community Leader
Community Leaders are connectors, ambassadors, and mentors. On the online community, they serve as thought leaders, product experts, and moderators.
Oct 19, 2023

I would think you should be able to simply include "order by" in the JQL configuration of your issue picker field.

But I tested it and it doesn't work.

I don't think any of the customization options will let you affect the supplied list other than the JQL.

So you might need to contact adaptavist support to suggest this as a new feature (or perhaps a bug, I don't know why the order by clause in the JQL would be ignored).

David Harkins
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.
Oct 20, 2023

@Peter-Dave Sheehan 

Yes that was my first thought, also failed for me.

0 votes
Ram Kumar Aravindakshan _Adaptavist_
Community Leader
Community Leader
Community Leaders are connectors, ambassadors, and mentors. On the online community, they serve as thought leaders, product experts, and moderators.
Oct 19, 2023

Hi @David Harkins

Could you please specify what version of Jira and ScriptRunner you are currently using?

Thank you and Kind regards,

Ram

David Harkins
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.
Oct 20, 2023

Data Centre Installation

Jira Software 9.4.6

Jira Service Management 5.4.6

ScriptRunner: Installed version: 8.4.0

Suggest an answer

Log in or Sign up to answer
TAGS
AUG Leaders

Atlassian Community Events