Forums

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

Making a field read only using Scriptrunner

Brian Selewski
Contributor
November 22, 2024

I'm running into an issue where I am trying to make a field read only using Scriptrunner Behaviours for Jira cloud.  

It seems pretty straight forward, I set the script 

getFieldById('customfield_12904').setReadOnly(true)

 

For some reason this is making my field disappear.  Anyone else see this type of behavior? 

1 answer

Suggest an answer

Log in or Sign up to answer
1 vote
Kristian Walker _Adaptavist_
Community Champion
November 25, 2024

Hi Brian,

I would advise checking if you have any other behaviours defined for that issue that could be hiding the field or any other plugins or automation that could be hiding that field.?

I have just tested in my instance with a select list field and setReadOnly made it read-only as expected.

If you can not identify any other behaviour hiding the field, I would advise raising a support ticket here so that the support team can help you debug this issue further.

Regards,

Kristian

 

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

Atlassian Community Events