Skip to content

[EE] Fix a potential frozen string error in app/mailers/notify.rb and add tests for Service desk emails

EE port of https://gitlab.com/gitlab-org/gitlab-ce/merge_requests/23728.

What does this MR do?

Normally, we won't hit frozen string error since callers of Notify#mail_answer_note_thread alls call Notify#subject to generate the subject, which returns a non-frozen string.

That said, better be safe we had a case where Service Desk emails weren't using Notify#subject to generate the subject and thus hitting the frozen string error when calling Notify#mail_answer_thread (https://gitlab.com/gitlab-org/gitlab-ce/issues/55104 => https://gitlab.com/gitlab-org/gitlab-ce/merge_requests/23683).

What are the relevant issue numbers?

Related to https://gitlab.com/gitlab-org/gitlab-ce/issues/55104.

Closes https://gitlab.com/gitlab-org/gitlab-ce/issues/55183.

Does this MR meet the acceptance criteria?

Edited by Rémy Coutable

Merge request reports