Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.

Bug 337752

Summary: navigator sorting wrong after creating folder
Product: [ECD] Orion Reporter: Boris Bokowski <bokowski>
Component: ClientAssignee: Susan McCourt <susan>
Status: RESOLVED FIXED QA Contact:
Severity: normal    
Priority: P3    
Version: 0.2   
Target Milestone: 0.2   
Hardware: PC   
OS: Mac OS X - Carbon (unsup.)   
Whiteboard:

Description Boris Bokowski CLA 2011-02-21 13:52:55 EST
(Mac, Chrome)

steps:
 - go into a directory containing a few files and folders, by clicking on a link in the navigator
 - note how folders are listed first, then files
 - use the toolbar item to create a new folder
 - enter name for the folder, click OK
 expected: the new folder shows up in the list of folders at the top (perhaps, navigating into the new folder would be better, but I'm not sure)
 actual: all files and folders (including the new one) are sorted alphabetically as one list, rather than sorting within the folders and then within the files
Comment 1 Susan McCourt CLA 2011-02-23 13:27:26 EST
fixed >20110223.
This was actually a more general problem that could also be observed by expanding a folder for the first time in either the table or tree view.  The first time it would sort everything alphabetically regardless of file/folder (the way the server returns it).  Collapse and expand again and it would be correct.

We were caching and sorting a copy of the children on the parent, but using the original json array from the server in the subsequent UI updating.  On the second expand, we find the (sorted) cache and the problem corrects itself.

Fixed by not making a copy, there was no need to do this.