View Issue Details
ID | Project | Category | View Status | Date Submitted | Last Update |
---|---|---|---|---|---|
0026128 | mantisbt | ui | public | 2019-09-12 03:58 | 2019-12-09 04:32 |
Reporter | cproensa | Assigned To | dregad | ||
Priority | normal | Severity | minor | Reproducibility | have not tried |
Status | closed | Resolution | fixed | ||
Product Version | 2.23.0 | ||||
Target Version | 2.23.0 | Fixed in Version | 2.23.0 | ||
Summary | 0026128: Attachments displayed with empty user | ||||
Description | As seen in an example: 0026127 | ||||
Tags | No tags attached. | ||||
Attached Files | |||||
First I thought that this was a regression introduced by PR https://github.com/mantisbt/mantisbt/pull/1529, but the same behavior can be observed in 2.22.0 as well. |
|
Nevermind what I wrote in 0026128:0062770 - it does NOT occur in 2.22.0, it is indeed a regression, introduced by MantisBT master 255dfdf2 When adding the attachment, the file_attach_files() function calls file_add() with $p_user_id = 0, while the function expects null to set the default user. |
|
Data fix for attachments having user_id = 0 : set user_id to the linked issue's reporter, if the issue's date_submitted is the same as the attachment's file_added date |
|
MantisBT: master 9d840d2b 2019-09-12 08:47 Details Diff |
Add file with default value 'null' for user id This ensures that the file attachment is added with a reference to the current user. Regression introduced by 255dfdf261c42adb76c4f3b6a157186afe999f9b, caused attachments uploaded together with the issue's submission to be linked to user '0' instead of the reporter. Fixes 0026128 |
Affected Issues 0026128 |
|
mod - core/file_api.php | Diff File |