Create a note when replied to the email creating the service desk issue
What does this MR do and why?
Right now, when a user sends an email to create a service desk issue and put another person in cc, when that person responds to the email (and includes service desk in recipients) a new issue is created.
This MR changes that and instead of creating a new issue a new comment is added to the issue the first user had created with their email.
How to set up and validate locally
- Configure incoming emails
- Update
gitlab-mail_room
gem to version0.0.13
in https://gitlab.com/gitlab-org/gitlab/-/blob/master/Gemfile#L442 - Run mailroom
bundle exec mail_room -c './config/mail_room.yml'
- Go to project settings and find support desk address (eg. http://127.0.0.1:3000/flightjs/Flight/edit)
- Send an email to that address, cc another email that you have access to
- Check the project issues, a new issue should be created (eg. http://127.0.0.1:3000/flightjs/Flight/-/issues)
- Go to the second email account, a new email should arrive
- Respond to that email, don't forget to include support desk email among the recipients
- Go to the previously created issue, a new comment should be created
- Check no other issue has been created
Database
Migration up
== 20211110092710 CreateIssueEmails: migrating ================================
-- create_table(:issue_emails, {})
-- quote_column_name(:email_message_id)
-> 0.0000s
-> 0.0136s
== 20211110092710 CreateIssueEmails: migrated (0.0137s) =======================
Migration down
== 20211110092710 CreateIssueEmails: reverting ================================
-- drop_table(:issue_emails)
-> 0.0033s
== 20211110092710 CreateIssueEmails: reverted (0.0034s) =======================
Possible problems
There are problems with setting incoming emails. In order to make that working, need to update the MailRoom gem version in the Gemfile
, MR not merged yet:
- Cherry-pick the mailroom gem update
git cherry-pick 8103d700642bedf24ddd76bf03ccd895096284c5
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.
Related to #337608 (closed)
Edited by Jarka Košanová