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

Changing the target branch of a pull request clears the lastReviewedCommit column

    XMLWordPrintable

Details

    • Bug
    • Resolution: Fixed
    • Medium
    • 8.6.0
    • 6.10.1
    • Pull Requests

    Description

      Issue Summary

      If on an existing pull request the target branch is changed after reviewers have completed their reviews the lastReviewedCommit column in the sta_pr_participant table in the database is NULL -ed but review verdicts (Approved, Needs Work) are maintained.

      Note:
      The above is only unexpected if the original and the new target branch are at the same commit. If they are not at the same commit, then Bitbucket Server correctly removes the review verdicts and correctly clears the lastReviewedCommit column.

      Steps to Reproduce

      1. In a repo, create two branches off master, branch1 and branch2.
      2. Make changes and push to branch2.
      3. Create a PR from branch2 to master and add a reviewer
      4. As the reviewer approve the PR. At this point the lastReviewedCommit column in the sta_pr_participant table will be set
      5. As the original user, update the PR and change the target branch from master to branch1.

      Expected Results

      PR approval is kept and lastReviewedCommit still has the same value as before

      Actual Results

      The approval of the PR is kept (this is expected because the original and target branch are at the same commit), but the value of the lastReviewedCommit column in the sta_pr_participant table is now NULL.

      Workaround

      There is no known workaround.

      Attachments

        Issue Links

          Activity

            People

              3314e5447912 Ben Longhurst
              cglockner Christian Glockner
              Votes:
              7 Vote for this issue
              Watchers:
              11 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved:

                Backbone Issue Sync