Jira Automation:- Error Rendering Smart Values for Story Points Calculation

Navi
I'm New Here
I'm New Here
Those new to the Atlassian Community have posted less than three times. Give them a warm welcome!
August 11, 2024

 

 

I am encountering an error while trying to automate the calculation of story points in Jira using smart values based on custom fields. The custom fields involved are "Complexity", "Effort Required", and "Skill Required", each with dropdown options (High, Medium, Low). The goal is to calculate the story points as an average of these values, assigning numerical values (High = 3, Medium = 2, Low = 1), and then rounding the result.

Error Message

Error rendering smart-values when executing this rule: Failed to get value for ( (if(equals(issue.fields['Complexity'], 'High'), 3, if(equals(issue.fields['Complexity'], 'Medium'), 2, 1))) + (if(equals(issue.fields['Effort Required'], 'High'), 3, if(equals(issue.fields['Effort Required'], 'Medium'), 2, 1))) + (if(equals(issue.fields['Skill Required'], 'High'), 3, if(equals(issue.fields['Skill Required'], 'Medium'), 2, 1))) ) / 3.0 | round: {{ ( (if(equals(issue.fields['Complexity'], 'High'), 3, if(equals(issue.fields['Complexity'], 'Medium'), 2, 1))) + (if(equals(issue.fields['Effort Required'], 'High'), 3, if(equals(issue.fields['Effort Required'], 'Medium'), 2, 1))) + (if(equals(issue.fields['Skill Required'], 'High'), 3, if(equals(issue.fields['Skill Required'], 'Medium'), 2, 1))) ) / 3.0 | round }} }

 

 

Context:

I have set up the following custom fields:

  1. Complexity: Dropdown with options (High, Medium, Low)
  2. Effort Required: Dropdown with options (High, Medium, Low)
  3. Skill Required: Dropdown with options (High, Medium, Low)

Automation Rule Configuration:

  • Trigger: Field Value Changed for the custom fields (Complexity, Effort Required, Skill Required).
  • Action: Edit Issue Fields to calculate and set the Story Points.

Current Smart Value Expression:

 

{ "fields": { "Story Points": {{ ( (if(equals(issue.fields['Complexity'], 'High'), 3, if(equals(issue.fields['Complexity'], 'Medium'), 2, 1))) + (if(equals(issue.fields['Effort Required'], 'High'), 3, if(equals(issue.fields['Effort Required'], 'Medium'), 2, 1))) + (if(equals(issue.fields['Skill Required'], 'High'), 3, if(equals(issue.fields['Skill Required'], 'Medium'), 2, 1))) ) / 3.0 | round }} } } 

 

Issue:

The above expression fails to execute, returning an error about rendering smart values. The goal is to correctly evaluate the custom fields, convert their values to numbers, calculate the average, and round the result to set the Story Points.

Request:

Could you pleaes provide guidance on the correct syntax or approach to resolve this error? Any insights into ensuring the smart values are correctly evaluated and the final result is computed accurately would be greatly appreciated.

Additional Context:

  • Jira Cloud environment
  • Automation rule set up through Jira’s built-in automation tools
  • Custom fields are properly configured and visible on the appropriate screens

Thank you in advance for your assistance!

 

2 answers

0 votes
Bill Sheboy
Rising Star
Rising Star
Rising Stars are recognized for providing high-quality answers to other users. Rising Stars receive a certificate of achievement and are on the path to becoming Community Leaders.
August 21, 2024

Hi @Naveen 

I wanted to follow-up to learn if you have solved this or tried the lookup tables to do so.

Thanks!

0 votes
Bill Sheboy
Rising Star
Rising Star
Rising Stars are recognized for providing high-quality answers to other users. Rising Stars receive a certificate of achievement and are on the path to becoming Community Leaders.
August 11, 2024

Hi @Naveen -- Welcome to the Atlassian Community!

First thing, automating the calculation of story points this way could have unintended consequences and lead to problems. 

The concept of story points is often a relative-sizing-based approach used by a team of people, and IMO is a tool to reach shared understanding of the request, not to algorithmically forecast something.  Please discuss the problem you are trying to solve by doing this calculation with your team's scrum master / agile coach to learn more.

 

Next, if you still want to perform this calculation, I recommend using Lookup Tables for each field / input rather than using conditional logic.  Then the value would be a simple sum of the looked up values.  To learn more about lookup tables, please review these sources:

Kind regards,
Bill

Suggest an answer

Log in or Sign up to answer
TAGS
AUG Leaders

Atlassian Community Events