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

Grabbing current issueid through groovy

I am using script runner to automate account creation and branch creation in Perforce.

I cant figure out how to return the current issue ID that kicked off the custom listener that I created.

I am currently using this but this is a hard coded solution and not what I want.

Issue issue = issueManager.getIssueObject("XXX-64" )

IS there a way to return current issue such as:

Issue issue = issueManager.getIssueObject( currentIssue ) ?

1 answer

you can get current issue key like this

import com.atlassian.jira.issue.Issue;
 
Issue issue  = issue
def id=issue.getId()

this is just simply wrong .. can't access issue with Issue issue = issue ?????

I had to use the underlying issue to get to the issue

Suggest an answer

Log in or Sign up to answer
TAGS

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