Hi
Can anybody help me?
I'm trying to set up an automation rule which divides one field by another and populates a third field with the result. It's failing, saying that the first field isn't numerical 'CoD - 10081'.
To perform that math operation on your CoD (Cost of Delay) to determine WSJF (weighted shortest job first), you need to use math operators:
{{#=}}{{issue.customField_10081}} / {{issue.customField_10024}}{{/}}
or
{{issue.customField_10081.divide(issue.customField_10024)}}
Please look here for more information:
https://support.atlassian.com/jira-software-cloud/docs/smart-values-math-expressions/
Best regards,
Bill
Hi @Bill Sheboy
Thanks for the reply.
The second option appears to be accepted...but it's not populating the WSJF field.
I have the success message:
But the field is blank:
Thanks
Lucy
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Oh that's strange, I've switched the numbers around to:
{{issue.customField_10024.divide(issue.customField_10081)}}
It's populating the field but with the incorrect answer:
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Okay...connecting my questions together where I believe John was heading:
You are showing the field names on the issue view, and have you confirmed how those match to the custom field IDs you are using in the calculation?
Let's try this:
Thanks!
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Ah thank you so much for the help...I've figured out why it wasn't working....
So I have a calculated field in CoD - it updates when I amend User/Business Value, Time Criticality, and RR|OE Value and adds them all together.
So my calculation for the WSJF field was updating as soon as I updated one of those and it was using the old value in CoD (silly me).
However, now I have changed it to make sure it only updates when either CoD or Story Points is updated - it doesn't recognise CoD being updated as it's being done by another automation rule. I'm guessing it must be a limitation so might need to schedule it to run periodically š¤
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
I should say, I figured out what was wrong because you showed me how to use the log action so thank you! š
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Thank you everyone for the help. I have now amended my rule to the below. Feel free to suggest anything better but this appears to work š
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi Lucy,
Can you share a screen shot of the list of custom fields where it shows the field type?
Also, can you show the error message in the audit log that you are receiving?
Do either of the fields contain a value of 0
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi @John Funk
Number fields:
I was getting this error message:
However, I am now using the expression:
{{issue.customField_10081.divide(issue.customField_10024)}}
This is showing as successful but the WSFJ field isn't populating:
Thanks
Lucy
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Which field is 10081 and which field is 10024?
And can you share the rule that shows where you are updating the field with the formula?
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.
When I look at the error, it mentions the value it is trying to get for WSJF is /5.0
which seems to suggest that you are trying to divide by the Time Critically field since it has a value of 5. So if that field is wrong, I am suspicion that you are not using the right field for the first number either.
So I would just use the field name and see what happens. Try it with this:
{{issue.CoD.divide(issue.Story Points)}}
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Thanks so much for your help, I didn't know I could use the custom fields names! I was definitely using the wrong ID in my original calculation as it is now "working" but with a limitation that I assume isn't something I can do anything about.
Please see my message above that explains š.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi Lucy,
What type of field is CoD? Cheers!
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.
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.