Forums

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

ScriptRunner behaviour and Select List (cascading)

SergioA August 28, 2024

Hi, I'm working on a simple behaviour that changes the value of a field based on the value of a Select List (cascading) field.

At this moment, the behaviour looks like this:

 

const changedField = getChangeField()
console.log(`New value is ${JSON.stringify(changedField.getValue(), null, 2)}`)
And it's configured to be executed on load and on init events, in the create view.
When I change the value of any field of the creation form, I can see the logs in the browser's console:
Captura.PNGCaptura1.PNG
But when I change the value of both fields of the Select List (cascading) fields, I can see no logs, like if the on change event is not being triggered.
Does ScriptRunner's Behaviours provide support for this type of fields?
Thanks!

2 answers

1 accepted

1 vote
Answer accepted
Ben
I'm New Here
I'm New Here
Those new to the Atlassian Community have posted less than three times. Give them a warm welcome!
August 28, 2024

Hi Sergio,

 

Unfortunately cascading lists are not yet supported by ScriptRunner Behaviours.

 

A list of supported fields can be found here

https://docs.adaptavist.com/sr4jc/latest/features/behaviours/behaviours-supported-fields-and-products#:~:text=your%20selected%20view%3A-,Create%20View%20Supported%20Fields,-Field%20/%20methods

 

ScriptRunner Behaviours is reliant on Atlassian's UI Modifications API. Once cascading lists are supported by the UI Modifications API they will be available within Behaviours.

https://developer.atlassian.com/platform/forge/apis-reference/jira-api-bridge/uiModifications/#supported-fields-per-view

 

I hope this information helps and appreciate it's not the ideal response you were looking for!

 

Cheers,

Ben

SergioA August 28, 2024

Many thanks for your quick response, Ben.

Breanna Byron
I'm New Here
I'm New Here
Those new to the Atlassian Community have posted less than three times. Give them a warm welcome!
November 15, 2024

The documentation does not reflect that though. I would expect the field cascading list to be... well listed.

0 votes
S Sajeed Ahamad September 5, 2024

Hi @SergioA 

Hi, I am a JIRA Developer and part-time Freelancer. I provide support for all types of Cloud and Data Center scripting solutions, including Groovy and SIL. I specialize in Listeners, Behaviors, Conditions, Validators, and Custom Post Functions. If you need assistance, feel free to contact me on WhatsApp at +17866876777 or via email at freelancerjira@gmail.com.

Suggest an answer

Log in or Sign up to answer
DEPLOYMENT TYPE
CLOUD
PRODUCT PLAN
STANDARD
TAGS
AUG Leaders

Atlassian Community Events