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?
Since you're editing your script outside the context of being a post function, the compiler doesn't know what issue is. When it runs as a post function, though, issue will be defined. So, you can ignore the static type checking error while editing the script. I have one like this, and it runs fine.
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.