Tech review

Style guide



On this page


Use case

When a certain number field is updated on a sub-task, this rule will calculate a sum and write it to a field on the parent issue field on the parent issue. The field a field want to display in the parent issue the sum of a number field in sub-tasks. So as soon as the value in a sub-task changes, the parent value will also automatically be updated.



Function

<link to function being used>

Use case description

When the 'Number field' custom field is changed in a sub-task, the corresponding field in the parent, representing the sum of those field values, gets updated with the updated result.

Complexity





Field Changed Event



Add a Trigger → Field Changed Event


Fields*

Choose your custom Number Field


Changed to*

Choose Any value




Issue Selector

Add SelectorIssue Selector


Target Issue(s)*

 Parent Issue


Update Field

Next to the Issue Selector click on Add → ActionUpdate Field


Field*

Choose your custom Number Field


Update to* 

Choose Value returned by parsed expression


Parser Expression*

Set it to Advanced and enter the following Parser Expression

sum(fieldValue({issue.cfnnnnn}, subtasks()))


nnnnn is the field code for the custom number field to be summed up.








Screencast

This is how the configuration above should look on your screen


Related examples