Calculate Total Story Points for an Epic

 

This is the documentation for JSU for Jira Cloud. If you are using JSU on Jira Server/Data Center, see the Server/Data Center use cases. Calculated Field is available with JSU Cloud only.


Goal

Use Jira to run a calculation rather than extracting data to another platform or performing the calculation manually.

Scenario

Imagine you are a Manager who relies on multiple calculations to make business decisions. You can simplify your work by attaching numerical values within project issues and displaying calculations on the project epic. With some preplanning, you can then use JSU to run the calculations for you. Let’s see how we use JSU to calculate the ‘Total Story Points’ on an Epic.

JSU Components

Calculated Field post function

Example setup

  1. Create and add the custom fields on which you will build your calculations, e.g. Total story points on Epic.

  2. Create an Epic in your project and add the associated stories and tasks.

  3. Add story points to each of the epic’s child issues.

How to configure this workflow

  1. Create a draft of your project workflow. If you're unsure how to get to this page, follow the onboarding steps in Edit a Jira Workflow. You can then view your workflow in Text or Diagram mode. The steps in this use case represent Text mode. If you haven't already, switch the workflow viewer to Text mode.

  2. Select the IN PROGRESS transition. 

  3. Select the Post Functions tab, then click Add Post Function.

  4. Select the Calculated Field (JSU) post function then click Add at the bottom of the page.

    List of JSU post functions showing the Calculated Field post function selected.
  5. Configure the post function:

    1. For the Calculate field on all issues related as option, select Within the same issue.

      Screenshot of the Calculated Fields post function configuration options.
    2. Select Total story points from the field dropdown. This is the field we created in our example setup.

    3. Define the formula:

      1. We want to calculate the sum of the story points in the stories of our epic, so we select the Sum function from the dropdown and then select the issuesInEpic function. When the issuesInEpic function is combined with a function like the sum, it will retrieve the values of the selected field from all issues in the epic.

      2. Select the Story points field to add it to the formula. 

  6. Click Add.

  7. Publish your workflow.

  8. Move the epic to In Progress and see the sum of all the story points from all the child tasks displayed in the epic’s Total Story Points field.