Skip to content

Fix new issue note for group level issues

Mario Celi requested to merge 425016-fix-issue-note-email into master

What does this MR do and why?

New issue note mailer was not handling group level issues. Also refactored issue mailer specs so they are grouped

Notes for reviewer

The diff looks pretty large, but it's just moving a big chunk of specs outside of a describe 'for project' block now that we want to test issue mailers at both group and project level. All mailer specs are moved into the already existing shared example that was created in a previous MR.

Doing a side by side view might help read the moved blocks better. No changes were made to the actual specs other than small changes on subjects to reuse across blocks.

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 feature flag in rails console Feature.enable(:namespace_level_work_items)
  2. Go to http://localhost:3000/groups/flightjs/-/work_items
  3. Create a new epic
  4. Go into the new epic's detail view and create a note
  5. Before this change, you wouldn't get an email. Now you can see the email is sent correctly. You can ckeck emails in your GDK by going to http://localhost:3000/rails/letter_opener

Related to #425016 (closed)

Edited by Mario Celi

Merge request reports