From f0269d696cfe138e4b98055f484132acb7d6ec86 Mon Sep 17 00:00:00 2001 From: lkassianik Date: Mon, 3 Aug 2015 07:01:42 -0700 Subject: [PATCH] Calendar list objects that are ghost events should link to a ghost event, not the parent Summary: Fixes T9034, Calendar list objects that are ghost events should link to a ghost event, not the parent. Test Plan: Open All Events in Calendar, make sure ghost objects open the ghost instance, not the parent instance. Reviewers: epriestley, #blessed_reviewers Reviewed By: epriestley, #blessed_reviewers Subscribers: epriestley, Korvin Maniphest Tasks: T9034 Differential Revision: https://secure.phabricator.com/D13764 --- .../query/PhabricatorCalendarEventSearchEngine.php | 13 ++++++++++++- 1 file changed, 12 insertions(+), 1 deletion(-) diff --git a/src/applications/calendar/query/PhabricatorCalendarEventSearchEngine.php b/src/applications/calendar/query/PhabricatorCalendarEventSearchEngine.php index 4d2193f2bb..8614e68f56 100644 --- a/src/applications/calendar/query/PhabricatorCalendarEventSearchEngine.php +++ b/src/applications/calendar/query/PhabricatorCalendarEventSearchEngine.php @@ -287,10 +287,21 @@ final class PhabricatorCalendarEventSearchEngine $event->getDuration()); } + if ($event->getIsGhostEvent()) { + $title_text = $event->getMonogram() + .' (' + .$event->getSequenceIndex() + .'): ' + .$event->getName(); + } else { + $title_text = $event->getMonogram().': '.$event->getName(); + } + $item = id(new PHUIObjectItemView()) ->setUser($viewer) ->setObject($event) - ->setHeader($viewer->renderHandle($event->getPHID())->render()) + ->setHeader($title_text) + ->setHref($event->getURI()) ->addAttribute($event_date_info) ->addAttribute($attendees) ->addIcon('none', $duration);