Email notifications in 2.15 can't use fromName

137 views
Skip to first unread message

okitain

unread,
Jun 15, 2018, 2:44:32 AM6/15/18
to Repo and Gerrit Discussion
Hi,
Since upgrading to Gerrit 2.15.2 from 2.14, our Gerrit notification emails lack the "$fromName posted comments on this change" line.
Trying to add it back via a custom template results in the following error:
com.google.template.soy.error.SoyCompilationException: errors during Soy compilation
/home/gerrit_drap/etc/mail/CommentHtml.soy:80: error: Unknown data key 'fromName'.
{$fromName} <strong>posted comments</strong> on this change.

fromName is still present in the email formatting documentation.
Is fromName deprecated for comments?

Wyatt Allen

unread,
Jun 18, 2018, 8:27:25 PM6/18/18
to oki...@gmail.com, Repo and Gerrit Discussion
What does your Soy template look like? I wonder if "fromName" hasn't been declared in the parameter list with "@param".

--
--
To unsubscribe, email repo-discuss...@googlegroups.com
More info at http://groups.google.com/group/repo-discuss?hl=en

---
You received this message because you are subscribed to the Google Groups "Repo and Gerrit Discussion" group.
To unsubscribe from this group and stop receiving emails from it, send an email to repo-discuss...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Joel DuBien

unread,
Jun 19, 2018, 2:54:46 PM6/19/18
to Repo and Gerrit Discussion
I'm running gerrit 2.15 and have also noticed the fromName is missing from the email completely. I'm not using a custom template at all.

okitain

unread,
Jun 21, 2018, 8:58:01 AM6/21/18
to Repo and Gerrit Discussion
I was originally using the default Soy template for HTML mail.

fromName was, indeed, not declared with @param. All of the other parameters were only mentioned in a comment, so I didn't pay it any mind.
After writing fromName into the same comment, putting the name on the top works.
I also found bug https://bugs.chromium.org/p/gerrit/issues/detail?id=6123, which was the reason for this change.
I'm using Gerrit with a rather small reviewer roster, where who commented on the review matters.
I'm guessing this is not the typical usage.

вторник, 19 июня 2018 г., 3:27:25 UTC+3 пользователь Wyatt Allen написал:
Reply all
Reply to author
Forward
0 new messages