View | Details | Raw Unified | Return to bug 267349
Collapse All | Expand All

(-)b/Bugzilla/BugMail.pm (-1 / +7 lines)
Lines 264-271 sub Send { Link Here
264
                $dep_ok = $user->can_see_bug($params->{blocker}->id) ? 1 : 0;
264
                $dep_ok = $user->can_see_bug($params->{blocker}->id) ? 1 : 0;
265
            }
265
            }
266
266
267
            # suppress mail
268
            my $suppress_group = Bugzilla->params->{suppressmailgroup};
269
            my $suppress_mail = ($suppress_group
270
                && Bugzilla->user->in_group($suppress_group)
271
                && Bugzilla->input_params->{suppress_mail});
272
267
            # Email the user if the dep check passed.
273
            # Email the user if the dep check passed.
268
            if ($dep_ok) {
274
            if ($dep_ok && !$suppress_mail) {
269
                my $sent_mail = sendMail(
275
                my $sent_mail = sendMail(
270
                    { to              => $user, 
276
                    { to              => $user, 
271
                      bug             => $bug,
277
                      bug             => $bug,
(-)b/Bugzilla/Config/GroupSecurity.pm (+8 lines)
Lines 90-95 sub get_param_list { Link Here
90
   name => 'or_groups',
90
   name => 'or_groups',
91
   type => 'b',
91
   type => 'b',
92
   default => 0
92
   default => 0
93
  },
94
95
  {
96
   name => 'suppressmailgroup',
97
   type => 's',
98
   choices => \&_get_all_group_names,
99
   default => 'admin',
100
   checker => \&check_group
93
  } );
101
  } );
94
  return @param_list;
102
  return @param_list;
95
}
103
}
(-)b/template/en/default/admin/groups/list.html.tmpl (-1 / +2 lines)
Lines 76-82 Link Here
76
%]
76
%]
77
77
78
[% FOREACH group IN ["chartgroup", "comment_taggers_group", "debug_group",
78
[% FOREACH group IN ["chartgroup", "comment_taggers_group", "debug_group",
79
                     "insidergroup", "querysharegroup", "timetrackinggroup"] %]
79
                     "insidergroup", "querysharegroup", "timetrackinggroup",
80
                     "suppressmailgroup"] %]
80
  [% special_group = Param(group) %]
81
  [% special_group = Param(group) %]
81
82
82
  [% IF special_group %]
83
  [% IF special_group %]
(-)b/template/en/default/admin/params/groupsecurity.html.tmpl (-1 / +5 lines)
Lines 51-56 Link Here
51
              "view it. If it is off, a user needs to be a member of all " _
51
              "view it. If it is off, a user needs to be a member of all " _
52
              "the $terms.bug's groups. Note that in either case, if the " _
52
              "the $terms.bug's groups. Note that in either case, if the " _
53
              "user has a role on the $terms.bug (e.g. reporter) that may " _
53
              "user has a role on the $terms.bug (e.g. reporter) that may " _
54
              "also affect their permissions."
54
              "also affect their permissions.",
55
56
  suppressmailgroup => "The name of the group of users who can suppress mail " _
57
                 "sending when editing bugs. Set blank, to disable mail suppressing " _
58
                 "option from all.",
55
 }
59
 }
56
%]
60
%]
(-)b/template/en/default/bug/edit.html.tmpl (+5 lines)
Lines 1247-1252 Link Here
1247
    <div class="knob-buttons">
1247
    <div class="knob-buttons">
1248
      <input type="submit" value="Save Changes" 
1248
      <input type="submit" value="Save Changes" 
1249
             id="commit[% id FILTER css_class_quote %]">
1249
             id="commit[% id FILTER css_class_quote %]">
1250
      [% IF user.in_group(Param('suppressmailgroup')) %]
1251
      <br><input type="checkbox" name="suppress_mail" value="1">
1252
      <label style="font-size: small; font-weight: normal;"
1253
             for="suppress_mail">Suppress mail</label>
1254
      [% END %]
1250
    </div>
1255
    </div>
1251
  [% END %]
1256
  [% END %]
1252
[% END %]
1257
[% END %]
(-)b/template/en/default/list/edit-multiple.html.tmpl (+4 lines)
Lines 389-394 Link Here
389
[%+ Hook.process('after_groups') %]
389
[%+ Hook.process('after_groups') %]
390
390
391
<input type="submit" id="commit" value="Commit">
391
<input type="submit" id="commit" value="Commit">
392
[% IF user.in_group(Param('suppressmailgroup')) %]
393
<input type="checkbox" name="suppress_mail" value="1">
394
<label for="suppress_mail">Suppress mail</label>
395
[% END %]
392
396
393
[%############################################################################%]
397
[%############################################################################%]
394
[%# Select Menu Block                                                        #%]
398
[%# Select Menu Block                                                        #%]

Return to bug 267349