Sum Parent- Customfield with Customfields of subtask
How can I sum the custom field value of my subtasks to custom field of my parent task?
I used this expression for the transition 'done' with the post-function Mathematical or date-time expression calculator Function:
{50504}+sum(fieldValue({10502},subtasks()))
Best regards,
Seher
Comments (6)
-
repo owner -
reporter Hi,
- I want to implement a sum function 'provision'. I have a custom Field provision and a second custom field 'sum of provision'. If I change the transition from 'to do' to 'done', I want to have a calculate function to add the value of provision (subtask) to the sum of provision in my parent task.
- I create a custom field, but it doesn't inherit the value from parent task, so I think, they are different.
I need this function for 2 different calculations: money and time.
-
repo owner You should use "Mathematical and date-time expression calculator" post-function in transition "To Do - Done" in subtask's workflow using the following configuration:
- Target field: "Parent's Sum of Provision"
- Formula:
sum(fieldValue({aaaaa}, filterByStatus(siblingSubtasks(), "Done"))) + {aaaaa}
replacing aaaaa with field code of Provision custom field.
Assuming that:
- "Sum of Provision" and "Provision" are numeric custom fields.
- "Sum of Provision" custom field in parent issue should always contain the sum of the fields "Provision" of all its subtask in status "Done".
-
reporter Thanks it works. How can I report the changing value of my provision in a dashboard? Is that possible?
-
repo owner I'm not sure I have correctly understood your question, but I will try to answer: In dashboards you usually show statistics and information related with many issues, but you usually don't use dashboards for showing the value of a particular field of a particular issue.
-
repo owner - changed status to resolved
- Log in to comment
Hi Seher,
Some questions: