I'm currently attempting to find all users in a group then add all of them to another group using scriptrunner. Below I am able to view the individuals in the initial group, but I am unable to add them to another. Below is currently what I have.
**edit** we are using crowd to manage our groups. These are not local groups.
import com.atlassian.jira.component.ComponentAccessor
import com.atlassian.jira.bc.user.search.UserSearchService
import com.atlassian.crowd.embedded.api.User
import com.atlassian.jira.user.ApplicationUser
def groupManager = ComponentAccessor.getGroupManager()
def userManager = ComponentAccessor.getUserManager()
def usersInGroup = groupManager.getUsersInGroup("GRC-RefSeq")
log.warn(usersInGroup)
def systems = groupManager.getGroup("Systems")
for(people in usersInGroup){
//lost
}