diff --git a/lib/gitlab/import_export/relation_factory.rb b/lib/gitlab/import_export/relation_factory.rb index df05d6a6f67cfddf565a1bcf060c21ff9f636892..5f12caa8981c58bdbecebe5c2878fdccdb9b05c0 100644 --- a/lib/gitlab/import_export/relation_factory.rb +++ b/lib/gitlab/import_export/relation_factory.rb @@ -57,9 +57,11 @@ module Gitlab author = @relation_hash.delete('author') - if admin_user? && @members_mapper.missing_author_ids.include?(old_author_id) - update_note_for_missing_author(author['name']) - end + update_note_for_missing_author(author['name']) if can_update_notes? + end + + def can_update_notes? + (admin_user? && @members_mapper.missing_author_ids.include?(old_author_id)) || !admin_user? end def missing_author_note(updated_at, author_name)