FIX: fixed not setting of status within listing
This commit is contained in:
parent
5a3e0dcfcc
commit
cad6c3276a
@ -184,10 +184,10 @@ sub add
|
||||
=cut
|
||||
sub parseIssue
|
||||
{
|
||||
my $self = shift;
|
||||
my $d = shift;
|
||||
my $tag = shift;
|
||||
|
||||
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,31 +256,17 @@ 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))
|
||||
{
|
||||
push(@all,$closed->get());
|
||||
}
|
||||
|
||||
if (defined($assigned))
|
||||
{
|
||||
push(@all,$assigned->get());
|
||||
}
|
||||
|
||||
if (defined($inprogress))
|
||||
{
|
||||
push(@all,$inprogress->get());
|
||||
}
|
||||
|
||||
for my $d (@all)
|
||||
{
|
||||
my $issue = $self->parseIssue($d,$tag);
|
||||
push(@issues,$issue);
|
||||
for my $status ($root->find($s))
|
||||
{
|
||||
for my $i ($status->get())
|
||||
{
|
||||
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())
|
||||
{
|
||||
|
Loading…
Reference in New Issue
Block a user