Uploaded image for project: 'Bitbucket Cloud'
  1. Bitbucket Cloud
  2. BCLOUD-22933

Branch compare swap button does not work for commits

XMLWordPrintable

      Issue Summary

      • When comparing a commit hash with a branch, as well as a commit with another commit - the swap button does nothing
      • Comparing a branch with another branch works fine
      • The root cause seems to be that the URL redirection is not occurring, the URL changes for branch vs branch but does not work for commit vs commit or commit vs branch
      • When the swap button is pressed, the exact same output is present on the page

      Steps to Reproduce

      1. Look at the commit list for a branch (master for example)
      2. Get the previous commit hash before the head
      3. Open branch compare, set the commit hash as the destination and master as the source
      4. It will correctly show in the commit list the head commit (as the master branch has this commit but the previous commit does not)
      5. Click the swap button, and the same commit is displayed despite the master being the destination
      6. Now exit out of the branch compare view and go back, this time set the commit hash as the source and the master branch as the destination - you will see 0 commits here, the swap button also shows 0 commits (when it should show at least 1 commit like it did before)

      Expected Results

      • The swap button switches around the source/destination and accurately reports the diff between these

      Actual Results

      • The swap button does nothing, whatever was displayed previously continues to display despite the source/destination being swapped

      Workaround

      • The only workaround at this stage is to manually exit the branch compare view and then select the source/destination as if it were swapped to view the accurate results for this comparison

        1. branchdiff1.png
          branchdiff1.png
          69 kB
        2. branchdiff2.png
          branchdiff2.png
          68 kB

              Unassigned Unassigned
              57b7f67f3625 Ben
              Votes:
              1 Vote for this issue
              Watchers:
              3 Start watching this issue

                Created:
                Updated:
                Resolved: