Uploaded image for project: 'Bitbucket Data Center'
  1. Bitbucket Data Center
  2. BSERV-12799

Pull request diff suggestions are incorrectly shown if the code is changed by a commit to the same file before the suggestion is saved by the user

    XMLWordPrintable

Details

    • Bug
    • Resolution: Unresolved
    • Low
    • None
    • 7.6.0, 7.8.1

    Description

      Issue Summary

      In Pull-request diff if a user if trying to make a suggestion for a line let's say 12th line.
      Before the suggestion is saved if there is a new commit to the file which added new lines on the file and the 12th line is now the 15th line as per the new commit.
      Now when the user saves the Suggestion the code in the suggestion on preview shows correctly when saved.
      However, Once we refresh the page the suggestion is shown incorrectly since the code on line 12th has changed as per the new commit.

      Steps to Reproduce

      1. Create a Pull request and make a suggestion on any line for example lets say 12th but don't save it yet.
      2. Modify the same file where you are trying to add the comment and add a new line on top of line 12
      3. Push that to the repo
      4. As per the new commit on the repo the line where you are trying to add the suggestion should be 13th and when the comment is created we expect that to be created on line 13th
      5. Save the suggestion its created on the 12th line itself instead of 13th

      How the Files looked when the suggestion was created

      When the commit was pushed

      The suggestion saved after the commit was made

      Expected Results

      The suggestion must be moved to the new line

      Actual Results

      The suggestion is shown on the same line where it was initially created

      Workaround

      Delete the suggestion and resubmit on the new correct line.

      Attachments

        Issue Links

          Activity

            People

              Unassigned Unassigned
              5338c0aa34f9 Danny Samuel
              Votes:
              0 Vote for this issue
              Watchers:
              2 Start watching this issue

              Dates

                Created:
                Updated:

                Backbone Issue Sync