Bug 101287 - search by commenter ANDed with other email checkboxes.
search by commenter ANDed with other email checkboxes.
Status: CLOSED CURRENTRELEASE
Product: Bugzilla
Classification: Community
Component: Bugzilla General (Show other bugs)
3.2
All Linux
medium Severity medium (vote)
: ---
: ---
Assigned To: PnT DevOps Devs
David Lawrence
:
Depends On:
Blocks:
  Show dependency treegraph
 
Reported: 2003-07-30 12:52 EDT by Mike McLean
Modified: 2013-06-23 23:01 EDT (History)
0 users

See Also:
Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Environment:
Last Closed: 2008-10-28 16:42:23 EDT
Type: ---
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---


Attachments (Terms of Use)

  None (edit)
Description Mike McLean 2003-07-30 12:52:54 EDT
If I enter my email address and select, say both the owner and reporter
checkboxes, then I will get bugs where my address is listed either place.

However, if I also check the comment box then this contraint gets ANDed instead
of ORed so I get only the subset of bugs from the first query where I am also a
commenter.

Consider bug#101256 and the following two queries:

http://bugzilla.redhat.com/bugzilla/query.cgi?query_format=&short_desc_type=substring&short_desc=updating%20rpm%20and%20beecrypt%20removes&component_text=&long_desc_type=allwordssubstr&long_desc=&bug_file_loc_type=allwordssubstr&bug_file_loc=&status_whiteboard_type=allwordssubstr&status_whiteboard=&fixed_in_type=allwordssubstr&fixed_in=&qa_whiteboard_type=allwordssubstr&qa_whiteboard=&devel_whiteboard_type=allwordssubstr&devel_whiteboard=&keywords_type=allwords&keywords=&cust_facing=&cust_facing_type=substring&emailassigned_to1=1&emailreporter1=1&emailqa_contact1=1&emailcc1=1&emailtype1=exact&email1=mikem%40redhat.com&emailreporter2=1&emailtype2=exact&email2=&bugidtype=include&bug_id=&changedin=&chfieldfrom=&chfieldto=Now&chfieldvalue=&remaction=run&namedcmd=anaconda%20modified&field0-0-0=noop&type0-0-0=noop&value0-0-0=
http://bugzilla.redhat.com/bugzilla/query.cgi?query_format=&short_desc_type=substring&short_desc=updating%20rpm%20and%20beecrypt%20removes&component_text=&long_desc_type=allwordssubstr&long_desc=&bug_file_loc_type=allwordssubstr&bug_file_loc=&status_whiteboard_type=allwordssubstr&status_whiteboard=&fixed_in_type=allwordssubstr&fixed_in=&qa_whiteboard_type=allwordssubstr&qa_whiteboard=&devel_whiteboard_type=allwordssubstr&devel_whiteboard=&keywords_type=allwords&keywords=&cust_facing=&cust_facing_type=substring&emailassigned_to1=1&emailreporter1=1&emailqa_contact1=1&emailcc1=1&emaillongdesc1=1&emailtype1=exact&email1=mikem%40redhat.com&emailreporter2=1&emailtype2=exact&email2=&bugidtype=include&bug_id=&changedin=&chfieldfrom=&chfieldto=Now&chfieldvalue=&remaction=run&namedcmd=anaconda%20modified&field0-0-0=noop&type0-0-0=noop&value0-0-0=
Comment 1 David Lawrence 2003-07-30 20:02:15 EDT
SQL Query from first link:

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 LEFT JOIN bug_group_map ON bug_group_map.bug_id = bugs.bug_id LEFT
JOIN cc ON cc.bug_id = bugs.bug_id AND cc.who = 6 LEFT JOIN cc cc_CC0 ON
bugs.bug_id = cc_CC0.bug_id AND cc_CC0.who IN(84357) LEFT JOIN profiles
map_qa_contact ON bugs.qa_contact = map_qa_contact.userid , profiles AS
map_assigned_to, profiles AS map_reporter WHERE bugs.assigned_to =
map_assigned_to.userid AND bugs.assigned_to = map_assigned_to.userid AND
bugs.reporter = map_reporter.userid AND ((map_assigned_to.login_name IN
('mikem@redhat.com')) OR (map_reporter.login_name IN ('mikem@redhat.com')) OR
(cc_CC0.who IS NOT NULL) OR (map_qa_contact.login_name IN ('mikem@redhat.com')))
AND (POSITION('updating rpm and beecrypt removes' IN LOWER(bugs.short_desc)) !=
0) AND ((bug_group_map.group_id IS NULL OR bug_group_map.group_id IN
(1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20,21,22,23,24,25,26,27,28,29,30,31,32,33,34,35,36,37,38,39,40,41,42,43,44,45,46,48,49,50,51))
OR (bugs.reporter_accessible = 1 AND bugs.reporter = 6) OR
(bugs.cclist_accessible = 1 AND cc.who IS NOT NULL) OR (bugs.assigned_to = 6) OR
(bugs.qa_contact = 6) ) GROUP BY bugs.bug_id,
bugs.bug_id,bugs.bug_severity,bugs.priority,bugs.rep_platform,map_assigned_to.login_name,bugs.bug_status,bugs.resolution,bugs.short_desc
ORDER BY bugs.bug_id asc

SQL Query from second link:

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 LEFT JOIN bug_group_map ON bug_group_map.bug_id = bugs.bug_id LEFT
JOIN cc ON cc.bug_id = bugs.bug_id AND cc.who = 6 LEFT JOIN longdescs
longdescs_email_1 ON bugs.bug_id = longdescs_email_1.bug_id AND
longdescs_email_1.who IN(84357) LEFT JOIN cc cc_CC0 ON bugs.bug_id =
cc_CC0.bug_id AND cc_CC0.who IN(84357) LEFT JOIN profiles map_qa_contact ON
bugs.qa_contact = map_qa_contact.userid , profiles AS map_assigned_to, profiles
AS map_reporter WHERE bugs.assigned_to = map_assigned_to.userid AND
longdescs_email_1.who IS NOT NULL AND bugs.assigned_to = map_assigned_to.userid
AND bugs.reporter = map_reporter.userid AND ((map_assigned_to.login_name IN
('mikem@redhat.com')) OR (map_reporter.login_name IN ('mikem@redhat.com')) OR
(cc_CC0.who IS NOT NULL) OR (map_qa_contact.login_name IN ('mikem@redhat.com')))
AND (POSITION('updating rpm and beecrypt removes' IN LOWER(bugs.short_desc)) !=
0) AND ((bug_group_map.group_id IS NULL OR bug_group_map.group_id IN
(1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20,21,22,23,24,25,26,27,28,29,30,31,32,33,34,35,36,37,38,39,40,41,42,43,44,45,46,48,49,50,51))
OR (bugs.reporter_accessible = 1 AND bugs.reporter = 6) OR
(bugs.cclist_accessible = 1 AND cc.who IS NOT NULL) OR (bugs.assigned_to = 6) OR
(bugs.qa_contact = 6) ) GROUP BY bugs.bug_id,
bugs.bug_id,bugs.bug_severity,bugs.priority,bugs.rep_platform,map_assigned_to.login_name,bugs.bug_status,bugs.resolution,bugs.short_desc
ORDER BY bugs.bug_id asc

Comment 2 David Lawrence 2003-07-30 20:12:25 EDT
The way it is "supposed" to work is everything in the first column of the email
options is OR'ed together and then it is AND'ed with whatever is selected in the
second column. It seems that that is the case if the commenter field is not
selected. But when the commenter field is, then it adds an additional JOIN to
the query which essentially makes it an AND in the first column.

LEFT JOIN longdescs
longdescs_email_1 ON bugs.bug_id = longdescs_email_1.bug_id AND
longdescs_email_1.who IN (84357)

because it is lacking an IS NOT NULL in the extra criteria similar to the way
the CC table is handled. Ex: OR (cc_CC0.who IS NOT NULL).

I think if I add an OR (longdescs_email_1.who IS NOT NULL) in then the proper
behaviour can happen.
Comment 3 David Lawrence 2006-04-08 14:00:40 EDT
Red Hat's current Bugzilla version is 2.18. I am moving all older open bugs to
this version. Any bugs against the older versions will need to be verified that
they are still bugs. This will help me also to sort them better.
Comment 4 Mike McLean 2008-08-20 17:46:26 EDT
This appears to be fixed in current bugzilla.
Comment 5 David Lawrence 2008-09-16 12:50:04 EDT
Red Hat Bugzilla is now using version 3.2 of the Bugzilla codebase and therefore this bug will need to be re-verified against the new release. With the updated code this bug may no longer be relevant or may have been fixed in the new code.
Updating bug version to 3.2.

Note You need to log in before you can comment on or make changes to this bug.