I have script that I need to reuse on a lot of Workflow Post-functions, so I decided to move it to the Script Editor, but now I'm having a syntax issue on this part:
def project = issue.getProjectObject()
#Error: The variable 'issue' is undeclared.
But my 'issue' is the current is which triggered the action.
How can I update this script to make it work as a Post-function?