-
Type:
Bug
-
Resolution: Unresolved
-
Priority:
Low
-
None
-
Affects Version/s: 6.6.0
-
Component/s: Pull Request - Comments
-
None
-
Severity 3 - Minor
This appears to be a race condition when creating suggestions on a PR that is being rescoped (or has already rescoped but the user hasn't refreshed their page yet). This bug is present for all comments, not just suggestions, but the issue is most visible as the suggestion is now completely wrong.
Issue Summary
This is reproducible on Data Center: yes
Steps to Reproduce
- Create a pull request, and open up the PR diff page
- Push a commit to the PR source branch that inserts one or more lines at the top of the file
- Without refreshing the PR diff page, create a suggestion on an ADDED line below the lines you just added somewhere on the pull request
- Refresh the page
Expected Results
I'm not entirely sure what should be expected here. If the comment is submitted mid-rescope, maybe Bitbucket should reject the request (and ask you to refresh). Maybe after the front-end is aware of the rescope, you shouldn't be allowed to make comments in the UI (and again ask for a refresh).
Actual Results
The comment is created successfully, but on page refresh the suggestion will be pointing to a line number ABOVE the line you originally selected (as many lines up as lines you pushed).
Workaround
Currently there is no known workaround for this behavior. A workaround will be added here when available