Page Menu
Home
Phabricator
Search
Configure Global Search
Log In
Files
F15395820
D10235.diff
No One
Temporary
Actions
View File
Edit File
Delete File
View Transforms
Subscribe
Mute Notifications
Award Token
Flag For Later
Size
2 KB
Referenced Files
None
Subscribers
None
D10235.diff
View Options
diff --git a/src/applications/maniphest/editor/ManiphestTransactionEditor.php b/src/applications/maniphest/editor/ManiphestTransactionEditor.php
--- a/src/applications/maniphest/editor/ManiphestTransactionEditor.php
+++ b/src/applications/maniphest/editor/ManiphestTransactionEditor.php
@@ -373,11 +373,6 @@
->setOldValue(array($object->getPHID() => $old))
->setNewValue(array($object->getPHID() => $new));
- // TODO: We should avoid notifiying users about these indirect
- // changes if they are getting a notification about the current
- // change, so you don't get a pile of extra notifications if you are
- // subscribed to this task.
-
id(new ManiphestTransactionEditor())
->setActor($this->getActor())
->setActingAsPHID($this->getActingAsPHID())
diff --git a/src/applications/maniphest/storage/ManiphestTransaction.php b/src/applications/maniphest/storage/ManiphestTransaction.php
--- a/src/applications/maniphest/storage/ManiphestTransaction.php
+++ b/src/applications/maniphest/storage/ManiphestTransaction.php
@@ -632,14 +632,40 @@
}
case self::TYPE_UNBLOCK:
+ $blocker_phid = key($new);
+ $old_status = head($old);
+ $new_status = head($new);
- // TODO: We should probably not show these in feed; they're highly
- // redundant. For now, just use the normal titles. Right now, we can't
- // publish something to noficiations without also publishing it to feed.
- // Fix that, then stop these from rendering in feed only.
+ $old_closed = ManiphestTaskStatus::isClosedStatus($old_status);
+ $new_closed = ManiphestTaskStatus::isClosedStatus($new_status);
- break;
+ $old_name = ManiphestTaskStatus::getTaskStatusName($old_status);
+ $new_name = ManiphestTaskStatus::getTaskStatusName($new_status);
+ if ($old_closed && !$new_closed) {
+ return pht(
+ '%s reopened %s, a task blocking %s, as "%s".',
+ $this->renderHandleLink($author_phid),
+ $this->renderHandleLink($blocker_phid),
+ $this->renderHandleLink($object_phid),
+ $new_name);
+ } else if (!$old_closed && $new_closed) {
+ return pht(
+ '%s closed %s, a task blocking %s, as "%s".',
+ $this->renderHandleLink($author_phid),
+ $this->renderHandleLink($blocker_phid),
+ $this->renderHandleLink($object_phid),
+ $new_name);
+ } else {
+ return pht(
+ '%s changed the status of %s, a task blocking %s, '.
+ 'from "%s" to "%s".',
+ $this->renderHandleLink($author_phid),
+ $this->renderHandleLink($blocker_phid),
+ $this->renderHandleLink($object_phid),
+ $old_name,
+ $new_name);
+ }
case self::TYPE_OWNER:
if ($author_phid == $new) {
File Metadata
Details
Attached
Mime Type
text/plain
Expires
Mon, Mar 17, 9:54 AM (1 w, 6 d ago)
Storage Engine
blob
Storage Format
Encrypted (AES-256-CBC)
Storage Handle
7705544
Default Alt Text
D10235.diff (2 KB)
Attached To
Mode
D10235: Improve "unblock task" feed stories
Attached
Detach File
Event Timeline
Log In to Comment