diff --git a/src/applications/maniphest/ManiphestTaskQuery.php b/src/applications/maniphest/ManiphestTaskQuery.php index 65fccf07d5..8ee667ca68 100644 --- a/src/applications/maniphest/ManiphestTaskQuery.php +++ b/src/applications/maniphest/ManiphestTaskQuery.php @@ -59,6 +59,7 @@ final class ManiphestTaskQuery { const ORDER_PRIORITY = 'order-priority'; const ORDER_CREATED = 'order-created'; const ORDER_MODIFIED = 'order-modified'; + const ORDER_TITLE = 'order-title'; private $limit = null; const DEFAULT_PAGE_SIZE = 1000; @@ -505,6 +506,9 @@ final class ManiphestTaskQuery { case self::ORDER_MODIFIED: $order[] = 'dateModified'; break; + case self::ORDER_TITLE: + $order[] = 'title'; + break; default: throw new Exception("Unknown order query '{$this->orderBy}'!"); } @@ -519,6 +523,7 @@ final class ManiphestTaskQuery { switch ($column) { case 'subpriority': case 'ownerOrdering': + case 'title': $order[$k] = "task.{$column} ASC"; break; default: diff --git a/src/applications/maniphest/controller/ManiphestTaskListController.php b/src/applications/maniphest/controller/ManiphestTaskListController.php index 1a2eb2a141..1eff255477 100644 --- a/src/applications/maniphest/controller/ManiphestTaskListController.php +++ b/src/applications/maniphest/controller/ManiphestTaskListController.php @@ -437,6 +437,7 @@ final class ManiphestTaskListController extends ManiphestController { $order_map = array( 'priority' => ManiphestTaskQuery::ORDER_PRIORITY, 'created' => ManiphestTaskQuery::ORDER_CREATED, + 'title' => ManiphestTaskQuery::ORDER_TITLE, ); $query->setOrderBy( idx( @@ -796,6 +797,7 @@ final class ManiphestTaskListController extends ManiphestController { 'p' => 'priority', 'u' => 'updated', 'c' => 'created', + 't' => 'title', ); } @@ -822,6 +824,7 @@ final class ManiphestTaskListController extends ManiphestController { 'p' => 'Priority', 'u' => 'Updated', 'c' => 'Created', + 't' => 'Title', ); }