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

RESOLVED FIXED in Bugzilla 3.2

Status

()

Bugzilla
Creating/Changing Bugs
--
major
RESOLVED FIXED
10 years ago
10 years ago

People

(Reporter: Frédéric Buclin, Assigned: Frédéric Buclin)

Tracking

({dataloss, regression})

3.1.3
Bugzilla 3.2
dataloss, regression
Bug Flags:
approval +
blocking3.2 +

Details

Attachments

(1 attachment)

(Assignee)

Description

10 years ago
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+

Comment 1

10 years ago
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.
(Assignee)

Comment 2

10 years ago
(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.

Comment 3

10 years ago
Ah, good point. Yeah, it would be nice to get rid of that hack.
(Assignee)

Comment 4

10 years ago
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".
Assignee: mkanat → LpSolit
Status: NEW → ASSIGNED
Attachment #302809 - Flags: review?(mkanat)

Comment 5

10 years ago
Comment on attachment 302809 [details] [diff] [review]
patch, v1

Yeah, that looks way more sensible.
Attachment #302809 - Flags: review?(mkanat) → review+

Updated

10 years ago
Flags: approval+
(Assignee)

Comment 6

10 years ago
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
Last Resolved: 10 years ago
Resolution: --- → FIXED
You need to log in before you can comment on or make changes to this bug.