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.
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.
Online forums and learning are now in one easy-to-use experience.
By continuing, you accept the updated Community Terms of Use and acknowledge the Privacy Policy. Your public name, photo, and achievements may be publicly visible and available in search engines.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.