Jira automation rule to sum up story points from linked issues returns "0".

Sujitha_Krishnan
Contributor
August 24, 2023

Hi Team,

 

We have an issuetype = "impediments" on our board and teams link all the issues (story, spike, tasks and so on) blocked by this impediment to it.

 

I am creating an automation rule in Jira to sum up all the story points on this linkedissues and to populate a field named "story points impacted".

 

Details of the rule:

Rule screenshot 1.pngRule screenshot 2.png

The rule runs and gives a success result:

Sum story points from linked issues - Audit log.png

But the field "story points impacted" field is populated as "0".

 

Sum story points from linked issues - Results.png

Would really appreciate any leads to solve this issue. Thanks.

2 answers

2 accepted

1 vote
Answer accepted
Trudy Claspill
Community Leader
Community Leader
Community Leaders are connectors, ambassadors, and mentors. On the online community, they serve as thought leaders, product experts, and moderators.
August 24, 2023

Hello @Sujitha_Krishnan 

Can you show us a screen image of one of the linked issues showing the Story Points field with its value?

Can you try using the Log action to print into the Audit Log the value of {{lookupIssues.Story Points.sum}}

Sujitha_Krishnan
Contributor
August 24, 2023

 

Sure.

Linkedissue screenshot.png

Sujitha_Krishnan
Contributor
August 24, 2023

I added a log action into the Audit Log to print the value of {{lookupIssues.Story Points.sum}} and it returns "0".

Log Audit.png

Trudy Claspill
Community Leader
Community Leader
Community Leaders are connectors, ambassadors, and mentors. On the online community, they serve as thought leaders, product experts, and moderators.
August 24, 2023

That will have a value only after you have executed a Lookup Issues action. You need to insert into your rule after that action.

Sujitha_Krishnan
Contributor
August 24, 2023

below screenshot of the updated rule and audit logs. Added log action.png

Trudy Claspill
Community Leader
Community Leader
Community Leaders are connectors, ambassadors, and mentors. On the online community, they serve as thought leaders, product experts, and moderators.
August 25, 2023

The log file documents that issues are being found by the Lookup, per the notes on the right side. But, just to confirm can you add another Log action after the Lookup to print out

Results count: {{lookupIssues.size}}

Given that the print out of {{lookupIssues.Story Points.sum}} is zero, that is an indication that there is something wrong with your smart value. 

I don't see any typos in the smart value. The field name appears to match the field shown on the screen.

Can you check if there is more than one field named "Story Points" defined for your system? Go to the "View all issues" screen under the filters menu and using the Advanced/JQL view type into the JQL field Story. That will present you a list of possibly matching fields. Is there more than one field named Story Points?

Like Bill Sheboy likes this
Sujitha_Krishnan
Contributor
August 25, 2023

Thanks. Updated the rule to add the log action to print the count and results are as below.

Log action to print the count.png

 

Upon checking the fields, I do see 2 fields with the same name "story points". 

Multiple fields.png

Looks like the fieldname is "Story Points[Number]", it filters the items with the story point values.

Story points field.png

Trudy Claspill
Community Leader
Community Leader
Community Leaders are connectors, ambassadors, and mentors. On the online community, they serve as thought leaders, product experts, and moderators.
August 25, 2023

I did a quick test and it doesn't appear that the field can be referenced using "Story Points[Number]" as the field name in an Automation Rule. So you will have to find the custom field identifier for it.

Refer to this document:

https://support.atlassian.com/cloud-automation/docs/find-the-smart-value-for-a-field/

Search the output for Story Points. You should find something like this:

,"customfield_10030":"Story Points",

In this example customfield_10030 is the custom field identifier.

To confirm that is the right field, do a second search of the output for the story point value for that issue. If the story point value is 99, then do a search for :99.0, You should find something like this:

,"customfield_10030":99.0,

That will confirm you found the right custom field identifier.

Where you used Story Points in your smart value, instead use customfield_10030 (but use the identifier you find in your output).

Like Sujitha_Krishnan likes this
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 25, 2023

Yes, and...I hypothesize this is the start of consequences for having multiple fields named "Story Points".  I recommend discussing this with your Jira Site Admin so they are aware of the situation and can take actions, as necessary.

Like Trudy Claspill likes this
Sujitha_Krishnan
Contributor
August 25, 2023

Thanks @Trudy Claspill . I figured out the custom field identifier, updated the rule as you suggested and it worked! Thankyou so much for all your help. Appreciate it. ☺

Like Trudy Claspill likes this
Sujitha_Krishnan
Contributor
August 25, 2023

Sure @Bill Sheboy , copy that! 

0 votes
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.
August 24, 2023

Hi @Sujitha_Krishnan 

Is this for a company-managed or a team-managed project?  You may find that information at the bottom-left side of the page expanding area.

Company-managed projects use the Story Points field, and team-managed ones use Story point estimate...even though they are both called "Story Points" on the screen.

So if you are using team-managed, please change your rules to use this smart value:

{{lookupIssues.Story point estimate.sum|0}}

And smart values are case-sensitive, so if you are using company-manage, please use this one:

{{lookupIssues.Story points.sum|0}}

I added a default value of 0 to both to help rule out other problems.

Kind regards,
Bill

Sujitha_Krishnan
Contributor
August 24, 2023

We are using a "company-managed project" and I updated the rule to 

{{lookupIssues.Story points.sum|0}}

 The results is still "0".

Sujitha_Krishnan
Contributor
August 24, 2023

Thanks for the details, I wasn't aware that it works differently for team managed and company managed projects.

Suggest an answer

Log in or Sign up to answer
DEPLOYMENT TYPE
CLOUD
PRODUCT PLAN
PREMIUM
TAGS
AUG Leaders

Atlassian Community Events