Skip to content

Fix project setting approval input in non-sequential order

Issue: #37951 (closed)

What does this MR do?

In the Merge request approvals under the project settings page, when increasing/decreasing the no. of required approvals input, it has a strange behavior. It seems like the FE is overriding and then slowly changing the number.

Dec-02-2019_17-22-12

This is because the changes are saved immediately when the input is changed. So this MR adds a debounce to delay immediate save of every change.

Testing

  1. Go to Settings > General > Expand Merge request approvals
  2. Try to increase the number by clicking the up caret as quickly as you can from ex. 6 - 20 (or to any number)
  • The number should increase in sequential order

image

  • When you refresh the page, the new approval amount is saved.
  • This effect should also work when decrementing

Screenshots

Does this MR meet the acceptance criteria?

Conformity

Availability and Testing

Security

If this MR contains changes to processing or storing of credentials or tokens, authorization and authentication methods and other items described in the security review guidelines:

  • Label as security and @ mention @gitlab-com/gl-security/appsec
  • The MR includes necessary changes to maintain consistency between UI, API, email, or other methods
  • Security reports checked/validated by a reviewer from the AppSec team

Closes #37951I

Edited by 🤖 GitLab Bot 🤖

Merge request reports