Community moderators have prevented the ability to post new answers.
The problem is in the error message - your code does not define myIssue.
You either need to define an issue in your code, or, as I suspect it's running in the context of an issue already, try just using the issue context itself (replace myIssue with just issue)
Hey Community! I work at Atlassian in product marketing and we are conducting a survey to better understand how people feel about their development tool chain and DevOps. We would love if you could...
Connect with like-minded Atlassian users at free events near you!Find an event
Connect with like-minded Atlassian users at free events near you!
Unfortunately there are no Community Events near you at the moment.Host an event
You're one step closer to meeting fellow Atlassian users at your local event. Learn more about Community Events