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.
@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.
@Peter-Dave 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.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
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)
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
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.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
@Peter-Dave Sheehan :- Thank you.It is working fine by using script.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 .
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
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
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
@Vikrant Yadav :- I have tried this, but it is not working as expected.Its behaviour is inconsistent.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
@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.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
@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 .
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
@Jyoti Kumari I don't think it's possible to hide pencil icon.
You need to remove field from Edit screen, then only pencil icon get removed.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.