Come for the products,
stay for the community

The Atlassian Community can help you and your team get more value out of Atlassian products and practices.

Atlassian Community about banner
Community Members
Community Events
Community Groups

customField.setAllowInlineEdit(false) is not working in Behaviour



I want to 'read only' field fixVersion in Jira.

In edit screen in is working okay, But in view screen it is not read only and users can edit it.

I tried to use this intialiser without success:

def customField = getFieldByName("Fix Version/s")


What am I doing wrong?

Thank you,


2 answers

Ahh I get it now. Just remove the field from the edit screen that will make it read-only. No need for behaviours :)

I dont want to remove this field... There isn't a different way to do it?

But you don't want people to edit it so why keep it on the edit screen? As far as I can tell from your description, fixVersion is set upon creation and shouldn't be edited after? If so fixVersion should only be on the view (so you can view it) and create screen (so you can set it upon creation), not on the edit screen (since it shouldn't be edited). That is the way to go :) Even if you could do it differently the result would be the same.

I have a condition on this field, only users from a specific group can edit it.

So, I need it in edit, in create and in view screens.

But in View screen, the script didn't work, and all of the users can update it....

I see. Then you should be able to add the field to your behaviour, make it Readonly and add a new condition for a certain role or user like so :)


I did it, like I wrote from the beggining...

It is working great only in edit screen, not in view screen.

In view screen all of the users can edit this field.

Hmm wierd. Works fine here. I see the edit if i hover over the field, but i can't actually edit it..


Like Mehdi Heydari likes this

@Mathis Hellensberg you only have to add the field in the behaviour. That forces the edit screen to pop up when you try to inline edit it. 

Like aligntechsupport likes this

Hi @Dan27

Wouldn't customField.setReadOnly(true) work?


Hi @Mathis Hellensberg 

No, I still can change FixVersion value from view screen

@Dan27 Hmm.. can you post the full behaviour script? :)

@Mathis Hellensberg 

def customField = getFieldByName("Fix Version/s")




def customField = getFieldByName("Fix Version/s")

Suggest an answer

Log in or Sign up to answer
Community showcase
Published in Jira

Online AMA this week: Your project management questions answered by Jira Design Lead James Rotanson

We know that great teams require amazing project management chops. It's no surprise that great teams who use Jira have strong project managers, effective workflows, and secrets that bring planning ...

205 views 1 6
Read article

Atlassian Community Events