Hello,
i want to use the script runner to add users to group.
I found this script for showing the users who are not in a group:
import com.atlassian.jira.component.ComponentAccessor
import com.atlassian.jira.user.util.UserUtilUserUtil userUtil = ComponentAccessor.getUserUtil()
result = ''
userUtil.getUsers().findAll {
userUtil.getGroupsForUser(it.getName()).size() == 0}
.each { u -> result += u.name + "<br>"
}
result
Here (https://docs.atlassian.com/jira/latest/com/atlassian/jira/security/groups/GroupManager.html) is see the method "addUserToGroup".
Is it possible to help me for programming the additional code, to add users to an existing group?
Would me help very much.
Thanks