Merge button disabled after approved

Part of #1979 (closed)

Summary

This is a bug when approval_rules is enabled.

When a MR is just approved, the merge widget is updated accordingly. However the button is still disabled.

(before approval_rules is enabled, correct behavior)

CapturFiles_34

(after approval_rules is enabled)

CapturFiles_36 CapturFiles_35

Note that the wording are correctly refreshed, it is only the button disabled status being wrong.

Steps to reproduce

  1. Find a project with ultimate plan.
  2. Enable its approval_rules feature flag.
  3. For approval_rules, add one approver and set approvals_required to be 1.
  4. Open a merge request, check that it is not approved yet
  5. Open that merge request in a second window, login as another project member, approve it
  6. Switch to first window, wait and observe the approval widget auto-updating itself.

Example Project

What is the current bug behavior?

"Merge" button is not clickable (disabled) once MR is approved

What is the expected correct behavior?

"Merge" button should be clickable (not disabled) once MR is approved

Relevant logs and/or screenshots

(Paste any relevant logs - please use code blocks (```) to format console output, logs, and code as it's very hard to read otherwise.)

Output of checks

(If you are reporting a bug on GitLab.com, write: This bug happens on GitLab.com)

Possible fixes

(If you can, link to the line of code that might be responsible for the problem)

Assignee Loading
Time tracking Loading