ADD: be a bit more verbose in error messages
This commit is contained in:
parent
781bd7d3e9
commit
4da12276d1
@ -50,7 +50,7 @@ The default value is B<low>.
|
|||||||
has 'priority' => (is => 'rw', isa => 'Str', default => 'low', trigger => sub {
|
has 'priority' => (is => 'rw', isa => 'Str', default => 'low', trigger => sub {
|
||||||
my ($self, $new, $old) = @_;
|
my ($self, $new, $old) = @_;
|
||||||
|
|
||||||
die("unknown value (" . $new . ")") unless lc($new) eq "urgent" || lc($new) eq "high" ||
|
die("unknown value in priority (" . $new . ")") unless lc($new) eq "urgent" || lc($new) eq "high" ||
|
||||||
lc($new) eq "medium" || lc($new) eq "low";
|
lc($new) eq "medium" || lc($new) eq "low";
|
||||||
});
|
});
|
||||||
|
|
||||||
@ -76,7 +76,7 @@ The default value is B<low>
|
|||||||
has 'severity' => (is => 'rw', isa => 'Str', default => 'low',trigger => sub {
|
has 'severity' => (is => 'rw', isa => 'Str', default => 'low',trigger => sub {
|
||||||
my ($self, $new, $old) = @_;
|
my ($self, $new, $old) = @_;
|
||||||
|
|
||||||
die("unknown value (" . $new . ")") unless lc($new) eq "critical" || lc($new) eq "high" ||
|
die("unknown value in severity (" . $new . ")") unless lc($new) eq "critical" || lc($new) eq "high" ||
|
||||||
lc($new) eq "medium" || lc($new) eq "low";
|
lc($new) eq "medium" || lc($new) eq "low";
|
||||||
});
|
});
|
||||||
|
|
||||||
@ -106,7 +106,7 @@ The default values is B<bug>.
|
|||||||
has 'type' => (is => 'rw', isa => 'Str', default => 'bug', trigger => sub {
|
has 'type' => (is => 'rw', isa => 'Str', default => 'bug', trigger => sub {
|
||||||
my ($self, $new, $old) = @_;
|
my ($self, $new, $old) = @_;
|
||||||
|
|
||||||
die("unknown value (" . $new . ")") unless lc($new) eq "bug" || lc($new) eq "security-bug" ||
|
die("unknown value in type (" . $new . ")") unless lc($new) eq "bug" || lc($new) eq "security-bug" ||
|
||||||
lc($new) eq "improvement" || lc($new) eq "feature" ||
|
lc($new) eq "improvement" || lc($new) eq "feature" ||
|
||||||
lc($new) eq "task" || lc($$new) eq "epic";
|
lc($new) eq "task" || lc($$new) eq "epic";
|
||||||
});
|
});
|
||||||
@ -133,7 +133,7 @@ The default value is B<open>.
|
|||||||
has 'status' => (is => 'rw', isa => 'Str', default => 'open', trigger => sub {
|
has 'status' => (is => 'rw', isa => 'Str', default => 'open', trigger => sub {
|
||||||
my ($self, $new, $old) = @_;
|
my ($self, $new, $old) = @_;
|
||||||
|
|
||||||
die("unknown value (" . $new . ")") unless lc($new) eq "open" || lc($new) eq "assigned" ||
|
die("unknown value in status (" . $new . ")") unless lc($new) eq "open" || lc($new) eq "assigned" ||
|
||||||
lc($new) eq "inprogress" || lc($new) eq "closed";
|
lc($new) eq "inprogress" || lc($new) eq "closed";
|
||||||
});
|
});
|
||||||
|
|
||||||
@ -157,7 +157,7 @@ The default value is B<none>.
|
|||||||
has 'substatus' => (is => 'rw', isa => 'Str', default => 'none', trigger => sub {
|
has 'substatus' => (is => 'rw', isa => 'Str', default => 'none', trigger => sub {
|
||||||
my ($self, $new, $old) = @_;
|
my ($self, $new, $old) = @_;
|
||||||
|
|
||||||
die("unknown value (" . $new . ")") unless lc($new) eq "none" || lc($new) eq "fixed" ||
|
die("unknown value in substatus (" . $new . ")") unless lc($new) eq "none" || lc($new) eq "fixed" ||
|
||||||
lc($new) eq "wontfix";
|
lc($new) eq "wontfix";
|
||||||
});
|
});
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user