I am using the 'ScriptRunner workflow function - Send a custom email' on the Create transition for a specific issue type. I would like to display the corresponding issue type icon in two places within the email body.
Could anyone provide me a suggestion on how to do this?
My email template is as follows:
<% out << issue.reporter?.displayName %> <b> created </b> an issue <br>
<p style="border:1px; border-style:solid; border-color:#ADD8E6; padding: 1em;">
$issue.project.name / (insert icon here) <a href="$baseUrl/browse/<% out << issue.key %>">$issue</a> <br>
<a href="$baseUrl/browse/<% out << issue.key %>"><b><font size="4">$issue.summary</b></font></a> <br><br>
Issue Type: (insert icon here) $issue.issueType.name <br>
Assignee: <% out << issue.assigneeUser?.displayName %> <br>
Created: ${issue.getCreated().format('MM/dd/yyyy HH:mm')} <br>
Reporter: <a href="$baseUrl/browse/<% out << issue.reporter %>"><% out << issue.reporter?.displayName %></a><br></p>
Hi MEDITECH,
$issue.getIssueType().iconUrl will give you the icons url but without the base url, so you will need to add that. Give that a try and let me know if it works.
Thanks,
Johnson
Thank you for your response. I will try this out and get back to you.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
I can not yet get this to work. What I would like to do is to place the issue type icon directly to the left of the issue key like it is in the standard Atlassian notification emails.
Below is what I use right now to display a link to the issue. I've tried inserting $issue.getIssueType().iconUrl in various places within this line but I cannot get the icon to display. Where specifically does this need to be inserted? Thank you for any additional assistance.
<a href="$baseUrl/browse/<% out << issue.key %>"> $issue</a>
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.