Description
Issue Summary
When attempting to swap the location of a repo and its fork, deleting the fork after swapping can cause the original repo to be deleted. This is caused by a UI problem which causes the user to think the repository delete did not function correctly, resulting in a second delete attempt which deletes the original repo.
Steps to Reproduce
Issue reproduced on both Bitbucket Server 5.15.0 and 6.3.0
- Create three projects PROJ-A, PROJ-B, PROJ-C
- Create repo in PROJ-A: PROJ-A/my-repo
- PROJ-A/my-repo (original)
- PROJ-B (empty)
- PROJ-C (empty)
- Move repo to PROJ-B: PROJ-B/my-repo
- PROJ-A (empty)
- PROJ-B/my-repo (original)
- PROJ-C (empty)
- Fork repo back to PROJ-A (uncheck 'Enable fork syncing'): PROJ-A/my-repo
- PROJ-A/my-repo (fork)
- PROJ-B/my-repo (original)
- PROJ-C (empty)
- Move original repo to PROJ-C: PROJ-C/my-repo
- PROJ-A/my-repo (fork)
- PROJ-B (empty)
- PROJ-C/my-repo (original)
- Move fork to PROJ-B: PROJ-B/my-repo
- PROJ-A (empty)
- PROJ-B/my-repo (fork)
- PROJ-C/my-repo (original)
- Move original repo to PROJ-A: PROJ-A/my-repo
- PROJ-A/my-repo (original)
- PROJ-B/my-repo (fork)
- PROJ-C (empty)
- Delete fork repo PROJ-B/my-repo
- Selecting 'Delete repository' will bring up the confirmation dialog
Expected Results
Fork repo is deleted, and the user is returned back to the project
Actual Results
Selecting 'Delete' will appear to run, but then returns to the fork repo's settings rather than the project view
- This is when the fork is deleted, but to the user it looks like the delete did not work for some reason
- The original repo still exists at this point
Selecting 'Delete repository' again will bring up the confirmation dialog
- Selecting 'Delete' will now appear to perform the normal delete action and return to the project view (in this case PROJ-B)
- This is when the original repo is deleted
Notes
- This does not occur when the repo is just moved, then forked, then the fork is deleted. The swap is required to cause the original repo to be deleted.
- This may be due to the alias table added by: https://jira.atlassian.com/browse/BSERV-3751
Workaround
Prior to deletion of the fork, ensure that repository is moved to a new/unused location.
Attachments
Issue Links
- mentioned in
-
Page Loading...