Come for the products,
stay for the community

The Atlassian Community can help you and your team get more value out of Atlassian products and practices.

Atlassian Community about banner
4,296,599
Community Members
 
Community Events
165
Community Groups

Select List Conversion (ScriptRunner) works in JIRA Core, not in JSD

I have a Select List Conversion script which works fine in JIRA Core but doesn't display any values in JSD. It was entirely based on the first example in the Adaptavist Script Runner documentation for Select List Conversion.

Mappings are:

Test Service Desk (All request types)

Test Service Desk (All issue types)

Script is:

getFieldByName("Location").convertToSingleSelect([ 
ajaxOptions: [
url : getBaseUrl() + "/rest/scriptrunner-jira/latest/issue/picker",
query: true, // keep going back to the sever for each keystroke

// this information is passed to the server with each keystroke
data: [
currentJql : "project=comp and issuetype = 'Location' and active=yes ORDER BY summary ASC",
label : "Pick a Company location",
showSubTasks: false,

// specify maximum number of issues to display, defaults to 10
max : 10,
],
formatResponse: "issue"
],
css: "max-width: 500px; width: 500px",
])

Location field is Text Field (Single Line).

Project COMP has 4 issues of type Location that have Active=Yes.

Accessing the project Test Service Desk as a JSD Agent and opening an existing issue, I can view the Location field in Edit mode and it has 4 items in the list. However, when I try to Create an Issue form the Portal, the List has no entries. Any ideas?

1 answer

Hi Peter,

Currently, Select List Conversions do not function through the JSD portal. I would suggest viewing this open bug ticket through our support desk: https://productsupport.adaptavist.com/browse/SRJIRA-2667

Regards,

Josh

Hi 

 

I´ve tried to do a conversion to single select but it´s doesn´t works at Jira Service Desk.

The options are ok at select list but a new "div" inside html code is created for each selection at selection list. 

A new select list is designed and printed at screen every time that I selected a option.

Any idea ?

 

Thanks in advance

 

The behaviour code is:

getFieldByName("TestVersion").convertToSingleSelect([

    ajaxOptions: [

        url : getBaseUrl() + "/rest/scriptrunner/latest/custom/getVersions",

        query: true, // keep going back to the sever for each keystroke

        formatResponse: "general"

 

    ],

 

])

Like Mikhail Kosenko likes this

Joshua Yamdogo @ Adaptavist 

I´ve forgot the print screen

My versions are:

Jira Software 7.13.1

Jira Core 7.13.1

JIRA Service Desk 3.16.1

Script Runner: 5.5.3

 

 

Bug.jpg

Like # people like this

Did you ever figure this out?  I'm having the same situation where multiple fields are added to the page when a new option is chosen from the related field.

Same issue here, my Behaviour works in SD portal except for this html/new div issue.

Suggest an answer

Log in or Sign up to answer
TAGS
Community showcase
Posted in Jira Service Management

Jira Service Management Documentation Opportunities

Hello everyone, Hope everyone is safe! A few months ago we posted an article sharing all the new articles and documentation that we, the AMER Jira Service Management team created. As mentioned ...

325 views 0 10
Join discussion

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