Submitted by lucasd on 2010/12/05 21:57
 I have encountered a simple situation in which manual sort order gets lost. Steps to repeat (I'm using 0.9.25H 12/3/2010 installed version):
  • In Options | Grids, check the box for "While editing, Enter creates a new item.
  • Create new grid.
  • In the first item space, write "Two".
  • Press enter.
  • In the second item space, write "Three".
  • Now, select the first item ("Two"), and press alt+enter. This should create a new item above "Two". 
  • In the new (top) item space, write "One." The three items should now appear in order from top to bottom: One, Two, Three.
  • Save and close the grid. 
  • Reopen the grid. If your situation is like mine, the order will now have changed to: Two, Three, One.
In other words, the order of items reverts to the order of entry (which is also the order of item ID's), but the manually created order gets lost. Can others verify? (Let me know if my description isn't clear.)
 
(Also note: Before encountering the behaviour described here, I wrote another post with a question about manual sort order metadata here.)
 
UPDATE: I encountered the behaviour described above while writing a letter. Just now I once again manually moved what should be the first line of the letter back to the top. But then once again closing and re-opening the grid caused that line to move back down (to what happens to be its position when sorted by item ID, even though I have all sorting turned off). And the same goes for the test scenario described above. Even when I manually move "One" back to the top, I can't get it to stick.
 
UPDATE 2: I just discovered this thread and this Mantis entry. Sorry I hadn't done enough digging before writing this post.
 
UPDATE 3: In the other thread mentioned above, Armando wrote, "TLI can't retain a manual reordering of items". So, I tried the scenario described above with the new items all under a parent item, and this way the order was maintained. So it seems that the solution, for now, is to have a 'parent' item for my letter, such that the top-level items of my letter are not actually TLI's. That way they'll maintain their order.
 
UPDATE 4: Note, however, that the method described above (Update 3) does not work if the children are hoisted. When hoisted, as far as I can tell, they become like TLI's again, and lose their manually created order.
 
Thanks,
Lucas
 

Comments

Hi Lucas,
 
All your observations are correct. This is how IQ's "manual" sorting works at this point. Manual sorting is always retained (and you verify that by deactivating the source bar sort box -- alt+s, last text box on the right),  unless :
 
1- items are TLIs (you need to number them or use another systemto  order them using either the columns headers + sort bar OR the sort text box from the source bar)
2- you sort items using the sort bar + column headers AND you manually move an item afterward. If you don't manually change the order of items the column sorting shouldn't affect anything.
 
These rules are not ideal and a bit confusing for sure. Sorting is something Pierre said he'd review at some point.
 
There are many other threads where sorting is discussed. The last one being : Sorting : the UI

lucasd

2010/12/06 00:08

In reply to by Armando

Thanks, Armando. I now realize, also, that the gist of this is explained in the manual, which I hadn't studied carefully enough. Perhaps the manual can be updated to clarify that the issue with "manual sorting" also applies when using "alt+enter" and also to clarify that "children" behave like TLI's when hoisted.

Armando

2010/12/06 02:02

In reply to by lucasd

[quote=lucasd]
Thanks, Armando. I now realize, also, that the gist of this is explained in the manual, which I hadn't studied carefully enough. Perhaps the manual can be updated to clarify that the issue with "manual sorting" also applies when using "alt+enter" and also to clarify that "children" behave like TLI's when hoisted.
[/quote]
 
I made some modifications to the manual this evening.
I'll put a note for myself to add the 2 points you're mentioning. (But anybody can do it of course... Feel free to add these elements if you want.)