Hi, everyone.
To get a specific issue for a particular Jira project, I wrote the following Perl script:
use utf8;
use Filehandle;
use strict;
use warnings;
use Encode;
use JIRA::REST;
use REST::Client;
use JSON;
use Data::Dumper;
use MIME::Base64;
my $jira = JIRA::REST -> new({
url => ‘http://company.domaiin:8080’,
username => ‘xxxx’,
password => ‘xxxxxxxx’,
});
Get issue.
my $issue = $jira -> GET("/issue/SMPKB-16");
my $json_text = do {
open(my $json_fh, “<:encoding(UTF-8)”, $issue) or die (“Can’t open $issue”: $!\n");
local $/;
<$json_fh>
};
my $json = JSON -> new;
my $data = $json -> decode($json_text);
However, I can not ‘print’ the summary and description fields of a particular issue.
I added a JSON script, but I still get an error (I use JSON for the first time).
I look forward to your help.
Alex.