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
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.