Fetching live data from child issues and displaying them on their corresponding parent card.
Asked by Mireya Cintora:

Hello!

I have this really hopeful dream to have some sort of automation to fetch me data from a child issue and have it displayed on a specified field in the parent card.

1. Field that counts the total amount of child issues as they are created
2. Field that adds (or average) up the amount of money recorded in each child issue, and displays the total on the parent. Honestly just running data or averages as our child issues deal with money.
3. Field that counts the amount of child issues in each status (*To-Do, In-Progress, Done).*


Answers:
author: Amay Purohit_RVS
body: Hi [@Mireya Cintora](/t5/user/viewprofilepage/user-id/5526385)

If you would be interested in an app to help with roll ups of numeric fields, you may want to try our plugin.

[Issue Hierarchy](https://marketplace.atlassian.com/apps/1228019/issue-hierarchy-structure?hosting=cloud&tab=overview)

The app shows your linked issue hierarchy in a tree view. The app can help you easily Sum up values (time tracking/story point/custom numeric fields) to see overall progress for your Issues at each parent level, in percentage terms.

Also it allows to filter your linked issue with custom JQL and grouping at parent level as well.

In the example below it shows the child issue statuses at each parent level.

(Disclaimer: I work on RVS, the vendor for this app)

![Epic Hierarchy - Children Statuses.PNG](https://community.atlassian.com/t5/image/serverpage/image-id/336846i4230093EBB73B958/image-size/large?v=v2&px=999 "Epic Hierarchy - Children Statuses.PNG")


author: Trudy Claspill
body: Hello [@Mireya Cintora](/t5/user/viewprofilepage/user-id/5526385)

You mention you want to do this for parent/child issues. What are the actual issue types? Are you talking about standard issues (i.e. task, story, bug) and their subtasks? Are you talking about Epics and their child issues (which are standard issue types)?

You can definitely create Automation rules to fulfill those requirements, but I would ask you to consider what problem you are trying to solve by doing this, and is there a better solution?

There are third party apps that can help generate roll-up information without creating custom fields and creating new automation rules. Perhaps that would be a better solution.

Automation Rules would require you to add more custom fields. Updating the fields in real time with the changes happening in the child issues could result in a large number of automation rule executions.

Is this for just one project or many projects? If this involves Team Managed projects and Company Managed projects you would have to have different rules for each Team Managed project.

comments: author: Mireya Cintora
body: [@Trudy Claspill](/t5/user/viewprofilepage/user-id/3569011)

They are the Epics and their child issues. I did look into the third part apps but at the moment my employer wants to limit the amount of these third part applications, so I must find a way to do with automations.

*Updating the fields in real time with the changes happening in the child issues could result in a large number of automation rule executions.*- Would that run our project/issue slower?

This will just be a for one project that is Team Managed.


author: Trudy Claspill
body: Hello [@Mireya Cintora](/t5/user/viewprofilepage/user-id/5526385)

I have not heard that Automation Rules cause other project/issue processing to slow down.

You should check with your administrators about the potential for the execution of these rules (there will be more than one) combined with any other rules that run to bump your instance over the usage limit for Automation Rules. Refer to

<https://support.atlassian.com/cloud-automation/docs/how-is-my-usage-calculated/>

I have some additional questions about your requirements.
> 1. Field that counts the total amount of child issues as they are created

If a child issue is removed from an Epic, do you want the count of child issues in the Epic updated?

If a child is added to an Epic at a later date (after the creation of the child was completed) do you want the count of child issues in the Epic updated?

> 2. Field that adds (or average) up the amount of money recorded in each child issue, and displays the total on the parent. Honestly just running data or averages as our child issues deal with money.

You need to define this requirement. Do you want the amounts from the child issues totaled and displayed in the Epic, or do you want an average displayed in the Epic? If an average, how do you want that calculated; total of amounts in children divided by number of children?

Do you want this value to be updated as child issues are added and removed from the Epic?

Are the values in the child issues subject to change? If they change, do you want the information in the Epic updated?

> Field that counts the amount of child issues in each status (*To-Do, In-Progress, Done).*

Are those the only statuses used in the child issues? Are those all the statuses used by the child issues?

Is the workflow likely to be changed so that any of those statuses are removed, or new statuses added?

Do you want these counts updated as the child issues move through their workflows?

Do you want these counts updated if child issues are added/removed from the Epics?


author: Mireya Cintora
body: [@Trudy Claspill](/t5/user/viewprofilepage/user-id/3569011)

Thank you for the automation heads up, we indeed are about to hit our max amount of rules ran for the month.

***1.** If a child issue is removed from an Epic, do you want the count of child issues in the Epic updated?*

* Yes please.

*If a child is added to an Epic at a later date (after the creation of the child was completed) do you want the count of child issues in the Epic updated?*

* Yes please.

***2.** Do you want the amounts from the child issues totaled and displayed in the Epic, or do you want an average displayed in the Epic? If an average, how do you want that calculated; total of amounts in children divided by number of children?*

* Child issues: I want to total amount displayed on the epic
* The average would not apply to the child issue count. Sorry for the confusion, what I meant is we have a field named Max Amt (number field) that lives in each child issue, and would like the average of that field to display on the epic.
* We have another number field that lives in the child issues (Additional Monies). What I would like is for there to be an automation that sums up all the additional monies in each child issue and displays the total in the epic issue.

*Do you want this value to be updated as child issues are added and removed from the Epic?*

* Yes please.

*Are the values in the child issues subject to change? If they change, do you want the information in the Epic updated?*

* 95% of the time they will remain the same value. For that 5%, then yes I would like the epic to be updated.

***3**. Are those the only statuses used in the child issues? Are those all the statuses used by the child issues?*

* No there are a total of 5 statuses dedicated to child issues.

*Is the workflow likely to be changed so that any of those statuses are removed, or new statuses added?*

* Very unlikely.

*Do you want these counts updated as the child issues move through their workflows?*

* Yes please.

*Do you want these counts updated if child issues are added/removed from the Epics?*

* Yes please.


author: Trudy Claspill
body: Regarding #3 is the only acceptable solution one where that information is visible in the details view of each Epic?

I ask because you can get the same information using a Saved Filter and the Two Dimensional Filter Statistics gadget on a [Jira Dashboard.](https://support.atlassian.com/jira-software-cloud/docs/work-with-dashboards-in-jira-cloud/) And that would eliminate the need for a 5 more custom fields in your Epics and increasing your rule execution usage.

Using a saved filter like this:

project=*\<insert your project here\>* and Parent is not empty and issuetype in standardIssueTypes()

You can add the Two Dimensional Filter Statistics gadget to a Dashboard you create in Jira. You set the gadget configuration to use that saved filter, set the X-axis to Status and the Y-axis to Parent.

![Screenshot 2024-07-24 at 3.09.06?PM.png](https://community.atlassian.com/t5/image/serverpage/image-id/337754iC6DCEDE8CC1BC594/image-dimensions/244x456?v=v2 "Screenshot 2024-07-24 at 3.09.06?PM.png")

That will give you a table that lists the Epics and the number of child issues in each status for each Epic. Example:

![Screenshot 2024-07-24 at 3.10.54?PM.png](https://community.atlassian.com/t5/image/serverpage/image-id/337755i99E240E0685E341D/image-size/large?v=v2&px=999 "Screenshot 2024-07-24 at 3.10.54?PM.png")


author: Trudy Claspill
body: Regarding #1 you could accomplish this also with the Two Dimensional Filter Statistics gadget in a Dashboard.

Set the X-axis to Project, and that will give you a count of all the child issues per Epic.

![Screenshot 2024-07-24 at 4.52.35?PM.png](https://community.atlassian.com/t5/image/serverpage/image-id/337762i045EFA985553F53A/image-size/large?v=v2&px=999 "Screenshot 2024-07-24 at 4.52.35?PM.png")

And, while there is not a native gadget to sum or average child issue values in a similar manner, if you are open to acquiring a third party app then I'm pretty sure one exists that would provide a dashboard gadget for that also.


author: Mireya Cintora
body: [@Trudy Claspill](/t5/user/viewprofilepage/user-id/3569011)

My apologies i have never used the JQL on Advanced Search, is this what it would look like?

![Screenshot 2024-07-25 101318.png](https://community.atlassian.com/t5/image/serverpage/image-id/337994iA6189B20BD1E5F3B/image-size/large?v=v2&px=999 "Screenshot 2024-07-25 101318.png")

I tried inserting the project name, key and URL but unsure what I need to do when using JQL...

EDIT: Nevermind i figured it out! I just needed to remove the \<\> :

project = ARNEGS AND parent is not EMPTY AND issuetype in standardIssueTypes()

![Screenshot 2024-07-25 102457.png](https://community.atlassian.com/t5/image/serverpage/image-id/338003i64F87ADEC04C0815/image-size/large?v=v2&px=999 "Screenshot 2024-07-25 102457.png")

Now I have one other issue, it shows there are 699 unique parent issues which I am assuming they count as unique based on the Summary field (Member Name) of the epic issue correct? If so, that would no work since we may have the same member but is at a different provider facility. For our parents, they are unique if the combo of the member name ad facility are different.

Second, is there a way to only pull specific statuses instead of all the ones that exist in the project?


author: Trudy Claspill
body: Hello Mireya,

The count of Epics is based on the issue key of the Epics. The Parent field stores the issue key of the Epic. The dashboard gadget displays the Summary from each Epic rather than the issue key. If some Epics have the same Summary they should show up in the list once for each unique Epic issue key.
> Second, is there a way to only pull specific statuses instead of all the ones that exist in the project?

You can limit the issues selected based on their status. You would add criteria to your query thus:

project=ARNEGS and Parent is not empty and issuetype in standardIssueTypes() *and Status in (\<comma separated list of the Status values you want to include\>)*

For example

project=ARNEGS and Parent is not empty and issuetype in standardIssueTypes() and Status in ("To Do", "In Progress", "Done")


author: Mireya Cintora
body: [@Trudy Claspill](/t5/user/viewprofilepage/user-id/3569011)

Oh perfect it worked with the specified statues. Regarding the unique issue keys, when I export all the unique keys there are 2903 give or take some. But the gadget only displays 693 rows.

Now that this JQL and dashboard has opened more opportunities, can I adjust the filter of instead of grouping by parent, to group by a custom field? I tried to change the X and Y axis but could not find the field I was looking for.


author: Trudy Claspill
body: I notice in your post tags you have indicated that you are using the Premium product plan.

Has the Issue Type Hierarchy in your instance been extended such that you make Epics children of another issue type, like Initiative? If so, that would require a change to the filter. The issue types above Epic are technically classified as part of the "standardIssueTypes()" group, so the filter would need to be adjusted to exclude those higher level issues.


author: Trudy Claspill
body: You said:
> when I export all the unique keys there are 2903 give or take some. But the gadget only displays 693 rows.

How are you "exporting all the unique keys"? There should be a row for each unique Epic issue key.

> can I adjust the filter of instead of grouping by parent, to group by a custom field? I tried to change the X and Y axis but could not find the field I was looking for.

Not all custom fields are supported are supported in the gadget. What is the field type of the fields you want to use?


Tags: cloud

jira-service-management

jira-service-management-cloud