Hi,
I have a subtask 1 and subtask 2
Each of one contains a numeric field.
I want to make a sum with fieldTask1 and fieldTask2
and put my result in numeric field in the task form
Exemple: Task 1 = 2 (1+1)
subtask 1 = 1
subtask2 = 1
Thank you !!!
The far most easiest way is to create a (new) scripted field (you seem to have scriptrunner installed) for your Task that sums the values of the field in the subtasks. No need to use behaviours for that.
// Get values from 2 custom fields def valA = getCustomFieldValue("A") def valB = getCustomFieldValue("B") // check both fields contain valid numeric values if (valA != null && valB != null){ return valA + valB }else{ // return to some code to indicate a null value in one of the fields return "-1" }
I ll try thank you .
.
thank you i solved my problem
It looks like you're new here. Sign in or register to get started.