Closed Bug 416481 Opened 16 years ago Closed 16 years ago

No bugmail is sent if no comment is added on bug creation

Categories

(Bugzilla :: Creating/Changing Bugs, defect)

3.1.3
defect
Not set
major

Tracking

()

RESOLVED FIXED
Bugzilla 3.2

People

(Reporter: LpSolit, Assigned: LpSolit)

Details

(Keywords: dataloss, regression)

Attachments

(1 file)

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.
Flags: blocking3.2+
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.
Attached patch patch, v1Splinter Review
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".
Assignee: mkanat → LpSolit
Status: NEW → ASSIGNED
Attachment #302809 - Flags: review?(mkanat)
Comment on attachment 302809 [details] [diff] [review]
patch, v1

Yeah, that looks way more sensible.
Attachment #302809 - Flags: review?(mkanat) → review+
Flags: approval+
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
Status: ASSIGNED → RESOLVED
Closed: 16 years ago
Resolution: --- → FIXED
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: