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.
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:
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)
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.
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.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
@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!
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
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
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Thanks for confirming @Joseph Chung Yin, I've submitted the support ticket now and will revert with the results.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
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
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.