{{issue.Story point estimate}} not showing in automated emails
Asked by Akash Mukherjee:

Hello, I have been trying to automate jira in a way such that we get all the details regarding any story task or bug posted on the jira board that transitions from "in progress" to "done". The email is supposed to be having all the necessary details including the story points as well but no matter what the story points are not being shown in those emails

\| Issue Key \| Summary \| Assignee \| Status \| Transition Date \| Story Points \| \|-----------\|---------\|----------\|--------\|-----------------\|--------------\| {{#lookupIssues}} \| {{key}} \| {{summary}} \| {{assignee.displayName}} \| {{status.name}} \| {{changelog.status.last.updated}} \| {{Issue.Story point estimate}} \| {{/lookupIssues}}  

This is the email query that I use. We are a team based board so I use Story point Estimate and the lookup issues jql query is :

(project in (10002)) AND (status changed FROM "In Progress" TO "Done" After -14d)

Any help is really appreciated \<3


Answers:
author: Bill Sheboy
body: Hi [@Akash Mukherjee](/t5/user/viewprofilepage/user-id/5545728) -- Welcome to the Atlassian Community!

When inside of the iterator for {{#lookupIssues}} ... {{/}} data, do not use the *issue.* prefix as the fields are coming from the lookup. For example:

```
{{#lookupIssues}}
{{key}} -- {{Story point estimate}}
{{/}}
```

Kind regards,  
Bill

comments: author: Hans Polder
body: [@Bill Sheboy](/t5/user/viewprofilepage/user-id/1685313) , you rock! Thanks for the assist - this indeed works.


author: Akash Mukherjee
body: Thank you so much sir! It indeed worked, you are amazing


author: Akash Mukherjee
body: Can you also help me out in this regard. I created a new custom field called Shirt Size and I used the same format as the story points but it is not showing in the email. Can you please let me know where am I going wrong?


author: Bill Sheboy
body: Smart values are name, spacing, and case-sensitive, and they may not exactly match the displayed name on the issue pages. When an incorrect smart value is used, it returns *null* and so often fails silently in rules.

To find the correct smart value (or its custom field id) please use this how-to article: <https://support.atlassian.com/cloud-automation/docs/find-the-smart-value-for-a-field/>

The essential steps are:

* identify an example issue with your field
* using a browser tab, call the REST API endpoint to get the issue data, substituting in your Jira URL and the example issue's key:

```
yourJiraURL/rest/api/3/issue/exampleIssueKey?expand=names
```

* search on the page for your field to find its exact smart value and custom field id
* update your rule to use the correct one

If the smart value does not work, try the custom field id, such as with:

```
{{issue.customfield_12345}}
```


author: Akash Mukherjee
body: Am sorry to bother you again but I made a small change to the {{lookupissues}} and all of a sudden the story points stopped showing in the report. I am not getting any indications either to why such thing is happening.   

The Lookup issues JQL is (status changed FROM "To Do" TO "Done" AFTER -7d) OR (status changed FROM "On Hold" TO "Done" AFTER -7d) OR (status changed FROM "In Progress" TO "Done" AFTER -7d)

The Email setup is  
Hi Admin,  
Here are the issues transitioned from "In Progress" to "Done" in the last 14 days:  
Issue Key \| Summary \| Assignee \| Status \| Story Points \|  
{{#lookupIssues}}  
{{key}} \| {{summary}} \| {{assignee.displayName}} \| {{status.name}} \| {{Story point estimate}} \|  
{{/lookupIssues}}  
Best regards,  
Jira Automation


author: Bill Sheboy
body: Hi [@Akash Mukherjee](/t5/user/viewprofilepage/user-id/5545728)

Was the only thing changed the JQL for the Lookup Issues action?

Is this rule only running in a Team-managed project?

Please post an image of the audit log details showing the rule execution. That will provide context to help explain this.


author: Akash Mukherjee
body: yes the only thing that was changed was the jql for the lookup issues action and yes it is a team managed project so we use story point estimate. prior to the jql change your method was working just fine and give the story points on the email report. the audit log inly shows success and no other given context


author: Bill Sheboy
body: Please post an image of the audit log details showing the rule execution. I want to confirm which issues were returned for the lookup so they can be compared to...

Using the JQL used in the Lookup Issues action, if you try that stand-alone with Filters \> View All Issues, which issues are returned with values in the Story Point Estimate field?


author: Akash Mukherjee
body: ![Screenshot 2024-08-13 110146.png](https://community.atlassian.com/t5/image/serverpage/image-id/341430i0BFC6CF0675408BC/image-size/large?v=v2&px=999 "Screenshot 2024-08-13 110146.png")


author: Akash Mukherjee
body: All the issues that were filtered by the lookup issues jql do have the story point estimate values before changing the jql they were showing using your method but eversince I made the JQL change the story points are not showing.


author: Akash Mukherjee
body: when i validate the jql query and it gives a proper return of the list of issues we are looking for in the report as well


author: Hans Polder
body: [@Akash Mukherjee](/t5/user/viewprofilepage/user-id/5545728) ,

In my instance, the field that actually has the data is not 'Story point estimate', but 'Story points':

{{issue.Story points}}

![Screenshot 2024-07-17 072505.png](https://community.atlassian.com/t5/image/serverpage/image-id/336011i647B7BF360F53147/image-size/large?v=v2&px=999 "Screenshot 2024-07-17 072505.png")

comments: author: Akash Mukherjee
body: Its a team run board and not a company one so I have to use story point estimate.


author: Hans Polder
body: [@Akash Mukherjee](/t5/user/viewprofilepage/user-id/5545728) ,

Ah, you are right, I missed that part. When I test it in a team managed project, it indeed needs to be the one you're using.

![Screenshot 2024-07-18 062252.png](https://community.atlassian.com/t5/image/serverpage/image-id/336230iDE50714B2A7318D3/image-size/large?v=v2&px=999 "Screenshot 2024-07-18 062252.png")

Before we continue, can you please share some screenshots of your entire automation rule configuration, with screenshots of the separate steps as well?

I see the same behavior if I try it on my side. [@Marc Koppelaar](/t5/user/viewprofilepage/user-id/3931256) could you maybe spread your Automation wisdom?


Tags: cloud

jira-cloud