So I'm trying to use Jira Automation to do a simple Value / Effort calculation.
We use a field "Priority Score" to represent value and we use the Jira "Original Estimate" field to represent the effort.
I want to divide one by the other.
After some trial and error I've landed on the following which is intended to populate the numeric field "Net Priority Score" whenever an issue is updated.
{{#=}}{{issue.fields.priority score.divide.issue.fields.originalestimate}}{{/}}
I look in the Automation audit log which proudly tells me "SUCCESS".
However when I then look at the issue I edited, the "Net Priority Score" is simply null.
I can confirm the 2 fields in the calculation both have values defined
Send help.
Resolved it with the following expression and putting the expression in the top box not the bottom one.. woops
{{#math}}{{issue.priority score}}/({{issue.original estimate}}/28800){{/math}}
Hi @Phil Skade
Please review the math expression documentation as your rule appears to have some errors: https://support.atlassian.com/cloud-automation/docs/jira-smart-values-math-expressions/
And also...Your rule's edit action has both selected the field from the dropdown list and is trying to update it with advanced edit with JSON. That is not possible: pick one method to update the field, such as using only the dropdown selection.
Kind regards,
Bill
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Thanks for the latter tip, moved the edit action up a box. Hasn't entirely fixed it but getting there.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi @Phil Skade
please refer to this sample:
{{issue.timetracking.timeSpentSeconds.divide(3600).divide(issue.Request participants.size)}}
https://support.atlassian.com/cloud-automation/docs/jira-smart-values-math-expressions/
Maybe you can try:
{{issue.priority score.divide(issue.originalestimate)}}
You could test if score and estimate field vlaues can be got firstly if you have any issue.
Hope it helps.
YY哥
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.