You're on your way to the next level! Join the Kudos program to earn points and save your progress.
Level 1: Seed
25 / 150 points
1 badge earned
Challenges come and go, but your rewards stay with you. Do more to earn more!
What goes around comes around! Share the love by gifting kudos to your peers.
Keep earning points to reach the top of the leaderboard. It resets every quarter so you always have a chance!
Join now to unlock these features and more
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?
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)
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.