Closed
Bug 309896
Opened 19 years ago
Closed 19 years ago
The "Saved searches" tab in User Prefs can report incorrect information
Categories
(Bugzilla :: Query/Bug List, defect)
Tracking
()
RESOLVED
FIXED
Bugzilla 2.20
People
(Reporter: LpSolit, Assigned: karl)
References
()
Details
Attachments
(1 file, 1 obsolete file)
|
1.57 KB,
patch
|
LpSolit
:
review+
|
Details | Diff | Splinter Review |
If one of your saved searches has the same name as one of another user's saved
search, and that user uses this query for a whine, the Saved Search tab in User
Prefs says that *you* use it!?!
The culprit is User::queries which doesn't check the user ID:
my $sth = $dbh->prepare(q{ SELECT
DISTINCT name, query, linkinfooter,
CASE WHEN whine_queries.id
IS NOT NULL THEN 1 ELSE 0 END,
UPPER(name) AS uppername
FROM namedqueries
LEFT JOIN whine_queries
ON whine_queries.query_name = name
WHERE userid=?
ORDER BY uppername});
It should check that the whine is from the current user.| Reporter | ||
Updated•19 years ago
|
Target Milestone: --- → Bugzilla 2.20
| Reporter | ||
Updated•19 years ago
|
Assignee: query-and-buglist → karl
| Assignee | ||
Comment 1•19 years ago
|
||
A relatively simple patch, this includes a join with whine_events to get the creator userid of the whine. We then return 1 only if whine_queries.id is not null AND the userids match.
| Assignee | ||
Updated•19 years ago
|
Attachment #197283 -
Flags: review?(LpSolit)
| Assignee | ||
Updated•19 years ago
|
Status: NEW → ASSIGNED
| Reporter | ||
Comment 2•19 years ago
|
||
Comment on attachment 197283 [details] [diff] [review] Patch v1 >Index: User.pm >- CASE WHEN whine_queries.id >- IS NOT NULL THEN 1 ELSE 0 END, >+ CASE WHEN whine_queries.id IS NOT NULL >+ AND whine_events.owner_userid = userid This last line should not be here as it's already in the FROM clause. >+ THEN 1 ELSE 0 END, > UPPER(name) AS uppername > FROM namedqueries > LEFT JOIN whine_queries > ON whine_queries.query_name = name >+ LEFT JOIN whine_events >+ ON whine_events.owner_userid = userid You forgot to link the whine_events and whine_queries tables.
Attachment #197283 -
Flags: review?(LpSolit) → review-
| Assignee | ||
Updated•19 years ago
|
Attachment #197283 -
Attachment is obsolete: true
Attachment #197292 -
Flags: review?(LpSolit)
| Reporter | ||
Comment 4•19 years ago
|
||
Comment on attachment 197292 [details] [diff] [review] Patch v2 r=LpSolit
Attachment #197292 -
Flags: review?(LpSolit) → review+
| Reporter | ||
Updated•19 years ago
|
Flags: approval?
Flags: approval2.20?
Updated•19 years ago
|
Flags: approval?
Flags: approval2.20?
Flags: approval2.20+
Flags: approval+
| Reporter | ||
Comment 5•19 years ago
|
||
tip: Checking in Bugzilla/User.pm; /cvsroot/mozilla/webtools/bugzilla/Bugzilla/User.pm,v <-- User.pm new revision: 1.84; previous revision: 1.83 done 2.20rc2: Checking in Bugzilla/User.pm; /cvsroot/mozilla/webtools/bugzilla/Bugzilla/User.pm,v <-- User.pm new revision: 1.61.2.9; previous revision: 1.61.2.8 done
Status: ASSIGNED → RESOLVED
Closed: 19 years ago
Resolution: --- → FIXED
You need to log in
before you can comment on or make changes to this bug.
Description
•