Forums

Articles
Create
cancel
Showing results for 
Search instead for 
Did you mean: 

How can I get the sum of a number field from all issues in a project and pass it to a pie graph?

Virgil Corral June 25, 2018

The issue in my project has a number field that is used to identify how many purchase orders were created.

I would like to get the sum of these number fields from all of the issues in the project for use on a pie graph.  Its a one off request, so funding for a new plugin is not available.

Available addons:

Exporter,

Project Configurator,

Script Runner

1 answer

0 votes
Sana Safai
Rising Star
Rising Star
Rising Stars are recognized for providing high-quality answers to other users. Rising Stars receive a certificate of achievement and are on the path to becoming Community Leaders.
June 26, 2018

Hi Virgil,

What are you trying to show in the pie graph? The number for each issue represent a piece of the pie?

Virgil Corral June 26, 2018

Hi Sana, it will be the total number of purchase orders generated for each issue type.

For example I may have 10 issues in my JIRA project that are for painting houses.  That may have generated a total of 34 purchase orders.  I might also have 4 issues that are for laying concrete and have a total of 7 purchase orders.

So my pie graph would reflect a total of 41 purchase orders spread among the two different job types (34 paint, 7 concrete).

Thanks for having a look!

 

Regards,

Virgil

Sana Safai
Rising Star
Rising Star
Rising Stars are recognized for providing high-quality answers to other users. Rising Stars receive a certificate of achievement and are on the path to becoming Community Leaders.
June 26, 2018

Hi Virgil,

I don't think this is possible out of the box to be honest. There are a number of plugins that solve this, but since that is off the table, my suggestion is the following. Note: this is just a one-time thing, and a workaround for your current situation. Under normal circumstances I would not recommend doing it like this:

1. Create a select list called "job type" (if you don't already have one)

2. Create a script that calculates the sum for each job type and create a dummy issue for each amount. Using your example above, it would create 34 paint dummy issues, and 7 concrete. Make sure they have the correct "job type"-select list value set.

3. Create a filter with all the dummy issues.

4. Display the filter with an out of the box pie chart gadget, and use the "job type" select list as statistic type.

 

Good luck!

Suggest an answer

Log in or Sign up to answer
TAGS
AUG Leaders

Atlassian Community Events