Create
cancel
Showing results for 
Search instead for 
Did you mean: 
Sign up Log in

Sum up sub-task custom fields to Epic custom field

Laviniu Chis July 19, 2024

Hi there,

I'm trying to create a rule to sum up at Epic level "Venituri totale proiecte depuse €"  (customfield_10099) all custom fields (customfield_10090) from all child issues (stories, tasks and especially stories sub-tasks) every time "Valoare factura €" (customfield_10092) changes.

image.png

This is what I managed to build so far but it doesn't work.

image.png

Any suggestions?

 

1 answer

1 accepted

2 votes
Answer accepted
Trudy Claspill
Community Leader
Community Leader
Community Leaders are connectors, ambassadors, and mentors. On the online community, they serve as thought leaders, product experts, and moderators.
July 19, 2024

Hello @Laviniu Chis 

Does the field "Venituri totale projecte depuse" display in the UI for issue FUE-26? Can you edit that field directly in the UI?

What type of project is the FUE project? Get that information from the Type column on the View All Projects page under the Projects menu.

Laviniu Chis July 19, 2024

Hi @Trudy Claspill

Thank you for your answer. Yes, the field is displayed in the Epic FUE-47 UI and it is editable. Though, it is not present in the story FUE-26 and its sub-task FUE-39 where the field "Valoare factura €" is present.

FUE-47 is a business project.

Trudy Claspill
Community Leader
Community Leader
Community Leaders are connectors, ambassadors, and mentors. On the online community, they serve as thought leaders, product experts, and moderators.
July 19, 2024

The way your rule is written, the action to Edit an issue and update the field "Venituri totale projecte depuse" is being applied to the parent of the subtask.

Screenshot 2024-07-19 at 9.17.17 AM.png

According to the Audit Log the subtask issue is FUE-62. Its parent issue is FUE-26.

You said the field is not present in the UI in that issue. Therefore the rule can't update the field and instead shows you the error in the audit log.

If you want that field updated in the parent issue, then you have to add that field to the parent issue type's screen.

Laviniu Chis July 19, 2024

I would like the information to be updated in the Epic, not in the sub-task's closest parent. How should I update the rule so that all sub-tasks field "Valoare factura" are sumed up in the "Venituri totale proiecte depuse" field of their parent Epic.

Trudy Claspill
Community Leader
Community Leader
Community Leaders are connectors, ambassadors, and mentors. On the online community, they serve as thought leaders, product experts, and moderators.
July 19, 2024

A rule like this should work using the same trigger you have.

1. Confirm that the issue that triggered the rule is a subtask

2. This is a debugging step to print a message in the log file. At this point the smart value {{issue.parent.parent}} should be the key of the Epic that is the parent of the issue that is the parent of the subtask.

3. Here you branch/change the rule focus to that Epic.

4. Get a list of all the issue that are children or grandchildren (subtasks) under that Epic. Use the "and issueType in subTaskIssueTypes()" criteria to limit the results to only the subtasks.

5. Check that you got at least one issue back in that list.

6. Edit the Epic to update the field in the epic with the sum of the field values in the listed issues. Use the smart value {{lookupIssues.<your Field in the Subtasks>.sum}}

 

Screenshot 2024-07-19 at 10.32.46 AM.png

Laviniu Chis July 20, 2024

Thank you @Trudy Claspill  for the detailed explanation.

This updated rule worked partially, meaning that now is sums up some values at Epic level,

image.png

but still it is not the corect value and it does not update when the sub-task issues is updated.

My updated rule looks like this now

image.png

the audit log now shows the following errors (issue FUE-39 being a sub-task)

image.png

what am I missing?

Trudy Claspill
Community Leader
Community Leader
Community Leaders are connectors, ambassadors, and mentors. On the online community, they serve as thought leaders, product experts, and moderators.
July 22, 2024

The error message is indicating that the first condition is not being met - the issue type of the triggering issue is not "Sub-task".

Are these issues in a Team Managed project or a Company Managed project?

Is the scope of this rule Global, multiple projects, or a single project?

Also, you don't need the rule Trigger that has multiple events. Try going back to the original trigger that was just "When value changes for" and the specified field.

Laviniu Chis July 22, 2024

Thank you again for your patience @Trudy Claspill

These issues are in  Company Managed project. The scope of this rule is for a single project. I reverted back to initial condition.

now the rule looks like this, but still the values don't sum up.

image.png

and the audit log shows

image.png

Trudy Claspill
Community Leader
Community Leader
Community Leaders are connectors, ambassadors, and mentors. On the online community, they serve as thought leaders, product experts, and moderators.
July 22, 2024

That error message is telling you the Smart Value Condition in the branch is not being met.

Smart values can be space and case sensitive. In this case, you are not using the correct capitalization of the smart value. It needs to be lookupIssues with a capital "i".

Screenshot 2024-07-22 at 10.01.40 AM.png

Laviniu Chis July 22, 2024

That was it, the capital I. Thank you.

Like Trudy Claspill likes this

Suggest an answer

Log in or Sign up to answer
TAGS
AUG Leaders

Atlassian Community Events