How to trigger an Issue create event when moving n issue to a new poject

Moon May 30, 2017

Hi All,

I have set up quite a few logic in terms of post functions in my workflow such that when an issue is created in my project a number of activities take place upon ticket creation. 

However, if someone moves a ticket to my project from another project the same post fucntions will not trigger on the new ticket. I am wondering if there is a way to trigger an Issue Create event when a ticket is moved from another projet to my project. 

 

Thank you

1 answer

0 votes
Nic Brough -Adaptavist-
Community Leader
Community Leader
Community Leaders are connectors, ambassadors, and mentors. On the online community, they serve as thought leaders, product experts, and moderators.
May 30, 2017

It's not a "create" though.  The issue already exists, it's got content and a history.

What you need to do is trap the "move" event and replicate the post-functions in a listener.

Moon May 30, 2017

Thanks Nic for your quick response. How do I trap the "move"?

Nic Brough -Adaptavist-
Community Leader
Community Leader
Community Leaders are connectors, ambassadors, and mentors. On the online community, they serve as thought leaders, product experts, and moderators.
May 30, 2017

With a listener - they're for picking up and responding to events.

Marina Veselić October 10, 2019

I have a similar problem. I have scripts on postfunctions that are triggered on a create event, and I need them to trigger on a move issue event. Postfunctions are Scriptrunner scripts on the server. Is there a way to reuse them? Because I have a problem with Available binding variables. Binding variable issue is available in workflow postfunction, and event isn't. And it is vice versa for script listeners. 

Does anyone have any suggestion how to overcome this?

Cheers,

Marina

Nic Brough -Adaptavist-
Community Leader
Community Leader
Community Leaders are connectors, ambassadors, and mentors. On the online community, they serve as thought leaders, product experts, and moderators.
October 10, 2019

You'll need to copy your post-function scripts over into listener scripts that catch the "move issue" events.

Marina Veselić October 11, 2019

Thanks for the quick response!

So, you are saying, I'll need to manage duplicate code? I would like to reuse code. Is there a way to make the script aware of the context? Is there a way to do that without writing a plugin?

Cheers!

Suggest an answer

Log in or Sign up to answer