Create
cancel
Showing results for 
Search instead for 
Did you mean: 
Sign up Log in
Celebration

Earn badges and make progress

You're on your way to the next level! Join the Kudos program to earn points and save your progress.

Deleted user Avatar
Deleted user

Level 1: Seed

25 / 150 points

Next: Root

Avatar

1 badge earned

Collect

Participate in fun challenges

Challenges come and go, but your rewards stay with you. Do more to earn more!

Challenges
Coins

Gift kudos to your peers

What goes around comes around! Share the love by gifting kudos to your peers.

Recognition
Ribbon

Rise up in the ranks

Keep earning points to reach the top of the leaderboard. It resets every quarter so you always have a chance!

Leaderboard

Come for the products,
stay for the community

The Atlassian Community can help you and your team get more value out of Atlassian products and practices.

Atlassian Community about banner
4,464,074
Community Members
 
Community Events
176
Community Groups

Calculation error with automation and custom fields

Edited

Hi,

My problem is a bit complicated to explain and my englishlevel does'nt help.
So sorry for the disorder :/

First a little explanation of how we work:
We are BI developpers so our taks are mostely loading process ans databases creation.
We use Epics for scoped part of our dataWarehouse.
Tasks for little things that takes an hour or so to complete.
Stories for entities and subtasks for tables load process.

So now the problem:
I created a custome field named "sid 2.0 Sprint Story Points" and whant to add to thisone the variation of story points of the subtasks.
Auto.png

{{To}} = {{fieldChange.toString|0}}
{{From}} = {{fieldChange.fromString|0}}
{{Variation}} = {{#=}}-{{From}}+{{To}}{{/}}
{{SID 2.0 : Sprint Story Points}} = {{#=}}{{SID 2.0 : Sprint Story Points|0}}+{{Variation}}{{/}}

 

For exemple if i go from 10 to 8 the log said "Modification de 10 à 8 pour une variation de -2" wich is right.
In the ticket modification I have this value :
{{#=}}{{SID 2.0 : Sprint Story Points|0}}+{{Variation}}{{/}}

And instead of adding the variation value tu the current value of the parent, it set the value to {{Variation}}.
Let say in this example I have au value of 20 for "SID 2.0 : Sprint Story Points" in the parent ans modify a subtask from 10 to 8 the parent is set to -2 instead of 18.

What is strange is that the exact same code works perfectely with "Story Points" field.

I hope you anderstand and can help me.

Best regards

 

1 answer

1 accepted

0 votes
Answer accepted
John Funk Community Leader Jul 25, 2022

Hi Juan,

It's probably the : in the field name that is causing the problem. You could try putting quote marks around the entire field name, but not sure if that will work or not. I would try that first since it is the easiest thing to do. 

If it doesn't work, then replace the field name with the custom field Id. So it would look like this:

{{#=}}{{customfield_16339|0}}+{{Variation}}{{/}}

Sorry for the delay, I did not received any notification.

With the double quotes it works perfectely.

Thank You.

Like John Funk likes this

Suggest an answer

Log in or Sign up to answer
TAGS

Atlassian Community Events