Hi Team,
I am trying to use automation to calculate a sum of several custom fields, whenever one of them is modified. Result of the sum should appear in "Grand total des indices de risques".
For some reason, I am not successful.
Here are my fields and automations so far :
And my automations
The error I get :
Would any one be so kind to have a look ? What am I missing ?
Thanks a lot beforehand,
Valérie
Looking at the image you posted of the Create Variable action, it appears there are some typos in your mathematical expression.
Some of the smart values start with
{{issue.fieldname.value}}
while others start with an extra character before "issue"
{{Iissue.fieldname.value}}
Please try removing those extra characters to see if that helps.
Kind regards,
Bill
Hi Bill,
I am going to buy better glasses ;-).
Thanks for the advice. Tried it, but not working either.
{{#=}} {{issue."Ressources humaines Indice de risque total".value}} + {{issue."Direction Indice de risque total".value}} + {{issue."IT Indice de risque total".value}} + {{issue."Gestion de projet Indice de risque total".value}} + {{issue."Commercial Indice de risque total".value}} + {{issue."Customer Solutions Indice de risque total".value}} + {{issue."Production Indice de risque total".value}} + {{issue."ENV et BAT Indice de risque total".value}} + {{issue."Logistique Indice de risque total".value}}{{/}}
Would you have any other piece of advice ?
Thanks so much !
Valérie
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Okay, the next thing to check: are those the correct smart values for the fields?
Smart values are name, spacing, and case-sensitive. And, just because something has a field that does not mean it is supported by automation rules (e.g., vendor addon, calculated fields).
To check your smart values, please use the how-to article below. Basically you identify an example issue with your fields, call the REST API with a browser, and look for your fields to find the smart value.
https://support.atlassian.com/cloud-automation/docs/find-the-smart-value-for-a-field/
Also...If those are numeric (or text) fields, you should not need the .value part. That is primarily used with single and multi-select option fields.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi Bill !
Thanks a lot ! Issue was coming from the .value that were not needed.
Learned a lot, thanks again !
Kind regards,
Valérie
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
This is a duplicate of another post with another answer here:
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi Trudy,
Indeed, thanks for noticing and sorry for my mistake !
Valérie
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Remove the quotes from the Custom Field names. They aren't needed.
Also as a general troubleshooting method, I like to add an action to "Log action" with the Smart Value. This will help make sure you get the value you need before making changes to issues. You can see these values in the Audit Log for the Rule.
Finally, I would also recommend starting with a smaller set of thing to add. It's really hard to debug a long string like that, so start with just adding 2 custom fields together. Once you have the syntax correct, you can add the additional fields.
Kris
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi Kristopher,
Thanks for your answer and suggestion.
I tried, but it is not working either
I also tried to reduce the string to 2 items and to insert an audit log, but here is what I got.
{{#=}} {{issue.Direction Indice de risque total.value}} } + {{issue.Qualité Indice de risque total.value}} {{/}} |
Sorry, still on my learning curve :-(. I really appreciate the time you took !
Kind regards,
Valérie
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
There’s an extra } before the + Try removing that.
I would also look at @Bill Sheboy suggestion of confirming the data structure of the custom fields. I have a feeling he is right about potentially not needing the .value at the end, but I can’t say for sure. If you visit the link he provided, they talk about how to look at the custom fields to figure out what you need.
Kris
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Thanks Kristopher !
Issue was the .value, not needed because my fields are number fields.
Thanks again for your help!
Valérie
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
{{#=}} {{issue.Direction Indice de risque total.value}} } + {{issue.Qualité Indice de risque total.value}} {{/}}
At this expression there is an extra } after {{issue.Direction Indice de risque total.value}}
@Valerie Blondel
Have you solved this issue? I'm with the same problem here.
thanks
FF
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi Felipe,
Yes, solved in the meanwhile. And yes, issue was coming from an extra }.
It's sometimes difficult, in very long strings, to detect a missing } or one too much ! But with the help of the community (and some new glasses for me) we managed to do it.
Have a nice day !
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Online forums and learning are now in one easy-to-use experience.
By continuing, you accept the updated Community Terms of Use and acknowledge the Privacy Policy. Your public name, photo, and achievements may be publicly visible and available in search engines.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.