Closed Bug 379787 Opened 17 years ago Closed 17 years ago

Flag request mail has a blank requestee when requestee doesn't get the mail

Categories

(Bugzilla :: Email Notifications, defect)

defect
Not set
normal

Tracking

()

RESOLVED FIXED
Bugzilla 3.0

People

(Reporter: wicked, Assigned: LpSolit)

Details

Attachments

(1 file)

Request mails sent to flags CC List addresses can have a blank requestee even if the request has one. This happens when requestee of a flag request doesn't have "Email me when someone asks me to set a flag" email preference enabled and thus doesn't get the request mail.

For example, this is what first line of request mail looks like when requestee gets the notification:
"Test User <testuser@example.net> has asked Bugmaster <bugmaster@example.net> for test-cclist:"

And this is what it looks like when requestee doesn't get the notification:
"Test User <testuser@example.net> has asked  for test-cclist:"
Assignee: email-notifications → LpSolit
Severity: minor → normal
Status: UNCONFIRMED → NEW
Ever confirmed: true
Target Milestone: --- → Bugzilla 3.0
Attached patch patch, v1Splinter Review
Requesting review for the 3.0 branch.
Attachment #264123 - Flags: review?(wicked+bz)
Comment on attachment 264123 [details] [diff] [review]
patch, v1

Seems to fix the problem and not break other notify mails.
Attachment #264123 - Flags: review?(wicked+bz) → review+
Comment on attachment 264123 [details] [diff] [review]
patch, v1

>             my $requester;
>             if ($flag->status eq '?') {
>                 $requester = $flag->setter;
>+                $flag->{'requester'} = $requester;
>             }

Nit: couldn't this be simply:

            if ($flag->status eq '?') {
                $flag->{'requester'} = $flag->setter;
            }

And then use $flag->{'requester'} instead of the $requester temporary variable later in the methods.

Otherwise this looks good, although the "addressee" and "to_identity" names are unfortunate, since the "addressee" isn't the only person to receive the message (and in fact might not receive it at all if not in the group to which the message is restricted), and the person identified by "to_identity" isn't necessarily the person to whom the message is being sent.

r=myk
Attachment #264123 - Flags: review+
Status: NEW → ASSIGNED
Flags: approval3.0+
Flags: approval+
tip:

Checking in Bugzilla/Flag.pm;
/cvsroot/mozilla/webtools/bugzilla/Bugzilla/Flag.pm,v  <--  Flag.pm
new revision: 1.84; previous revision: 1.83
done
Checking in template/en/default/request/email.txt.tmpl;
/cvsroot/mozilla/webtools/bugzilla/template/en/default/request/email.txt.tmpl,v  <--  email.txt.tmpl
new revision: 1.17; previous revision: 1.16
done


3.0:

Checking in Bugzilla/Flag.pm;
/cvsroot/mozilla/webtools/bugzilla/Bugzilla/Flag.pm,v  <--  Flag.pm
new revision: 1.83.2.1; previous revision: 1.83
done
Checking in template/en/default/request/email.txt.tmpl;
/cvsroot/mozilla/webtools/bugzilla/template/en/default/request/email.txt.tmpl,v  <--  email.txt.tmpl
new revision: 1.14.2.2; previous revision: 1.14.2.1
done
Status: ASSIGNED → RESOLVED
Closed: 17 years ago
Resolution: --- → FIXED
You need to log in before you can comment on or make changes to this bug.