Hi Team,
We have a custom field(date field) which needs to be hide by a specific group of uses.
We have tried it in Script runner Behaviours but no action is performed.
Kindly help us to solve this using Script or Conditions using Scriptrunner Behaviours.
Please find the below script that we used to perform the action:
import com.atlassian.jira.component.ComponentAccessor
def groupManager = ComponentAccessor.getGroupManager()
def currentUser = ComponentAccessor.getJiraAuthenticationContext().getLoggedInUser()
def customField = getFieldById("customfield_12305")
def remoteUsersRoles = ComponentAccessor.getGroupManager().isUserInGroup(currentUser, "ut-state")
if (remoteUsersRoles) {
customField.setHidden(true)
}
Thanks in Advance
BR,
Revathy Madhavan