If you file a bug and don't comment, no bugmail is sent at all and the "comment required" check (given by the status workflow) doesn't complain. The reason is that _check_comment() replaces undef and '' by ' ', so that the "comment required" check sees a comment whose length is longer than 0. No idea about why no bugmail is sent, though.
Oh, this is some stupid thing in Bugzilla::BugMail. I've encountered this before, customizing Bugzilla. I think we just need to fix something in BugMail.pm. We should fix the comment required check separately, too.
(In reply to comment #1) > We should fix the comment required check separately, too. Not sure. It's probably related. The only reason _check_comment() replaces '' by ' ' is for BugMail to correctly send email notifications. If we can get rid of this hack, then _check_comment() would no longer replaces '' and the "require comment" check would correctly detect '' as comment and would complain that no comment has been given.
Ah, good point. Yeah, it would be nice to get rid of that hack.
Created attachment 302809 [details] [diff] [review] patch, v1 I found what the problem is: prepare_comments() in BugMail.pm calls wrap_comment() which converts ' ' back to ''. So this is really not reliable. I instead look for $isnew. Tested, works fine and fixes the problem about "require comment".
Comment on attachment 302809 [details] [diff] [review] patch, v1 Yeah, that looks way more sensible.
Checking in Bugzilla/Bug.pm; /cvsroot/mozilla/webtools/bugzilla/Bugzilla/Bug.pm,v <-- Bug.pm new revision: 1.233; previous revision: 1.232 done Checking in Bugzilla/BugMail.pm; /cvsroot/mozilla/webtools/bugzilla/Bugzilla/BugMail.pm,v <-- BugMail.pm new revision: 1.118; previous revision: 1.117 done