Closed
Bug 365302
Opened 18 years ago
Closed 17 years ago
email userprefs doesn't tell you if you are a globalwatcher
Categories
(Bugzilla :: User Accounts, defect)
Tracking
()
RESOLVED
FIXED
Bugzilla 3.0
People
(Reporter: timeless, Assigned: timeless)
References
()
Details
(Keywords: ue)
Attachments
(1 file, 2 obsolete files)
2.08 KB,
patch
|
LpSolit
:
review+
|
Details | Diff | Splinter Review |
steps: 1. log out 2. log in as timeless@gmail (or another global watcher) 3. load mail user prefs actual results: User Watching If you watch a user, it is as if you are standing in their shoes for the purposes of getting email. Email is sent or not according to your preferences for their relationship to the bug (e.g. Assignee). You are currently not watching any users. expected results: Some indication that "You are currently configured to receive mail for all bugs that you can see" (or "You are a global watcher") plus a note explaining to contact the admin if you need to be removed from this role.
not sure i like the placement, but.... oh, and i have no idea if this works :)
Updated•17 years ago
|
OS: Windows XP → All
Hardware: PC → All
Target Milestone: --- → Bugzilla 3.0
Comment 2•17 years ago
|
||
Comment on attachment 250026 [details] [diff] [review] something like this? We should have a $user->is_global_watcher() method, so that we can easily reuse it, e.g. in BugMail.pm
Attachment #250026 -
Flags: review? → review-
i can't find any way to use this in BugMail, but i'm certainly fine with a method.
Attachment #250026 -
Attachment is obsolete: true
Attachment #272750 -
Flags: review?(LpSolit)
Comment 4•17 years ago
|
||
Comment on attachment 272750 [details] [diff] [review] something like that >Index: Bugzilla/User.pm >+sub is_global_watcher { >+ my $self = shift; >+ >+ my @watchers = split /[,\s]+/, Bugzilla->params->{'globalwatchers'}; >+ my $index = grep $watchers[$_] eq $self->login, 0 .. $#watchers; >+ return $index >= 0; >+} - Add parens to split(//, foo). - Write: @foo = grep { $_ eq $self->login } @watchers; return scalar(@foo) ? 1 : 0; so that it's a bit more readable. - Cache the result in $self->{'is_global_watcher'} as we do for ->is_insider. >Index: template/en/default/account/prefs/email.html.tmpl >+ You are watching all bugs. To stop watching all bugs you will need to contact bugs -> [% terms.bugs %]
Attachment #272750 -
Flags: review?(LpSolit) → review-
Attachment #272750 -
Attachment is obsolete: true
Attachment #273071 -
Flags: review?(LpSolit)
Comment 6•17 years ago
|
||
Comment on attachment 273071 [details] [diff] [review] use term.inology >+ my @foo = grep { $_ eq $self->login } @watchers; No comment about @foo as a variable name. :) r=LpSolit for 3.0 and 3.1.
Attachment #273071 -
Flags: review?(LpSolit) → review+
Updated•17 years ago
|
Flags: approval3.0+
Flags: approval+
Comment 7•17 years ago
|
||
Comment on attachment 273071 [details] [diff] [review] use term.inology Well, I have a comment @foo is an unacceptable variable name. We're trying to make Bugzilla's code *clearer*, not unreadable. You could just do "my $is_in_array = grep". You don't even need to cache that, it's an unnecessary optimization, all it does is read Bugzilla->params.
Attachment #273071 -
Flags: review-
Comment 8•17 years ago
|
||
(In reply to comment #7) > (From update of attachment 273071 [details] [diff] [review]) > Well, I have a comment @foo is an unacceptable variable name. Max, you misunderstood my review comment. My "no comment" was clearly an incentive to change this variable name. I r+ it because I think timeless is able to do it on checkin. > You don't even need to cache that, it's an unnecessary optimization This optimization is fine and I asked him to do it. No reason to remove it.
Comment 9•17 years ago
|
||
Comment on attachment 273071 [details] [diff] [review] use term.inology Okay. As long as it's changed on checkin. The optimization is premature and useless, though.
Attachment #273071 -
Flags: review-
Comment 10•17 years ago
|
||
tip: Checking in Bugzilla/User.pm; /cvsroot/mozilla/webtools/bugzilla/Bugzilla/User.pm,v <-- User.pm new revision: 1.155; previous revision: 1.154 done 3.0: Checking in Bugzilla/User.pm; /cvsroot/mozilla/webtools/bugzilla/Bugzilla/User.pm,v <-- User.pm new revision: 1.148.2.2; previous revision: 1.148.2.1 done
Status: ASSIGNED → RESOLVED
Closed: 17 years ago
Resolution: --- → FIXED
Assignee | ||
Comment 11•17 years ago
|
||
this was the other half mozilla/webtools/bugzilla/Bugzilla/User.pm 1.154 mozilla/webtools/bugzilla/template/en/default/account/prefs/email.html.tmpl 1.29 BUGZILLA-3_0-BRANCH: mozilla/webtools/bugzilla/Bugzilla/User.pm 1.148.2.1 mozilla/webtools/bugzilla/template/en/default/account/prefs/email.html.tmpl 1.28.2.1
You need to log in
before you can comment on or make changes to this bug.
Description
•