gitlab email display name not working with issues
Everyone can contribute. Help move this issue forward while earning points, leveling up and collecting rewards.
Summary
after setting the display name in gitlab.rb file, notification emails going out as part of an issue change (or creation) used the user name as display name.
Steps to reproduce
- modify display name in gitlab.rb
- create/modify/close an issue
Expected behavior
I would like to see the constant display name i set in gitlab.rb as the sender name.
Actual behavior
the sender name is the gitlab user full name
Possible fixes
https://gitlab.com/gitlab-org/gitlab-ce/blob/master/app/mailers/notify.rb#L51
def sender(sender_id, send_from_user_email = false)
return unless sender = User.find(sender_id)
address = default_sender_address
address.display_name = sender.name
if send_from_user_email && can_send_from_user_email?(sender)
address.address = sender.email
end
address.format
end
as you can see, the sender function disregards the fact that we set the display name in giltba.rb file. in address.display_name you should put a condition asking for the constant display name or the sender.name if it wasn't set.
Edited by 🤖 GitLab Bot 🤖