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()) {
log.error(result.getErrorCollection())
}
issueService.create(asignado, result); (Here is where Jira hangs)
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.
Thanks
You can create a project in a transition using this script: https://gist.github.com/jechlin/7198215
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
When it's "locked", get a thread dump, using jstack or whatever. Post that, maybe we can work out what the problem is.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.