I'm trying to restrict custom field "Story Points" editing to few and should be read-only to all other users.
For this, under behaviors, created a behavior >> mapped to required project >> under field selected "Story Points" >> and added exception to be written for few users.
By doing so I was able to make it read-only for all users except the users I mentioned in the condition. But the inline editing is still accessible to all the users. How to fix that?
Can we use script conditions for each transition? If so, can you help in improving the script?
def storypoints = getFieldById("Story Points")
if(currentUser.name("username")){
getFieldById("Story Points").setReadOnly(false)
}else{
getFieldById("Story Points").setReadOnly(true)
}
Hi @Sarath
Check this:
In my example I used summary field but you can change it to Story Points.
I marked field as read only and set negative condition wich allows users from group jira-administrators to edit summary field.
I hope that this will help you :)
Regards,
Seba
Hi @Sebastian Krzewiński , thanks for the response.
In this context what was your screen configuration? Does the field summary included in the edit screen? I think screen config. is overwriting the behavior setting.
This is my setting. What's happening is, it is read-only for all the users except the one I mentioned in the condition, only in the edit screen. Still inline editing is enabled for all the users.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi @Sarath
My configuration block summary field on edit screen.
Behaviours works only on create and edit screens so you can't achieve described action (block inline edit on view screen).
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
I had same issue.
I think it is linked to your ScriptRunner version ?
When trying to edit a field that is linked to a Behavior, the Edit form should come up, you shouldn't be able to do inline edits on such fields (see Scriptrunner Behavior doc).
Unfortunately it seems there were some versions of Scriptrunner with a bug : inline editing was allowed even for Behavior linked fields....
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi @Marc Minten (EVS) the current version we're using is 5.59. Do you know if it is the version problem or just the script runner limitation on not able to to get impact on inline editing?
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
We are running 5.5.9 and everything is running fine. We upgraded (Adaptavist support info) to overcome the in-line edit issue.
I think you best contact Adaptavist support...
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.
Online forums and learning are now in one easy-to-use experience.
By continuing, you accept the updated Community Terms of Use and acknowledge the Privacy Policy. Your public name, photo, and achievements may be publicly visible and available in search engines.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.