From 7c9a74ce04d862f4acdfa863ab1bd0623e5fb7ee Mon Sep 17 00:00:00 2001 From: epriestley Date: Thu, 14 Jul 2016 04:44:13 -0700 Subject: [PATCH] Make ghost event instances render better on the event list Summary: Ref T11326. Currently, we render "E (99)" for ghost instances, which is meaningless and inconsistent. Render these more sensibly and consistently. Test Plan: Viewed event list, saw reasonable monograms / object names. Reviewers: chad Reviewed By: chad Maniphest Tasks: T11326 Differential Revision: https://secure.phabricator.com/D16296 --- .../query/PhabricatorCalendarEventSearchEngine.php | 13 ++++++------- 1 file changed, 6 insertions(+), 7 deletions(-) diff --git a/src/applications/calendar/query/PhabricatorCalendarEventSearchEngine.php b/src/applications/calendar/query/PhabricatorCalendarEventSearchEngine.php index f3489c5cee..b88b99dd39 100644 --- a/src/applications/calendar/query/PhabricatorCalendarEventSearchEngine.php +++ b/src/applications/calendar/query/PhabricatorCalendarEventSearchEngine.php @@ -275,19 +275,18 @@ final class PhabricatorCalendarEventSearchEngine } if ($event->getIsGhostEvent()) { - $title_text = $event->getMonogram() - .' (' - .$event->getSequenceIndex() - .'): ' - .$event->getName(); + $monogram = $event->getParentEvent()->getMonogram(); + $index = $event->getSequenceIndex(); + $monogram = "{$monogram}/{$index}"; } else { - $title_text = $event->getMonogram().': '.$event->getName(); + $monogram = $event->getMonogram(); } $item = id(new PHUIObjectItemView()) ->setUser($viewer) ->setObject($event) - ->setHeader($title_text) + ->setObjectName($monogram) + ->setHeader($event->getName()) ->setHref($event->getURI()) ->addAttribute($event_date_info);