I created a schedule that pulls high-priority issues that have not been updated in two days and it will send the list of the issues to the assignees via email. However it does not include issue-type icons, it is just sending issue types' names. Is there a way to include issue-type icons?
{{#issues}}
<tr>
<td>{{key}}</td>
<td>{{issueType.name}}</td>
<td>{{summary}}</td>
<td>{{status.name}}</td>
<td>{{assignee.displayName}}   </td>
<td>{{updated.format("MM/dd/yyyy")}}</td>
</tr>
Any idea how to include icons?
Thank you
There may be a better solution, but I'll suggest an approach I'd use to solve this.
I see you're using Jira Server, which I don't have access to. I'll show my work here for a Jira Cloud solution, and you can replicate the effort to find what works for you.
I'd start by investigating the URLs that Jira uses to display the issue type icons of interest. After all, they are just image files that all your Jira users already can access.
In the Chrome browser, I can right-click on an icon and use "Open image in new tab". Doing this on an issue type icon in Jira will reveal a URL to that icon. In my Jira Cloud instance for an Epic issue type icon, I see:
https://xxx.atlassian.net/images/icons/issuetypes/epic.svg
I was able to replace "epic" with "story" and "subtask" in my instance and see the right icons.
Based on this, I created a test rule which replicated part of your table:
This simply maps {{issueType.name}} to all lowercase letters and embeds it in the URL for the icon. Here's a text version of that magic line above (for easier copy/paste):
<td><img src="https://xxxx.atlassian.net/images/icons/issuetypes/{{issueType.name.toLowerCase()}}.svg"/></td>
Testing my rule showed me this in an email:
I can't explain the odd border on the first icon. Hopefully it looks normal for you.
_ _ _ _ _ _ _
A few additional notes about this approach:
<td><img src="http://xxx.atlassian.net/rest/api/2/universal_avatar/view/type/issuetype/avatar/{{if(equals(issueType.id,10000))}}10315{{/}}{{if(equals(issueType.id,10001))}}10312{{/}}?size=medium"/></td>
This is ugly, and a bit brittle. But it'll work!
@Mykenna CepekI was able to view icons by using https://myjira.com:8080/images/icons/issuetypes/task.svg.
I used the first method, the below code:
<td><img src="https://myjira.com:8080/images/icons/issuetypes/{{issueType.name.toLowerCase()}}.svg"/></td>
it didn't display the icons. It displays image missing icons, here is the screenshot:
I did right click and selected "Download Pictures" from outlook, it still didn't display icons. it displayed the below icons:
I was not sure about the second method because of those two numbers 10000 and 10315. Are these avatar ids? Where I can find it? I found the below code when I right-clicked on the task icon from the issue type and went to inspect.
<img src="https://myjira.com:8080/secure/viewavatar?size=xsmall&avatarId=11218&avatarType=issuetype" height="16" width="16" border="0" align="absmiddle"">
Thank you for your help.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
If you can view the task.svg icon in your browser but not in an Outlook email, that sounds like it might be an Outlook thing. More on that later...
The second method I showed is using two numerical values, and it may be confusing. In my example, 10000 and 10001 are what Automation sees for {{issueType.id}}, so you can output those to the Automation Audit Log to see what those values are in your Jira Server instance for each Issue Type.
In my example for the second method, the numbers 10325 and 10312 are the avatarId values. So use those when constructing the URL in the conditionals. You'll also want to change the URL to match what you see when you right-click and inspect the task icon (rather than using what I posted).
Sounds like you've got the right approach. Just fuss with those details. If the URL looks right, but Outlook isn't showing it, maybe talk to a coworker who has worked with HTML in email at your workplace. Maybe the Jira base URL needs to be added to an Outlook whitelist so it can be treated as a safe source for images? Just a wild guess.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Is there a way to include the issueType icon in a Slack message?
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
If you're open to using a tool other than Automation, we support issue type icons in Notification Assistant for Jira.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Not sure if this will work... haven't tried but maybe try:
<td>{{issueType.icon}}</td>
OR
<td>{{issueType.avatar}}</td>
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.
Online forums and learning are now in one easy-to-use experience.
By continuing, you accept the updated Community Terms of Use and acknowledge the Privacy Policy. Your public name, photo, and achievements may be publicly visible and available in search engines.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.