Calculate field from sub-tasks

Issue #380 resolved
Elvir DLN created an issue

HI

Would you like to help me on this one please ?

In parent's issue, I have a number field 'remaining amount' For each issue I have several sub-task issues with another numeric field (sub-task amount)

I would to write this formular.

Remaining amount = remaining amount - (Sum of all (sub task amounts)

it is a great plugin thank you for your help.

Elvir

Comments (4)

  1. Fidel Castro Armario repo owner

    Hi Elvir,

    It can be done using "Mathematical and date-time expression calculator" post-function.

    The configuration to be used depends of whether the post-function is going to be executed by a transition in parent's workflow or subtask's workflow.

    Anyway, I recommend you not to set the value of "Remaining Amount" custom field based on a formula that also uses the current value of "Remaining Amount", since it will make the value dependable of the number of times the post-function is executed.

    It's a much better solution to have a field called "Initial Amount" (or something like this), and set the value of "Remaining Amount" with a formula like:

    Remaining Amount = Initial Amount - (Sum of all (Sub-Task Amounts))

    Please, let me know:

    • Where are you going to execute the post-function?
    • What do you think of my proposal of using a field like Initial Amount?
  2. Elvir DLN reporter

    Thanks for your response.

    So I would like to execute the post-function in the parent's workflow. Initial amount is a good idea too.

  3. Log in to comment