Page MenuHomePhabricator

Make pretty feed titles for recurring event edits
Closed, ResolvedPublic

Event Timeline

lpriestley claimed this task.
lpriestley raised the priority of this task from to Normal.
lpriestley updated the task description. (Show Details)
lpriestley added a project: Calendar.
lpriestley added a parent task: Restricted Maniphest Task.
lpriestley added a subscriber: lpriestley.

When creating/editing events, transaction feed stories are generated for every transaction applied to the event object. Sometimes, the feed stories are grouped and prioritized, so that not all stories are visible. But each transaction that can be displayed, should have better text. Currently, event transactions for the recurring information should only be applied when creating an event, since you can not edit the recurring information of a recurring event after it is created.

PhabricatorCalendarEventTransaction is where the transaction feed stories are composed. There are two methods of interest: getTitle and getTitleForFeed. getTitle builds transaction stories that are displayed in the timeline on the event detail view (found at /E123). getTitleForFeed builds transaction stories that will be displayed in Feed (found at /feed). Right now, the recurring transactions all display, "Recurring event has been updated". This text was meant as a placeholder.

In getTitle:

  • case self::TYPE_RECURRING: should display a story that will look something like, "lpriestley made this event recurring."
  • case self::TYPE_FREQUENCY: should display a story that will look something like, "lpriestley made this event repeat weekly."
  • case self::TYPE_RECURRENCE_END_DATE: should display a story that will look something like, "lpriestley edited the recurrence end date of this event."

In getTitleForFeed, those same stories should be built, but "this event" should be replaced with a handle for that object.
case self::TYPE_INSTANCE_OF_EVENT: and case self::TYPE_SEQUENCE_INDEX: should be left as is, because we won't ever hit those two cases, but it might be helpful for troubleshooting.