Page Menu
Home
Phabricator
Search
Configure Global Search
Log In
Files
F13180887
D15004.diff
No One
Temporary
Actions
View File
Edit File
Delete File
View Transforms
Subscribe
Mute Notifications
Award Token
Flag For Later
Size
1 KB
Referenced Files
None
Subscribers
None
D15004.diff
View Options
diff --git a/src/infrastructure/customfield/standard/PhabricatorStandardCustomFieldDate.php b/src/infrastructure/customfield/standard/PhabricatorStandardCustomFieldDate.php
--- a/src/infrastructure/customfield/standard/PhabricatorStandardCustomFieldDate.php
+++ b/src/infrastructure/customfield/standard/PhabricatorStandardCustomFieldDate.php
@@ -191,6 +191,42 @@
}
}
+ public function getApplicationTransactionTitleForFeed(
+ PhabricatorApplicationTransaction $xaction) {
+
+ $viewer = $this->getViewer();
+
+ $author_phid = $xaction->getAuthorPHID();
+ $object_phid = $xaction->getObjectPHID();
+
+ $old = $xaction->getOldValue();
+ $new = $xaction->getNewValue();
+
+ if (!$old) {
+ return pht(
+ '%s set %s to %s on %s.',
+ $xaction->renderHandleLink($author_phid),
+ $this->getFieldName(),
+ phabricator_datetime($new, $viewer),
+ $xaction->renderHandleLink($object_phid));
+ } else if (!$new) {
+ return pht(
+ '%s removed %s on %s.',
+ $xaction->renderHandleLink($author_phid),
+ $this->getFieldName(),
+ $xaction->renderHandleLink($object_phid));
+ } else {
+ return pht(
+ '%s changed %s from %s to %s on %s.',
+ $xaction->renderHandleLink($author_phid),
+ $this->getFieldName(),
+ phabricator_datetime($old, $viewer),
+ phabricator_datetime($new, $viewer),
+ $xaction->renderHandleLink($object_phid));
+ }
+ }
+
+
public function shouldAppearInConduitTransactions() {
// TODO: Dates are complicated and we don't yet support handling them from
// Conduit.
File Metadata
Details
Attached
Mime Type
text/plain
Expires
Fri, May 10, 5:08 AM (3 w, 1 d ago)
Storage Engine
blob
Storage Format
Encrypted (AES-256-CBC)
Storage Handle
6281618
Default Alt Text
D15004.diff (1 KB)
Attached To
Mode
D15004: Make custom "date" field feed stories human-readable
Attached
Detach File
Event Timeline
Log In to Comment