Hi,
I need to made a text field 'read only' only in edit screen (The user can change this field in the edit and create screen).
BR,
Daniel
Um, your question says "make text field read-only in edit screen" then "the user can change this field in edit screen" - which one is it?
Or do you mean you just want to be able to stop all edits of the field after creation? (To do that, remove it from the edit screen)
If they can edit the field then it isn't defined as read only. If you are setting it in the background remove it from the edit and view screens. If you don't have separate create, edit, and view screens you need to create them instead of just using the default screen for all functions.
Hii @Nic Brough -Adaptavist-
I mean this:
In the create screen user can put value in this field.
In edit screen- user can change the value and update this field.
In view screen- the field will be read only (If the user wants to change, he will need to press the 'Edit' bottom).
Hi @Joe Pitt ,
In view screen- the field will be read only (If the user wants to change, he will need to press the 'Edit' bottom)...
Is it possible ?
Ah, ok. You have a problem then - the standard way to tell Jira a field cannot be edited in "view" is to remove it from the edit screen. The "inline edit" is a friendly way of making Jira quicker and easier for your users - changing a field becomes three clicks instead of 6.
If you want to disable inline edit while keeping the ability to change a field then consider these:
Thank you @Nic Brough -Adaptavist- ,
How can I do the third bullet? I can make a field 'read only' , but at all of the screens (view + edit).
I would like to 'read only' only in inline edit (view screen)
Can you help me? Sorry, I couldn't run it. I made it readonly in Select List custom field custom options. But I don't want it to be read only when changing options on the edit screen.
if (getAction()?.id == 1){return}
def CustomField = getFieldByName("Request Type")
def selectedOption = CustomField.getValue() as String
def isOtherSelected = (selectedOption == "Defect" || selectedOption == "New Feature")
CustomField.setReadOnly(isOtherSelected);
If "Request Type" Defect or New Feature is selected, get readonly. Example "Request Type" Test selected. Later, when it is called edit, I do not want read only when Defect is selected.
It looks like you're new here. Sign in or register to get started.