Uploaded image for project: 'Jira Platform Cloud'
  1. Jira Platform Cloud
  2. JRACLOUD-94413

Workflow triggers are reinitiated when existing repository is moved to another workspace and resynced/reconnected back in Jira

XMLWordPrintable

      Issue Summary

      When Jira projects have workflow triggers configured for work item status transitions and the repository is disconnected from Jira, we notice that the triggers are reinitiated when the development information is synced from a Bitbucket repository which was moved to a different workspace and connected back to Jira. The status transitions occurs if the Jira issues were moved back to a status in the workflow where the trigger is configured.

      This behaviour is seen in the following scenario:

      • The repository is moved from one Bitbucket Workspace to another
      • The current repository has been deleted, and a new repository is created with the Branch/Commit/PR having the same work item key.

      Note: The workflow triggers are not reinitiated in the below scenario:

      • Ensure project has workflow trigger for PR created between To Do and In Progress
      • Create a PR in the BB repo and this transitions the ticket to In Progress
      • Disconnect the BB repo in Jira
      • Transition the ticket back to "To Do"
      • Connect the BB repo again

      Steps to Reproduce

      • Create 2 Bitbucket cloud workspaces with the same Atlassian account - test and test_copy
      • Create 1 repo under test workspace - source_repo
      • On Jira, created a project and modified the workflow to include "Pull request created" trigger between "To Do" and "In progress" transitions
      • Navigate to DVCS page, added both test and test_copy repos to the connection.
      • Create a file, make a commit and create a PR with work item key: TEST-1
      • The commit and PR is synced, and the issue TEST-1 will be transitioned to "In Progress" as expected.
      • Transfer the repo "Source_repo" from test to test_copy as per: documentation. Approved the transfer via email
      • Once the transfer is complete, the commit and PR links are broken and result in 404 (Bug: JRACLOUD-93720)
      • Disconnect the workspace "test_copy" and reconnect it

      Expected Results

      Once the sync is complete, existing links are routed to the correct repo as expected and previously synced work items are not transitioned as per workflow triggers.

      Actual Results

      Once the sync is complete, existing links are routed to the correct repo as expected, however, the previously synced work items are transitioned as per workflow triggers after the reconnection and this action triggers emails to the watchers (may involve older issues and cause confusion)

      Workaround

      Currently, the workaround is to remove the devops triggers from the workflow before reconnection of the workspace with the moved repository and re-add them after the reconnection.

              Unassigned Unassigned
              b678926ca497 Bopanna
              Votes:
              0 Vote for this issue
              Watchers:
              2 Start watching this issue

                Created:
                Updated: