Closed
Bug 180980
Opened 21 years ago
Closed 21 years ago
Doing 2 email searches fails when searching for CC list members
Categories
(Bugzilla :: Query/Bug List, defect, P1)
Tracking
()
RESOLVED
FIXED
Bugzilla 2.18
People
(Reporter: bryner, Assigned: bugreport)
References
Details
(Keywords: regression)
Attachments
(1 file, 2 obsolete files)
2.67 KB,
patch
|
myk
:
review+
|
Details | Diff | Splinter Review |
Steps to reproduce: Fill out both parts of the email search field as follows: Search 1: Bug Reporter or CC list member is <user1> Search 2: Bug Reporter or CC list member is <user2> Submit the query. Results: Software error: SELECT bugs.bug_id, bugs.bug_severity, bugs.priority, bugs.rep_platform, map_assigned_to.login_name, bugs.bug_status, bugs.resolution, bugs.short_desc FROM bugs, profiles AS map_assigned_to LEFT JOIN cc cc_ ON bugs.bug_id = cc_.bug_id AND cc_.who IN(4346) LEFT JOIN cc cc_ ON bugs.bug_id = cc_.bug_id AND cc_.who IN(15991) LEFT JOIN bug_group_map ON bug_group_map.bug_id = bugs.bug_id WHERE bugs.assigned_to = map_assigned_to.userid AND bugs.assigned_to = map_assigned_to.userid AND bugs.assigned_to = map_assigned_to.userid AND (bugs.bug_status IN ('NEW','ASSIGNED','REOPENED')) AND ((map_assigned_to.login_name IN ('tao@netscape.com')) OR (cc_.who IS NOT NULL)) AND ((map_assigned_to.login_name IN ('bryner@netscape.com')) OR (cc_.who IS NOT NULL)) AND ((bug_group_map.group_id IS NULL)) GROUP BY bugs.bug_id ORDER BY bugs.bug_id : Not unique table/alias: 'cc_' at globals.pl line 283.
Comment 1•21 years ago
|
||
Now that we pull the list emails stuff out, we need to do more than one table join, using all three digits from the boolean bits fot the tbale identifier. Bleh.
Keywords: regression
Assignee | ||
Comment 2•21 years ago
|
||
This is a bit of a hack, but this will keep CC joins from using the null $chartid value over and over.
Assignee | ||
Comment 3•21 years ago
|
||
myk has this as a the last 2.17.1 blocker, so I'll fix it.
Assignee: endico → bugreport
Priority: -- → P1
Target Milestone: --- → Bugzilla 2.18
Assignee | ||
Updated•21 years ago
|
Attachment #107016 -
Flags: review?(myk)
Comment 4•21 years ago
|
||
I wonder if this ever worked. On my test install of the last version of Bugzilla, the query does, f.e. "(map_cc_.login_name = 'myk@mozilla.org') AND (map_cc_.login_name = 'asa@mozilla.org')", which of course returns no results.
Comment 5•21 years ago
|
||
myk: Those two things in query.cgi are ANDed not OR'd. However, it should still be possible to serach on them taht way - bryner's search will return results.
Comment 6•21 years ago
|
||
Comment on attachment 107016 [details] [diff] [review] Patch >Index: Bugzilla/Search.pm >+ my $xtra; >+ $xtra = $chartid; >+ if ($chartid eq "") { >+ $xtra = "A$extraid"; >+ $extraid++; >+ } The "chartid" variable is declared without being defined on line 289, so comparing it to the empty string could fail in some cases. It would be better to compare it for boolean trueness (i.e. "if ($chartid) {") Nit: "extra" and "xtra" could be more clearly named, although I'm not sure what the best name would be. The only thing I can think of is "occurrence", but that's too long and cumbersome. Nit: "A" would be clearer and more future-proof as "cc". Fix the first problem and (optionally) fix the nits, and I'll grant it review.
Attachment #107016 -
Flags: review?(myk) → review-
Assignee | ||
Comment 7•21 years ago
|
||
OK, myk's items covered
Attachment #107016 -
Attachment is obsolete: true
Assignee | ||
Updated•21 years ago
|
Attachment #107102 -
Flags: review?(myk)
Comment 8•21 years ago
|
||
Comment on attachment 107102 [details] [diff] [review] patch v2 >Index: Bugzilla/Search.pm >+ if ($chartid) { Hmm, sorry, it turns out I was wrong in advising you to change this conditional. It really should be '$chartid eq ""'. Fix that, and r=myk
Attachment #107102 -
Flags: review?(myk) → review-
Assignee | ||
Updated•21 years ago
|
Status: NEW → ASSIGNED
Flags: approval?
Assignee | ||
Comment 9•21 years ago
|
||
Attachment #107102 -
Attachment is obsolete: true
Updated•21 years ago
|
Attachment #107104 -
Flags: review+
Updated•21 years ago
|
Flags: approval? → approval+
Assignee | ||
Comment 10•21 years ago
|
||
Checking in Bugzilla/Search.pm; /cvsroot/mozilla/webtools/bugzilla/Bugzilla/Search.pm,v <-- Search.pm new revision: 1.37; previous revision: 1.36 done
Status: ASSIGNED → RESOLVED
Closed: 21 years ago
Resolution: --- → FIXED
Comment 11•21 years ago
|
||
*** Bug 191338 has been marked as a duplicate of this bug. ***
Comment 12•20 years ago
|
||
*** Bug 217426 has been marked as a duplicate of this bug. ***
Comment 13•20 years ago
|
||
*** Bug 217071 has been marked as a duplicate of this bug. ***
Updated•11 years ago
|
QA Contact: matty_is_a_geek → default-qa
You need to log in
before you can comment on or make changes to this bug.
Description
•