-
Type:
Bug
-
Resolution: Fixed
-
Priority:
Low
-
Affects Version/s: 9.12.0
-
Component/s: Administration - Workflows, Webhooks
-
9.12
-
3
-
Severity 3 - Minor
-
40
Issue Summary
When setting up a webhook with JQL filtering with DVCS smart commits enabled causes workflow transitions triggered by commits become corrupted.
Steps to Reproduce
- Create the DVCS org (e.g. Bitbucket) and a repo inside of it.
- Connect your org to DVCS plugin in Jira DC, make sure Smart Commits are enabled.
- Create a Jira user with an email matching the Bitbucket user, so that smart commits can transition the issues (user should have proper permissions).
- Create TEST project in jira.
- Create a simple workflow with circular transitions loop:

- Assign the workflow to TEST project.
- Create a TEST-1 issue in TEST project.
- Create a simple webhook reacting to Issue Updated and having some JQL filter:

- Now, add a commit to the repo with a commit msg: "TEST-1 #in-progress"
- Refresh the repo in DVCS accounts panel - the issue seems to not be reproducible when transition is triggered via webhook call from VCS host to Jira.
Expected Results
Issue is transitioned and issue status in DB state is not corrupted. Statuses in OS_CURRENTSTEP and jiraissue match.
Actual Results
- Observe the issue is transitioned, but there's this line in logs:
[c.a.j.util.thread.JiraThreadLocalUtils] Uncommitted database transaction detected. Closing...
- Issue ends up in the inconsistent state. (OS_CURRENTSTEP table is not updated while jiraissue is.).

Workarounds
- Disable webhooks using JQL filtering, or replace them with A4J rules.
- Upgrade to Jira 10+, webhooks processing is done async there, and this issue was not observed.