Sum Story Points in Epic in Jira Automation Data Center
Asked by Abby Domanowski:

Hi,  

Does anyone have a solution for summing up story points using Jira Automation Data Center? I know there is a solution in the Cloud version using the Lookup Issues action in the rule, but without that action available in Data Center, I'm not sure how to create an automation rule that works.

Goal: sum up story points at any child level and display in Story Points field in parent ticket. Most commonly, this would sum the story points of issues in an epic and display the sum value in the Story Points field on the epic, but ideally, we'd like to be able to push that up a level as well (sum the values on the epics and display on the parent feature, for example). But if we can only solve part of this, rolling up to the epic level is the first goal.  

For reference, here is the solution in Cloud, which is not available in Data Center: <https://community.atlassian.com/t5/Automation-questions/How-do-you-sum-up-story-points-to-the-epic-using-jira-automation/qaq-p/1731595>  

Thank you!


Answers:
author: Gareth Cantrell
body: Hi [@Abby Domanowski](/t5/user/viewprofilepage/user-id/4468618)

I posted a solution using Jira Data Center earlier this year which you can read in [this thread](https://community.atlassian.com/t5/Automation-questions/How-to-automate-the-sum-of-story-points-for-all-issues-under-the/qaq-p/1607809#M1087)

comments: author: Bill Sheboy
body: Hi [@Abby Domanowski](/t5/user/viewprofilepage/user-id/4468618)

Yes, and...to Gareth's suggestion:

First thing, I am using Cloud version and so cannot test this...

* You are correct that Data Center version of automation does not have Lookup Issues. Instead you can use the the [bulk handling feature of the scheduled trigger or a branch](https://confluence.atlassian.com/automation/bulk-handling-of-issues-993924653.html).
* In that case, this might work: {{issues.Story Points.sum}}
* Please note that "issues" is plural to handle the batch, which then treats it as a list, allowing use of [list functions](https://confluence.atlassian.com/automation/lists-993924868.html)

Kind regards,  
Bill


author: Abby Domanowski
body: Thank you, [@Gareth Cantrell](/t5/user/viewprofilepage/user-id/3178836) and [@Bill Sheboy](/t5/user/viewprofilepage/user-id/1685313) - I will take another look at that and let you know if I have success. Thanks!


author: Abby Domanowski
body: Hi [@Gareth Cantrell](/t5/user/viewprofilepage/user-id/3178836) - we recently upgraded to Jira 8.20.1 where personal access tokens can be created, and we're moving away from basic auth. Do you know how the web request auth header would need to be updated to work with a personal access token (generated within a user's profile in Jira)?


author: Gareth Cantrell
body: Hi [@Abby Domanowski](/t5/user/viewprofilepage/user-id/4468618)

My suggestion would be to use a service account and create a PAT for that; you can then use the following header in your web request in place of the basic auth header:

    Authorization: Bearer <yourToken>


author: Allison
body: Thank you for the suggestions, this works perfectly using Bearer \<yourtoken\>


Tags: data-center