Forums

Articles
Create
cancel
Showing results for 
Search instead for 
Did you mean: 

How can I add the trigger issue as my parent for issues created from automation?

Andy Ades
April 22, 2020

I'm using a next-gen project with Automation for Jira (cloud). I have a rule setup for whenever an epic is created to trigger creation of new issues (not sub-tasks) with certain fields set. I'm trying to set the trigger issue as the Epic of the newly created issues, but since "parent" isn't available until an Epic is linked to an issue, I'm unable to figure out how to properly do this. Is this possible in next-gen?

 

My advanced code block is:

{
"fields": {
"parent": "{{triggerIssue.key}}"
}
}

The error I get in the audit logs is:

Error creating issue: data was not an object (parent)

 

3 answers

1 accepted

1 vote
Answer accepted
JamieA
Rising Star
Rising Star
Rising Stars are recognized for providing high-quality answers to other users. Rising Stars receive a certificate of achievement and are on the path to becoming Community Champions.
July 22, 2012

That's not javascript (js), that's groovy, as such it needs to have the extension .groovy.

The exception shows you that the wrong interpreter is being invoked:

sun.org.mozilla.javascript.internal.EvaluatorException

If you have applied the updated workflow with the script post-function, there will be an exception in the logs.

Tanner Wortham
Rising Star
Rising Star
Rising Stars are recognized for providing high-quality answers to other users. Rising Stars receive a certificate of achievement and are on the path to becoming Community Champions.
July 22, 2012

worked like a charm. it's always the simple things that end up consuming far too much time. ;)

firdaus
December 9, 2016

i am facing same prob. Script is not getting executed. And i am not sure where to put the script so that JIRA locates the path.

JamieA
Rising Star
Rising Star
Rising Stars are recognized for providing high-quality answers to other users. Rising Stars receive a certificate of achievement and are on the path to becoming Community Champions.
December 9, 2016

I think this is a different problem, please ask a new question.

0 votes
Tanner Wortham
Rising Star
Rising Star
Rising Stars are recognized for providing high-quality answers to other users. Rising Stars receive a certificate of achievement and are on the path to becoming Community Champions.
July 22, 2012

Consider it confirmed. I decided it use an absolute path since $CATALINA_BASE looked not to be set. That path is D:\JIRA\work\Catalina\lockedestimate.js where D:\JIRA is the path for our JIRA install.

0 votes
Renjith Pillai
Rising Star
Rising Star
Rising Stars are recognized for providing high-quality answers to other users. Rising Stars receive a certificate of achievement and are on the path to becoming Community Champions.
July 20, 2012

Tanner,

Could you confirm that you have checked the notes from Jamie here?

Suggest an answer

Log in or Sign up to answer