Forums

Articles
Create
cancel
Showing results for 
Search instead for 
Did you mean: 

How can I remove Jira email foot details

eburnett July 28, 2020

I am trying to updated the footer.vm to remove this. 

I'm not sure what parts I can remove to accomplish this any suggestions? 

 

#disable_html_escaping()
#* @vtlvariable name="string" type="org.apache.commons.lang.StringUtils" *#
#* @vtlvariable name="build" type="com.atlassian.jira.util.BuildUtilsInfo" *#
--
$i18n.getText("template.jira.footer.generated.by")
#set ($commitId = "")
#if ($string.isNotBlank($build.commitId))
## shorten the Git SHA
#set ($commitId = "-sha1:${build.commitId.substring(0, 7)}")
#end
#set ($partnerName = "")
#if ($string.isNotBlank($build.buildPartnerName))
#set ($partnerName = "-$build.buildPartnerName")
#end
(v${build.version}#${build.currentBuildNumber}${commitId}${partnerName})

1 answer

1 accepted

0 votes
Answer accepted
Nic Brough -Adaptavist-
Rising Star
Rising Star
Rising Stars are recognized for providing high-quality answers to other users. Rising Stars receive a certificate of achievement and are on the path to becoming Community Leaders.
July 28, 2020

In Velocity (I'm going to over simplify this a bit), each line starting with a # is a scripting command or comment if it's ##, and without the # the line is content that it will be "printed".  You can see that the words prefixed with $ are variables.

So, this chunk of Velocity you have here is a load of calculation of variables, but there's actually only two things output - line 5 throws out a bit of text, and the last line the results of all the calculations.

To get rid of the details, comment out (##) or remove those two lines.  If you're not using them though, you can comment out all the lines calculating the variables for the last line, as there's no point making it calculate a load of stuff it's not going to use.

eburnett July 28, 2020

So I should be able to just comment the 2 lines out with ## then?

 

#disable_html_escaping()
#* @vtlvariable name="string" type="org.apache.commons.lang.StringUtils" *#
#* @vtlvariable name="build" type="com.atlassian.jira.util.BuildUtilsInfo" *#
--
##$i18n.getText("template.jira.footer.generated.by")
#set ($commitId = "")
#if ($string.isNotBlank($build.commitId))
## shorten the Git SHA
#set ($commitId = "-sha1:${build.commitId.substring(0, 7)}")
#end
#set ($partnerName = "")
#if ($string.isNotBlank($build.buildPartnerName))
#set ($partnerName = "-$build.buildPartnerName")
#end
##(v${build.version}#${build.currentBuildNumber}${commitId}${partnerName})

Nic Brough -Adaptavist-
Rising Star
Rising Star
Rising Stars are recognized for providing high-quality answers to other users. Rising Stars receive a certificate of achievement and are on the path to becoming Community Leaders.
July 28, 2020

That should do it, yes

eburnett August 5, 2020

OK I did that but still seeing footer info after that change.  

Any other place I can change it?

Nic Brough -Adaptavist-
Rising Star
Rising Star
Rising Stars are recognized for providing high-quality answers to other users. Rising Stars receive a certificate of achievement and are on the path to becoming Community Leaders.
August 5, 2020

Nope, that's the file generating it.  Did you restart Jira after the change?  And what do you now get in the footer?  (After restarting)

eburnett August 5, 2020

I stopped jira,

made change to D:\Program Files\Atlassian\JIRA\atlassian-jira\WEB-INF\classes\templates\email\text\includes\footer.vm

#disable_html_escaping()
#* @vtlvariable name="string" type="org.apache.commons.lang3.StringUtils" *#
#* @vtlvariable name="build" type="com.atlassian.jira.util.BuildUtilsInfo" *#
--
##$i18n.getText("template.jira.footer.generated.by")
#set ($commitId = "")
#if ($string.isNotBlank($build.commitId))
## shorten the Git SHA
#set ($commitId = "-sha1:${build.commitId.substring(0, 7)}")
#end
#set ($partnerName = "")
#if ($string.isNotBlank($build.buildPartnerName))
#set ($partnerName = "-$build.buildPartnerName")
#end
##(v${build.version}#${build.currentBuildNumber}${commitId}${partnerName})

started Jira back up

jira footer.png

eburnett August 6, 2020

I guess that this footer is in the html response.  so what do I remove from this file?

D:\Program Files\Atlassian\JIRA\atlassian-jira\WEB-INF\classes\templates\email\html\includes\footer.vm

#disable_html_escaping()
#* @vtlvariable name="build" type="com.atlassian.jira.util.BuildUtilsInfo" *#
#* @vtlvariable name="attachmentsManager" type="com.atlassian.jira.mail.util.MailAttachmentsManager" *#
#parse("templates/email/html/includes/emailconstants.vm")
<!-- there needs to be content in the cell for it to render in some clients -->
<tr>
<td class="email-content-rounded-bottom mobile-expand">&nbsp;</td>
</tr>
</table>
</td>
</tr>

#if ($extraFooterContent)
#parse("templates/email/html/includes/patterns/extra-footer-content.vm")
#end

## footer pattern
<tr>
<td id="footer-pattern">
<table id="footer-pattern-container" cellspacing="0" cellpadding="0" border="0">
## Footer links + desktop logo
<tr>
<td id="footer-pattern-text" class="mobile-resize-text" width="100%">
$i18n.getText("template.jira.footer.generated.by")

#set ($commitId = "")
#if ($textutils.stringSet($build.commitId))
## shorten the Git SHA
#set ($commitId = "-<span title='$!{build.commitId}' data-commit-id='${build.commitId}}'>sha1:${build.commitId.substring(0, 7)}</span>")
#end

#set ($partnerName = "")
#if ($textutils.stringSet($build.buildPartnerName))
#set ($partnerName = "-$build.buildPartnerName")
#end

<span id="footer-build-information">(v${build.version}#${build.currentBuildNumber}${commitId}${partnerName})</span>
</td>
<td id="footer-pattern-logo-desktop-container" valign="top">
<table>
<tr>
<td id="footer-pattern-logo-desktop-padding">
<img id="footer-pattern-logo-desktop"
src="${baseurl}/images/mail/atlassian-email-logo.png"
alt="Atlassian logo"
title="Atlassian logo"
width="191"
height="24"
class="image_fix" />
</td>
</tr>
</table>
</td>
</tr>
</table>
</td>
</tr>
</table>
</body>
</html>

Nic Brough -Adaptavist-
Rising Star
Rising Star
Rising Stars are recognized for providing high-quality answers to other users. Rising Stars receive a certificate of achievement and are on the path to becoming Community Leaders.
August 6, 2020

So, I have messed up here.  I apologise for wasting so much of your time here.

I completely forgot all the emails are produced in pairs - text and html.  You mentioned footer.vm for the text ones, and I think I got the answers for those right, but then ran with just that one half of them.

But I completely forgot the html adjunct, which explains why people saw no change - we'd only amended the plain text ones and most people see the (default) html versions.

So, for the html emails, the answer is similar - comment out, or remove, any line you do not want to go into the email.

  1. For html, that means getting rid of the content and structure commands.  I'd be brutal here, but one step at a time (don't do all of this, do one section, test it and then move to the next)
  2. Comment out <span id="footer-build-information"> and every single line within it.  Get the section out that starts with <span id="footer-build-information">
  3. Next hit "extraFooterContent"
  4. Finally, the "#parse("templates/email/html/includes/emailconstants.vm")" block, but I don't think you will need to hide that.

Suggest an answer

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

Atlassian Community Events