Gerrit's Emails Missing Salutation

91 views
Skip to first unread message

Joel DuBien

unread,
May 14, 2019, 11:41:21 AM5/14/19
to Repo and Gerrit Discussion
Hello,

We have an instance of gerrit that has been running since before 2.10. It is upgraded regularly, and is now on 2.16.7. Ever since upgrading to 2.15 (I believe this was when it started), the emails that gerrit sends are missing the salutations that tell you who caused the message to be sent.

Here is an example:
 
View Change

1 comment:

File docker-compose.yml:

Patch Set #3, Line 127: hostname: example.com

I didn't think that the application would care about its host name...

To view, visit change 82944. To unsubscribe, or for help writing mail filters, visit settings.


As you can see, there is nothing at the top that says who actually added the comment to Patch Set #3, Line 127. 

Here are the email templates in the gerrit site directory. Do I have to set these all up now? Why doesn't the gerrit install have a default that includes the comment  name?

total 204
-r--r--r-- 1 gerrit gerrit 1023 Mar 16 03:06 AbandonedHtml.soy.example
-r--r--r-- 1 gerrit gerrit 1196 Mar 16 03:06 Abandoned.soy.example
-r--r--r-- 1 gerrit gerrit 1686 Sep 23  2016 Abandoned.vm.example
-r--r--r-- 1 gerrit gerrit 1693 Mar 16 03:06 AddKey.soy.example
-r--r--r-- 1 gerrit gerrit 2140 Dec 22  2015 AddKey.vm.example
-r--r--r-- 1 gerrit gerrit 1536 Mar 16 03:06 ChangeFooterHtml.soy.example
-r--r--r-- 1 gerrit gerrit 1161 Mar 16 03:06 ChangeFooter.soy.example
-r--r--r-- 1 gerrit gerrit 1850 Jan 27  2015 ChangeFooter.vm.example
-r--r--r-- 1 gerrit gerrit 1205 Mar 16 03:06 ChangeSubject.soy.example
-r--r--r-- 1 gerrit gerrit 1889 Apr 17  2015 ChangeSubject.vm.example
-r--r--r-- 1 gerrit gerrit  711 Mar 16 03:06 CommentFooterHtml.soy.example
-r--r--r-- 1 gerrit gerrit  893 Mar 16 03:06 CommentFooter.soy.example
-r--r--r-- 1 gerrit gerrit 1577 Jun 25  2013 CommentFooter.vm.example
-r--r--r-- 1 gerrit gerrit 4633 Mar 16 03:06 CommentHtml.soy.example
-r--r--r-- 1 gerrit gerrit 2362 Mar 16 03:06 Comment.soy.example
-r--r--r-- 1 gerrit gerrit 2085 Sep 23  2016 Comment.vm.example
-r--r--r-- 1 gerrit gerrit 2093 Jun 25  2013 CommitMessageEdited.vm.example
-r--r--r-- 1 gerrit gerrit 1154 Mar 16 03:06 DeleteReviewerHtml.soy.example
-r--r--r-- 1 gerrit gerrit 1385 Mar 16 03:06 DeleteReviewer.soy.example
-r--r--r-- 1 gerrit gerrit 1794 Sep 23  2016 DeleteReviewer.vm.example
-r--r--r-- 1 gerrit gerrit 1034 Mar 16 03:06 DeleteVoteHtml.soy.example
-r--r--r-- 1 gerrit gerrit 1143 Mar 16 03:06 DeleteVote.soy.example
-r--r--r-- 1 gerrit gerrit 1642 Sep 23  2016 DeleteVote.vm.example
-r--r--r-- 1 gerrit gerrit  845 Mar 16 03:06 FooterHtml.soy.example
-r--r--r-- 1 gerrit gerrit  954 Mar 16 03:06 Footer.soy.example
-r--r--r-- 1 gerrit gerrit 1435 Dec 15  2013 Footer.vm.example
-r--r--r-- 1 gerrit gerrit  703 Mar 16 03:06 HeaderHtml.soy.example
-r--r--r-- 1 gerrit gerrit 2451 Mar 16 03:06 InboundEmailRejectionHtml.soy.example
-r--r--r-- 1 gerrit gerrit 2498 Mar 16 03:06 InboundEmailRejection.soy.example
-r--r--r-- 1 gerrit gerrit 1146 Mar 16 03:06 MergedHtml.soy.example
-r--r--r-- 1 gerrit gerrit 1271 Mar 16 03:06 Merged.soy.example
-r--r--r-- 1 gerrit gerrit 1763 Sep 23  2016 Merged.vm.example
-r--r--r-- 1 gerrit gerrit 1698 Apr 27  2012 MergeFail.vm.example
-r--r--r-- 1 gerrit gerrit 1694 Mar 16 03:06 NewChangeHtml.soy.example
-r--r--r-- 1 gerrit gerrit 1884 Mar 16 03:06 NewChange.soy.example
-r--r--r-- 1 gerrit gerrit 2051 Sep 23  2016 NewChange.vm.example
-r--r--r-- 1 gerrit gerrit 2060 Nov  1  2012 RebasedPatchSet.vm.example
-r--r--r-- 1 gerrit gerrit 1631 Mar 16 03:06 RegisterNewEmail.soy.example
-r--r--r-- 1 gerrit gerrit 2034 Apr 27  2012 RegisterNewEmail.vm.example
-r--r--r-- 1 gerrit gerrit 1425 Mar 16 03:06 ReplacePatchSetHtml.soy.example
-r--r--r-- 1 gerrit gerrit 1965 Mar 16 03:06 ReplacePatchSet.soy.example
-r--r--r-- 1 gerrit gerrit 2053 Sep 23  2016 ReplacePatchSet.vm.example
-r--r--r-- 1 gerrit gerrit  911 Mar 16 03:06 RestoredHtml.soy.example
-r--r--r-- 1 gerrit gerrit 1196 Mar 16 03:06 Restored.soy.example
-r--r--r-- 1 gerrit gerrit 1683 Sep 23  2016 Restored.vm.example
-r--r--r-- 1 gerrit gerrit  926 Mar 16 03:06 RevertedHtml.soy.example
-r--r--r-- 1 gerrit gerrit 1207 Mar 16 03:06 Reverted.soy.example
-r--r--r-- 1 gerrit gerrit 1683 Sep 23  2016 Reverted.vm.example
-r--r--r-- 1 gerrit gerrit 1361 Mar 16 03:06 SetAssigneeHtml.soy.example
-r--r--r-- 1 gerrit gerrit 1543 Mar 16 03:06 SetAssignee.soy.example

TYIA for your help!

-Joel

Gert van Dijk

unread,
May 14, 2019, 12:31:49 PM5/14/19
to Repo and Gerrit Discussion
On Tue, May 14, 2019 at 5:41 PM 'Joel DuBien' via Repo and Gerrit Discussion <repo-d...@googlegroups.com> wrote:
Hello,

We have an instance of gerrit that has been running since before 2.10. It is upgraded regularly, and is now on 2.16.7. Ever since upgrading to 2.15 (I believe this was when it started), the emails that gerrit sends are missing the salutations that tell you who caused the message to be sent.

Here is an example:
 
View Change

1 comment:

File docker-compose.yml:

Patch Set #3, Line 127: hostname: example.com

I didn't think that the application would care about its host name...

To view, visit change 82944. To unsubscribe, or for help writing mail filters, visit settings.


As you can see, there is nothing at the top that says who actually added the comment to Patch Set #3, Line 127. 

Here are the email templates in the gerrit site directory. Do I have to set these all up now? Why doesn't the gerrit install have a default that includes the comment  name?

Please have a look at the system setting sendemail.from [1]; it can be configured to include the name of the user triggering the notification. This means that depending that setting's value, the mail's From: header will show who has posted those comments.

I do understand that this information could be included in the body of the email as well. E.g. above the line "Patch set 1: Code-Review -1", add something like "John Doe commented on patch set #1 of this change.", just like you see on notifications of newly uploaded patch sets.

HTH

Gareth Bowles

unread,
Jun 6, 2019, 2:18:39 PM6/6/19
to Repo and Gerrit Discussion
I'm seeing the same problem on 2.1.5.11; we shouldn't need to set the sendmail.from value since the Comment.soy.example template (among others) should include a line "{$fromName} has posted comments on this change." It seems as if Gerrit has stopped applying the email templates at some point after 2.14.x.
Reply all
Reply to author
Forward
0 new messages