Patch for bug 213679: Implement a parameter that allows administrators to control whether blank comments are allowed when filling new bugs; code by Dave Swegen <dswegen@software.plasmon.com>; r=myk; a=myk.
git-svn-id: svn://10.0.0.236/trunk@152104 18797224-902f-48f8-a5cc-f745e15eee43
This commit is contained in:
parent
83d80aee52
commit
fe2f01e78e
@ -843,6 +843,14 @@ Reason: %reason%
|
||||
default => 'this may indicate a bug in your browser.'
|
||||
},
|
||||
|
||||
{
|
||||
name => 'commentoncreate',
|
||||
desc => 'If this option is on, the user needs to enter a description ' .
|
||||
'when entering a new bug',
|
||||
type => 'b',
|
||||
default => 0
|
||||
},
|
||||
|
||||
{
|
||||
name => 'commentonaccept',
|
||||
desc => 'If this option is on, the user needs to enter a short comment if ' .
|
||||
|
||||
@ -76,6 +76,10 @@ my $format = GetFormat("bug/create/comment", $::FORM{'format'}, "txt");
|
||||
$template->process($format->{'template'}, $vars, \$comment)
|
||||
|| ThrowTemplateError($template->error());
|
||||
|
||||
# Check that if required a description has been provided
|
||||
if (Param("commentoncreate") && !trim($::FORM{'comment'})) {
|
||||
ThrowUserError("description_required");
|
||||
}
|
||||
ValidateComment($comment);
|
||||
|
||||
my $product = $::FORM{'product'};
|
||||
|
||||
@ -150,6 +150,10 @@
|
||||
[% title = "Dependency Loop Detected" %]
|
||||
You can't make [% terms.abug %] blocked or dependent on itself.
|
||||
|
||||
[% ELSIF error == "description_required" %]
|
||||
[% title = "Description Required" %]
|
||||
You must provide a description of the [% terms.bug %].
|
||||
|
||||
[% ELSIF error == "dupe_invalid_bug_id" %]
|
||||
[% title = BLOCK %]Valid [% terms.Bug %] Number Required[% END %]
|
||||
You must specify a valid [% terms.bug %] number of which this
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user