Request Type in Automation for Jira email body

Aaron Williams December 7, 2023

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

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
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

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

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)

2 answers

1 accepted

1 vote
Answer accepted
Aaron Williams December 13, 2023

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 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.
George G
Contributor
June 18, 2024

What a crappy solution

0 votes
Joseph Chung Yin
Community Leader
Community Leader
Community Leaders are connectors, ambassadors, and mentors. On the online community, they serve as thought leaders, product experts, and moderators.
December 7, 2023

@Aaron Williams -

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.

Aaron Williams December 8, 2023

@Joseph Chung Yin 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!

Joseph Chung Yin
Community Leader
Community Leader
Community Leaders are connectors, ambassadors, and mentors. On the online community, they serve as thought leaders, product experts, and moderators.
December 8, 2023

@Aaron Williams -

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

Like Aaron Williams likes this
Aaron Williams December 11, 2023

Thanks for confirming @Joseph Chung Yin, I've submitted the support ticket now and will revert with the results.

Joseph Chung Yin
Community Leader
Community Leader
Community Leaders are connectors, ambassadors, and mentors. On the online community, they serve as thought leaders, product experts, and moderators.
December 13, 2023

@Aaron Williams -

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

Suggest an answer

Log in or Sign up to answer
DEPLOYMENT TYPE
SERVER
TAGS
AUG Leaders

Atlassian Community Events