Skip to content

Only replace non-approval mr-widget-footer on getMergeStatus.

username-removed-408230 requested to merge mr-widget-approval-regression into master

What this MR does

Three issues (https://gitlab.com/gitlab-org/gitlab-ce/issues/29147 https://gitlab.com/gitlab-org/gitlab-ee/issues/1866 https://gitlab.com/gitlab-org/gitlab-ee/issues/1867) report the MR widget footer being duplicated in the DOM when approvals are enabled. This MR prevents duplication by using more specific selectors to refresh the DOM when the merge status is loaded. Actually, at the moment, 6 other duplicates are being copied into the DOM -- fortunately they're hidden.

Some context

The bug was introduced here (https://gitlab.com/gitlab-org/gitlab-ee/commit/c95ec812c065ce3ab8ac64ddc5613a0740087f0e), when a check preventing getMergeStatus being called when approvals are present was removed. That fix was necessary because the preventative check was actually too restrictive, and was preventing the MR widget from being updated properly. That problem was introduced by the recent changes to the approvals UX.

Closes #1866 (closed) #1867 (closed)

Merge request reports