Hi Team,
Can someone help me with the automation for when value is added to the subtasks ie number of custom fields that should display on the parent with sum of those values including the value in the story.
Ex- If subtask1--5
subtask2--5
subtask3--5
But Story has the value of 10 now after the automation--story should display- 25 not 15
Looking forward for the response
Hi Kiran!
Do you have an automation that looks like this?
If you do: The code in the box on the right side only adds sum of Subtask story points and join them together and write that into the Story point field of the parent issue.
(It does not add the value of the subtasks to the original value of the parent)
Hi Tobias H,
Thank you for your quick reply,
I have attached the screenshot of the rule. I have Num custom field in both subtasks and story. If story has value 10 including subtasks values ie Ex- If subtask1--5
subtask2--5
subtask3--5
After the rule story should display 25 not just 15 in the story. on the same custom field. Any help would be appreciated.
Regards,
Kiran
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
If you could provide the actual code used to do this, I might be able to assist. Your automation looks correct otherwise :)
As I said, it might be that you are using a code (like the one I posted above) that sums together the three subtask values and then just overwrites the parent value.
Value1(5) + Value2 (5) + Value3 (5) = ValueTotal (15)
ValueTotal is then edited into the Story Point field on the parent, so it EDITs ParentValue and CHANGES it to ValueTotal. It doesn't care for the previous value of the Parent field.
(Instead of ParentValue (10) + ValueTotal (15) = NewTotal (25))
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
{
"fields": {
"Num": {{#=}}{{subtasks.Num.join(" + ")}}{{/}}
}
}
Could you try this code instead (basically just swapping the second #= to a /)
It will still just add the subtask Num values and overwrite whatever is in the Num value of the parent, but it shouldn't generate an error.
I am not a programmer, but I'll try to help you figure out how to get the value of Parent.Num + subtask.Num = Total.Num
(Not sure if it can be done, but we'll see :D)
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi @Tobias H ,
Thank you for your response,
Its working now without any errors. But only subtasks value is getting added not with story.
Story already has an value --5
subtask1--10
subtask2--10
subtask3--10
Total showing now after the automation is 30 but it should be 35 including the value of the story.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi again!
I totally understand the problem, but I do not have a solution (if there is one) right now. Happy to hear that it runs without errors for now :)
As said previously, I'll try to look for a solution that would make sure that the total adds up to 35, and not just 30, but I am not sure what needs to be configured to do so off the top of my head.
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.