Jira Automation - combining costs in one epic
Asked by Noah M?ller:

Hey,  
I need your help for my Jira project. In the column: "Costs", I would like to have all costs of the respective subtasks to be displayed collectively in the associated epic (see attached image). I wanted to solve this with Jira automation, but it doesn't work. How would Jira Automation have to be set up in detail so that all costs of an epic are summarized in the list? My current status of setting up the automation can be seen in the appendix.

Thank you!

![Atlassian 1.PNG](/t5/image/serverpage/image-id/326305iAA6543F89B7ECB22/image-size/large?v=v2&px=999 "Atlassian 1.PNG")![Atlassian 2.PNG](/t5/image/serverpage/image-id/326306iC4294602B97E89EE/image-size/large?v=v2&px=999 "Atlassian 2.PNG")


Answers:
author: Trudy Claspill
body: Hello [@Noah M?ller](/t5/user/viewprofilepage/user-id/5507328)

Welcome to the Atlassian community.

I recommend that you change this portion of your Automation Rule.

![Screenshot 2024-05-28 at 9.01.26?AM.png](https://community.atlassian.com/t5/image/serverpage/image-id/326393iE411A4B7C7CC0212/image-size/large?v=v2&px=999 "Screenshot 2024-05-28 at 9.01.26?AM.png")

Keep the first step "Fur: Ubergeordnet".

Immediately after that, before the next step, add to the branch a Lookup Issues action. In it provide a JQL statement to search for all the child issues of the Parent issue.

![Screenshot 2024-05-28 at 9.04.54?AM.png](https://community.atlassian.com/t5/image/serverpage/image-id/326395i0077FF9983CDC058/image-size/large?v=v2&px=999 "Screenshot 2024-05-28 at 9.04.54?AM.png")

In the Edit Issue action you can then use the "sum" function to get the total of all Kosten values from the issues found by the Lookup Issue action, and assign that value to the Kosten value in the parent issue.

![Screenshot 2024-05-28 at 9.08.20?AM.png](https://community.atlassian.com/t5/image/serverpage/image-id/326396i6D0C291115F9614E/image-size/large?v=v2&px=999 "Screenshot 2024-05-28 at 9.08.20?AM.png")

In my example the field name is "A number field" rather than "Kosten".

comments: author: Noah M?ller
body: Thank you, how could I open the number field for the last one ?

My current status of setting up the automation can be seen in the appendix. I dont find the number field. ![Jira 4.PNG](https://community.atlassian.com/t5/image/serverpage/image-id/326562i1FC43DC88FA3E81E/image-size/large?v=v2&px=999 "Jira 4.PNG")


author: Trudy Claspill
body: Hello Noah,

Use the pull-down field to find your number field.

![Screenshot 2024-05-29 at 8.25.56?AM.png](https://community.atlassian.com/t5/image/serverpage/image-id/326703iD1CAA48FB53EC744/image-size/large?v=v2&px=999 "Screenshot 2024-05-29 at 8.25.56?AM.png")

Type in the name of your field and it should appear in the list of fields below.

![Screenshot 2024-05-29 at 8.27.54?AM.png](https://community.atlassian.com/t5/image/serverpage/image-id/326704iC3A4595993729402/image-size/large?v=v2&px=999 "Screenshot 2024-05-29 at 8.27.54?AM.png")

Check the box next to the field. That will not close the list, because Jira is leaving it open in case you want to select another field, so click somewhere else in the Edit Action dialog to close the window. That should leave you with the Edit Action looking similar to this: with the name of your field (1) and a box for specifying the value (2).

![Screenshot 2024-05-29 at 8.30.32?AM.png](https://community.atlassian.com/t5/image/serverpage/image-id/326705i1F3DE8E06BABE795/image-size/large?v=v2&px=999 "Screenshot 2024-05-29 at 8.30.32?AM.png")

Type the smart value into (2).


author: Noah M?ller
body: Hey, thank you again. I still get a notification that it failed. Could you imagine because of what? You see all details in the appendix![Fehlermeldung.PNG](https://community.atlassian.com/t5/image/serverpage/image-id/327140i2A6BC2C88203B8B0/image-size/large?v=v2&px=999 "Fehlermeldung.PNG")![Fehlermeldung1.PNG](https://community.atlassian.com/t5/image/serverpage/image-id/327141i93738C17AFC82F73/image-size/large?v=v2&px=999 "Fehlermeldung1.PNG")


author: Noah M?ller
body: Some more details for the specific sections ![Fehldermeldun 2.PNG](https://community.atlassian.com/t5/image/serverpage/image-id/327143i7327557C5068CBEC/image-size/large?v=v2&px=999 "Fehldermeldun 2.PNG")![Fehlermeldung 3.PNG](https://community.atlassian.com/t5/image/serverpage/image-id/327144i17088B0D3E683205/image-size/large?v=v2&px=999 "Fehlermeldung 3.PNG")![Fehlermeldung 4.PNG](https://community.atlassian.com/t5/image/serverpage/image-id/327145iD6DD02219650B134/image-size/large?v=v2&px=999 "Fehlermeldung 4.PNG")


author: Trudy Claspill
body: The message is indicating that the automation rule has found your system to have multiple fields with the same name "Kosten" and the same field type. It doesn't know which one of those fields you are trying to update.

You will need to get the unique ID (i.e. customfield_12345) for the "Kosten" field in the project you are working with, and use that ID where you have used "Kosten" in your smart value. The following article explains how to get that ID:

<https://support.atlassian.com/cloud-automation/docs/find-the-smart-value-for-a-field/>

You will likely also need to update the field using Advanced JSON Editing, found by clicking on the "More Options" link in the Edit Issue action, rather than by picking the field from the list. This article explains Advanced JSON Editing:

<https://support.atlassian.com/cloud-automation/docs/advanced-field-editing-using-json/>


author: Noah M?ller
body: Hey, I solved the problem with the field: Kosten. There is another problem with the "Lookup-Vorgang" and "?bergeordnet". Which components I have to change?

Best regards


author: Noah M?ller
body: ![Jira Kosten 1 Fehler.PNG](https://community.atlassian.com/t5/image/serverpage/image-id/328844i17489DDB89AFDCB6/image-size/large?v=v2&px=999 "Jira Kosten 1 Fehler.PNG")


author: Trudy Claspill
body: In the JQL try substituting Parent for Ubergeordnet.


author: Noah M?ller
body: I dont know which one I have to choose for the JQL. I cant find something like substituting parent. Could you please help me?


author: Noah M?ller
body: ![Jira Kosten Fehler 2.PNG](https://community.atlassian.com/t5/image/serverpage/image-id/329102i505EE9B10D6030E9/image-size/large?v=v2&px=999 "Jira Kosten Fehler 2.PNG")


author: Trudy Claspill
body: In English the field name is Parent. Try this for your JQL.

Parent = {{issue.key}}

On your instance you have set the language to German and some field names appear to have been translated. Ubergeordnet appears to be the translation for Parent. I have worked only with systems set up for English so I'm not sure if JQL would require this field name in English or German. German didn't work so I suggest that you try the English field name.


author: Noah M?ller
body: Thank you! Without changing language it finally works. I used Parent and instead of: ?bergeordnet --\> Epic.


author: Hannes Obweger - JXL for Jira
body: Hi [@Noah M?ller](/t5/user/viewprofilepage/user-id/5507328)

welcome to the community!

I trust that you will be able to resolve this in Jira Automation!

Just as food for thought: If you're open to solutions from the Atlassian Marketplace and/or don't want this to eat into your automation budget, there's also a number of apps available that can help with this.

As an example, this would be easy to do 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=2710186).

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 this in just a couple of clicks:

![kosten-sum-up.gif](https://community.atlassian.com/t5/image/serverpage/image-id/328291i8F8780118CF55F95/image-size/large?v=v2&px=999 "kosten-sum-up.gif")

This is really just one of a virtually endless number of possible views and reports - you can also view, group by, and sum up any other field(s), configure different sum-up styles, etc. etc.

Any questions just let me know,

Best,

Hannes


Tags: automation

cloud

jira-work-management-cloud