Skip to content

Only expose valid custom notification settings in API

Heinrich Lee Yu requested to merge 421678-notification-settings-api into master

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

  1. Open the project page
  2. Set the notification level to "Custom" (The bell icon)
  3. Check that "New epic" does not show up
  4. 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.

Edited by Heinrich Lee Yu

Merge request reports