My question has multiple parts:
Thanks in advance for any help or guidance!
As per my understanding, both listeners and notifications are based on events but you cannot guarantee which one happens first because both are different threads.
If you set something in the listener, notifications might miss it. You should try setting the values in Create Post function and make sure the post function is executed before the event is thrown.
In my experience (and having had colleagues dig through the code), Jobin is exactly right - there is no "order" to listeners and events. Listeners listen, events get fired, and whichever listener happens to pick it up first runs first. I've boiled this down to the assumptions that
It's a bit like reading a newspaper - it might be printed in a specific order, but the printer has no way of forcing me to read it in that order.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
I don't see how to add a Post Function for Create in JIRA 4.1. It looks maybe this is available in the Design mode in JIRA 4.4. Does that sound right?
It sounds like what I would really need to guarantee order is to create a new custom event, include that in the post functions before the generic Issue Created event and then have our plugin fire on that custom event. Does that sound correct?
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Checkout http://confluence.atlassian.com/display/JIRA041/Configuring+Workflow#ConfiguringWorkflow-Addingapostfunction to find out how to add post function under Create. See the Note.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
I looked at this a little more and it turns out that I cannot add another event as a post function so I cannot fire something different before the Issue Created event. Given that I want to read another database I guess the approach would be that I need to create a custom post function and use it.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
yup, you can't throw multiple events. You need a post function.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.