Adds Service Desk new participant email
What does this MR do and why?
Contributes to External participants are notified when added a... (#299261 - closed)
Epic: Participants in Service Desk (&3758)
issue_email_participants
. It'll be enabled for production shortly and probably enabled by default for 17.0
.
One aspect of the "external participants" feature is to automatically include CC
ed 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 when they're added. This MR introduces a new email service_desk_new_participant_email
which will be sent whenever an external participant has been added to a work item. This applies for both participants added via CC
header and added via quick action.
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).
Also fixes exclusive lease issues in email previews.
Contributes to Fix exclusive lease usage in transaction for ap... (#441523 - closed)
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
Screenshots are required for UI changes, and strongly recommended for all other merge requests.
No before screenshots.
Mailer previews
http://127.0.0.1:3000/rails/mailers/notify/service_desk_new_participant_email.html?locale=en
http://127.0.0.1:3000/rails/mailers/notify/service_desk_new_participant_email.txt?locale=en
How to set up and validate locally
Numbered steps to set up and validate the change are strongly suggested.
So there are two concepts to test:
- Create a Service Desk ticket from an email with
CC
ed emails. External author receivesthank_you
email,CC
ed emails receivenew_participant
email. - Add external participant via
/invite_email
quick action on the ticket
Let's go
- View the email previews
- If you haven't set up
incoming_email
orservice_desk_email
for email ingestion, please add this to yourgitlab.yml
file in thedevelopment:
section. Please restart GDK withgdk restart
: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
Cc
ed emails to the issueServiceDeskSettings::UpdateService.new(project, User.first, add_external_participants_from_cc: true).execute
- Ingest a sample email which will create a ticket 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 send a thank you email to user@example.com and a new participant email to cc@example.com EMAIL EmailReceiverWorker.new.perform(email_raw)
- Now open letter opener (
http://127.0.0.1:3000/rails/letter_opener
) and you should find a thank you email touser@example.com
and a new participant email tocc@example.com
. If they don't show up😟 agdk restart
might help. In my installation some background jobs are stuck until I restart. Maybe that helps👍 - Now browse to the newly created ticket in the frontend and add a new external participant using a quick action
/invite_email invited@example.com
- Reload letter opener and you should see another new participant email to
invited@example.com
. It should look somewhat like this: