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})
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.
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})
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
That should do it, yes
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
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)
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
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
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
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"> </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>
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
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.
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.