From ba0765bf4dc468815e4fa45509010c0cd675e5b2 Mon Sep 17 00:00:00 2001 From: Byron Jones Date: Mon, 25 Nov 2013 16:21:03 +0800 Subject: Bug 793963: add the ability to tag comments with arbitrary tags r=dkl, a=glob --- Bugzilla/Config/BugFields.pm | 8 +++++++- Bugzilla/Config/Common.pm | 14 ++++++++++++++ Bugzilla/Config/GroupSecurity.pm | 11 ++++++++++- 3 files changed, 31 insertions(+), 2 deletions(-) (limited to 'Bugzilla/Config') diff --git a/Bugzilla/Config/BugFields.pm b/Bugzilla/Config/BugFields.pm index e24f75661..39c43cb92 100644 --- a/Bugzilla/Config/BugFields.pm +++ b/Bugzilla/Config/BugFields.pm @@ -84,7 +84,13 @@ sub get_param_list { choices => ['', @legal_OS], default => '', checker => \&check_opsys - } ); + }, + + { + name => 'collapsed_comment_tags', + type => 't', + default => 'obsolete, spam', + }); return @param_list; } diff --git a/Bugzilla/Config/Common.pm b/Bugzilla/Config/Common.pm index 5872ae1e1..96d7c1c89 100644 --- a/Bugzilla/Config/Common.pm +++ b/Bugzilla/Config/Common.pm @@ -28,6 +28,7 @@ use parent qw(Exporter); check_mail_delivery_method check_notification check_utf8 check_bug_status check_smtp_auth check_theschwartz_available check_maxattachmentsize check_email check_smtp_ssl + check_comment_taggers_group ); # Checking functions for the various values @@ -367,6 +368,14 @@ sub check_theschwartz_available { return ""; } +sub check_comment_taggers_group { + my $group_name = shift; + if ($group_name && !Bugzilla->feature('jsonrpc')) { + return "Comment tagging requires installation of the JSONRPC feature"; + } + return check_group($group_name); +} + # OK, here are the parameter definitions themselves. # # Each definition is a hash with keys: @@ -465,6 +474,11 @@ Checks that the value is a valid number Checks that the value is a valid regexp +=item C + +Checks that the required modules for comment tagging are installed, and that a +valid group is provided. + =back =head1 B diff --git a/Bugzilla/Config/GroupSecurity.pm b/Bugzilla/Config/GroupSecurity.pm index d57573de3..1d3878415 100644 --- a/Bugzilla/Config/GroupSecurity.pm +++ b/Bugzilla/Config/GroupSecurity.pm @@ -56,7 +56,15 @@ sub get_param_list { default => 'editbugs', checker => \&check_group }, - + + { + name => 'comment_taggers_group', + type => 's', + choices => \&_get_all_group_names, + default => 'editbugs', + checker => \&check_comment_taggers_group + }, + { name => 'debug_group', type => 's', @@ -84,4 +92,5 @@ sub _get_all_group_names { unshift(@group_names, ''); return \@group_names; } + 1; -- cgit v1.2.3-24-g4f1b