def issue = event.issue as issue in groovy. A error saying event is not declared for class is coming. I dont know what the problem is. I am trying to get the current issue key which is created after create issue event.
You need to tag your question with scriptrunner if you expect the vendor to help.
You're trying to cast 'event.issue' as an Issue but you haven't imported the Issue class. So the error is obvious.
Add
import com.atlassian.jira.issue.Issue
to the top of your script and it will no longer cause an issue.
Hello @Meena Sabnivisu and @Steven F Behnke ,
I am facing the same error even though I have imported Issue Class. Please let me know how to fix it. script runner version: 6.5.0. Jira version: 8.5.0
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
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.