Subject: | feature request |
Date: | Wed, 18 Nov 2015 17:42:57 +0000 |
To: | "bug-JIRA-Client-Automated [...] rt.cpan.org" <bug-JIRA-Client-Automated [...] rt.cpan.org> |
From: | "Lyons, Roy" <Roy.Lyons [...] cmegroup.com> |
simple simon stuff. I can add it locally, but I thought perhaps others will want it.
you have function:
sub get_issue {
my ($self, $key) = @_;
my $uri = "$self->{auth_url}issue/$key";
my $request = GET $uri, Content_Type => 'application/json';
my $response = $self->{_ua}->request($request);
if (!$response->is_success()) {
die "Error getting JIRA issue $key " . $response->status_line();
}
my $new_issue = $self->{_json}->decode($response->decoded_content());
return $new_issue;
}
and I would like to have in addition:
sub get_issue_worklog {
my ($self, $key) = @_;
my $uri = "$self->{auth_url}issue/$key/worklog";
my $request = GET $uri, Content_Type => 'application/json';
my $response = $self->{_ua}->request($request);
if (!$response->is_success()) {
die "Error getting JIRA issue $key " . $response->status_line();
}
my $new_issue = $self->{_json}->decode($response->decoded_content());
return $new_issue;
}