Jira post function - get current issue ID / Key

1.1k views Asked by At

I'm writing post function that will change custom fields values on transition. I need to get issue Id or Key. Problem is that I can't access any data through Issue issue; becouse object is empty...

1

There are 1 answers

0
Czachovic On BEST ANSWER

I found solution:

(...)
private MutableIssue mutableIssue;

public void execute(Map transientVars, Map args, PropertySet ps) throws WorkflowException {

     MutableIssue issue = (MutableIssue) getIssue(transientVars);
     System.out.println("Issue Id: " + issue.getId() + "\n"); 
}
(...)

Above code allows to get issue object from Jira post-function execute method level.