@recaptime-dev's working patches + fork for Phorge, a community fork of Phabricator. (Upstream dev and stable branches are at upstream/main and upstream/stable respectively.) hq.recaptime.dev/wiki/Phorge
phorge phabricator
1
fork

Configure Feed

Select the types of activity you want to include in your feed.

Calendar query results should be ordered from first start date to last start date

Summary: Closes T8041, Calendar query results should be ordered from first start date to last start date

Test Plan: Open "Upcoming Events" in Calendar, verify that the event with the first start date is first and that events are ordered in ascending start dates.

Reviewers: #blessed_reviewers, epriestley

Reviewed By: #blessed_reviewers, epriestley

Subscribers: Korvin, epriestley

Maniphest Tasks: T8041

Differential Revision: https://secure.phabricator.com/D12968

+24
+24
src/applications/calendar/query/PhabricatorCalendarEventQuery.php
··· 42 42 return $this; 43 43 } 44 44 45 + protected function getDefaultOrderVector() { 46 + return array('start', 'id'); 47 + } 48 + 49 + public function getOrderableColumns() { 50 + return array( 51 + 'start' => array( 52 + 'table' => $this->getPrimaryTableAlias(), 53 + 'column' => 'dateFrom', 54 + 'reverse' => true, 55 + 'type' => 'int', 56 + 'unique' => false, 57 + ), 58 + ) + parent::getOrderableColumns(); 59 + } 60 + 61 + protected function getPagingValueMap($cursor, array $keys) { 62 + $event = $this->loadCursorObject($cursor); 63 + return array( 64 + 'start' => $event->getDateFrom(), 65 + 'id' => $event->getID(), 66 + ); 67 + } 68 + 45 69 protected function loadPage() { 46 70 $table = new PhabricatorCalendarEvent(); 47 71 $conn_r = $table->establishConnection('r');