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
Community showcase
Posted Oct 16, 2018 in Jira

Looking for anyone who made the switch to Data Center

The Jira Marketing team is putting together an ebook on migrating to Data Center. We're looking for pro tips on how you staffed your project team and organized your Proof of Concept. Share yo...

66 views 0 2
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