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

It's not the same without you

Join the community to find out what other Atlassian users are discussing, debating and creating.

Atlassian Community Hero Image Collage

Display max result using Select List Conversions?

Hi,

 

Using the out of the box example from Dynamically Changing the Picker Query, I would like to get all results from the jql listed in the select list, not just the first 10 (which seems to be the default).

I have tried to add:

max : 30, 

 to the ajaxOptions but It still results in only the first 10.

 

Using the code from the page above page:

def selectedProject = getFieldById(getFieldChanged()).value as Project
def jqlSearchField = getFieldByName("TextFieldA")

if (selectedProject) {
    jqlSearchField.setReadOnly(false).setDescription("Select an issue in the ${selectedProject.name} project")

    jqlSearchField.convertToSingleSelect([
        ajaxOptions: [
            url           : getBaseUrl() + "/rest/scriptrunner-jira/latest/issue/picker",
            query         : true,

            data          : [
                currentJql  : "project = ${selectedProject.key} ORDER BY key ASC", 
                label       : "Pick high priority issue in ${selectedProject.name} project",
                max         : 30,
], formatResponse: "issue" ], css : "max-width: 500px; width: 500px", ]) } else { // selected project was null - disable control jqlSearchField.convertToShortText() jqlSearchField.setReadOnly(true).setDescription("Please select a project before entering the issue") }

 Anyone can help out? :)

1 answer

1 accepted

0 votes
Answer accepted

Hi, 

There is an existing bug report for this here: https://productsupport.adaptavist.com/browse/SRJIRA-3617

Regards,

Katy

Report back since 5.6.6.1-jira8 of Scriptrunner is now out.

Using max on the ajaxOptions now works as expected.

Suggest an answer

Log in or Sign up to answer
TAGS
Community showcase
Asked in Jira Service Desk

Calling all Insight users, we need your help!

Hello Insight users,  As part of our (Mindville's) acquisition by Atlassian, our training team is looking to build some new Insight training materials. It would really helpful if you can ...

135 views 1 0
View question

Community Events

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

Find an event

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

Unfortunately there are no Community Events near you at the moment.

Host an event

You're one step closer to meeting fellow Atlassian users at your local event. Learn more about Community Events

Events near you