Hello,
I want only specific group can use Radio button values. Is it possible through behavior plugin.
Thank You,
Mrityunjay Biswas
Hi @Gsep Support,
I guess it's possible, I haven't checked below code so may require minor changes
import com.onresolve.jira.groovy.user.FieldBehaviours
import com.onresolve.jira.groovy.user.FormField
import com.atlassian.jira.component.ComponentAccessor
def user = ComponentAccessor.getJiraAuthenticationContext().getLoggedInUser()
String groupName = "YourGroup" //place the group here to validate
def field = getFieldByName("Field Name")
if (!groupManager.getUsersInGroup(groupName).contains(user)) {
field.setReadOnly(true) //will be visible in the form but can't edit
field.setHidden(true) //if you want to hide
}else{
field.setReadOnly(false)
field.setHidden(false)
}
BR,
Leo
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.