Forums

Articles
Create
cancel
Showing results for 
Search instead for 
Did you mean: 

Script Runner Cloud Behaivour functionality

arielei
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.
October 4, 2025

Hello Community,

Is it possible in ScriptRunner Cloud using Behaviour to set a subset of a custom field or the component field?

for example,

CF: [1,2,3,4,5]

 

i want to give an option to select only [1,2,3]

 

and no, i dont want to do this with field context.

 

Thanks

Ariel 

2 answers

1 accepted

Suggest an answer

Log in or Sign up to answer
4 votes
Answer accepted
Maria Rusnakova
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.
October 5, 2025

Hi @arielei

this should work for the custom field CF:

 

CF.setOptionsVisibility(["1","2","3"],true)

arielei
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.
October 5, 2025

Hey @Maria Rusnakova 

It didnt work, it shows nothing when i did that.

Maria Rusnakova
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.
October 5, 2025

Hi @arielei

use id's of your options instead of their names.

Here you can check how to find the id:

How-do-I-get-the-id-s-of-the-dropdown-options-in-an-issue 

arielei
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.
October 6, 2025

Hey @Maria Rusnakova 

Thank you very much, that works!

 

Do you know if this can be implemented also on the Components?

i tried by giving the component id but it didnt work, used this to get the id:
Https://jDOMAIN.atlassian.net/rest/api/2/project/{projectIdOrKey}/components

 

Best

Maria Rusnakova
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.
October 6, 2025

Hi @arielei

unfortunately, so far I have only set it for select lists.

I tried the same script for Components now but, as you mentioned, it didn't work.

arielei
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.
October 6, 2025

Hey @Maria Rusnakova 
Thanks, according to Adaptavist, its not supporting Components yet.

https://docs.adaptavist.com/sr4jc/latest/features/behaviours/behaviours-supported-fields-and-products

 

Thanks for your help!

Like Maria Rusnakova likes this
0 votes
Matteo Vecchiato
Community Champion
October 5, 2025

Hi @arielei ,

I'm not sure if in cloud is feasible, maybe only at transition screen level. Have you checked this script example?

https://www.scriptrunnerhq.com/help/example-scripts/filter-resolution-for-issue-type-cloud 

Regards

DEPLOYMENT TYPE
CLOUD
PERMISSIONS LEVEL
Product Admin
TAGS
AUG Leaders

Atlassian Community Events