Project

General

Profile

Actions

Defect #41572

closed

`updated_by_id` in Journal retains deleted user id instead of being set to `User.anonymous`

Added by Go MAEDA over 1 year ago. Updated over 1 year ago.

Status:
Closed
Priority:
Normal
Assignee:
Category:
Issues
Target version:
Resolution:
Fixed
Affected version:

Description

In the current implementation of the Redmine Journal model, the updated_by_id field stores the id of the user who last edited the notes. However, if the user associated with this id is deleted, the id remains pointing to the deleted user.

To ensure consistent behavior across Redmine, the updated_by_id should be set to User.anonymous.id when the associated user is deleted.

Steps to Reproduce:

1. Create an issue and add a notes to it.
2. Edit the notes as a specific user, which will set the updated_by_id.
3. Delete the user who last edited the notes.
4. Query the Journal model and check the updated_by_id field. The expected value is User.anonymous.id, however, it retains the deleted user's id.


Files

clipboard-202410241750-dvuxc.png (29.6 KB) clipboard-202410241750-dvuxc.png Go MAEDA, 2024-10-24 10:50
clipboard-202410241751-epej4.png (31.3 KB) clipboard-202410241751-epej4.png Go MAEDA, 2024-10-24 10:51
41572.patch (1.58 KB) 41572.patch Go MAEDA, 2024-10-24 10:51
41572-v2.patch (2.53 KB) 41572-v2.patch Go MAEDA, 2024-10-26 07:55

Related issues

Related to Redmine - Feature #31505: Mark edited journal notes as "Edited"ClosedGo MAEDAActions
Actions

Also available in: Atom PDF