Using boolean charts operators like "not equals" or "nowords" with flags does not return bugs that entirely lack flags

RESOLVED FIXED in Bugzilla 4.2



Query/Bug List
14 years ago
7 years ago


(Reporter: Vlad Dascalu, Assigned: Max Kanat-Alexander)


Bugzilla 4.2
Dependency tree / graph
Bug Flags:
approval +
blocking2.20 -
blocking2.18 -



(1 attachment)

8.44 KB, patch
Max Kanat-Alexander
: review+
Details | Diff | Splinter Review


14 years ago
If you search for bugs containing "editgroups.cgi" in the summary, you get a
fairly decent list, including bug 190222:

However, if we add to that query the boolean condition: "Flag is not equal to
approval?", the result list doesn't include anymore bug 190222:

At the moment, bug 190222 doesn't have the approval flag set (but that might
change in the future).

Comment 1

14 years ago
We might want this for 2.18. Or not.
Flags: blocking2.18?
The bug in question didn't have any other flags set either.  So there were no
flags on that bug that weren't equal to approval? :)  Funny how that logic
works, ain't it?

I could swear up and down this was a dupe, but I'll be damned if I can find the
original.  I know it's been discussed a lot before. :)  I think there's an INNER
JOIN (implicit with a comma perhaps) somewhere that should be a LEFT JOIN.

We've had the same problem for ages with searching for anything related to
attachments, though, so this is nothing new.  Not worth holding 2.18 for, but
I'll probably take it if it's fixed before then.
Depends on: 171553
Flags: blocking2.18? → blocking2.18-

Comment 3

13 years ago
Can't this be a dup of bug 275523? Can you re-test it?
setting blocking2.20 to make sure this gets dealt with.  Fixing dependency so
it's the correct direction.

If this is still reproducible, I'll call it a 2.20 blocker now.  If it isn't, it
needs to get duped to bug 275523.
Blocks: 171553
No longer depends on: 171553
Flags: blocking2.20+
Reassigning bugs that I'm not actively working on to the default component owner
in order to try to make some sanity out of my personal buglist.  This doesn't
mean the bug isn't being dealt with, just that I'm not the one doing it.  If you
are dealing with this bug, please assign it to yourself.
Assignee: justdave → query-and-buglist
QA Contact: mattyt-bugzilla → default-qa

Comment 6

13 years ago
The flag code in does still need to be fixed.  Its logic is just plain
wrong.  When we do fix it, saved queries with boolean searches on flags will break.

"If it's not a regression from 2.18 and it's not a critical problem with
something that's already landed, let's push it off." - Dave
Severity: blocker → major
Flags: blocking2.20+
Whiteboard: [wanted for 2.20]
Flags: blocking2.20-

Comment 8

13 years ago
Against, 2.18, the funcdef for pushes the wrong thing onto
@having in the m/not/ case.

It should do:
 push(@having, "(allflags_$chartid = matchingflags_$chartid or allflags_$chartid
= 0)");
but currently it does
 push(@having, "(allflags_$chartid = matchingflags_$chartid)");

Making this change allows bugs with no flags to be returned where the type
contains not.

Comment 9

13 years ago
I love the current subject for this bug.

Can I ask:  This bug is about boolean searching with "not equal" (etc) not
returning bugs with no flags set at all?

Would "Boolean search for flags ignores bugs with no flags" be an appropriate
subject, or should I file a new bug?

Comment 10

13 years ago
That would be one manifestation of this bug (so another bug would be a dupe). 
There would be many.

Essentially, now that the boolean charts work, the flags, which had their own
band-aid, need to adopt the more general solution.

Comment 11

13 years ago
*** Bug 310281 has been marked as a duplicate of this bug. ***


12 years ago
Target Milestone: --- → Bugzilla 2.20

Comment 12

12 years ago
Only security and dataloss fixes will be accepted on the 2.20 branch.
Severity: major → normal
Whiteboard: [wanted for 2.20]
Target Milestone: Bugzilla 2.20 → Bugzilla 2.22


11 years ago
Duplicate of this bug: 320717


11 years ago
Target Milestone: Bugzilla 2.22 → Bugzilla 3.0


10 years ago
Duplicate of this bug: 434064

Comment 15

10 years ago
target milestone is still set at 3.0 so I'm wondering if this missed being reprioritized in the bug reviews? 

it's rather a nasty bug.  does it figure in anywhere in the 4.x time frame?

Comment 16

10 years ago
Yeah, that's too late for 3.0, and nobody is working on this code these days. removing the milestone.
Target Milestone: Bugzilla 3.0 → ---


9 years ago
Duplicate of this bug: 491802


9 years ago
Duplicate of this bug: 519484


8 years ago
Duplicate of this bug: 533212


8 years ago
Priority: -- → P1
Target Milestone: --- → Bugzilla 3.8


7 years ago
Summary: Boolean flag-based query screwed → Using boolean charts operators like "not equals" or "nowords" with flags does not return bugs that entirely lack flags
Target Milestone: Bugzilla 4.0 → Bugzilla 4.2


7 years ago
Assignee: query-and-buglist → mkanat

Comment 20

7 years ago
Created attachment 516696 [details] [diff] [review]

This makes work with all the boolean chart operators.
Attachment #516696 - Flags: review+


7 years ago
Flags: approval+

Comment 21

7 years ago
For those wondering, this is heavily dependent upon some refactoring that was done on the trunk, so it is very unlikely to be backported to 4.0.

Committing to: bzr+ssh://
modified Bugzilla/
modified xt/lib/Bugzilla/Test/Search/
modified xt/lib/Bugzilla/Test/Search/
Committed revision 7740.
Last Resolved: 7 years ago
Resolution: --- → FIXED


7 years ago
Blocks: 181396
You need to log in before you can comment on or make changes to this bug.