Page Menu
Home
Phabricator
Search
Configure Global Search
Log In
Files
F14055046
D12597.diff
No One
Temporary
Actions
View File
Edit File
Delete File
View Transforms
Subscribe
Mute Notifications
Award Token
Flag For Later
Size
3 KB
Referenced Files
None
Subscribers
None
D12597.diff
View Options
diff --git a/src/applications/calendar/editor/PhabricatorCalendarEventEditor.php b/src/applications/calendar/editor/PhabricatorCalendarEventEditor.php
--- a/src/applications/calendar/editor/PhabricatorCalendarEventEditor.php
+++ b/src/applications/calendar/editor/PhabricatorCalendarEventEditor.php
@@ -144,4 +144,14 @@
return $errors;
}
+
+ protected function getMailTo(PhabricatorLiskDAO $object) {
+ return array($object->getUserPHID());
+ }
+
+ protected function shouldPublishFeedStory(
+ PhabricatorLiskDAO $object,
+ array $xactions) {
+ return true;
+ }
}
diff --git a/src/applications/calendar/phid/PhabricatorCalendarEventPHIDType.php b/src/applications/calendar/phid/PhabricatorCalendarEventPHIDType.php
--- a/src/applications/calendar/phid/PhabricatorCalendarEventPHIDType.php
+++ b/src/applications/calendar/phid/PhabricatorCalendarEventPHIDType.php
@@ -29,10 +29,10 @@
$event = $objects[$phid];
$id = $event->getID();
- $name = pht('Event %d', $id);
+ $name = $event->getName();
$handle
- ->setName(pht('Event %d', $id))
+ ->setName($name)
->setFullName(pht('E%d: %s', $id, $name))
->setURI('/E'.$id);
}
diff --git a/src/applications/calendar/storage/PhabricatorCalendarEventTransaction.php b/src/applications/calendar/storage/PhabricatorCalendarEventTransaction.php
--- a/src/applications/calendar/storage/PhabricatorCalendarEventTransaction.php
+++ b/src/applications/calendar/storage/PhabricatorCalendarEventTransaction.php
@@ -127,10 +127,17 @@
$old = $this->getOldValue();
$new = $this->getNewValue();
+ $viewer = $this->getViewer();
+
$type = $this->getTransactionType();
switch ($type) {
case self::TYPE_NAME:
- if ($old) {
+ if ($old === null) {
+ return pht(
+ '%s created %s',
+ $this->renderHandleLink($author_phid),
+ $this->renderHandleLink($object_phid));
+ } else {
return pht(
'%s changed the name of %s from %s to %s.',
$this->renderHandleLink($author_phid),
@@ -141,33 +148,43 @@
break;
case self::TYPE_START_DATE:
if ($old) {
+ $old = phabricator_datetime($old, $viewer);
+ $new = phabricator_datetime($new, $viewer);
return pht(
- '%s edited the start date of this event from %s to %s.',
+ '%s changed the start date of %s from %s to %s.',
$this->renderHandleLink($author_phid),
+ $this->renderHandleLink($object_phid),
$old,
$new);
}
break;
case self::TYPE_END_DATE:
if ($old) {
+ $old = phabricator_datetime($old, $viewer);
+ $new = phabricator_datetime($new, $viewer);
return pht(
- '%s edited the end date of this event from %s to %s.',
+ '%s edited the end date of %s from %s to %s.',
$this->renderHandleLink($author_phid),
+ $this->renderHandleLink($object_phid),
$old,
$new);
}
break;
case self::TYPE_STATUS:
+ $old_name = PhabricatorCalendarEvent::getNameForStatus($old);
+ $new_name = PhabricatorCalendarEvent::getNameForStatus($new);
return pht(
- '%s updated the event status from %s to %s.',
+ '%s updated the status of %s from %s to %s.',
$this->renderHandleLink($author_phid),
- $old,
- $new);
+ $this->renderHandleLink($object_phid),
+ $old_name,
+ $new_name);
break;
case self::TYPE_DESCRIPTION:
return pht(
- "%s updated the event's description.",
- $this->renderHandleLink($author_phid));
+ '%s updated the description of %s.',
+ $this->renderHandleLink($author_phid),
+ $this->renderHandleLink($object_phid));
break;
}
File Metadata
Details
Attached
Mime Type
text/plain
Expires
Sun, Nov 17, 7:44 AM (2 d, 2 h ago)
Storage Engine
blob
Storage Format
Encrypted (AES-256-CBC)
Storage Handle
6762431
Default Alt Text
D12597.diff (3 KB)
Attached To
Mode
D12597: Calendar events should now surface to Feed.
Attached
Detach File
Event Timeline
Log In to Comment