Skip to content

Fix bug when decrementing open MR count

Heinrich Lee Yu requested to merge 356661-fix-decrement-sidebar-mr-count into master

What does this MR do and why?

Fixes the parsing of the open MR count when merging MRs.

We have two .js-merge-counter elements (one for the expanded sidebar and one for collapsed). This means $('.js-merge-counter').text() will return the concatenated text of both elements.

For example, with 8 open MRs, that will return 8\n8\n. This will then get parsed as 88.

How to set up and validate locally

  1. Go to a project with less than 1,000 open MRs.
  2. Merge an MR
  3. Check the sidebar count

MR acceptance checklist

This checklist encourages us to confirm any changes have been analyzed to reduce risks in quality, performance, reliability, security, and maintainability.

Related to #355959 (closed)

Edited by Heinrich Lee Yu

Merge request reports