Bug 1205491

Summary: [Regression] Searching for null/not-null on Clone Of field does not work correctly
Product: [Community] Bugzilla Reporter: Jason McDonald <jmcdonal>
Component: Query/Bug ListAssignee: Matt Tyson 🤬 <mtyson>
Status: CLOSED CURRENTRELEASE QA Contact: tools-bugs <tools-bugs>
Severity: high Docs Contact:
Priority: high    
Version: 4.4CC: jmcdonal, mtyson, qgong
Target Milestone: 4.4   
Target Release: ---   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: 4.4.8030-5 Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2015-04-13 00:46:04 UTC Type: Bug
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:

Description Jason McDonald 2015-03-25 03:15:24 UTC
Description of problem:
It appears that the changes made for Bug 1174586 introduced a regression where searches for "Clone Of is null" and "Clone Of is not null" do not work correctly.

Additionally, it appears that bugs created prior to 2013-10-03 have a zero value for Clone Of if a bug is not a clone, while bugs created after that date have NULL instead.  The latter is correct.  I suspect that the zero values were introduced by the changes for Bug 1000132, which were released in Bugzilla 4.4.0009.

Version-Release number of selected component (if applicable):
4.4.6029

How reproducible:
Always

Steps to Reproduce:
Attempt to search for RHEL6 bugs that were cloned from other bugs (i.e. "Clone Of is not NULL") -- for example: https://bugzilla.redhat.com/buglist.cgi?classification=Red%20Hat&columnlist=bug_status%2Cbug_severity%2Cpriority%2Cversion%2Cshort_desc%2Cblocks_all%2Ccf_clone_of&f1=cf_clone_of&o1=isnotnull&product=Red%20Hat%20Enterprise%20Linux%206

Actual results:
Most of the returned bugs have an empty Clone Of value.

Expected results:
All bugs returned should have a non-empty Clone Of value.

Additional info:
none

Comment 3 Jason McDonald 2015-03-25 03:35:25 UTC
This bug can be worked around by searching for "Clone of is equal to 0" instead of "is null" or "Clone Of is not equal to 0" instead of "is not null".

Comment 4 Matt Tyson 🤬 2015-03-25 23:29:57 UTC
I've ripped out our old 'is null' and 'is not null' search terms and backported the Bugzilla 5 search code.

The new terms will be 'is empty' and 'is not empty'.

I've also added a small compatibility layer which will cause the old is null type queries to silently use the new search code.

This will address the searching problems.


We will probably need to update the existing cf_clone_of values to be NULL.  This can be done in the script for bug 1201150

Comment 5 Rony Gong 🔥 2015-03-26 13:44:05 UTC
QE added cases to cover this bug.
Verified on 
QA environment(bzweb01-qe) with version(4.4.8030-3, DB: mysql)
QA environment(bzperfweb01.app.qa) with version(4.4.8030-3, DB: psql)
Result: Pass

Comment 6 Matt Tyson 🤬 2015-04-13 00:46:04 UTC
This change is now live. If there are any issues, do not reopen this bug.
Instead, you should create a new bug and reference this bug.