Bug 103743 - Search using OtherBugsDependOn doesn't work
Search using OtherBugsDependOn doesn't work
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-09-04 11:20 EDT by Richard Li
Modified: 2013-06-23 23:04 EDT (History)
1 user (show)

See Also:
Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Environment:
Last Closed: 2008-11-24 15:32:34 EST
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 Richard Li 2003-09-04 11:20:08 EDT
> I'm trying to run a query in Bugzilla that gets me all the bugs that do 
> not block any bug (this is because we use a lot of blocker bugs and if 
> something isn't listed against a blocker, it doesn't get done).
> 
> I tried setting OtherBugsDependOnThis to "is null" in the boolean query 
> but this returns zero bugs (and visual inspection of bugs shows that it 
> should return more than zero.)
> 
> Strangely, setting it to "is not null" returns correctly (it returns 36 
> bugs).
> 
> Removing the field altogether returns 63 bugs for my query.

The URL query being run when it is null is:

https://bugzilla.redhat.com/bugzilla/buglist.cgi?query_format=&short_desc_type=allwordssubstr&short_desc=&product=Feature+Tracker&component=RHE_CMS&component=RHE_COLLAB&component=RHE_CORE&component=RHE_PORTAL&component_text=&bug_status=ASSIGNED&bug_status=NEW&bug_status=REOPENED&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=&keywords_type=allwords&keywords=&cust_facing=&cust_facing_type=substring&emailassigned_to1=1&emailtype1=exact&email1=&emailreporter2=1&emailtype2=exact&email2=&bugidtype=include&bug_id=&changedin=&chfieldfrom=&chfieldto=Now&chfieldvalue=&cmdtype=doit&order=Reuse+same+sort+as+last+time&field0-0-0=blocked&type0-0-0=isnull&value0-0-0=

The query is:

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 = 91949 , profiles AS
map_assigned_to, dependencies blocked_0 

WHERE bugs.assigned_to = map_assigned_to.userid AND blocked_0.dependson =
bugs.bug_id AND (bugs.product_id IN (39)) AND (bugs.component_id IN
(9331,9333,9330,9332)) AND (bugs.bug_status IN ('ASSIGNED','NEW','REOPENED'))
AND (blocked_0.blocked IS NULL) AND ((bug_group_map.group_id IS NULL OR
bug_group_map.group_id IN (7,8,15,17,22,25,33,35,38,39,41,44)) OR
(bugs.reporter_accessible = 1 AND bugs.reporter = 91949) OR
(bugs.cclist_accessible = 1 AND cc.who IS NOT NULL) OR (bugs.assigned_to =
91949) OR (bugs.qa_contact = 91949) ) 

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 1 Richard Li 2003-09-04 11:22:54 EDT
This is the query that does work (OtherBugsDependOn is not null):

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 = 91949 , profiles AS
map_assigned_to, dependencies blocked_0 WHERE bugs.assigned_to =
map_assigned_to.userid AND blocked_0.dependson = bugs.bug_id AND
(bugs.product_id IN (39)) AND (bugs.component_id IN (9331,9333,9330,9332)) AND
(bugs.bug_status IN ('ASSIGNED','NEW','REOPENED')) AND (blocked_0.blocked IS NOT
NULL) AND ((bug_group_map.group_id IS NULL OR bug_group_map.group_id IN
(7,8,15,17,22,25,33,35,38,39,41,44)) OR (bugs.reporter_accessible = 1 AND
bugs.reporter = 91949) OR (bugs.cclist_accessible = 1 AND cc.who IS NOT NULL) OR
(bugs.assigned_to = 91949) OR (bugs.qa_contact = 91949) ) 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

The two queries seem pretty correct to me. Perhaps this is an empty string v
null bug?
Comment 2 David Lawrence 2003-09-04 11:47:54 EDT
I think it is missing a LEFT JOIN so that it returns bugs if there does not
exist an entry in the dependencies table. I will look at the Bugzilla/Search.pm
module and see what is going on here. IS NULL and IS NOT NULL were added by me
and is not  part of the default Bugzilla code base. It was put in originally for
searching for bugs that were not private or were private and seems to work fine
for those but not everything else.
Comment 3 David Lawrence 2006-04-08 14:13:48 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 David Lawrence 2008-09-16 12:50:20 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.