Skip to content

Fix group level work item notifications

Mario Celi requested to merge 425016-notifications-group-level-work-items into master

What does this MR do and why?

Now we have issues that are associated directly to a group. Before, an issue would always belong to a project, so we need to make some changes for the mailers to handle both scenarios. Now issues always belong to a namespace (Group or ProjectNamespace, both on the namespaces table)

MR acceptance checklist

Please evaluate this MR against the MR acceptance checklist. It helps you analyze changes to reduce risks in quality, performance, reliability, security, and maintainability.

How to set up and validate locally

  1. Enable the namespace_level_work_items FF in the rails console Feature.enable(:namespace_level_work_items)
  2. Go to work items list at the group level http://localhost:3000/groups/flightjs/-/work_items
  3. Create a new epic
  4. We can test the mailers in the console as there are many to trigger. Then we can see the sent emails in http://localhost:3000/rails/letter_opener

In the rails console try the following

u = User.first
i = Issue.where(project_id: nil).last

Notify.reassigned_issue_email(,, [],
label = i.namespace.labels.first
Notify.relabeled_issue_email(,, [],
Notify.changed_milestone_issue_email(,, Milestone.last,
Notify.issue_status_changed_email(,, 'closed',

Related to #425016 (closed)

Edited by Mario Celi

Merge request reports