Cascading Select List with ScriptRunner

Klaus Foerschl April 11, 2018

Hello,
I'm wondering if I could script cascading select lists with ScriptRunner.

I know, there's the custom field type "Select List (cascading)", but this supports 2 levels only.
I wanted to have 3 levels (and maybe more).

So, my idea was to "simply" create one (or more) scripted custom fields (selection lists), which I can assign to the desired screens, and which are then filled dependently on each other.
But, meanwhile I'm in doubt, that I can - with ScriptRunner:
a) create and display a scripted selection list as a scripted custom field
b) dependent on the selection in a first selection list, I can initiate and show (for selection) a further selection list with dependent values - in the same create/update issue screen.

Does ScriptRunner Scripted Fields allow me to calculate AND DISPLAY fields (not only select lists, but any kind of editable fields) on screens as mentioned above?
Or, is it more, that scripted fields are intended to calculate (as post create function e.g.) a value and store it?
If it's more the second option. What could I do to achieve my dream of visualizing pre-calculated fields in screens?

Apart from the question(s) above, honestly I do not understand the "Template" concept of scriptrunner scripted fields.
I checked https://scriptrunner.adaptavist.com/latest/jira/scripted-fields.html, but it does not say much about it.
If my intention is to provide a selection list in a screen (as explained above), I'm not sure - if the Template could help here at all, or which template to select, or what and how to work with the "Custom Template".

Can anyone bring light into this for me?

Looking forward for your input.

Klaus

 

2 answers

1 vote
Adrián Plaza [DEISER]
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.
April 11, 2018

Hi @Klaus Foerschl,

 

for example, you can make many select lists (unique option) Jira default custom fields as you want, then with behaviours you can hide and show different list depends on the option that you select in the first list.

 

Cheers,
Adrián.

0 votes
jessiexjqin August 31, 2020

Hi @Adrián Plaza [DEISER] ,

I'm new user with behaviors, do you have some template for refer? thanks.

Suggest an answer

Log in or Sign up to answer