[Script Runner] Working with 2 listeners : Clone and update the created issue

Hi,

I want to automaticaly clone an issue and link with the built in Script, I successfully set up a listener with the right condition, and the issue is created exactly like I want.

Apart from this listener, I have an auto transition one which trigger from every possible event, looking for field completion to auto transition from new to review.

The issue is :

When creating the cloned issue (Listener 1) with the field completion conform (Listener 2) the newly created issue remains on 'new' status instead of reviewed.

I noticed that if i make a modification on the issue (comment, update..), the listener 2 is activated. I suppose the listener 1 doesn't fire any event "Issue Created" to the newly created issue. I tried to change the order on the listeners list, but it doesn't change anything. Any idea on how I can get these 2 listeners work together ?

3 answers

1 accepted

Hi,

I eventualy solved the problem, but without the first listeners. I created a step on my workflow and use a transition to create the clone, set a comment on it and auto come bask to the previous step. the second listener catch the event and make the update on the cloned issue.

I then only use the built in scripts because I cannot install SDK and never figure out how to make the transition on the cloned issue.

0 votes
Timothy Chin Community Champion May 26, 2014

Any idea on how I can get these 2 listeners work together ?

Merge them into 1 listener. That is the simplest and the most effective answer.

Hi,

I tried to do it on a single listener, adding as additional issue action :

issue.setStatusId("2")

but the issue is still not in the required status.

Timothy Chin Community Champion May 27, 2014

You need to transition an issue. You cannot just set the status of the issue.

Suggest an answer

Log in or Join to answer
Community showcase
Sarah Schuster
Posted Jan 29, 2018 in Jira

What are common themes you've seen across successful & failed Jira Software implementations?

Hey everyone! My name is Sarah Schuster, and I'm a Customer Success Manager in Atlassian specializing in Jira Software Cloud. Over the next few weeks I will be posting discussion topics (8 total) to ...

2,981 views 12 18
Join discussion

Atlassian User Groups

Connect with like-minded Atlassian users at free events near you!

Find a group

Connect with like-minded Atlassian users at free events near you!

Find my local user group

Unfortunately there are no AUG chapters near you at the moment.

Start an AUG

You're one step closer to meeting fellow Atlassian users at your local meet up. Learn more about AUGs

Groups near you
Atlassian Team Tour

Join us on the Team Tour

We're bringing product updates and pro tips on teamwork to ten cities around the world.

Save your spot