Only expose valid custom notification settings in API
What does this MR do and why?
When requesting for notification settings of an object, we should only return the events relevant to the object.
For example, read_epic
should not be included when requesting a project's custom notification settings.
Our UI for selecting events depends on the API response so this was causing a bug where unrelated checkboxes appear and they cannot be checked too.
Related to #421678 (closed)
How to set up and validate locally
- Open the project page
- Set the notification level to "Custom" (The bell icon)
- Check that "New epic" does not show up
- Also verify on the group-level settings that "New epic" shows up
MR acceptance checklist
This checklist encourages us to confirm any changes have been analyzed to reduce risks in quality, performance, reliability, security, and maintainability.
-
I have evaluated the MR acceptance checklist for this MR.
Edited by Heinrich Lee Yu