Setting up a webhook with JQL filtering with DVCS smart commits enabled causes workflow transitions triggered by commits to become corrupted.

XMLWordPrintable

    • 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

      1. Create the DVCS org (e.g. Bitbucket) and a repo inside of it.
      2. Connect your org to DVCS plugin in Jira DC, make sure Smart Commits are enabled.
      3. Create a Jira user with an email matching the Bitbucket user, so that smart commits can transition the issues (user should have proper permissions).
      4. Create TEST project in jira.
      5. Create a simple workflow with circular transitions loop:
      6. Assign the workflow to TEST project. 
      7. Create a TEST-1 issue in TEST project.
      8. Create a simple webhook reacting to Issue Updated and having some JQL filter:
      9. Now, add a commit to the repo with a commit msg: "TEST-1 #in-progress"
      10. 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

      1. Observe the issue is transitioned, but there's this line in logs:
        [c.a.j.util.thread.JiraThreadLocalUtils] Uncommitted database transaction detected.  Closing...
        
      2. Issue ends up in the inconsistent state. (OS_CURRENTSTEP table is not updated while jiraissue is.).

      Workarounds

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

        1. image-2025-04-24-14-05-53-747.png
          17 kB
          Filip Nowak
        2. image-2025-04-24-14-08-09-037.png
          77 kB
          Filip Nowak
        3. image-2025-04-24-14-11-17-649.png
          31 kB
          Filip Nowak
        4. Zrzut ekranu 2025-04-25 o 11.31.07.png
          41 kB
          Dominik Wojtasik

            Assignee:
            Unassigned
            Reporter:
            Filip Nowak
            Votes:
            1 Vote for this issue
            Watchers:
            11 Start watching this issue

              Created:
              Updated:
              Resolved: