PDA

View Full Version : Task Sort Order


trimble
14-04-05, 05:03 AM
I was hoping someone could point me to the sql code which controls the order in which tasks are displayed. I would like to change the default order in which tasks are displayed.

pedroa
14-04-05, 07:43 AM
Yep, this a hard one to spot, but has a final simple answer:
line 283 of modules/tasks/tasks.php that's where you change the default order and is defined:
"\nORDER BY project_id, task_start_date";

That means it is being ordered by project id (internal number) ascend and then by task start date ascend too.

Funny, line 285 was left for some debug, if you uncomment that line you'll see the whole sql statment on screen.

This one is kinda hard to find because the building of the sql statment is quite long, it starts on line 135 and ends on that line 283, then if permissions are correct the $tsql is passed to mysql server.

I guess you know what to do now...

Pedro A.

trimble
14-04-05, 07:51 AM
Yeah!! Thank you very much Pedro!