Hello Everyone,
I want to hide fields for inline edit through Script Runner Behaviour Template,Kindly guide me how to achieve this.I am able to hide it, when we are clicking on Edit button.
For Example:-
I want to hide priority from editing.
Hi @Jyoti Kumari
You need to apply Behaviour on priority field :-
def priorityField = getFieldById("priority") priorityField .setAllowInlineEdit(false)//priorityField.setReadOnly(true)
This script will won't allow editing field from view screen , it opens Edit Screen.
Thanks,
Vikrant yadav
@Jyoti Kumari it is not possible to conditionally show/hide fields in the view screen.
All you can do is disable the in-line edit and force the full edit screen to open when someone attempts to in-line edit.
The only way to hide a field from the view screen is to remove it from the field configuration.
@PD Sheehan :- I cannot remove field from view screen, but need to disable from in-line editing .Can you suggest me, how we can achieve this.
@Vikrant Yadav :- I have tried this, but it is not working as expected.Its behaviour is inconsistent.
@Jyoti Kumari I think you applied script at wrong Field. On my side, it's working fine. Edit screen/dialog box is coming, not allowing to Edit Priority from view screen.
Generally, just the fact of listing a field in a behaviour configuration will generally disallow in-line editing.
But you can call it out explicitly
getFieldByName('some field').setAllowInlineEdit(false)
Note that the in-line edit appears to be available, but if you attempt to click on the field to start editing, you will get the full edit screen pop up.
@Vikrant Yadav :- Thank you so much, for the detail Information.There was some issue in one of the project, it is not working for every issue ,so I tested it on different project.It is working fine there.
Is it possible to not show pencil icon, as showing the pencil icon on the screen and not available that field for the edit is creating bad UI experience for the end users .
It looks like you're new here. Sign in or register to get started.