-
Suggestion
-
Resolution: Won't Fix
-
None
NOTE: This suggestion is for JIRA Server. Using JIRA Cloud? See the corresponding suggestion.
The current DB transaction boundaries are inconsistent:
- Many actions call DefaultIssueUpdater.doUpdate() which updates the issue and adds the change group inside one transaction but then commits it and switches to autocommit before dispatching the issue event
- Adding a comment uses DefaultCommentManager.create() which doesn't use a transaction at all
- Doing a workflow step uses OSWorkflowManager.doWorkflowAction() which does everything in one transaction
- There may be other cases that fire issue events, I haven't looked very thoroughly.
My use case is an issue event listener that updates an activeobject which must stay in sync with the issue. So I would like that every time the listener runs it is inside the relevant transaction not just for workflow steps.
When making this issue I didn't notice that AOs use their own database connection so it's not that simple to get everything into one transaction. Nonetheless this issue is something worth tidying up or at least noting in the event listener documentation.
- duplicates
-
JRASERVER-40596 Update developer documentation about events
- Closed
- is related to
-
JRASERVER-40597 Issue events fired from a workflow transition should happen after the transaction is committed
- Closed
-
JRASERVER-31756 Ability for Active Objects to use the current ofbiz transaction
- Closed
-
JRASERVER-25808 Enable ActiveObjects transaction support in JIRA
- Gathering Interest
- relates to
-
JRACLOUD-31733 Run all issue event listeners inside the database transaction that writes the issue data
- Closed