summaryrefslogtreecommitdiffstats
path: root/Bugzilla
diff options
context:
space:
mode:
authorlpsolit%gmail.com <>2005-10-26 02:55:02 +0200
committerlpsolit%gmail.com <>2005-10-26 02:55:02 +0200
commit383e47ca9ec03a821519474555408c6e78152a7c (patch)
treeb6b6da25c8d014f00ea3a02132663a021b6ebe87 /Bugzilla
parent44de29d04d1ca7e3b047b2a847508dc949c29038 (diff)
downloadbugzilla-383e47ca9ec03a821519474555408c6e78152a7c.tar.gz
bugzilla-383e47ca9ec03a821519474555408c6e78152a7c.tar.xz
Bug 313020: Implement the ability to add individual bugs to saved searches - Patch by Frédéric Buclin <LpSolit@gmail.com> r=joel a=justdave
Diffstat (limited to 'Bugzilla')
-rw-r--r--Bugzilla/Constants.pm7
-rw-r--r--Bugzilla/DB/Schema.pm1
-rw-r--r--Bugzilla/User.pm5
3 files changed, 11 insertions, 2 deletions
diff --git a/Bugzilla/Constants.pm b/Bugzilla/Constants.pm
index 078c988b6..795f0096b 100644
--- a/Bugzilla/Constants.pm
+++ b/Bugzilla/Constants.pm
@@ -65,6 +65,9 @@ use base qw(Exporter);
DEFAULT_COLUMN_LIST
DEFAULT_QUERY_NAME
+ QUERY_LIST
+ LIST_OF_BUGS
+
COMMENT_COLS
UNLOCK_ABORT
@@ -173,6 +176,10 @@ use constant DEFAULT_COLUMN_LIST => (
# for the default settings.
use constant DEFAULT_QUERY_NAME => '(Default query)';
+# The possible types for saved searches.
+use constant QUERY_LIST => 0;
+use constant LIST_OF_BUGS => 1;
+
# The column length for displayed (and wrapped) bug comments.
use constant COMMENT_COLS => 80;
diff --git a/Bugzilla/DB/Schema.pm b/Bugzilla/DB/Schema.pm
index 8379f0b12..5ffb41216 100644
--- a/Bugzilla/DB/Schema.pm
+++ b/Bugzilla/DB/Schema.pm
@@ -665,6 +665,7 @@ use constant ABSTRACT_SCHEMA => {
name => {TYPE => 'varchar(64)', NOTNULL => 1},
linkinfooter => {TYPE => 'BOOLEAN', NOTNULL => 1},
query => {TYPE => 'MEDIUMTEXT', NOTNULL => 1},
+ query_type => {TYPE => 'BOOLEAN', NOTNULL => 1},
],
INDEXES => [
namedqueries_userid_idx => {FIELDS => [qw(userid name)],
diff --git a/Bugzilla/User.pm b/Bugzilla/User.pm
index 7f3736c28..6beb16a8b 100644
--- a/Bugzilla/User.pm
+++ b/Bugzilla/User.pm
@@ -198,7 +198,7 @@ sub queries {
my $dbh = Bugzilla->dbh;
my $sth = $dbh->prepare(q{ SELECT
- DISTINCT name, query, linkinfooter,
+ DISTINCT name, query, linkinfooter, query_type,
CASE WHEN whine_queries.id IS NOT NULL
THEN 1 ELSE 0 END,
UPPER(name) AS uppername
@@ -221,7 +221,8 @@ sub queries {
name => $row->[0],
query => $row->[1],
linkinfooter => $row->[2],
- usedinwhine => $row->[3],
+ query_type => $row->[3],
+ usedinwhine => $row->[4],
});
}
$self->{queries} = \@queries;