Skip to content

Issue creation by email ignores content if all lines are quoted

Summary

When an new incoming email to a service desk address arrives (which creates an issue) we ignore the body of the email if the content is entirely quoted (with > on every line).

In gitlab-foss!18865 (merged) we added support of retaining quotes, but this scenario (of every line being a quote) appears unhandled.

This can occur when someone forwards an email but does not include any text in that forward.

Steps to reproduce

Send an email with all lines quoted to any service desk address. No regular lines must be present in the email sent.

Example Project

See customer ticket: https://gitlab.zendesk.com/agent/tickets/228343 (internal link)

What is the current bug behavior?

Issue is created with empty description

What is the expected correct behavior?

Issue is created with the email content from the quoted text

Relevant logs and/or screenshots

See customer ticket: https://gitlab.zendesk.com/agent/tickets/228343 (internal link)

Output of checks

This bug happens on GitLab.com

Possible fixes

The issue comes from this implementation line, which can be seen ignoring the entire body if all lines are starting with a quote character (>): https://gitlab.com/gitlab-org/gitlab/blob/e1acca6ead3c7a1f5ea2b5aff37e2aa552b438fd/lib/gitlab/email/reply_parser.rb#L31

Edited by Harsh Chouraria