diff options
author | terry%mozilla.org <> | 2000-01-07 06:16:13 +0100 |
---|---|---|
committer | terry%mozilla.org <> | 2000-01-07 06:16:13 +0100 |
commit | 397beebc19dfac0417a64fdbcfb4e6657f6ad9f5 (patch) | |
tree | ddd220c777c77fffcce232bffb0ae3b8b80ca014 /buglist.cgi | |
parent | 845f202912dadeb9f18837bb19f117f8c092bacc (diff) | |
download | bugzilla-397beebc19dfac0417a64fdbcfb4e6657f6ad9f5.tar.gz bugzilla-397beebc19dfac0417a64fdbcfb4e6657f6ad9f5.tar.xz |
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".
Diffstat (limited to 'buglist.cgi')
-rwxr-xr-x | buglist.cgi | 42 |
1 files changed, 39 insertions, 3 deletions
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 <code>$v</code>.\n"; + print "<P>The legal keyword names are <A HREF=describekeywords.cgi>"; + print "listed here</A>.\n"; + print "<P>Please click the <B>Back</B> 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(\" <input type=button value=\\\"Uncheck All\\\" onclick=\\\"SetCh } - print " -</TABLE> + if (@::legal_keywords) { + print qq{ +<TR><TD><B><A HREF="describekeywords.cgi">Keywords</A>:</TD> +<TD COLSPAN=3><INPUT NAME=keywords SIZE=32 VALUE=""> +<SELECT NAME="keywordaction"> +<OPTION VALUE="add">Add these keywords +<OPTION VALUE="delete">Delete these keywords +<OPTION VALUE="makeexact">Make the keywords be exactly this list +</SELECT> +</TD> +</TR> +}; + } + + + print "</TABLE> <INPUT NAME=multiupdate value=Y TYPE=hidden> |