Good Morning
We have a field that we want to make read only for certain users.
Looking at the Behaviours plugin, the documentation says that using the plugin can help to "Making a field read-only dependent on user role or group".
Can you please help me to do this?
I have got the following to put in the script area for the selected field: "formField.setReadOnly(true)" but do not know how to only apply this to only to people in certain group/s or to those that are not in a particular group.
I hope to hear from someone soon on this.
Kind regards
Adam
assuming you are not doing anything else, You really don't need to add any script for this.. You should see something like this when editing the behaviour.
Required (Optional)
Writable (Readonly)
Shown (Hide)
Conditions: None - Add one.
Just select the "readonly" option (it is a hyper link in you instance) and then under Conditions.. add the proper except or When condition you want. Once in the conditions part it should be self explanatory.. just remember to select the proper Except or When.. I always get caught on that one and put the wrong one in.
@Jeff Louwerse or @Jamie Echlin (Adaptavist) - how do you make it stay read only after the form has been submitted. I have the issue that when the create dialog first launches it adheres to the Readonly change I made, but if there are any errors on the page it flips it back to writable which defeats the purpose of creating the behaviour. Any ideas would be great or if there is something additional I'm supposed to be doing? Do I need to create a validation script?
We are running JIRA Server version 7.1.2 and Scriptrunner 4.3.5
Maybe it has something to do with the following reported issue i found: https://productsupport.adaptav...
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.