From 397beebc19dfac0417a64fdbcfb4e6657f6ad9f5 Mon Sep 17 00:00:00 2001 From: "terry%mozilla.org" <> Date: Fri, 7 Jan 2000 05:16:13 +0000 Subject: Add support for a new "keywords" feature. This lets some central authority maintain a list of keywords, and users can associate any keyword with any bug. The new functionality won't appear until at least one keyword is defined. Note that you *must* run the "checksetup.pl" script after updating this change, in order to create the new required tables "keywords" and "keyworddefs". --- buglist.cgi | 42 +++++++++++++++++++++++++++++++++++++++--- 1 file changed, 39 insertions(+), 3 deletions(-) (limited to 'buglist.cgi') diff --git a/buglist.cgi b/buglist.cgi index 403a689dd..211259dca 100755 --- a/buglist.cgi +++ b/buglist.cgi @@ -235,7 +235,8 @@ from bugs, profiles assign, profiles report left join profiles qacont on bugs.qa_contact = qacont.userid, - versions projector + versions projector, + keywords where bugs.assigned_to = assign.userid and bugs.reporter = report.userid @@ -292,6 +293,27 @@ if (defined $::FORM{'sql'}) { } } +if ($::FORM{'keywords'}) { + GetVersionTable(); + my @list; + foreach my $v (split(',', $::FORM{'keywords'})) { + my $id = $::keywordsbyname{trim($v)}; + if ($id) { + push(@list, "keywords.keywordid = $id"); + } else { + print "Unknown keyword named $v.\n"; + print "

The legal keyword names are "; + print "listed here.\n"; + print "

Please click the Back button and try again.\n"; + exit; + } + } + if (@list) { + $query .= "and keywords.bug_id = bugs.bug_id and (" . + join(" $::FORM{'keywords_type'} ", @list) . ")\n"; + } +} + foreach my $id ("1", "2") { if (!defined ($::FORM{"email$id"})) { @@ -750,8 +772,22 @@ document.write(\" + if (@::legal_keywords) { + print qq{ +Keywords: + + + + +}; + } + + + print " -- cgit v1.2.3-24-g4f1b