New folder created is missing on the recent folder list. Need to set MRMTime when creating folder
Categories
(Thunderbird :: Mail Window Front End, enhancement)
Tracking
(Not tracked)
People
(Reporter: lazlong, Unassigned)
References
(Depends on 1 open bug, )
Details
Attachments
(1 obsolete file)
Comment 1•8 years ago
|
||
Comment 4•8 years ago
|
||
Comment 7•7 years ago
|
||
Comment 8•6 years ago
|
||
Mihai, with the success of bug 546722, possible to continue your skills here?
Sure, I'll take a look and get back to you in a day or two.
Comment 10•6 years ago
|
||
BTW, it might be that the new folders don't yet have a value for MRMTime (the most recently modified timestamp), and thus the menu building ignores them:
// Find 15 (_MAXRECENT) of most recently modified ones.
specialFolders = this.getMostRecentFolders(specialFolders,
this._MAXRECENT,
"MRMTime");
Comment 11•6 years ago
|
||
So yes, I confirm that the new folders don't yet have "MRMTime" & "MRUTime" values. But so do other folders, depending on how one has historically used them, so checking these two fields for "empty" won't do here. Thinking of other ways...
Comment 12•6 years ago
|
||
Wouldn't it actually make sense to initialize the "MRMTime" & "MRUTime" values to the current time when the folder is created, so that this issue will be indirectly addressed?
As an analogy, this would somewhat be similar to how POSIX defines the three file timestamps handling. And probably as a consequence, GNU C does this: "When a file is created, all three time stamps for that file are set to the current time."
Jorg, who decides if this is acceptable?
Comment 13•6 years ago
|
||
Usually you just submit a patch to fix a bug or implement a feature and then the reviewer decides. This looks reasonable, so I think your patch would be accepted. Let's ask Aceman, he's recently worked in this area.
Comment 14•6 years ago
|
||
Thanks Jorg.
![]() |
||
Comment 15•6 years ago
|
||
(In reply to Mihai from comment #12)
Wouldn't it actually make sense to initialize the "MRMTime" & "MRUTime" values to the current time when the folder is created, so that this issue will be indirectly addressed?
The MRUTime and MRMTime seems to be documented here:
https://searchfox.org/comm-central/source/mailnews/base/public/msgCore.h#44
Currently the MRMTime is only changed when a message is copied/moved to a folder (see SetMRMTime() and UpdateTimestamps()).
But initializing it at folder creation time seems reasonable. Users not wanting new folders in the Recent list probably won't be affected much, there will not be a flood of new folders pushing the useful folders out of the Recent list.
![]() |
||
Comment 16•6 years ago
|
||
(In reply to Jorg K (GMT+1) from comment #13)
Usually you just submit a patch to fix a bug or implement a feature and then the reviewer decides. This looks reasonable, so I think your patch would be accepted. Let's ask Aceman, he's recently worked in this area.
Of course it is better to ask before submitting a complicated patch and having it shot down :)
Comment 17•6 years ago
|
||
Agreed on all counts, thanks. I'll look into it then.
Comment 18•6 years ago
|
||
I have briefly looked in the past at where the various folder properties are set - in a number of locations actually -, but couldn't yet identify where to best check for the presence of the "MRMTime" & "MRUTime" properties, to initialize them.
So, to anyone willing to take over, please go ahead.
Comment 19•6 years ago
|
||
Aceman, since you've worked on recent folders in bug 949135.
![]() |
||
Comment 20•6 years ago
|
||
Yes, actually bug 949135 has shown that the MRUTime of a newly created folder is somewhere in year 2000, but not zero.
Yes, for the Recent submenu in folder picker we need MRMTime, but we could set both.
Comment 21•5 years ago
|
||
Mihai, does that give you enough information to proceed?
Comment 22•5 years ago
|
||
(In reply to Wayne Mery (:wsmwk) from comment #21)
Mihai, does that give you enough information to proceed?
No, as it doesn't hint where MRUTime is set, to set MRMTime as well.
Aceman, do you happen to know? It's probably just a one-liner.
Comment 23•5 years ago
|
||
The 'Recent' list of folders to move/copy to should contain the folder that has been made the moment before, because the user most likely wants to use the last created folder right away (why else would the user have created a folder?).
I gather the just created folder is an even better candidate for the 'most recently used folder list' then a folder which has been used to put a message in!
Comment 26•3 years ago
|
||
(In reply to Mihai from comment #22)
(In reply to Wayne Mery (:wsmwk) from comment #21)
Mihai, does that give you enough information to proceed?
No, as it doesn't hint where MRUTime is set, to set MRMTime as well.
Aceman, do you happen to know? It's probably just a one-liner.
I recently saw how an old archive would ensure the folders it contains would not get ignored during decompression, by making them contain dummy files to be deleted by the user.
If setting those parameters that seem to stall everything is hard to do manually, would it be possible to create a dummy message, move it to the folder, then delete it, allowing older systems to take care of the details?
Comment 27•3 years ago
|
||
One or both of these searches should help you
Updated•3 years ago
|
Comment 28•3 years ago
|
||
Wow, this thread is rather old, and I also miss this function. Which folder could be more "recent" than the newest one? I created it because I want to use it, not just for fun.
Reporter | ||
Comment 29•3 years ago
|
||
Yep, guys please add this function as it's really needed..
![]() |
||
Comment 30•3 years ago
|
||
It is because MRMTime that is used to choose folders into the recent list is defined as "Most recently moved to" not "most recently modified":
https://searchfox.org/comm-central/rev/bfefc713c577d1b7db4e06f16bd687ccb7875ea7/mailnews/base/public/msgCore.h#44
But maybe it shouldn't hurt if we add recently created folders to it.
Updated•3 years ago
|
Updated•2 years ago
|
Updated•1 year ago
|
Comment 32•1 year ago
|
||
Updated•1 year ago
|
Comment 33•1 year ago
|
||
Stepping back a little and ignoring implementation: what should appear on the recent-folder list?
- Folders created by the user
- Folder which have had messages copied/moved into them (by the user, not by filters?)
- Other?
Comment 34•1 year ago
•
|
||
IIRC folders to be excluded:
- noselect folders
- folders set as Favorites
- targets of TB commands like Trash, Spam, Archive
- targets of automation, eg filters (unless a user has done a manual action)
Everything else where a user has created a folder or done a manual move or copy should be fair game. I can't think of others.
Comment 35•1 year ago
|
||
Under my Thunderbirds (v91 and v115), FAVORITE folders do show under RECENT if I COPY'd or MOVE'd to them by hand. I wouldn't want that to change, as one may select a FAV folder this time for several repeated operations and would expect it to be there just like any other folder.
I also suggested long ago that a newly-created folder should also appear under RECENT, since I just created it (perhaps in an obscure path) usually with the immediate intention of using it. I stand by that suggestion (as per Comment 33).
Comment 36•1 year ago
|
||
(In reply to Wayne Mery (:wsmwk) from comment #34)
IIRC folders to be excluded:
But if the user had manually moved a message to one of those folders, that should then appear in the Recent list, right?
Dan's comment #35 all sounds pretty intuitive and sensible stuff to me.
Does it boil down to:
"any user-initiated operation that targets a folder should result in that folder being added to the Recent list"
?
Comment 37•1 year ago
•
|
||
Let me first say that my #1 and #4 items can be ignored. My listing them is just confusing.
As for #2 and #3 ...
(In reply to Ben Campbell from comment #36)
(In reply to Wayne Mery (:wsmwk) from comment #34)
IIRC folders to be excluded:
But if the user had manually moved a message to one of those folders, that should then appear in the Recent list, right?
Dan's comment #35 all sounds pretty intuitive and sensible stuff to me.
Does it boil down to:
"any user-initiated operation that targets a folder should result in that folder being added to the Recent list"
?
No, Trash, Junk and Archive, which are likely used many times a day by every user, and which trivially have messages moved to those folders at the stroke of a single key (delete, J and A) should never be listed in Recent. Putting these in Recent will needlessly pollute the list by bumping off other "frequently used" folders. And that is how it works today, you don't see these folders in Recent. (But they do show up in Favorites list if you have marked them as such - I think that's fine)
As for Favorites, I see that current behavior is a Favorites folder does appear in both lists, as Dan mentions. But IMO that is unnecessary and not something I would have expected. I think it is a mistake. If such a folder can be in the Recent list then why offer a Favorites list at all?
Put another way, wouldn't we prefer to offer to the user a total of 40 unique folder names between Favorites and Recent, rather than have Thunderbird force less than 40 because a fav folder can be in both lists?
Comment 38•1 year ago
|
||
We're probably getting too far into the front end side for me to be commenting now, but I will anyway :-)
To me it sounds like the rules are complicated enough that it should be the front end code which manages a "Recent" list - explicitly adding folders when something significant occurs.
This sounds more manageable than the current situation of trying to bend an ill-defined back-end property (MTMtime) to magically produce the list you'd expect. Especially given that the back end doesn't treat explicitly-user-created folders differently (and I don't think it should).
And if the back end doesn't provide the facilities required to do that, then it should, dammit :-)
I just filed Bug 1892531 to cover the createSubFolder()
not telling you which folder was actually created issue.
Updated•1 year ago
|
Comment 39•1 year ago
|
||
So let's postpone this until the back-end has caught up.
Description
•