Forums

Articles
Create
cancel
Showing results for 
Search instead for 
Did you mean: 

Getting an error while trying to add story points if the status of the story is Ready

Shruti Shrivastava December 18, 2023

Getting an error while trying to add story points if the status of the story is Ready and story point is not equal to empty. 

I am getting the list of issues via jql query in an automation rule and send the same in a report via email.

{{#=}}0{{#issues}}

{{#if(and(status.name.equals("Ready"), not(story points.equals(""))))}} + {{story points}}

{{/}}{{/}}{{/}}

I am getting an error - Missing parameter(s) for operator +: 0 + 5.0 +

1 answer

1 accepted

1 vote
Answer accepted
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.
December 18, 2023

Hi @Shruti Shrivastava 

That error is showing one or more of the story points are empty (or null).

Smart values are name, spacing, and case-sensitive.  When an unknown one is used, that evaluates to null and often fails silently.

I believe the smart value for the field is "Story points" and not "story points".  Please change both of your references to the smart value to use that and retest.

Kind regards,
Bill

Shruti Shrivastava December 18, 2023

Hello @Bill Sheboy 

Thank you for replying back.

I changed the field to "Story points" but I am still getting the same error.

I know that there are empty story points in some issues, How can I tackle it or when story points are empty or null, we can consider 0 or leave that issue in the calculation?

I tried the following as well:

{{#=}}0{{#issues}}

{{#if(and(status.name.equals("Ready"), not(Story points.isEmpty)))}} + {{story points}}

{{/}}{{/}}{{/}}

but getting the same error getting

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.
December 18, 2023

Would you please post some images to provide context:

  • one image of the entire rule,
  • one image showing the rule action containing that smart value expression, and
  • one image showing the audit log details with the rule execution.

Next, when using smart values a default value can be added when a field is empty, or null, by adding the vertical bar character followed by the value.  For example:

{{issue.Story points|0}}

 

Finally, I am using Jira Cloud, and for my instance the smart value is "Story points".  For Jira Server it could instead be "Story Points".  To confirm the correct smart value for a field, please try this how-to article.  Essentially you use these steps:

  1. identify an issue with your field
  2. call a REST API issue search from a browser tab
  3. search for your field on the page, such as with CTRL-F, to find the smart value

https://confluence.atlassian.com/automation/find-the-smart-value-for-a-field-993924665.html

Shruti Shrivastava December 18, 2023

@Bill Sheboy 

{{issue.Story points|0}}

This worked. Thank you so much..:) 

Like Bill Sheboy likes this

Suggest an answer

Log in or Sign up to answer