FIX: fixed not setting of status within listing

This commit is contained in:
Dominik Meyer 2018-09-11 20:31:15 +02:00
parent 5a3e0dcfcc
commit cad6c3276a
No known key found for this signature in database
GPG Key ID: B4C312B600606B64

View File

@ -187,7 +187,7 @@ sub parseIssue
my $self = shift;
my $d = shift;
my $tag = shift;
my $status = shift;
my $subject = $d->mypath();
my $description = $d->find("description");
my $priority = $d->find("priority");
@ -213,6 +213,7 @@ sub parseIssue
my $tz=DateTime::TimeZone->new( name => 'local' );
my $issue = Git::IssueManager::Issue->new(subject => $subject);
$issue->status($status);
$issue->description($description->content());
$issue->priority($priority->content());
$issue->severity($severity->content());
@ -255,32 +256,18 @@ sub list
my $tag = $ref->find(".tag")->content();
my @all;
# merge all issues into one array
if (defined($open))
my @statusse = ("open","closed","assigned","inprogress");
for my $s (@statusse)
{
push(@all,$open->get());
}
if (defined($closed))
for my $status ($root->find($s))
{
push(@all,$closed->get());
}
if (defined($assigned))
for my $i ($status->get())
{
push(@all,$assigned->get());
}
if (defined($inprogress))
{
push(@all,$inprogress->get());
}
for my $d (@all)
{
my $issue = $self->parseIssue($d,$tag);
my $issue = $self->parseIssue($i,$tag,$s);
push(@issues,$issue);
}
}
}
return @issues;
}
@ -304,7 +291,7 @@ sub delete
for my $s (@statusse)
{
for my $status ($root->find("open"))
for my $status ($root->find($s))
{
for my $i ($status->get())
{