I have a custom field defined and in my Jira plugin I want to create a small bar chart with number of issues in a project per custom field value.
So far I am creating one JQL search per custom field value like project = JRA and cf[10490] = xss and get the number of issues via SearchService.searchCount.
Is there an easier way to get the counts per all values of custom field in one call like in SQL you would have a select count(*) group by customfield?