Aggregate JQL Search
The Virtual Tour Server Team would like to audit their current workload to find out how many weeks of effort remain on a set of stories. By using the aggregateExpression JQL and creating a filter, the project manager can see at an instant the data and make an informed decision about their next steps.
In order to get results in this exercise, you need to enter a few time entries / remaining estimates into issues in your project.
Open a new search by clicking Issues > Search for Issues.
If you’re not in Advanced search mode already, click Advanced.
Write a JQL thread to identify the issues you’d like to see remaining work on: e.g.
project=DPS AND Issuetype=story
AND issueFunction in aggregateExpression("Remaining work for all Issues", "remainingestimate.sum()")to the thread and run the search.
Optionally, save this as a filter to use again later, or in other functions in Jira. The aggregateExpression JQL function calculates all of the remaining time estimates on the issues in the query and displays them in an info box. This info box appears below the search field with the results of the query, and can be used again if saved as a filter. In our example, it shows that there are eight weeks and one day left of work. The results of the aggregateExpression are a snapshot and will change as issues are updated.
You cannot export the results of the calculation because the number from the info box isn’t saved anywhere. Rather, this calculation is displayed when the search is run. If you want to perform calculations on information that is in Jira and then create exportable reports, you could create script fields for those calculations. This will require some Groovy code, and the Adaptavist library has few recipes you could use as a starting point.