Forbid creating --- and "unspecified" versions and --- milestones
parent
74362458d6
commit
211a0dfa26
|
@ -118,7 +118,12 @@ sub run_create_validators
|
|||
sub create
|
||||
{
|
||||
my $class = shift;
|
||||
my $self = $class->SUPER::create(@_);
|
||||
my ($params) = @_;
|
||||
if ($params->{name} =~ /^-*$/s)
|
||||
{
|
||||
ThrowUserError('milestone_blank_name', $params);
|
||||
}
|
||||
my $self = $class->SUPER::create($params);
|
||||
if ($self)
|
||||
{
|
||||
# Fill visibility values
|
||||
|
|
|
@ -141,6 +141,10 @@ sub create
|
|||
{
|
||||
my $class = shift;
|
||||
my ($params) = @_;
|
||||
if ($params->{name} =~ /^(-*|unspecified)$/s)
|
||||
{
|
||||
ThrowUserError('version_blank_name', $params);
|
||||
}
|
||||
my $self = $class->SUPER::create($params);
|
||||
if ($self)
|
||||
{
|
||||
|
|
|
@ -1239,7 +1239,11 @@
|
|||
|
||||
[% BLOCK error_milestone_blank_name %]
|
||||
[% title = "Blank Milestone Name Not Allowed" %]
|
||||
You must enter a name for this milestone.
|
||||
Blank and "---" milestone names are not allowed.
|
||||
If you want an empty milestone for bugs in your product, just
|
||||
[% IF product %]<a href="editproducts.cgi?product=[% product.name | html %]">[% END -%]
|
||||
enable empty value for the Target Milestone field
|
||||
[%- IF product %]</a>[% END %] in it.
|
||||
[% END %]
|
||||
|
||||
[% BLOCK error_milestone_name_too_long %]
|
||||
|
@ -1363,21 +1367,6 @@
|
|||
You did not specify a subcategory for this series.
|
||||
[% END %]
|
||||
|
||||
[% BLOCK error_missing_version %]
|
||||
[% title = "Missing Version" %]
|
||||
[% admindocslinks = {'versions.html' => 'Defining versions'} %]
|
||||
Sorry, the product <em>[% product.name FILTER html %]</em>
|
||||
has to have at least one version in order for you to
|
||||
enter [% terms.abug %] into it.<br />
|
||||
[% IF user.in_group("editcomponents", product.id) %]
|
||||
<a href="editversions.cgi?action=add&product=[% product.name FILTER url_quote %]">Create
|
||||
a new version</a>.
|
||||
[% ELSE %]
|
||||
Please contact [% Param("maintainer") %] and ask them
|
||||
to add a version to this product.
|
||||
[% END %]
|
||||
[% END %]
|
||||
|
||||
[% BLOCK error_move_worktime_empty %]
|
||||
[% title = "No Worktime In Selected Bug" %]
|
||||
You are trying to move or split Hours Worked by in ratio taken from
|
||||
|
@ -1923,7 +1912,11 @@
|
|||
|
||||
[% BLOCK error_version_blank_name %]
|
||||
[% title = "Blank Version Name Not Allowed" %]
|
||||
You must enter a name for this version.
|
||||
Blank, "---" and "unspecified" version names are not allowed.
|
||||
If you want an empty version for bugs in your product, just
|
||||
[% IF product %]<a href="editproducts.cgi?product=[% product.name | html %]">[% END -%]
|
||||
enable empty value for the Version field
|
||||
[%- IF product %]</a>[% END %] in it.
|
||||
[% END %]
|
||||
|
||||
[% BLOCK error_unknown_action %]
|
||||
|
|
Loading…
Reference in New Issue