Hi All,
I want to write a Groovy Script to check if the current user belongs to a given group or project role. And based on that I want to hide certain fields on the screen. Is this possible with a groovy script ?
If possible, what is the syntax to check the current users group and hide a given custom field in groovy ?
Also please let me know what classes to import.
Thanks for Reading
Andrian
What plugin are you using to write your groovy scripts? If you're using the Adaptivist Scriptrunner plugin, you have behaviors available. See this page for hidden fields behaviours documentation.
Hi @Doug Swartz
Do you know how to get rid of the below message in Behaviour Plugin. I want hide fields in the view screen. But according to the below message I can only do it in the edit screen.
The field Description is not hideable, so it will only be hidden when the issue is editable
Any thoughts ?
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi folks,
I have the same question, but I am using JMWE add-on. Been playing with variables, but can't find how to check if current user is member of the role.
Thanks a bunch
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
These are the steps i have in PF, after create event:
The following will be processed after the transition occurs
Run this post-function only if the following condition is true:
currentUser.isInProjectRole("Developers", issue.get("project"))
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.