Hi there,
Currently I am strugling with one thing in scriptRunner cloud jira, I am working on report, we want to check, how many components are covered by our tests.
The whole script is almost ready, but I can't get all issues with components field. Currently we have above 300 tests, but /rest/api/3/search limits results to only 100 items. How to change that?
def searchReq = get('/rest/api/3/search')
.queryString('jql', query)
.queryString('fields', 'components')
.asObject(Map)
assert searchReq.status == 200
Map searchResult = searchReq.body
int count = 0;
searchResult.issues.each { Map issue ->
count++
def components = issue.fields.components.name
}
println "${searchResult.total} iterations: ${count}"So after running this simple script, I get 332 searchResult size but the loop goes only 50 times. Trying to change maxResults parameter allow me to increase iteration number up to 100 only.