Project

General

Profile

Web imageviewer out of chronological order

Added by Harry Kao over 8 years ago

Hi,

After editing the 'framepath' in leginondb table SessionData, the drop down menu on the imageviewer page of the myami webrowser no longer displays the projects in chronological order. We now have older projects from 2014 showing up on top of the list. Is there a way to restore the order?

Thank you.

Harry

p.s. Other tables, `GridHolderData` and 'ConnectToClientsData', were also edited recently to remove unwanted entries. These tables should not affect the project display order.


Replies (2)

RE: Web imageviewer out of chronological order - Added by Anchi Cheng over 8 years ago

The update of the tables probably changed timestamp, and the secondary sorting is based on that by default.
Try this change in myamiweb/inc/project.inc to force the name sorting.

@@ -151,7 +151,8 @@ class project {
                                ."FROM ".DB_PROJECT.".projects as projects " 
                                ."WHERE projects.`DEF_id` IN ($sharedProjectsQuery) " 
                                ."OR projects.`DEF_id` IN ($ownedProjectsQuery) " 
-                               ."GROUP BY `DEF_id` ";
+                               ."GROUP BY `DEF_id` " 
+                               ."ORDER by projects.`name` ";
                $myprojects = $this->mysql->getSQLResult($q);
                }

RE: Web imageviewer out of chronological order - Added by Anchi Cheng over 8 years ago

Just realize that my suggested change will put them in alphabetical order not chronological (the order it happens) and your description of old project on top is chronological.

Anyway, if you want in chronological order, change "ORDER by" to projects.`DEF_id` not projects.`name`. There is also another line will need to be change if you want the behavior to stay.

    (1-2/2)