I have an event listener plugin that works well to capture the events from issue edit. However, when I leverage the workflow transition screen to update a field, it seems like this issue event is captured but things not working properly. I observe that the block of code is called inside the listener plugin, but not each line of code is executed. Does anyone has this issue?
Hi @gil ,
did you manage to find a solution to this please as I am facing an issue where I have reindex code is called, but looking at the logs, i see it its only being done after the listener is finised.
Thanking you
How do you reindex? Provide your code
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
boolean bWasIndexing = ImportUtils.isIndexIssues();
ImportUtils.setIndexIssues(true);
ComponentAccessor.getIssueIndexManager().reIndex(issue);
ImportUtils.setIndexIssues(bWasIndexing);
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
You said you have a plugin. I just had a look at my code. I do it the following way:
I import IssueIndexManager component to the constructor of the listener and then if I need to do a reindex, I just execute the following line:
issueIndexManager.reIndex(issue);
It works for me. I can not see much difference with your code. There must be something else in your code.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
They will both work. Again, when the trigger is from the issue edit, everything works fine, and I have same code for both events. It's just when the update comes from the transition, and this line of code is not executed, while other code got executed.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hello,
When you update a field in a transition it is not the same as you update a field on the edit screen. When you edit a field on the edit screen the issue updated event is generated. In a transition you define yourself what kind of event will be generated. It can be the issue update event, it can be generic event, it can be your custom event. You define it in the post functions of the transition. That is why have a look what kind of event your transition generates. If it does not explain the behaviour of your listener then provide your code and the type of the event generated by your transition.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi Alexey - I did not modify the list of in the post function for such transition. The end of the list is to trigger a generic event. I captured the issue generic event to do the processing and have the above-mentioned problem. I event changed the last item in the list to trigger an issue update event, and still same problem. All in all, my plugin is able to capture the trigger (I did some debugging to confirm this), but the processing is not done entirely. For example, in one of the steps, I reindex this JIRA issue, and it's not being executed, where, when there's an update directly from the edit screen, all steps are processed.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Online forums and learning are now in one easy-to-use experience.
By continuing, you accept the updated Community Terms of Use and acknowledge the Privacy Policy. Your public name, photo, and achievements may be publicly visible and available in search engines.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.