Draft (review) notes can generate wrong suggestions

  1. The user leaves a suggestion as a review note (the suggestion wasn't created in the DB yet)
  2. Before finishing up and sending the review as comment, the file that received the "pre-suggestion" changes
  3. Currently, when publishing the note (review note -> diff note) we use the note.original_position to fetch the diff content to generate the suggestion. That means that when a DraftNote becomes a DiffNote, the MR might have received updates, so the original_position might be pointing to an old revision, therefore in the transition time we might fetch old content to generate the suggestion, which might be confusing to the user.
Assignee Loading
Time tracking Loading