Grabbing current issueid through groovy

Deciderio Bisco September 19, 2013

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

9 votes
RambanamP
Rising Star
Rising Star
Rising Stars are recognized for providing high-quality answers to other users. Rising Stars receive a certificate of achievement and are on the path to becoming Community Leaders.
September 19, 2013

you can get current issue key like this

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

Ali Naqvi December 10, 2019

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

Luke Galardi December 10, 2019

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

Suggest an answer

Log in or Sign up to answer