ADD: added attributes for estimated and working time

This commit is contained in:
Dominik Meyer 2018-07-04 11:02:52 +02:00
parent 9f4b0e1abf
commit 54cee92dd8
No known key found for this signature in database
GPG Key ID: B4C312B600606B64

View File

@ -260,6 +260,32 @@ id of the issue
=cut =cut
has 'id' => (is => 'rw', isa => 'Str', default => ""); has 'id' => (is => 'rw', isa => 'Str', default => "");
=attr estimated_time
The estimated time for solving this issue in B<Minutes>
Default value is B<0>, meaning no estimate set.
=cut
has 'estimated_time' (is => 'rw', isa => 'Num', default => 0, trigger => sub {
my ($self, $new, $old) = @_;
die("unknown value (" . $new . ")") unless $new > 0;
});
=attr working_time
The current time in B<Minutes> already spent on this issue
The default value is B<0>.
=cut
has 'working_time' => (is => 'rw', isa=>'Num', default => 0, rigger => sub {
my ($self, $new, $old) = @_;
die("unknown value (" . $new . ")") unless $new > 0;
});
=method addTag =method addTag
@ -503,7 +529,21 @@ sub createIssue
}; };
push(@tree, $worker); push(@tree, $worker);
my $estimated = {
path => "estimated",
ref => $repository->createFileObject($self->estimated_time),
type => "blob",
mode => "100644"
};
push(@tree, $estimated);
my $working_time = {
path => "working",
ref => $repository->createFileObject($self->working_time),
type => "blob",
mode => "100644"
};
push(@tree, $working_time);
my $tags = { my $tags = {
path => "tags", path => "tags",