Email template trouble

Hi All,

I have a big trouble with the HTML email template.

One of a project of our Jira instance need a custom create issue email template. They need only a few fields displayed, no hyperlinks and a custom field.

We inherited the Jira from a previous team but we aren't acquinted with HTML editing.

I attach the current email template and the HTML code - the top left part.

I signed the necessary fields and wishes on the attached pic.

Whenever we change something in the email template we get error message in the email.

4 answers

1 accepted

0 votes
Answer accepted

All you need to do is to remove the unwanted fields - starting from #text to the next #text. For the key, you can replace #text("common.concepts.key") with Request Number

Hi Jobin,

it didn't work! I changed the #text("common.concepts.key") with Request Number and I got an error email. See attached txt!

Maybe is it in connection with the issuecreated.vm file? Because it contains only a few lines parsing these header, summary,etc. templates:


I am so disapponted because I have no idea why I got error mails.

Thanks for help!


Sorry, this is the Top-left part's html code. I could attach only as pic.

Thanks in advance for your help!


this is what i get

It complains about an extra #end. Is it working without that single change?

Yes it's working without the change.

IT is HTML email template I didn't mention.

What can be wrong?


have you got a private email. I would send you the summary-top-left.vm and the issuecreated.vm for you. The original summary-top-left.vm is what I pasted above.

Thanks in advance for your help!


Well, the problem is, there is an extra #end at line 474 ;) Can you attach the trmplate as a .txt file?

(summary_topleft.txt) (error_email.txt) (issuecreated.txt)

Hi Jobin,

I attach the 3 .txt files: the text of the last error email after I changed #text("common.concepts.key") with Request Number. Then I attach the Summary-topleft text and the issuecreated.vm

If you need additional files, let me know and I attach them too.

How can be a code error message like this:

An error occurred whilst rendering this message. Please contact the administrators, and inform them of this bug. Details: ------- org.apache.velocity.exception.ParseErrorException: Lexical error: org.apache.velocity.runtime.parser.TokenMgrError: Lexical error at line 440, column 84. Encountered: "q" (113), after : "&" at org.apache.velocity.Template.process( at

when I only changed #text("common.concepts.key") to 'Request Number'????

PS.: I made the changes in Word.

Thank you for your help!



if you need more infos, I attach. that your vm file? Or did you take the html source from somewhere? !

Hi Jobin,

yes they are.

Let me know if something wrong with them or you need additional info!

I would send you in Word but the forum doesn't let.

In the meantime I realized that I shouldn't edit the .vm files in Word but in Notepad.

Thanks in advance!


That is one big file and I don't have time to debug it to be frank! Too big to know where the problem is without spending time. I suggest you do 2 things. First, remove everything except the issue key and make it working with the original #text tag. And then try replacing it as I suggested.

If that doesn't work, attach both the working version and the modified version. It will be easier to debug in that case.

Sorry, I sent you an incorrect part.

Weel the problem was that I edited the .vm file in Word. Now I edited in Notepad and I got the needed Request Number field!

My question is how can I remove the hyperlinks from the script?

<table cellpadding="3" cellspacing="0" style="border-top-style:none;border-right-style:none;border-bottom-style:solid;border-left-style:none;border-width:1px;border-color:#3c78b5;" width="100%">
                    <td style="background-color:#ddd;">
                        (<b><a href="${baseurl}/browse/${issue.getKey()}">#text("")</a></b>)<br/>

Awesome! Remove a href and the matching closing tag. i.e.

<a href="${baseurl}/browse/${issue.getKey()}">



Oh yeah, go ahead and remove it ;) Try just


Try $issue.assigneeUser.displayName or $issue.assigneeUser.fullName depending on JIRA version if you want full name instead of user name.

Same for reporter.


thank you!

I also would like to remove the hyperlink from the Assignee and Reporter fields. How can I do that.

Here is the code but I don't dare to remove #authorlink. Can it be??

<tr style="vertical-align:top;">
                    <td style="font-weight:bold;white-space:nowrap;">#text("issue.field.assignee"):</td>
                        #if ($issue.assigneeUser)
                            #authorlink ($
                <tr style="vertical-align:top;">
                    <td style="font-weight:bold;white-space:nowrap;">#text("issue.field.reporter"):</td>
                        #if ($issue.reporterUser)
                            #authorlink ($

Hi Jobin,

thanks for the suggestion, it works great!

I'd like to ask you how to display the content of a custom field on an email template? How can I reference on the custom field?

Something like this??:

#if ($issue.getCUSTOMFIELDNAME())
                <tr style="vertical-align:top;">
                    <td style="font-weight:bold;white-space:nowrap;">#text("issue.field.resolution"):</td>
                        $textutils.htmlEncode($issue.getCUSTOMFIELDNAME().getNameTranslation($i18n), false)

Thank you Jobin

Hi Jobin,

thank you very much for your help so far!

I finally could create an email template we wanted.

There is only 3 problems left:

1. There is a frame which we cannot erase from the template (I marked it with an arrow in the attached pic)

2. We have a custom field called "Comment to reporter" which is a free text field. In the Jira we wrote the message in many lines but in the email it appears in one line which is not so pretty. How can we solve this?

3. The project leader needs a static field under the issue details: this is the "Lorem ipsum.." dummy text on the pic. It is in the footer.vm. The problem is that we need this static field from "wall-to-wall": I mean that from the left side of the email to the right side. Now this static field grew down.

Can you please suggest and help?

Thanks in advance!


Ps: can you see the attached pic?

Hi All,

any idea how can solve that the footer covers the whole mail form left to right?

Thanks in advance!


Suggest an answer

Log in or Sign up to answer
Community showcase
Published Mar 14, 2019 in Jira

Updates to give you visibility into what's coming in Jira Server and Data Center

Hello, Community! My name is Gosia and I'm a Product Manager on Jira Server and Data Center here at Atlassian. Since 2002 when we launched our public issue tracker, jira.atlass...

732 views 1 15
Read article

Atlassian User Groups

Connect with like-minded Atlassian users at free events near you!

Find a group

Connect with like-minded Atlassian users at free events near you!

Find my local user group

Unfortunately there are no AUG chapters near you at the moment.

Start an AUG

You're one step closer to meeting fellow Atlassian users at your local meet up. Learn more about AUGs

Groups near you