Hi together, I^m new in Jira. And I want to do a special calculation.
My starting point is: I have 9 global evaluation fields, and I want to do a math operation for these 9 fields.
And now comes the tricky part. When I can only evaluate 4 of these 9 fields with 5 stars, the total should be 100% when the others are empty becouse I can`t evaluate them. Also when I have only 3 of the 9 or 7 of the 9 fields.
I have created a automation for this, but it will not work.
I have my 9 evaluation field, and 1 field where the resulkt should be stored. This field is a Number field.
Now in the Audit-Log i see that the automation is working, but it could not write the output to the number field.
Automation:
Trigger: Value ChangeFields > Evaluation field 1-9
Then: Edit Process fields
SmartValuse:
{{#=}}
(
{{issue.customfield_20012|0}} +
{{issue.customfield_20013|0}} +
{{issue.customfield_20014|0}} +
{{issue.customfield_20015|0}} +
{{issue.customfield_20016|0}} +
{{issue.customfield_20017|0}} +
{{issue.customfield_20018|0}} +
{{issue.customfield_20019|0}} +
{{issue.customfield_20020|0}}
)
/
(
{{#if(issue.customfield_20012)}}1{{else}}0{{/}} +
{{#if(issue.customfield_20013)}}1{{else}}0{{/}} +
{{#if(issue.customfield_20014)}}1{{else}}0{{/}} +
{{#if(issue.customfield_20015)}}1{{else}}0{{/}} +
{{#if(issue.customfield_20016)}}1{{else}}0{{/}} +
{{#if(issue.customfield_20017)}}1{{else}}0{{/}} +
{{#if(issue.customfield_20018)}}1{{else}}0{{/}} +
{{#if(issue.customfield_20019)}}1{{else}}0{{/}} +
{{#if(issue.customfield_20020)}}1{{else}}0{{/}}
)
{{/}}
Output should be witten to my Number Output field.
But my Jira every Time say:
The operation was successfully processed, but some of the specified fields are not available.
Ignored fields:
Formula test thot (customfield_12044)
The field is there, i can manualy write numbers in it, but it still won`t work. Maybe im to silly to do that, or maybe it`s not possible to do that.
Hey @Thorsten Otto 👋 Welcome to Jira
That audit message usually means the rule actor can’t edit that field for that issue, or the field isn’t available on the project’s Edit/Create screen or in the field’s context.
First do this checks:
How to calculate “percentage of filled ratings”
From what you described, you want 100% whenever all filled ratings are 5 stars, regardless of how many are filled. That’s:
percentage = (sum of filled ratings) ÷ (count of filled ratings × 5) × 100 |
You can do this with a single smart value using math expressions ({{#=}}…{{/}}) and IF() to count only the filled ones. I’d also guard against divide‑by‑zero and round the result.
Replace the IDs with yours:
{{#=}} /* count only the fields you actually evaluated (assuming stars are 1–5) */ /* avoid divide-by-zero; scale to % and round */ |
Trigger
Use “Field value changed” on your 9 rating fields, then Edit issue to set your output field with the expression above. That’s all.
If it still shows “ignored fields,” switch the rule actor to Automation for Jira (or yourself for a test) and re-run; if it works then, it’s a permissions/screen/context issue as noted.
Links that might help:
Let me know if it worked
Hi, sorry i forgott to say that this is a calculation in Jira Product Discovery. I learned that Jira and Jira Product Discovery have not the same options in automations.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hey again @Thorsten Otto
In JPD, most idea fields can only be edited by Creators (the paid JPD role). The default Automation for Jira actor often doesn’t have JPD Creator permissions, so attempts to set JPD fields will succeed “overall” but ignore the specific field updates, producing the audit message you saw.
Try the below:
The rest of the solution should work I believe
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi Christos, my Role is Administrator, should be ok to do that.
For my Understanding. The Automation should look like this?
Trigger>If changes on the Fields 1-9 > Action > do the calculation > Action > writ to field where I want the Data inside
Or have I do a Automation, where alle 9 Fields need an action with variable and SmartValue?
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
I believe for the calculation, you don’t need nine separate actions, just one rule:
Trigger: Field value changed on your 9 rating fields → Action: Edit work item → paste this smart value in your Number field:
{{#=}} S = {{issue.customfield_20012.asNumber|0}} + … + {{issue.customfield_20020.asNumber|0}}; C = IF({{issue.customfield_20012.asNumber|0}} > 0,1,0) + … + IF({{issue.customfield_20020.asNumber|0}} > 0,1,0); IF(C = 0, 0, ROUND((S / (C * 5)) * 100, 0)) {{/}} |
This calculates (sum ÷ (count × 5)) × 100 and rounds to a whole number.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Sadly I become this
Unknown operator ; at character position 38: S = 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0; C = IF(0 > 0,1,0) + IF(0 > 0,1,0) + IF(0 > 0,1,0) + IF(0 > 0,1,0) + IF(0 > 0,1,0) + IF(0 > 0,1,0) + IF(0 > 0,1,0) + IF(0 > 0,1,0) + IF(0 > 0,1,0); IF(C = 0, 0, ROUND((S / (C * 5)) * 100, 0))
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
try this:
|
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
I removed the ; becouse they are not valid, but still get these:
Too many numbers or variables: S = 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 C = IF(0 > 0,1,0) + IF(0 > 0,1,0) + IF(0 > 0,1,0) + IF(0 > 0,1,0) + IF(0 > 0,1,0) + IF(0 > 0,1,0) + IF(0 > 0,1,0) + IF(0 > 0,1,0) + IF(0 > 0,1,0) IF(C = 0, 0, ROUND((S / (C * 5)) * 100, 0))
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
He could not change the value to a number.
Could not convert the field value to a number. Please ensure that the value is a number, a mathematical expression, or a smart value that can be converted to a number.
Formula test thot: 0 ``
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
So Automation now runs with Success. But the Value isn`t 100% its 0
I have now selectet all fields with 5 Stars, but get only 0 as Value, should be 100.
But it works, thank you for your effort to help me.
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.