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.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
// 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" }
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.