From dae63a256124376c8379a7d366d6ab885be22ac6 Mon Sep 17 00:00:00 2001 From: Nik Okuntseff Date: Wed, 29 May 2019 16:24:00 +0000 Subject: [PATCH] Fixed sorting of projects in dropdown on the reports.php page. --- WEB-INF/lib/ttProjectHelper.class.php | 6 +++--- WEB-INF/templates/footer.tpl | 2 +- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/WEB-INF/lib/ttProjectHelper.class.php b/WEB-INF/lib/ttProjectHelper.class.php index 22ef58a2..399cba2d 100644 --- a/WEB-INF/lib/ttProjectHelper.class.php +++ b/WEB-INF/lib/ttProjectHelper.class.php @@ -45,7 +45,7 @@ class ttProjectHelper { // Do a query with inner join to get assigned projects. $sql = "select p.id, p.name, p.tasks, upb.rate from tt_projects p". " inner join tt_user_project_binds upb on (upb.user_id = $user_id and upb.project_id = p.id and upb.status = 1)". - " where p.group_id = $group_id and p.org_id = $org_id and p.status = 1 order by p.name"; + " where p.group_id = $group_id and p.org_id = $org_id and p.status = 1 order by upper(p.name)"; $res = $mdb2->query($sql); if (!is_a($res, 'PEAR_Error')) { while ($val = $res->fetchRow()) { @@ -87,7 +87,7 @@ class ttProjectHelper { $result = array(); $sql = "select id, name, tasks from tt_projects". - " where group_id = $group_id and org_id = $org_id and (status = 0 or status = 1) order by name"; + " where group_id = $group_id and org_id = $org_id and (status = 0 or status = 1) order by upper(name)"; $res = $mdb2->query($sql); if (!is_a($res, 'PEAR_Error')) { while ($val = $res->fetchRow()) { @@ -109,7 +109,7 @@ class ttProjectHelper { $sql = "select p.id, p.name, p.tasks from tt_projects p". " inner join tt_client_project_binds cpb on (cpb.client_id = $user->client_id and cpb.project_id = p.id)". " where p.group_id = $group_id and p.org_id = $org_id and (p.status = 0 or p.status = 1)". - " order by p.name"; + " order by upper(p.name)"; $res = $mdb2->query($sql); if (!is_a($res, 'PEAR_Error')) { diff --git a/WEB-INF/templates/footer.tpl b/WEB-INF/templates/footer.tpl index 49305b5c..4c7e5cad 100644 --- a/WEB-INF/templates/footer.tpl +++ b/WEB-INF/templates/footer.tpl @@ -12,7 +12,7 @@
-
 Anuko Time Tracker 1.19.4.5012 | Copyright © Anuko | +  Anuko Time Tracker 1.19.4.5013 | Copyright © Anuko | {$i18n.footer.credits} | {$i18n.footer.license} | {$i18n.footer.improve} -- 2.20.1