Forums

Articles
Create
cancel
Showing results for 
Search instead for 
Did you mean: 

How to create MutuableIssue in a listener for the event issue?

Guy Plotnik
I'm New Here
I'm New Here
Those new to the Atlassian Community have posted less than three times. Give them a warm welcome!
November 12, 2019

Hi, 

I'm trying to transition a sub-task after its creation, by a listener.

The main issue is that I'm not sure how to create the MutuableIssue for the issue in the event.

MutableIssue mi = issueManager.getIssueObject(??????);

Can someone please advise?

Thanks,

Guy

1 answer

0 votes
Nic Brough -Adaptavist-
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.
November 14, 2019

In a listener, you get an "event" object you can work with.  This contains a load of stuff you might need (the pre-event issue plus a list of changes are the most useful things generally).

A very blunt answer to your question is just

MutableIssue mi = (MutableIssue) event.issue

It will grab the issue from the event and cast it over so you can make more changes.

Suggest an answer

Log in or Sign up to answer