Generate a report from an issue, capturing the fields from a set of subtasks within that issue?
Asked by Miguel:

Hey there!  

We want to generate a report from a single Issue that can summarize the amounts of numeric custom fields contained in a sub-task.  

**Example:**   
**ITSL-545 has 3 different SubTasks**   
**- ST-1 - Zoom**   
**- ST-2 - Slack**   
**- ST-3 - Google**   

**Each SubTask has a numeric custom field named Savings
- ST-1 - Savings is 500
- ST-2 - Savings is 250
- ST-3 - Savings is 250** We want to generate a report that would show a chart summarizing the total amount of Savings for each SubTask done:  

**Report for ITSL-545**   
**Number of subtasks done - 3**   
**Total Savings - 1000** Is there a way to accomplish this within Jira or through Automation?  

TIA  

<br />


Answers:
author: Marc - Devoteam
body: Hi [@Miguel](/t5/user/viewprofilepage/user-id/5398463)

Welcome to the community

I think in some extend yes.

First you would need a custom field to store the number of sub-tasks on the issue and an automation rule to populate this field, based on creation of the sub-task on the issue or when the parent is set to done find the sub-tasks and based upon the number of found task update the custom field

This should give the number of sub-tasks on the issue.

And another numeric custom field, to be placed on the parent of the sub-tasks, related an automation that fiends all sub-tasks and sums up the values of the field savings.

example on this on closing the parent and check if all childs are done as well

![Screenshot 2024-01-05 at 15.24.55.png](https://community.atlassian.com/t5/image/serverpage/image-id/299096i0CEDFF97F120F801/image-size/large?v=v2&px=999 "Screenshot 2024-01-05 at 15.24.55.png")

You could an an extra action to sent an email where you set the following:

Report for: {{issue.key}}  
Total sub-tasks: {{issue.Total sun-tasks}}  
Total saving is: {{issue.Savings}}

Please check to confirm the smart value matches your field name. To do that, use the information in this [how-to article](https://support.atlassian.com/cloud-automation/docs/find-the-smart-value-for-a-field/).


author: Hannes Obweger - JXL for Jira
body: Hi [@Miguel](/t5/user/viewprofilepage/user-id/5398463)

welcome to the community!

I understand that you're looking for an Automation-based solution, but just to put this out there as a possible alternative: If you're open to options from the Atlassian Marketplace, this would be easy to solve using the app that my team and I are working on, [JXL for Jira](https://marketplace.atlassian.com/apps/1224710?hosting=cloud&tab=overview&utm_source=atlassian-community&utm_medium=referral&utm_content=2571197).

JXL is a full-fledged spreadsheet/table view for your issues that allows viewing, inline-editing, sorting, and filtering by all your issue fields, much like you'd do in e.g. Excel or Google Sheets. It also comes with a number of advanced features, including support for (configurable) *issue hierarchies* , *issue grouping* by any issue field(s), *sum-ups* , or *conditional formatting*.

With these, you can build a view like e.g. this in just a couple of clicks:

![sub-task-custom-field-sum-up.gif](https://community.atlassian.com/t5/image/serverpage/image-id/299210iCCFF04D1C7D9901D/image-size/large?v=v2&px=999 "sub-task-custom-field-sum-up.gif")

Note that this *just works*, and doesn't require any scripting or automation whatosever.

Any questions just let me know,

Best,  
Hannes


Tags: cloud

jira-service-management

jira-service-management-cloud