View Issue Details
ID | Project | Category | View Status | Date Submitted | Last Update |
---|---|---|---|---|---|
0036257 | mantisbt | bugtracker | public | 2025-08-11 06:34 | 2025-09-02 03:38 |
Reporter | pikachurus | Assigned To | |||
Priority | normal | Severity | minor | Reproducibility | always |
Status | confirmed | Resolution | open | ||
Product Version | 2.26.4 | ||||
Summary | 0036257: Deleted notes not showing in bug history | ||||
Description | issue was transfered from public to private project (if it's matter) user1 (manager role in project) writes a comment (not a private), then deletes it. user2 (also manager role in project) recieved notification (to e-mail and telegram) with this comment user2 and even user with role administrator can't see this records (created/deleted) in bug history. but user1 see them. | ||||
Tags | No tags attached. | ||||
In history API, when processing bugnote add/change/delete events, there is a check to ensure that the bugnote exists, and if not the event is not shown. This check is bypassed for the note's creator only, which explains the behavior. In history_get_event_from_row() function:
This was introduced in MantisBT master-1.3.x 19736210 (see 0021878); I'm not really sure if that behavior was intentional, maybe @vboctor who authored the change will care to comment. |
|
@dregad I would keep it as it is. |
|
That's true, but at the same time the note's content is gone so it does not really matter so much as there is no real information disclosure (just info about a note added then deleted, that user could not see before). What I do find confusing, is that you can get a partial history. Consider the following scenario,
This is what everyone sees at the end:
|
|
And for the record
This makes no difference, the behavior is identical regardless of project / issue view state. |
|
I believe we have the following options:
Option 3 sounds nice, but maintaining proper sort order would be tricky due to the way the history array is built. I would personally go for 1 for the sake of simplicity, but if you think it's important not to disclose that a (potentially private) note was created then deleted then I would at least recommend option 2 so admins can have a complete, unfiltered view. |
|
Personally, I think that access to all events in the bugs history should be configured here |
|
I don't think this is worth adding another config option to store the necessary threshold. |
|
no another option - in that one (View Issue History) |
|
$g_view_history_threshold controls the access to view history at a global level, but further visibility restrictions must apply on individual history items, based on context (e.g. a user may not be allowed to view private notes, or issues linked in a restricted project - and therefore should not see related history events). What is happening here, is that since the note was deleted it is not possible to check its visibility status anymore since the database record no longer exists. Mantis currently takes the most conservative approach of only showing the event to the person that initiated it. As mentioned before, this is a corner case that is not worth introducing a special config option to fix. We just need to decide on one of the options I outlined in 0036257:0070439. |
|
That would be a privacy issue. Even the involvement of a user on an issue can be sensitive, even if the contents were deleted.
I'm OK with administrators seeing everything.
That is such a corner case. I don't think it is worth adding the complexity and runtime overhead. I suspect most of the time, such notes will be deleted shortly after creation - e.g. added to wrong issues. Otherwise, it is not the most common scenarios to delete old notes.
That's also fine by me. In summary, I would go for 2 or 4. |
|
I think a manager should also see all bug history of his project. |
|
Makes sense. @vboctor OK with you ? |
|
I think anyone who has access to view other user's private notes for the project, can see the history events of deleted notes. This will often cover DEVELOPERS, MANAGERS, and ADMINISTRATOR. |
|
OK that makes even more sense :-) |
|