Forum Discussion

zgen's avatar
13 years ago

Why customfield content not passing to script in "Created rewiev" trigger?


                    Hi,



We need your help with bug that I found in "Review Created"
trigger.



I setup "Review Created"
trigger with script, but first argument (ARG0) always empty if we
use that script in "review created", output is:



--------------

2011-12-05 22:41:29,143 WARN
com.smartbear.ccollab.datamodel.triggers.CommandLineTrigger - found
8 lines of stderr output from trigger command:

2011-12-05 22:41:29,143 WARN
com.smartbear.ccollab.datamodel.triggers.CommandLineTrigger -     
ARG0:

2011-12-05 22:41:29,143 WARN
com.smartbear.ccollab.datamodel.triggers.CommandLineTrigger -

2011-12-05 22:41:29,143 WARN
com.smartbear.ccollab.datamodel.triggers.CommandLineTrigger -

2011-12-05 22:41:29,143 WARN
com.smartbear.ccollab.datamodel.triggers.CommandLineTrigger -     
ARG1:

2011-12-05 22:41:29,143 WARN
com.smartbear.ccollab.datamodel.triggers.CommandLineTrigger -     
9868

2011-12-05 22:41:29,143 WARN
com.smartbear.ccollab.datamodel.triggers.CommandLineTrigger -     
Untitled Review

2011-12-05 22:41:29,143 WARN
com.smartbear.ccollab.datamodel.triggers.CommandLineTrigger -

2011-12-05 22:41:29,143 WARN
com.smartbear.ccollab.datamodel.triggers.CommandLineTrigger -     
java.lang.Exception:
com.atlassian.jira.rpc.exception.RemotePermissionEx

ception: This issue does not exist or you don't have permission to
view it. at /usr/local/ccollab-cmdline/cc-jira.pl line 15.

2011-12-05 22:41:29,143 INFO com.smartbear.ccollab.datamodel.Engine
- review created: Review #9868

----------------



If we use it in other trigger - all works fine.



Run as example:

/usr/local/ccollab-cmdline/cc-jira.pl "${review.custom.JIRAissueId}"
"${review.id}" "${review.title}"



Code:

#!/usr/bin/perl



use XMLRPC::Lite;

use Data::Dumper;



my $jira =
XMLRPC::Lite->proxy('https://support.itv.ru/jira/rpc/xmlrpc');

my $auth = $jira->call("jira1.login", "gennady.marchenko",
"pass_here")->result();



my $comment = $jira->call("jira1.addComment", $auth, "$ARGV[0]",
"https://sources.itvgroup.ru/cc/go?page=ReviewDisplay&reviewid=$ARGV[1]");



my $fault = $comment->fault();



if (defined $fault) {

print STDERR "ARG0:\n$ARGV[0]\n\nARG1:\n$ARGV[1]\n$ARGV[2]\n\n";

die $comment->faultstring();

} else {

print "issue created:\n";

print Dumper($comment->result());

}



$jira->call("jira1.logout", $auth);


No RepliesBe the first to reply