Fix for bug 71808: Can't set email preferences for voters (which caused voters…

Fix for bug 71808: Can't set email preferences for voters (which caused voters to get OldEmailTech notifications. Patch by jake@acutex.net r= justdave
parent d041005e
...@@ -51,6 +51,7 @@ my %force; ...@@ -51,6 +51,7 @@ my %force;
@{$force{'Owner'}} = (); @{$force{'Owner'}} = ();
@{$force{'Reporter'}} = (); @{$force{'Reporter'}} = ();
@{$force{'CClist'}} = (); @{$force{'CClist'}} = ();
@{$force{'Voter'}} = ();
sub Lock { sub Lock {
if ($::lockcount <= 0) { if ($::lockcount <= 0) {
...@@ -515,8 +516,11 @@ sub NewProcessOneBug { ...@@ -515,8 +516,11 @@ sub NewProcessOneBug {
@ccList = filterEmailGroup('CClist', \@currentEmailAttributes, @ccList = filterEmailGroup('CClist', \@currentEmailAttributes,
$values{'cc'}); $values{'cc'});
@voterlist = filterEmailGroup('Voter', \@currentEmailAttributes,
join(',',@voterlist));
my @emailList = (@assigned_toList, @reporterList, my @emailList = (@assigned_toList, @reporterList,
@qa_contactList, @ccList); @qa_contactList, @ccList, @voterlist);
# only need one entry per person # only need one entry per person
my @allEmail = (); my @allEmail = ();
...@@ -823,6 +827,16 @@ sub filterEmailGroup ($$$) { ...@@ -823,6 +827,16 @@ sub filterEmailGroup ($$$) {
my $matchName = 'email' . $emailGroup . $attribute; my $matchName = 'email' . $emailGroup . $attribute;
# **** Kludge... quick and dirty fix for 2.12
# http://bugzilla.mozilla.org/show_bug.cgi?id=73665
# If this pref is new (it's been added since this user
# last updated their filtering prefs, $userFlags{$matchName}
# will be undefined. This should be considered a match
# so that new prefs will default to 'on'
if (!defined($userFlags{$matchName})) {
$detectedOn = 1;
}
while ((my $flagName, my $flagValue) = each %userFlags) { while ((my $flagName, my $flagValue) = each %userFlags) {
if ($flagName !~ /$emailGroup/) { if ($flagName !~ /$emailGroup/) {
......
...@@ -45,7 +45,8 @@ my @emailGroups = ( ...@@ -45,7 +45,8 @@ my @emailGroups = (
'Owner', 'the Bug Owner', 'Owner', 'the Bug Owner',
'Reporter', 'the Reporter', 'Reporter', 'the Reporter',
'QAcontact', 'the QA contact', 'QAcontact', 'the QA contact',
'CClist', 'on the CC list' 'CClist', 'on the CC list',
'Voter', 'a Voter'
); );
my @emailFlags = ( my @emailFlags = (
...@@ -95,8 +96,16 @@ my $defaultEmailFlagString = ...@@ -95,8 +96,16 @@ my $defaultEmailFlagString =
'emailCClistResolved~' . 'on~' . 'emailCClistResolved~' . 'on~' .
'emailCClistKeywords~' . 'on~' . 'emailCClistKeywords~' . 'on~' .
'emailCClistCC~' . 'on~' . 'emailCClistCC~' . 'on~' .
'emailCClistOther~' . 'on' ; 'emailCClistOther~' . 'on~' .
'emailVoterRemoveme~' . 'on~' .
'emailVoterComments~' . 'on~' .
'emailVoterAttachemnts~' . 'on~' .
'emailVoterStatus~' . 'on~' .
'emailVoterResolved~' . 'on~' .
'emailVoterKeywords~' . 'on~' .
'emailVoterCC~' . 'on~' .
'emailVoterOther~' . 'on' ;
sub EmitEntry { sub EmitEntry {
my ($description, $entry) = (@_); my ($description, $entry) = (@_);
...@@ -409,6 +418,11 @@ sub printEmailOption ($$\%) { ...@@ -409,6 +418,11 @@ sub printEmailOption ($$\%) {
$value = 'CHECKED'; $value = 'CHECKED';
} }
# **** Kludge ... also mark on if the value in $$refCurrentFlags in undef
if (!defined($$refCurrentFlags{"email$optionName"})) {
$value = 'CHECKED';
}
print qq{ print qq{
<tr><td width=320></td> <tr><td width=320></td>
<td><input type="checkbox" name="email$optionName" VALUE="on" $value> <td><input type="checkbox" name="email$optionName" VALUE="on" $value>
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment