1 Details list of all Jira Users and Group
2 Script should print out Jira Users and what Group users are assigned
3 Should be able to access the page via
<jira_base_url>/rest/scriptrunner/latest/custom/doSomethingsimilar to documenation in https://scriptrunner.adaptavist.com/latest/jira/rest-endpoints.html?utm_source=product-help
Groovy Script prints username and group membership
import com.atlassian.jira.component.ComponentAccessorimport com.atlassian.jira.bc.group.search.GroupPickerSearchServiceimport com.atlassian.crowd.embedded.api.Groupdef groupSearch = ComponentAccessor.getComponent(GroupPickerSearchService)def groupList = groupSearch.findGroups("")def groupManager = ComponentAccessor.getGroupManager()for (Group group in groupList){log.error group.getName().toString()//print group names to loglog.error groupManager.getUsersInGroup(group)//print group members to log}
It looks like you're new here. Sign in or register to get started.