Issue 1531: Identify non-empty comments in emails.
Status:  Submitted
Owner: ----
Closed:  Oct 2012
Reported by jrobert...@gmail.com, Aug 17, 2012
In the spirit of  issue #140 , and as a gmail user, I am looking for more ways to improve my filters for gerrit emails.

In particular I would like to be able to "skip the inbox" when somebody approves a change without adding any additional comments, either in the cover message field or in the code.

If a reviewer has simply looked at the change and picked +1, publish comments, that email is not interesting to me and I don't want it to go in my inbox. Only if the reviewer has remarked or added a question to the review do I want to see a new message in my inbox.

Please add more tokens to the bottom of the email that would be useful for filters.

Gerrit-Score: 1
Gerrit-HasComments: yes
Sep 24, 2012
Project Member #1 david.pu...@sonymobile.com
I've been looking into this and it's not quite as easy as it seems.

In the template it's possible to do:

#if($email.coverLetter)
Gerrit-HasCoverLetter: Yes
#else
Gerrit-HasCoverLetter: No
#endif

However it always ends up as "Yes" because the generic message like "Patch Set 1: Looks good to me, but someone else must approve" text is actually the cover message.

Also the similar condition "#if($email.inlineComments)" always evaluates to true even if there are no comments.

Will look into this a bit more...

Oct 21, 2012
#2 sop@google.com
(No comment was entered for this change.)
Status: Submitted
Labels: FixedIn-2.6
May 9, 2013
#3 jrobert...@gmail.com
Thank you for adding this feature.

I am noticing that emails contain "Gerrit-HasComments: No" even when there are comments. I think it is when someone adds a comment to the change itself and not a code-level comment.

Is this working as intended?