Draft: Send Service Desk thank you emails to all external participants
What does this MR do and why?
Contributes to External participants are notified when added a... (#299261 - closed)
issue_email_participants.
One aspect of the "external participants" feature is to automatically include CCed emails in the issue from the start.
We send a thank_you email to the external author on Service Desk ticket creation but not to all other external participants. This MR now takes the full list of external participants and sends all of them the thank_you email. This way also CCed emails can directly interact with the ticket and send a reply to the thank_you email.
This is the setting in the frontend (General project settings --> Service Desk section) after you enabled the feature flag. To verify locally we just update the field from the backend (see steps).
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.
Screenshots or screen recordings
This is how letter opener looked like on my machine. Two emails with some content of the Service Desk thank_you email to both external participants.
How to set up and validate locally
Numbered steps to set up and validate the change are strongly suggested.
- If you haven't set up
incoming_emailorservice_desk_emailfor email ingestion, please add this to yourgitlab.ymlfile in thedevelopment:section. Please restart GDK withgdk restart:This will allow you to see the Service Desk section in the settings and generate project-specific email addresses. You won't be able to ingest real emails, but we don't need that here.incoming_email: enabled: true address: "incoming+%{key}@example.com" - Select a project and enable the feature flag for
issue_email_participants.project = Project.find(5) Feature.enable(:issue_email_participants, project) - Enable to automatically add
Cced emails to the issueServiceDeskSettings::UpdateService.new(project, User.first, add_external_participants_from_cc: true).execute - Ingest a sample email which will create an issue in the selected project.
service_desk_address = project.service_desk_incoming_address email_raw = <<~EMAIL To: #{service_desk_address} From: user@example.com Cc: cc@example.com Subject: SD issue This should send two SD thank you emails EMAIL EmailReceiverWorker.new.perform(email_raw) - Now open letter opener (
http://127.0.0.1:3000/rails/letter_opener) and you should find two thank you emails with the subjectRe: SD issue (#XX). One touser@example.comand one tocc@example.com. if they don't show up😟 agdk restartmight help. In my installation some background jobs are stuck until I restart. Maybe that helps👍

