Skip to content

Draft: Fix notes count when notes are internal

What does this MR do and why?

Related to #377303 (closed).

This MR fixes a problem where guest users could see a wrong number of notes on a noteable if there were some internal notes added.

Screenshots or screen recordings

Will add once we sort out some questions

How to set up and validate locally

  1. As a user with at least reporter access, find or open an issue
  2. Add an internal note to that issue
  3. Go back to the issues list
  4. The number of notes on the issue includes the internal note
  5. Log out and login with (or impersonate) a user who has guest access to the project where the issue with the internal note
  6. Go to the issues list
  7. On master: the number of notes on the issue includes the internal note even if we are guests
  8. With these changes: the number of notes does not count internal ones when we are guests

MR acceptance checklist

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

Merge request reports