diff --git a/lib/Git/IssueManager/Issue.pm b/lib/Git/IssueManager/Issue.pm index d0fa1a7..06845db 100644 --- a/lib/Git/IssueManager/Issue.pm +++ b/lib/Git/IssueManager/Issue.pm @@ -260,6 +260,32 @@ id of the issue =cut has 'id' => (is => 'rw', isa => 'Str', default => ""); +=attr estimated_time + +The estimated time for solving this issue in B + +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 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 @@ -503,7 +529,21 @@ sub createIssue }; 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 = { path => "tags",