Skip to content

Fixes #30967 - Over one thousand todo messages displaying a count of one in the UI.

What does this MR do?

This is a fix for #30967 (closed), formerly gitlab-foss issue #66123 .

When a user has over one thousand to-do items, and marks one as complete, the count in the to-do badge in the upper right-hand corner will display a count of "1". This MR fixes this and will update the count with an appropriate number.

Details

As discussed in #30967 (closed), the front-end code for the to-do badge receives a count, as a string, that will contain a comma if it is at, or over, one thousand. This MR changes the logic so that the front-end receives a raw integer and than handles the presentation -- commas and high-count representations -- itself.

Does this MR meet the acceptance criteria?

Conformity

Performance and Testing

What risks does this change pose? How might it affect the quality/performance of the product?

This MR changes the to-do counts provided to the front-end from strings to integers. Risks included any issues arising from the mishandling of this change.

What additional test coverage or changes to tests will be needed?

Additional tests were added, and previous tests were updated, to ensure the proper handling of the integer counts on the front-end.

Will it require cross-browser testing?

No

Closes #30967 (closed)

Edited by Jesse Hall

Merge request reports