# @todo Look into using a button for notes and links, and labels for all else
currentProject = self._get_project()
projId = self._manager.lookup_project(currentProject)["id"]
- for taskDetails in self._manager.get_tasks_with_details(projId):
+ sortedTasks = list(self._manager.get_tasks_with_details(projId))
+ sortedTasks.sort(key = lambda taskDetails: (taskDetails["priority"].get_nothrow(1000), taskDetails["dueDate"].get_nothrow(datetime.datetime.max)))
+ for taskDetails in sortedTasks:
show = self._showCompleted if taskDetails["isCompleted"] else self._showIncomplete
if not show:
continue