Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

How do I query for a flag NOT set? Or ANY field not populated?

1 view
Skip to first unread message

Christopher Randall

unread,
Nov 12, 2003, 11:07:07 AM11/12/03
to
I am using Bugzilla version 2.17.4 and need to know
how to query for bugs where a flag is NOT set.

I was able to set up a query to get bugs where a
particular flag WAS set by putting "Flag" in the left
column, "contains the string" in the middle column,
and "flagname+" in the right column of a boolean chart
under the "Advanced Querying Using Boolean Charts"
section of the query page. But, what I really want to
do be able to determine if a particular flag is NOT
set.

Related to this, how can I test if ANY field is
blank/null/not set?

Joel Peshkin

unread,
Nov 12, 2003, 12:53:12 PM11/12/03
to

You can match NULL values by making the following change to the
boolean charts.....

===================================================================
RCS file: /cvsroot/mozilla/webtools/bugzilla/Bugzilla/Search.pm,v
retrieving revision 1.40
diff -u -r1.40 Search.pm
--- Bugzilla/Search.pm 3 May 2003 03:21:41 -0000 1.40
+++ Bugzilla/Search.pm 8 May 2003 22:24:08 -0000
@@ -604,6 +604,9 @@
",equals" => sub {
$term = "$ff = $q";
},
+ ",isnull" => sub {
+ $term = "($ff IS NULL)";
+ },
",notequals" => sub {
$term = "$ff != $q";
},
Index: template/en/default/search/boolean-charts.html.tmpl
===================================================================
RCS file:
/cvsroot/mozilla/webtools/bugzilla/template/en/default/search/boolean-charts.html.tmpl,v
retrieving revision 1.5
diff -u -r1.5 boolean-charts.html.tmpl
--- template/en/default/search/boolean-charts.html.tmpl 8 Mar 2003
05:47:58 -0000 1.5
+++ template/en/default/search/boolean-charts.html.tmpl 8 May 2003
22:24:09 -0000
@@ -36,6 +36,7 @@
{ name => "anywords", description => "contains any of the words" },
{ name => "allwords", description => "contains all of the words" },
{ name => "nowords", description => "contains none of the words" },
+ { name => "isnull", description => "is NULL" },
{ name => "changedbefore", description => "changed before" },
{ name => "changedafter", description => "changed after" },
{ name => "changedfrom", description => "changed from" },

Gervase Markham

unread,
Nov 13, 2003, 4:29:19 AM11/13/03
to
Joel Peshkin wrote:

> You can match NULL values by making the following change to the
> boolean charts.....

That sounds like a good feature to add. Can you file a bug, Joel? I'll
review.

Gerv

0 new messages