Script Runner create sub-task post function locked up project

Jason Huntowski February 8, 2017

I created a script runner post-function to create a sub-task on a looped transition that goes from status a and returns to status a. The firt sub-task created fine. When I hit the button a second time, it just showed an eternal thinking wheel and now I can't load the project issue screen.

The post-function is simple, it creates a sub-task without any condition. I have one action scripted which is to set the summary to a set statement:

issue.summary = 'Incident Report for ' + sourceIssue.key

I did not set any action for what should occur if the sub-task already existed.

Initially I thought that by setting the summary to the same statement for two sub-tasks, it put JIRA into a state where it could not resolve the index of issues, but after I was thinking about it, the sub-task should have a different issue number, so the duplicate summary shouldn't matter. I don't know how to fix this. I went to the DB to see if I could pull up the issue I created and just delete the second sub-task, but the DB query won't load for that issue or its parent either.

 

I have used the sub-task create post-function many times with the same setup as above when moving from one status to a completely different status, so I am enticed to think that it might have something to do with the looping? Any help is welcomed.

3 answers

0 votes
Thanos Batagiannis _Adaptavist_
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 Leaders.
February 21, 2017

Cool smile 

0 votes
Jason Huntowski February 21, 2017

Thanos,

Thank you for your reply. This was a one off error. For all I know, it could have been something completely unrelated causing the issue. I restarted the server and after everything came back up, this was no longer an issue. The script works fine. Sorry for the fire drill.

 

Jason

0 votes
Thanos Batagiannis _Adaptavist_
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 Leaders.
February 21, 2017

Hi Jason,

I do not see any reason why this will fail. Did you check your logs for errors ? In which SR and JIRA versions you are ?

regards, Thanos

Suggest an answer

Log in or Sign up to answer