NAME

JIRA::REST::Class::Sprint - A helper class for JIRA::REST::Class that represents the sprint of a JIRA issue as an object (if you're using Atlassian GreenHopper).

VERSION

version 0.12

READ-ONLY ACCESSORS

id

rapidViewId

state

name

startDate

endDate

completeDate

sequence

RELATED CLASSES

# These methods don't work, probably because JIRA doesn't have a well-defined # interface for adding/removing issues from a sprint.

sub greenhopper_api_url { my $self = shift; my $url = $self->jira->rest_api_url_base; $url =~ s{/rest/api/.+}{/rest/greenhopper/latest}; return $url; }

sub add_issues { my $self = shift; my $url = join '/', q{}, 'sprint', $self->id, 'issues', 'add';

my $args = { issueKeys => \@_ };
my $host = $self->jira->{rest}->getHost;

$self->jira->{rest}->setHost($self->greenhopper_api_url);
$self->jira->{rest}->PUT($url, undef, $args);
$self->jira->_content;
$self->jira->{rest}->setHost($host);
}

sub remove_issues { my $self = shift; my $url = join '/', q{}, 'sprint', $self->id, 'issues', 'remove'; my $args = { issueKeys => \@_ }; my $host = $self->jira->{rest}->getHost;

$self->jira->{rest}->setHost($self->greenhopper_api_url);
$self->jira->{rest}->PUT($url, undef, $args);
$self->jira->_content;
$self->jira->{rest}->setHost($host);
}

AUTHOR

Packy Anderson <packy@cpan.org>

COPYRIGHT AND LICENSE

This software is Copyright (c) 2017 by Packy Anderson.

This is free software, licensed under:

The Artistic License 2.0 (GPL Compatible)