Relationship Graph
View Issue Details
ID | Project | Category | View Status | Date Submitted | Last Update |
---|---|---|---|---|---|
0034597 | mantisbt | migration | public | 2024-08-28 11:32 | 2024-08-30 11:12 |
Reporter | juan alejandro suarez | Assigned To | |||
Priority | normal | Severity | minor | Reproducibility | always |
Status | feedback | Resolution | open | ||
Product Version | 2.26.1 | ||||
Summary | 0034597: Problem with order in atached files when migrate Version From 2.14.0 to Version 2.26.1 | ||||
Description | I make migrate process from Version From 2.14.0 to Version 2.26.1 all good, but the DB estructure changes ( mantis_bug_file_table) last version included column "bugnote_id", when bug page shows results , take in mind this column but in migration process this colum was not filled , for this reason the atached files is showed in "Attached files" section, and not in comments orders thats was uploaded. how could you solve this data problem? Please check atached images. Thanks. | ||||
Steps To Reproduce | Migration from 2.14.0 to Version 2.26.1 | ||||
Tags | No tags attached. | ||||
Attached Files | |||||
It was a design decision taken at the time this feature was implemented, not to try and populate the new mantis_bug_file_table's bugnote_id field, i.e. leave its value to its default of For the record, there are 3 distinct states:
When displaying issue activities, MantisBT will show bugnotes and attachments submitted by the same user at the same time (within delay defined by issue_activity_note_attachments_seconds_threshold config) combined in a single entry. This is the so-called implicit link Note that this is for display only, the database is not updated. Currently the only action that actually updates the field (i.e. makes it an explicit link), is a change in visibility of the associated bugnote (i.e. public -> private or vice-versa). Attachments with bugnote_id == 0 but not matching a bugnote, are treated as bug-level attachments, and therefore listed under Attached Files in the View Issue Details section. Again, this was a design decision; I guess it's arguable, but that's the way it is.
I assume you mean moving the attachments with bugnote_id == 0 back down to the activity list, inserted in the appropriate sequence based on when the attachment was uploaded. Technically, this just requires creating a new bugnote (and related bugnote text record) having a date_submitted (and last_modified) timestamp equal to the attachment's date_added. As of this writing, his can't be done from the MantisBT GUI. One way to do it for individual files would be to add a button next to the attachment, that would call the necessary APIs to perform the above-mentioned tasks. It should be fairly simple to implement. A global approach (i.e. batch job to update all attachments in one go, possibly as a database upgrade step, would be more complex but that's feasible as well although I would not recommend this approach because there is no way to know the intention of the person who uploaded the file (i.e. if it was meant to be a bug-level attachment, or a bugnote without text). Pull requests welcome. |
|
Feature requested in 0023026 is another approach that could work too. |
|