Publish report viewer: Report items sorting#6092
Conversation
|
Out of curiosity - why wouldn't we just use the Create timestamp or Date modified timestamp of the file on disk? |
BigRoy
left a comment
There was a problem hiding this comment.
With this PR I'm unable to drop new error reports onto the left panel to load new reports if I remove an entry and try to drag 'n' drop it in directly again. I then need to first close the UI and restart it. (it migth be that this behavior is similar as before)
Also, if I drop in a file that's ALREADY in the UI then the UI appears to do nothing (no warning/error). I'd expect that if it should not add existing entries again, that instead it's best to highlight what matching entry already exists?
But maybe better is being able to load a file, again and again, as new entries?
I don't think those metadata are helpfull. UI will create and modify the file at the moment you drop the file in, or change label. Also create time of a file is usually not easy to pass to a different machine (especially to different OS).
That sounds like I've added a bug. Will look into it.
What if you'd drop 3 reports, 1 is new and 2 were already there, what should happen? I can imagine that new entries are highlighted in some way, maybe? Probably not in this PR.
That was actually a bug that you could do that. Each report has id, which is used for mapping in backend and also to store the report into file. Practically it is not possible to have 2 different reports with same id, until you manually modify them. |

Changelog Description
Proposal of items sorting in Publish report viewer tool. Items are sorted by report creation time. Creation time is also added to publish report data when saved from publisher tool.
Additional info
For older report items is used file modification time as 'created_at'. Possible issues with this approach is that new dropped report may not be as last but in the middle, which may not be ideal. ISO timestamp should be probably used instead of "current timezone" timestamp.
Other possible approaches:
intwith sort value is stored for each item.Testing notes: