Home >> perlcgitutorial >>
Perl and JIRA
JIRA combines issue tracking, agile project management, customisable workflow, and a pluggable integration framework to increase the velocity of your software development team.
You can use following example to create issues via webpage...
#!/usr/bin/perl
use strict;
use CGI;
use XMLRPC::Lite;
use Data::Dumper;
my $cgi=new CGI;
my $project=$cgi->param('project');
my $action=$cgi->param('action');
my $assigne=$cgi->param('assigne');
my $summary=$cgi->param('summary');
my $description=$cgi->param('description');
print "Content-type: text/html\r\n\r\n";
&main();
if($action eq "create"){&create();}
#############################################
sub main
{
print " ";
}
######################
sub create
{
my $jira = XMLRPC::Lite->proxy('http://localhost:8080/jira/rpc/xmlrpc');
my $auth = $jira->call("jira1.login", "admin", "admin")->result();
my $call = $jira->call("jira1.createIssue", $auth, {
'project' => $project,
'type' => 2,
'summary' => $summary,
'assignee' => $assigne,
'description' => $description});
my $fault = $call->fault();
if (defined $fault) {
print $call->faultstring();
die $call->faultstring();
} else {
print "issue created:\n";
print Dumper($call->result());
}
$jira->call("jira1.logout", $auth);
}
Perl functions
|
Perl CGI Tutorial
Download perl
download stable version of perl
Perl 5.10.1
|
|