Scriptrunner workflow function not updating

Jordan Hauser March 7, 2022

Hi all, 

I created a post function to assign a certain person during a transition based on a field selected and a table provided from confluence. This works perfectly fine when I added it to the initial issue creation transition.

I tried to reuse this in the same workflow at a different transition, and its not even reading the proper script for some reason. For some reason its telling me a listener is being run instead of the actual script being specified. 

Has anyone else run into a problem where their script being saved to a workflow function (as a file instead of inline script) is not saving/referencing the script editor properly?

-Jordan



EDIT: I got the server restarted to fix one of the issues that broke while testing this, but after the restart it's still running the wrong script on me. I can tell because the log lines I'm seeing are commented out in the current iteration of this script and shouldn't be appearing. I tried running this as an inline script as well I'm still seeing it run the wrong code.

1 answer

1 accepted

0 votes
Answer accepted
Jordan Hauser March 9, 2022

Coming back to this to give a little more detail - 

I never figured out 100% what was going on, but it had something to do with the following lines:

def validateAssignResult = issueService.validateAssign(user, issue.id, issue.reporterId)
issueService.assign(user, validateAssignResult)

That I found on several forum posts, including this one Solved: Using ScriptRunner to Set Assignee Based on Custom... (atlassian.com)

So just don't use this issueService.validateAssign() if you have listeners set up. It messed up scripts not even relevant to the workflow I was working on.

Suggest an answer

Log in or Sign up to answer