A more desirable option would be to have the picker only present people from a specific group in the select list, but given this option is not available I need to validate the list of users that were selected to ensure they are all in a specific group. The following code doesn't work, but I hope it conveys what I'm trying to accomplish.
---
import com.atlassian.jira.component.ComponentAccessor
def checkfield = customfieldManager.getCustomFieldObjectByName("name of custom field");
boolean flag=true;
for(i=0;i<checkfield.size();i++)
{
flag = groupManager.isUserInGroup(checkfield[i].name, 'group_name');
if(flag==false)
{
break;
}
}
return flag
---
Hey Terry,
You might find these custom field add-ons useful.
https://marketplace.atlassian.com/plugins/com.keplerrominfo.jira.plugins.usergrouppicker
https://marketplace.atlassian.com/plugins/ru.mail.jira.plugins.userpickers
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.