Creating an issue on a workflow transition

Hi,

I have a workflow transition and there is a groovy script in its post function. This script should create a new issue under different project and also create a link for the issue. What my problem is that I get an error like this:

Communications Breakdown

The JIRA server could not be contacted. This may be a temporary glitch or the server may be down.

Close this dialog and press refresh in your browser

This is from the log file:

Exception in thread "ajp-bio-8009-exec-4626" java.lang.StackOverflowError

Is there any suggestion?

2 answers

1 accepted

0 vote

Read your log file to see what might be causing that (read above and below it).

A common cause of a Stack Overflow is looping or recursive code. Try removing the script and checking that the basics work, then re-enable parts of your script one at a time until the error happens again. At least you'll know where the fault is.

Thanks for your quick reply Nic. I guess there is a problem with this line.

Map<String,Object> newIssueParams = ["issue":newIssue] as Map<String,Object>
    Issue newIssueObj = issueManager.createIssueObject(currentUserObj, newIssueParams)

I use these lines in subtask creation but I am not sure if it is ok when trying to create a new issue under different project as well. Do you have any idea?

Make sure the this post function is NOT on the create issue transition !!!

Yes, good point - the "new issue" line will fail if this is on the "create issue" transition - you need to have the main issue in existence before you can execute other creates.

Suggest an answer

Log in or Sign up to answer
How to earn badges on the Atlassian Community

How to earn badges on the Atlassian Community

Badges are a great way to show off community activity, whether you’re a newbie or a Champion.

Learn more
Community showcase
Published Thursday in Jira

5 ways you can make the most of Jira Software and Bitbucket Cloud

As part of the Bitbucket product team I'm always interested in better understanding what kind of impact the use of our tools have on the way you work. In a recent study we conducted of software devel...

78 views 0 5
Read article

Atlassian User Groups

Connect with like-minded Atlassian users at free events near you!

Find a group

Connect with like-minded Atlassian users at free events near you!

Find my local user group

Unfortunately there are no AUG chapters near you at the moment.

Start an AUG

You're one step closer to meeting fellow Atlassian users at your local meet up. Learn more about AUGs

Groups near you