Adds add_external_participants_from_cc to Service Desk settings page
What does this MR do and why?
Contributes to Service Desk should add emails in the To line a... (#4652 - closed)
issue_email_participants
.
When a received Service Desk email contains CC addresses they are now also added as external issue email participants if the settings flag add_external_participants_from_cc
in ServiceDeskSetting
is checked.
This MR adds the checkbox add_external_participants_from_cc
to the Service Desk settings section on the projects settings page.
Related MRs
- Adds add_external_participants_from_cc to Servi... (!133859 - merged)
- Automatically add CC as issue email participants (!134399 - merged)
- Allow to set add_external_participants_from_cc ... (!134997 - merged)
Screenshots or screen recordings
Screenshots are required for UI changes, and strongly recommended for all other merge requests.
Before | After |
---|---|
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_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"
- Visit
http://127.0.0.1:3000/flightjs/Flight/edit
and expand theService Desk
section. You should not see a checkbox with the labelAdd external participants from Cc header
because the feature flag is disabled by default. - Select the project and enable the feature flag for
issue_email_participants
.project = Project.find(7) Feature.enable(:issue_email_participants, project)
- Visit
http://127.0.0.1:3000/flightjs/Flight/edit
and expand theService Desk
section and find theAdd external participants from Cc header
checkbox at the bottom of the settings form and check the checkbox. - Select
Save changes
. You should see a success alert. The checkbox should stay checked. - Feel free to check the request and response in the dev tools. Both the request and the response should contain
add_external_participants_from_cc
in the payload. - Reload the settings page. The checkbox should still be checked.
- Uncheck the checkbox and select
Save changes
. The checkbox should stay unchecked. - (Optional) Use this to rollback the changes to your project
ServiceDeskSettings::UpdateService.new(project, User.first, add_external_participants_from_cc: false).execute Feature.disable(:issue_email_participants, project)
Test full feature
- Perform the steps above
☝ and have a setup where the setting is set totrue
and the feature flag is enabled. - Ingest a test email that will create a new Service Desk issue and will add the CC'ed email addresses to the issue
service_desk_address = project.service_desk_incoming_address email_raw = <<~EMAIL To: #{service_desk_address} From: user@example.com Cc: cc@example.com Subject: CC SD issue This issue should have the author and cc as external participants. EMAIL EmailReceiverWorker.new.perform(email_raw)
- Check that it worked in the console
issue = Issue.last puts issue.title puts issue.issue_email_participants.pluck(:email).join(', ')
- Check that it worked in he frontend
- Find the newly created issue and scroll down to the editor. You should find a warning below the editor that states that those three email addresses will be notified by comments.
- FYI: System notes for this will follow up shortly.
MR acceptance checklist
This checklist encourages us to confirm any changes have been analyzed to reduce risks in quality, performance, reliability, security, and maintainability.
-
I have evaluated the MR acceptance checklist for this MR.