Loading

[SOLVED] How to sort tasks by name

Get help with problems, or report & discuss bugs in Collabtive

[SOLVED] How to sort tasks by name

Postby dadid » 31.07.2017, 12:57

By default, in task list, tasks are sorted by days left. How to sort it by task title?

Thanks
dadid
 
Posts: 5
Joined: 26.01.2017, 12:26

Re: [2.0] How to sort tasks by name

Postby dadid » 01.08.2017, 13:58

Solution:
In class.tasklist change:

$sel2 = $conn->query("SELECT ID FROM tasks WHERE liste = $list[ID] AND status=1 ORDER BY `end`,`title` ASC");

$sel3 = $conn->query("SELECT ID FROM tasks WHERE liste = $list[ID] AND status=0 ORDER BY `end` ASC");

$sel = $conn->query("SELECT ID FROM tasks WHERE `liste` = $id AND `status` = $status ORDER BY `end`,`title` ASC");

to

$sel2 = $conn->query("SELECT ID FROM tasks WHERE liste = $list[ID] AND status=1 ORDER BY `title`,`ID` ASC");

$sel3 = $conn->query("SELECT ID FROM tasks WHERE liste = $list[ID] AND status=0 ORDER BY `title` ASC");

$sel = $conn->query("SELECT ID FROM tasks WHERE `liste` = $id AND `status` = $status ORDER BY `title`,`ID` ASC");
dadid
 
Posts: 5
Joined: 26.01.2017, 12:26


Return to Problems and Bugs

Who is online

Users browsing this forum: No registered users

cron