Listeners don't save the issue changes after work in queue

The problem appears on JIRA 7.2.7.

Situation:

  • Listener A is configured for project P to autoassign issue to another user after it is moved to project P;
  • Listener B is configured for project P to autotransition issue to another status after it is moved to project P (even if issue changes workflow within moving);
  • Both listeners exist within the same plugin.

The design of this listeners configured to do simple actions, which can be tested independently and fixed quickly.

 

Bug: when listener A processes before listener B, then issue assigner don't change. Otherwise (autoassign after autotransition), both listeners work correctly.

 

It was founded that listeners form queue of work randomly and process consistently. The order of queue can be changed through the plugin reinstalling, listener updating or server restarting. It seems that java-code “event.getIssue()” returns current local issue state, so the listener B has old issue assigner after listener A actions and saves issue state B in database with old value.

 

Please answer following questions:

  • Hot fix of bug is to use IssueManager - “issueManager.getIssueObject(event.getIssue().getId())” because it returns actual issue state. Can this way to provide code safety?
  • If no, theoretically, IssueEvent object can contains specific data only for this listener, which couldn't be used. What are this data?
  • Is this problem associated only with issue transitions and system fields? For example, it looks like custom field values updating has no errors.
  • Also, the problem listeners can be transformed to one big listener. What another ways can fix this bug? What is the best way?

0 answers

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 ...

3,338 views 14 20
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