@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.

Fix an issue where 'Attending' would appear on calendar view unnecessarily

Summary:
Ref T10295

* Viewing Upcoming Events in the calendar would display 'Attending: ' even if there were not attendees. This caused confusion, such as 'Is it telling me I am "Attending?"'
* When a calendar event has no attendees, simply do not display the 'Attending: ' label

Test Plan:
* Add a new event with no one attending.
* Add a new event with one or more attendees.
* View the Upcoming Events query of the Calendar app.
* Notice how the one with no attendees does not show 'Attending: ' while the other with attendees will show the already existing 'Attending: jdoe, ssmith' label.

Reviewers: #blessed_reviewers, epriestley

Reviewed By: #blessed_reviewers, epriestley

Subscribers: Korvin, epriestley

Maniphest Tasks: T10295

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

authored by

Jeremy Cowgar and committed by
epriestley
604b7809 d9bd062b

+19 -16
+19 -16
src/applications/calendar/query/PhabricatorCalendarEventSearchEngine.php
··· 266 266 $list = new PHUIObjectItemListView(); 267 267 268 268 foreach ($events as $event) { 269 - $duration = ''; 270 269 $event_date_info = $this->getEventDateLabel($event); 271 270 $creator_handle = $handles[$event->getUserPHID()]; 272 271 $attendees = array(); ··· 275 274 $attendees[] = $invitee->getInviteePHID(); 276 275 } 277 276 278 - $attendees = pht( 279 - 'Attending: %s', 280 - $viewer->renderHandleList($attendees) 281 - ->setAsInline(1) 282 - ->render()); 283 - 284 - if (strlen($event->getDuration()) > 0) { 285 - $duration = pht( 286 - 'Duration: %s', 287 - $event->getDuration()); 288 - } 289 - 290 277 if ($event->getIsGhostEvent()) { 291 278 $title_text = $event->getMonogram() 292 279 .' (' ··· 302 289 ->setObject($event) 303 290 ->setHeader($title_text) 304 291 ->setHref($event->getURI()) 305 - ->addAttribute($event_date_info) 306 - ->addAttribute($attendees) 307 - ->addIcon('none', $duration); 292 + ->addAttribute($event_date_info); 293 + 294 + if ($attendees) { 295 + $attending = pht( 296 + 'Attending: %s', 297 + $viewer->renderHandleList($attendees) 298 + ->setAsInline(1) 299 + ->render()); 300 + 301 + $item->addAttribute($attending); 302 + } 303 + 304 + if (strlen($event->getDuration()) > 0) { 305 + $duration = pht( 306 + 'Duration: %s', 307 + $event->getDuration()); 308 + 309 + $item->addIcon('none', $duration); 310 + } 308 311 309 312 $list->addItem($item); 310 313 }