i need jira cloud query that calculate the of estimate story points for a sprint and certain component , for example i need to sum all story points of sprint =1234 and component = FE
Hi Sara,
You can use JQL to retrieve all the issues matching the sprint and component, for example:
Sprint = 1234 AND component = "FE"
However, JQL itself cannot perform aggregations such as SUM on Story Points. It only returns the issues matching the query.
If your goal is to calculate the total Story Points, you have a few options:
For example, with Automation you could use Lookup issues with:
Sprint = 1234 AND component = "FE"
and then access the total with:
{{lookupIssues.Story Points.sum}}
Just make sure to use the correct Story Points field for your Jira configuration, as this can differ depending on the project setup.
If you have any trouble setting it up or this doesn’t quite cover your use case, feel free to reach out to me by email and I’ll be happy to take a closer look with you.
Hope this helps!
Adding to the automation suggestions above: if {{lookupIssues.Story Points.sum}} comes back empty, check which field your instance actually uses. Many instances have more than one story points field, and team-managed projects use a separate "Story point estimate" field. Referencing the field by ID avoids the problem, e.g. {{lookupIssues.customfield_10016.sum}}.
If you want the number on a dashboard instead, native gadgets won't help — Issue Statistics and Two Dimensional Filter Statistics only count issues, they can't sum a number field. That part needs an app. Disclaimer: I work for Plugio, the vendor of Plugio Suite. It can show Story Points summed for that JQL, or broken down by component. Its sprint mode also follows a board's active sprint, so you don't have to update the sprint ID every sprint.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
You cannot sum-up fields via JQL. With a JQL like this you can filter the issues from that sprint that have a certain component:
Sprint = 1234 AND component = "FE"
For summing-up the story points field of these issues, you could export them in CSV and use Excel to calculate the SUM.
However, such a filter will not return the subtasks from the sprint, in case of a team managed project, due to a Jira JQL bug/limitation (JRACLOUD-81069 ).
An alternative would be to search for an app/plugin on Atlassian Marketplace that offers capabilities such.
If you are willing to trying an app, our Great Gadgets offers some nice dashboard gadgets that you could use to achieve this with just a few clicks.
For your use case, I would recommend using the Pivot Table & Pivot Chart gadget, which works just like pivot table from Excel. In can easily calculate the sum of Story Points split by Components.
To get this, the gadget should be configured like this:
You can configure the gadget in many other ways:
You can also use its Issue Filter Formula or Advanced Issue Filter Formula gadgets to display sum of Story Points per Component as a number.
Hope this helps.
Danut.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
JQL is a filter language, so it returns the matching work items but never a computed total. sum is even a reserved word in JQL, so the aggregation can't be expressed in the query itself.
Two things worth adding to the JQL you'll use as the basis for any approach:
component is a project-level field, so a query without a project clause can also match same-named components in other projects. Use project = ABC AND sprint = 1234 AND component = FE, and quote any value containing spaces.sprint in openSprints() matches the sprint that is started but not yet completed, so the same filter keeps working next sprint: project = ABC AND sprint in openSprints() AND component = FE.For the total itself, a scheduled automation rule is the most practical native route:
{{lookupIssues.Story Points.sum}}, write it into a number field on a summary work item, or send it out by email.Referencing the field by ID, as in {{lookupIssues.customfield_10016.sum}}, tends to be more reliable, since many instances carry both a "Story Points" and a "Story point estimate" field and only one of them holds your values.
Best,
Ivan
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Following up on my earlier answer, @Sara Salem_ Vodafone: if you're open to solutions from the Atlassian Marketplace, this is also solvable without any automation or scripting, using the app my team and I work on, JXL for Jira.
JXL is a full-fledged spreadsheet/table view for your Jira data, with inline editing, sorting, filtering, grouping, and configurable sum-ups.
For your case, you'd filter to the sprint, group by Component, and configure a sum-up on Story Points. Each component then shows its own total, with a grand total for the whole sprint, and the numbers update as story points change. Sum-ups also do average, median, and counts, so the same view can answer "how many points per component, and how many items" at once.
Here's what that looks like:

Any questions, just let me know.
Hope this helps,
Ivan
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hey @Sara Salem_ Vodafone ,
Where would you like to store this information? For example, you could probably build automation to do so, but you would then either have to store it on a specific work item, send it as information in a messaging tool or email, or fetch it somehow. 👀
On the other hand, if you have Confluence, you could create new database, import work items from Jira by using something like:
project = ABC and spring = 1234 and component = FE
Then add Story Points as a column to a database and use "Sum" calculation at the bottom.
The only thing is that it's not dynamic, so you would need to manually refresh it each time you add, remove, or update work items or story points. 🫤
Hope this helps.
Cheers,
Tobi
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi @Javier Martínez
Welcome to the Atlassian Community!
Jira's native JQL can filter the work items, but it cannot calculate a SUM.
Your JQL would simply be -- sprint = 1234 AND component = FE
If you only need to see the total Story Points for that sprint/component, one simple native option is to save this filter and use Jira reporting/dashboard features to visualize the result.
If you need the total for further processing, Jira Automation is a good option.
Use Lookup work items with the JQL above and then sum the Story Points using a smart value such as
{{lookupIssues.Story Points.sum}}
Regards,
Gor
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.