sadmicrowave/TimeBlogger

Project List and Task List Sorting Problems

Closed this issue · 3 comments

Projects do not seem to be sorting by created in a descending order. Also, the updated sorting order of the tasks seem to be malfunctioning.

The Project List sorting issue is stemming from tbProjects.created is a Date field, not DateTime field. Meaning when multiple projects are created within the same day the sorting of the created field will be unpredictable. Changing the project sort criteria to sort by ProjectId DESC rather than created will also result in the newest project being listed first.

The task list view is not sorting correctly because the tbTasks.updated field is a TEXT field where 12 hour formatted time is stored. A sorting conflict arrises when we have a task saved at 4 am and 9 pm since 9 is greater than 4. One possible solution to this issue is retaining 24 hour time in this field. A potential drawback is that not all users know how to read 24 hour time.

issue fixed for sorting correctly by both time and name of task. Ended up using 'COLLATE NONCASE' for the task name