Showing results for 
Search instead for 
Did you mean: 
Sign up Log in

Next challenges

Recent achievements

  • Global
  • Personal


  • Give kudos
  • Received
  • Given


  • Global

Trophy case

Kudos (beta program)

Kudos logo

You've been invited into the Kudos (beta program) private group. Chat with others in the program, or give feedback to Atlassian.

View group

It's not the same without you

Join the community to find out what other Atlassian users are discussing, debating and creating.

Atlassian Community Hero Image Collage

def issue = event.issue as issue in groovy. error

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.

1 answer

1 vote
Steven Behnke Community Leader Apr 09, 2018

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. 


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 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

Suggest an answer

Log in or Sign up to answer

Community Events

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

Events near you