Skip to content

Fix issue detail if user who last edited an issue was deleted

Jarka Košanová requested to merge 34930-fix-edited-by into master

What does this MR do?

It adds a fallback to Editable concern for a case when an issue was edited but last_edited_by is nil. This happens when a user who edited the issue was deleted. Additionally it migrates last_edited_by and merge_user (merge user does not cause a problem but should be migrated anyway) to the "Ghost user" when deleted. This will affect only future deletion of users therefore the fallback is still necessary.

Are there points in the code the reviewer needs to double check?

Why was this MR needed?

When a user who last edited an issue has been deleted an error page is displayed because we called issuable.last_edited_by.name and last_edited_by was nil in that case.

Screenshots (if relevant)

Does this MR meet the acceptance criteria?

What are the relevant issue numbers?

Closes #34930 (closed)

Merge request reports