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 Sign up to answer
How to earn badges on the Atlassian Community

How to earn badges on the Atlassian Community

Badges are a great way to show off community activity, whether you’re a newbie or a Champion.

Learn more
Community showcase
Published Thursday in Jira

Meet the AUG leaders of Northern Virginia

@Rachel Wright (Jira Genie), @Billy Poggi (AUG NOVA, DC), and @Dana Jansen (Confluence Queen) are just some of the folks that lead one of the world's most active Atlassian User Group (AUG)....

137 views 5 9
Read article

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