Jira hangs in a post function script (script runner)

Hi, in a workflow transition i have two script post functions (script runner). The first one creates a new project, the second one creates an issue for that project.

but Jira stops working when creating the issue, I see no errors in the log, and when I execute the code in script console it works fine creating the project and its issue.

But in the transition jira stops working in the issueService.create sentence.

The log does not shows any error, but i have to stop jira and start it again. When I remove the post function that creates the issue, jira creates the project just fine and viceversa.

It seems to me that this is a lock problem or something like that. Can Anyone help me.

IssueService issueService = ComponentAccessor.getIssueService();


if (result.getErrorCollection().hasAnyErrors()) {



issueService.create(asignado, result); (Here is where Jira hangs)

3 answers

1 accepted

This widget could not be displayed.

Hi, lost so much time trying to fix this problem by myself that at the end I had to find a quick solution, so what I did was that I left the script that creates a project in the transition and removed the post function that creates the issue.

Then I added another script post function at the end that does a fast-track transition (new transition) in which I added the script post function that creates de issue for the project.

The new transition starts and ends in the same step, it is only used to execute the script post function.

So I guess the problem has to do with the Database, as long as the transition doesn’t end the project is not really inserted (or needs a commit) and the issue can’t be added because of that.


This widget could not be displayed.

When it's "locked", get a thread dump, using jstack or whatever. Post that, maybe we can work out what the problem is.

This widget could not be displayed.

You can create a project in a transition using this script: https://gist.github.com/jechlin/7198215

Suggest an answer

Log in or Sign up to answer
Atlassian Summit 2018

Meet the community IRL

Atlassian Summit is an excellent opportunity for in-person support, training, and networking.

Learn more
Community showcase
Published Jul 25, 2018 in Marketplace Apps

Jira Cloud and Bitbucket Cloud Integration with Microsoft Teams

One of the newest products in the Microsoft family - Microsoft Teams,  is a chat-based hub for teamwork that integrates all the people, content, and tools your team needs to be more engaged and ...

729 views 0 3
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