Skip to content

Append replies in email generated notes for issues

What does this MR do?

Related to #3780 (closed)

When handling service desk issue creation from emails, we are using Gitlab::Email::Handler::ReplyProcessing#message_including_reply to process the message. This would result in a service desk issue including a reply if present (any quoted text or content after a signature would be considered a reply in this case).

For Gitlab::Email::Handler::CreateNoteHandler we were using Gitlab::Email::Handler::ReplyProcessing#message instead, meaning that any reply would not be included in the note content. For this reason, some data could be lost when responding to service desk issues.

Although we could change it to use #message_including_reply, it was proposed to append the reply in a details block.

This MR introduces the new method Gitlab::Email::Handler::ReplyProcessing#message_with_appended_reply so that it can be replaced in CreateNoteHandler when the notable is an issue.

In cases when the note contains only quick commands, the reply would not be appended.

Screenshots or Screencasts (strongly suggested)

Screen_Recording_2021-08-05_at_18.16.18

How to setup and validate locally (strongly suggested)

Does this MR meet the acceptance criteria?

Conformity

Availability and Testing

Security

Does this MR contain changes to processing or storing of credentials or tokens, authorization and authentication methods or other items described in the security review guidelines? If not, then delete this Security section.

  • Label as security and @ mention @gitlab-com/gl-security/appsec
  • The MR includes necessary changes to maintain consistency between UI, API, email, or other methods
  • Security reports checked/validated by a reviewer from the AppSec team

Related to #3780 (closed)

Edited by Eugenia Grieff

Merge request reports