I'm writing a Listener plugin that will update some related issues at the time when the relationship is created or removed between the two issues. I am running a JQL search to determine the data needed to populate on these related issues. However, i've run into an issue suddenly regarding the time delay of the updates to the triggering issue and when those updates are available to be queried.
So, my listener runs the query but only sees related information as if there were no change to the issue causing this trigger (in the case of removal, the relationship still seems to be there).
I'm wondering if there is a Order of Operations document, or a way to force a delay in when the listener will actually run compared to when the event is thrown.
It seems like i'm running into a problem where the indexing of the issue being changed which is throwing the event and therefore triggering the listener is not completing in time for the JQL query to return the correct up-to-date results from the index.
Let me know if anyone else has run into this and if there is a workaround or if i'm just left to my own devices in order to handle the exceptions in code.
Thanks.