Hello,
I have a problem with attachments. I want to use hide UI elements in script fragments as a tool hide attachments from users specified on a custom field with exception to users group. Currently i have problems with combining both conditions.
Separately conditions works perfectly fine, but when I mix them, it not hide fields.
The groovy script looks like:
String uString = ComponentAccessor.getCustomFieldManager().getCustomFieldObjectByName("Job Interviewer II CSD")?.getValue(issue);
String groupname = "jira-administrators"
ApplicationUser lUser = ComponentAccessor.getJiraAuthenticationContext().getLoggedInUser();
ApplicationUser iUser = ComponentAccessor.getUserManager().getUserByName(uString);
def isManager = ComponentAccessor.getGroupManager().isUserInGroup(lUser,groupname)
if(!iUser.equals(iUser)) return true
if(lUser.equals(iUser) && isManager) return true
Do You have any idea how to deal with this problem ?
Hello @Thomas Deiler,
sadly i am not allowed to install any paid plugins, and free one don't provide hiding attachments
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
But you have groovy scripts plugin, or?
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.