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?
Is the custom field text or select. If it is a select field, then you should be able to get values group by using gadget on a dashboard. If it is text field, i don’t know if there is any way to do it.
I use searchService.searchCount. And to get the count for each of the option values I created a loop and call the searchService multiple times. Works fine.