summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--defparams.pl18
-rwxr-xr-xenter_bug.cgi2
2 files changed, 19 insertions, 1 deletions
diff --git a/defparams.pl b/defparams.pl
index ed6e6a0c7..365bb7e34 100644
--- a/defparams.pl
+++ b/defparams.pl
@@ -66,6 +66,16 @@ sub check_priority {
return "";
}
+sub check_severity {
+ my ($value) = (@_);
+ &::GetVersionTable();
+ if (lsearch(\@::legal_severity, $value) < 0) {
+ return "Must be a legal severity value: one of " .
+ join(", ", @::legal_severity);
+ }
+ return "";
+}
+
sub check_platform {
my ($value) = (@_);
&::GetVersionTable();
@@ -761,6 +771,14 @@ You will get this message once a day until you\'ve dealt with these bugs!
},
{
+ name => 'defaultseverity',
+ desc => 'This is the severity that newly entered bugs are set to.',
+ type => 't',
+ default => 'normal',
+ checker => \&check_severity
+ },
+
+ {
name => 'defaultplatform',
desc => 'This is the platform that is preselected on the bug '.
'entry form.<br>'.
diff --git a/enter_bug.cgi b/enter_bug.cgi
index a9f1f4958..c8ceed212 100755
--- a/enter_bug.cgi
+++ b/enter_bug.cgi
@@ -327,7 +327,7 @@ $vars->{'priority'} = \@legal_priority;
$default{'priority'} = formvalue('priority', Param('defaultpriority'));
$vars->{'bug_severity'} = \@legal_severity;
-$default{'bug_severity'} = formvalue('bug_severity', 'normal');
+$default{'bug_severity'} = formvalue('bug_severity', Param('defaultseverity'));
$vars->{'rep_platform'} = \@legal_platform;
$default{'rep_platform'} = pickplatform();