The Atlassian Community can help you and your team get more value out of Atlassian products and practices.
I'm trying to get all issues of our service desk project and group the result by Organizations. I'm trying to do it by running the below script on ScriptRunner console.
Map<String, Object> searchResult = get('/rest/api/2/search')
.queryString('jql', 'project = "ITZone Software Support"')
.queryString('fields', '*all,-comment')
.queryString('maxResults', '1000')
.asObject(Map)
.body
def issues = (List<Map<String, Object>>) searchResult.issues
issues.groupBy { issue ->
((Map<String, Map>) issue.fields).Organizations
}.collectEntries { Organizations, issueList ->
[(Organizations): issueList.size()]
}.toString()
The result I'm getting is:
[null:100]
What went wrong in my script?
Hello everyone, Hope everyone is safe! A few months ago we posted an article sharing all the new articles and documentation that we, the AMER Jira Service Management team created. As mentioned ...
Connect with like-minded Atlassian users at free events near you!
Find an eventConnect with like-minded Atlassian users at free events near you!
Unfortunately there are no Community Events near you at the moment.
Host an eventYou're one step closer to meeting fellow Atlassian users at your local event. Learn more about Community Events