Forums

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

Make Field Editable If User Picker (multiple users) value is Selected using Scriptrunner Behaviour

Digvijay Singh Gehlot
Contributor
November 10, 2025

H Community,

I want to pass a condition where - if user(s) is/ are selected in User Picker (multiple users) field, then a custom select list should be editable else it should set in ReadOnly mode using Scriptrunner Cloud Behavior.

Please share any Scriptrunner script behavior example or any relevant javascript code to fulfil the above.

Thanks.

1 answer

Suggest an answer

Log in or Sign up to answer
0 votes
Tudor Tofan
Contributor
November 10, 2025

Hi @Digvijay Singh Gehlot 

The script should be somewhere along these lines:

Screenshot 2025-11-10 174307.png

Pasting it in text as well:

const selectList = getFieldById("customfield_10190");

const changedField = getChangeField();

if (changedField.getName() == "user picker field" && changedField.getValue() != null){
    selectList.setReadOnly(false)
}
else {
    selectList.setReadOnly(true)
}
Digvijay Singh Gehlot
Contributor
November 11, 2025

Hi @Tudor Tofan 

Thank you for your message - it helped.

What could be the proper code for On Load as per mentioned use-case - where system checks if User Picker (multiple users) field filled or not, then only make the other custom field ReadOnly or Editable?

Thanks

Tudor Tofan
Contributor
November 11, 2025

Hi @Digvijay Singh Gehlot . I'm not sure what you're trying to change. What does "On Load" mean to you? You can play around in the dropdown where it says "Run the script:" 

DEPLOYMENT TYPE
CLOUD
PRODUCT PLAN
PREMIUM
PERMISSIONS LEVEL
Product Admin
TAGS
AUG Leaders

Atlassian Community Events