Request Type in Automation for Jira email body
Asked by Aaron Williams:

I'm trying (and failing) to display the Customer Request Type in an email body using Automation for Jira using a scheduled daily email to a specific team. The team need to see the Customer Request Type to help prioritise the order of response, some of these would require immediate action and others would not be needed inside a week.

The results of the query are shown below, see the Customer Request Type.

![Query.png](/t5/image/serverpage/image-id/295789i348F1AD0A97D2BDE/image-size/large?v=v2&px=999 "Query.png")

For context, this is Data Centre 4.13.2.

Looking at the Smart Values documentation, found here: [Jira smart values - issues \| Cloud automation Cloud \| Atlassian Support](https://support.atlassian.com/cloud-automation/docs/jira-smart-values-issues/)  
I have tried:

* {{issue.Request Type.requestType.name}} - Returns the customer request type.

* {{issue.Customer Request Type}} - Returns the customer request type for older Jira instances.

I have also grabbed and tried the customfield_00000 value following the documentation, found here: [Find the smart value for a field \| Cloud automation Cloud \| Atlassian Support](https://support.atlassian.com/cloud-automation/docs/find-the-smart-value-for-a-field/)

When I add {{Request Type}} in the email subject, I get:

![Subject.png](/t5/image/serverpage/image-id/295795iB290E0EE89DC339F/image-size/large?v=v2&px=999 "Subject.png")

However, no matter what I put in the body, I end up with the blank column shown.

Everything else works just fine, here's the Content section:

```
Hello,
<br><br>
The following issues have been found which are not yet assigned to someone from the team.<br>
Please review and assign these as soon as possible.
<blockquote>
<table>
<tbody>
<tr>
<th style="text-align: left;">Priority</th>
<th style="text-align: left;">Request Type</th>
<th style="text-align: left;">Link to Issue</th>
<th style="text-align: left;">Reporter</th>
<th style="text-align: left;">Assignee</th>
<th style="text-align: left;">Created</th>
</tr>
{{#issues}}
<tr>
<td>{{priority.name}}</td>
<td>{{issue.Customer Request Type}}</td>
<td><a href="{{toURL}}">{{key}} - {{summary}}</a></td>
<td>{{reporter.displayName}}</td>
<td>{{assignee.displayName}}</td>
<td>{{created.jiraDate}}</td>
</tr>
{{/}}
</tbody>
</table>
</blockquote>
This is an automated daily report.
```

It's obvious to see that the field is valid even simply as {{Request Type}} because of the subject line, and I believe this works just fine for individual issue notification body, but now that I'm trying to display it as a filtered list of a group of issues? No dice.

An old thread last year touched on this, but didn't contain a solution for me: [Solved: Adding request type to automation email (atlassian.com)](https://community.atlassian.com/t5/Jira-questions/Adding-request-type-to-automation-email/qaq-p/2163003#U2554239)


Answers:
author: Aaron Williams
body: Atlassian support agreed to check this out for me and produced the following code which solved my problem; I had believed I had already tried the {{customfield_10001}} option but must have simply had a single open/close brace, or another error when attempting it!

[@Joseph Chung Yin](/t5/user/viewprofilepage/user-id/396739) could you try this as well? You'll need to check the correct customfield ID for your "Customer Request Type" field!

```
Hello,
<br><br>
The following issues have been found which are not yet assigned to someone from the team.<br>
Please review and assign these as soon as possible.
<blockquote>
<table>
<tr>
<th style="text-align: left;">Priority</th>
<th style="text-align: left;">Request Type</th>
<th style="text-align: left;">Link to Issue</th>
<th style="text-align: left;">Reporter</th>
<th style="text-align: left;">Assignee</th>
<th style="text-align: left;">Created</th>
</tr>
{{#issues}}
<tr>
<td>{{priority.name}}</td>
<td>{{customfield_10001}}</td>
<td><a href="{{toURL}}">{{key}} - {{summary}}</a></td>
<td>{{reporter.displayName}}</td>
<td>{{assignee.displayName}}</td>
<td>{{created.jiraDate}}</td>
</tr>
{{/}}
</table>
</blockquote>
This is an automated daily report.
```

comments: author: George G
body: What a crappy solution


author: Joseph Chung Yin
body: [@Aaron Williams](/t5/user/viewprofilepage/user-id/5124542) -

I was able to reproduce your issue on my end.

Since you are trying to the request type name/other data from a set of issues, it is very odd only request type name is coming in as empty.

Here is my code against the Log Action action -

{{#lookupIssues}} \* {{key}} -- \*{{issue.Request Type.requestType.name}} {{/}}

The issue key returned successfully, but not for the request type name.

I would recommend that you can contact Atlassian Support (<https://support.atlassian.com>) for further assistance.

Please provide their replies when you obtained them, so we can all learn from it.

Sorry.

Best, Joseph Chung Yin

Jira/JSM Functional Lead, Global Technology Applications Team

Viasat Inc.

comments: author: Aaron Williams
body: [@Joseph Chung Yin](/t5/user/viewprofilepage/user-id/396739) for my support request, could you confirm the version you are on? I'll include it in the request to Atlassian to cover my back about being on an older version!


author: Joseph Chung Yin
body: [@Aaron Williams](/t5/user/viewprofilepage/user-id/5124542) -

Our DC version is 9.4.5/5.4.5 and will upgrade to 9.12 (LTS) next Jan/Feb time frame. Please note that my testing was done in our Cloud env.

Sorry that I forgot to mention it in my original response. However, it is my opinion that Automation for Jira using smart values should work the same between DC and Cloud env. I didn't have a chance to test it out in our DC env at this time.

Best, Joseph


author: Aaron Williams
body: Thanks for confirming [@Joseph Chung Yin](/t5/user/viewprofilepage/user-id/396739), I've submitted the support ticket now and will revert with the results.


author: Joseph Chung Yin
body: [@Aaron Williams](/t5/user/viewprofilepage/user-id/5124542) -

Great. If my suggestion helped you, please click on "Accept answer" when you have a chance + post your additional findings from Atlassian Support team.

Best, Joseph


Tags: jira-service-management

jira-service-management-server

server