Page 1 of 2

Column sorting problem

Posted: 01 Jul 2014 21:48
by prino
This concerns XY V14.20.0201

I've got a folder that contains the following five columns:
  • Name
  • Size
  • Type
  • Modified
  • Attr
The folder has two sort keys,
  1. Modified (Descending)
  2. Type (Ascending)
and this sort order is saved as the Folder View

The problem is that with this sort order, some files are sorted first on the "Type" and only then on "Modified", i.e. files with modifications dates "now" (where "now" means more recent than any others) do not end up at the top of the screen! Some further experimentation leads me to believe that once I've done this major-minor (Modified/Type) sort, there is no way of removing either of these fields from some internal sort order variable by trying to sort on only one of them.

However, once I click on any of the other three (Name/Size/Attr) and follow that by a click on "Modified", the sort order is correct and the "now" files are at the top (or bottom).

The attached WinRAR archive, which contains 7 files (stored with all three NTFS dates, just in case) shows the problem.

If you extract it, it will create a folder 01-data, containing

country.wiki, 9,447 bytes, 2014-07-01 14:04:00
days.h-h, 32,949 bytes, 2014-07-01 14:04:00
log2014.wiki, 9,307 bytes, 2014-07-01 14:04:00
tycona.txt, 12,207 bytes, 2014-07-01 20:54:19
tz.txt, 5,629 bytes, 2014-07-01 20:46:48
tzcross.txt, 4,541 bytes, 2014-06-13 19:01:00
year.wiki, 14,155 bytes, 2014-07-01 14:04:00

Click on any of the columns and the data will be sorted in Ascending order, except for, and this may be significant, "Modified" which is sorted in Descending order.

Sort on "Modified" as major and then sort on Type (shift-click) as minor. The order will be

days.h-h, 32,949 bytes, 2014-07-01 14:04:00
tycona.txt, 12,207 bytes, 2014-07-01 20:54:19
tz.txt, 5,629 bytes, 2014-07-01 20:46:48
log2014.wiki, 9,307 bytes, 2014-07-01 14:04:00
year.wiki, 14,155 bytes, 2014-07-01 14:04:00
country.wiki, 9,447 bytes, 2014-07-01 14:04:00
tzcross.txt, 4,541 bytes, 2014-06-13 19:01:00

and that is wrong, wrong, wrong, tycona.txt should be at the top as "Modified" is the major sort field. Having set this major/minor sort order, now sort on "Modified", (do it twice) and the result will be

days.h-h, 32,949 bytes, 2014-07-01 14:04:00
tycona.txt, 12,207 bytes, 2014-07-01 20:54:19
tz.txt, 5,629 bytes, 2014-07-01 20:46:48
log2014.wiki, 9,307 bytes, 2014-07-01 14:04:00
year.wiki, 14,155 bytes, 2014-07-01 14:04:00
country.wiki, 9,447 bytes, 2014-07-01 14:04:00
tzcross.txt, 4,541 bytes, 2014-06-13 19:01:00

Which is still wrong, the two .txt files should be at the top

Now sort on "Name", then sort on "Modified", and this time the sort on "Modified" is correct. Now shift-click on "Name" and discover that once again the major (="Modified") column is ignored, and the two .txt files that should be at the top (or bottom) are in fact sorted somewhere in the middle.

Well enough explained?

Re: Column sorting problem

Posted: 02 Jul 2014 11:30
by admin
Confirmed!

EDIT: Ok, confirmed, but it is a feature! On secondary sorting (and on grouping) the *time part* of the file date/time is ignored. I made it like this because otherwise you hardly get any groups (rarely have two files exactly the same date stamp).

Re: Column sorting problem

Posted: 02 Jul 2014 15:41
by prino
admin wrote:Confirmed!

EDIT: Ok, confirmed, but it is a feature! On secondary sorting (and on grouping) the *time part* of the file date/time is ignored. I made it like this because otherwise you hardly get any groups (rarely have two files exactly the same date stamp).
If it's a feature, it's a very bad feature. Can you please consider providing a tweak that allows using the full timestamp for all sorting?

Re: Column sorting problem

Posted: 02 Jul 2014 15:43
by admin
No, it's a good feature, otherwise I would not have added it.

Re: Column sorting problem

Posted: 02 Jul 2014 16:00
by prino
No, I'm sorry but I strongly have to disagree here!

Either you sort on a field, or you don't sort on a field, not you sort on a field, but once you add another field, you only sort on a part of the first field.

Re: Column sorting problem

Posted: 02 Jul 2014 16:09
by PeterH
prino wrote:No, I'm sorry but I strongly have to disagree here!

Either you sort on a field, or you don't sort on a field, not you sort on a field, but once you add another field, you only sort on a part of the first field.
But you've understood why Don made it this way?

And you don't show complete time info: it's exact to about a microsecond. If you first sort by this - you will not need a secondary sort.

Re: Column sorting problem

Posted: 02 Jul 2014 17:10
by LittleBiG
I feel still there is a small bug here. (I understand this feature and agree that it is a good one! I hope prino also will see it soon.)
I have a primary sorting by Modified and a secondary one by Type. Then I click on the column header of Modified. The secondary sort will be switched off (small triangle disappears from Type) and the sorting (by Modified) will be reversed. But the sorting feels as if the secondary sort would be alive, and sort the files accordingly (you can check it clicink Modified more times). I have to change the sorting to any other column (for example Name), then back to Modified, to achieve the expected normal sorting.

My guess is that secondary sorting isn't switched off when you click on the primary sort column. So the little triangle should remain, no?

Re: Column sorting problem

Posted: 02 Jul 2014 18:48
by prino
PeterH wrote:
prino wrote:No, I'm sorry but I strongly have to disagree here!

Either you sort on a field, or you don't sort on a field, not you sort on a field, but once you add another field, you only sort on a part of the first field.
But you've understood why Don made it this way?

And you don't show complete time info: it's exact to about a microsecond. If you first sort by this - you will not need a secondary sort.
All times are accurate, microsecond portions are guaranteed to be 000000!

In my case all files in the directory are set with a touch program to exact timestamps, down to the micro-second, i.e. all of them, except the ones I'm concerned about, and in such cases Don's "feature" is of no use - many of the files come from PDS'es on z/OS and the program (on z/OS) that builds the, more gobbledygook, AMATERSE'd XMIT datasets also builds a BAT file to apply the z/OS dates to the resulting files on windows, and that results in nice "clean" timestamps where a full sort would be OK.

Re: Column sorting problem

Posted: 02 Jul 2014 20:48
by admin
LittleBiG wrote:I feel still there is a small bug here. (I understand this feature and agree that it is a good one! I hope prino also will see it soon.)
I have a primary sorting by Modified and a secondary one by Type. Then I click on the column header of Modified. The secondary sort will be switched off (small triangle disappears from Type) and the sorting (by Modified) will be reversed. But the sorting feels as if the secondary sort would be alive, and sort the files accordingly (you can check it clicink Modified more times). I have to change the sorting to any other column (for example Name), then back to Modified, to achieve the expected normal sorting.

My guess is that secondary sorting isn't switched off when you click on the primary sort column. So the little triangle should remain, no?
Indeed, good find! Fix comes.

Re: Column sorting problem

Posted: 02 Jul 2014 21:17
by admin
prino wrote:
PeterH wrote:
prino wrote:No, I'm sorry but I strongly have to disagree here!

Either you sort on a field, or you don't sort on a field, not you sort on a field, but once you add another field, you only sort on a part of the first field.
But you've understood why Don made it this way?

And you don't show complete time info: it's exact to about a microsecond. If you first sort by this - you will not need a secondary sort.
All times are accurate, microsecond portions are guaranteed to be 000000!

In my case all files in the directory are set with a touch program to exact timestamps, down to the micro-second, i.e. all of them, except the ones I'm concerned about, and in such cases Don's "feature" is of no use - many of the files come from PDS'es on z/OS and the program (on z/OS) that builds the, more gobbledygook, AMATERSE'd XMIT datasets also builds a BAT file to apply the z/OS dates to the resulting files on windows, and that results in nice "clean" timestamps where a full sort would be OK.
I'll add tweak for it. Kanzen, baby! :beer:

Re: Column sorting problem

Posted: 02 Jul 2014 22:05
by LittleBiG
admin wrote:Indeed, good find! Fix comes.
I have just tried the fix. It means there is no need this line in the help file anymore, because the single click without SHIFT works in the same way.
Tip: You can remove any secondary sorting and keep the current primary sort order: Hold SHIFT and click the primary sort column.

Re: Column sorting problem

Posted: 02 Jul 2014 22:08
by admin
Oh yes, seems you are right.

Re: Column sorting problem

Posted: 08 Jul 2014 14:23
by admin
prino wrote:This concerns XY V14.20.0201 ...
So, does it work now as you wished?

Re: Column sorting problem

Posted: 08 Jul 2014 20:13
by prino
admin wrote:
prino wrote:This concerns XY V14.20.0201 ...
So, does it work now as you wished?
Just arrived in Vilnius, and will have to wait until we're visiting the in-laws, our internet (on the borrowed wireless connection of the neighbours - with their blessing) is just to slow and inconsistent to download anything.

Re: Column sorting problem

Posted: 30 Jul 2014 00:43
by prino
Is there a tweak or is there no tweak to use the full timestamp under all circumstances, all the sort items I've tried changing in the configuration file don't seem to solve that files with a time of 00:00:00 still end up between files with a time of 12:00:00 after adding a secondary sort field.

If there is one, what is it, I cannot find it in the myriad of options - now on V14.30.0301.