Project Picker Multi select with ScriptRunner

Deleted user July 25, 2019

Hi, 

I found that you could convert text fields to select lists using scriptrunner's behaviours on this url: https://scriptrunner.adaptavist.com/latest/jira/behaviours-conversions.html

In the last example, they have created a project picker and an issue picker. The issue picker is explained before, however I can't seem to wrap my head around the project picker.

Is there an existing rest URL like for issue pickers that I can use? Or do I have to go through the pain of creating an end restpoint (never done that before)

 

Thanks in advance!
Kind regards

2 answers

1 accepted

0 votes
Answer accepted
Steven F Behnke
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.
July 25, 2019

There is a customfield type included in Jira of type Project Picker.

image.png

Deleted user July 25, 2019

I'm stupid for not checking that... Thanks! :D

Like Steven F Behnke likes this
Steven F Behnke
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.
July 25, 2019

Please no worries, it's not mentioned in scriptrunner documentation and it's quite obscure imo. When I was a consultant no one I worked with had ever used it before.

Like Deleted user likes this
Josh_Kochelek__Modus_Create
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.
August 18, 2019

@Steven F Behnke Hi Steve. Is there a way to convert the Project Picker into a multi-select?

Like Deleted user likes this
Steven F Behnke
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.
August 20, 2019

No, not that I am aware of. This means you should either create a Plugin custom field that provides this implementation or you use scriptrunner. A Scriptrunner Script REST endpoint and a Behavior to convert the field should work fine. This is more or less documented on Behaviors Conversions.

DORIAN KERSCH August 20, 2019

@Steven F Behnke - Is there a solution for typeahead project picker single select? (If you have 500 projects, that list gets very long). 

Steven F Behnke
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.
August 20, 2019

Nothing specifically. There is general approaches. 

If the page loading is slow due to the amount, then you need to write your own plugin field. 

If you just want typeahead, you can either use Javascript added to the site or a Script runner behavior. Either way, both approaches are effectively calling $("my field").auiSelect2(), but you might need to adjust instead of blindly converting. 

0 votes
Deleted user July 25, 2019

 

 

 

Suggest an answer

Log in or Sign up to answer
TAGS
AUG Leaders

Atlassian Community Events