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

Improve "unblock task" feed stories

Summary:
Fixes T5184. Fixes T5008. Three issues with stories/notifications about changing the status of tasks which block other tasks:

**Bad Feed Stories**

- Problem: Feed story rendering was confusing (T5184).
- Solution: fix it to provide context.

**Too Many Feed Stories**

- Problem: Feed gets a story for the original task's close ("a closed x"), and a story for each blocked task ("a closed x, a task blocking y").
- "Solution": Punt. These are redundant in the full feed but not in filtered feeds. Right solution is display-time aggregation. No users have really complained about this.

**Too Many Notifications**

- Problem: Users subscribed to both tasks get notified about the clsoe, and also about the unblocked task. These notifications are redundant.
- "Solution": Punt. This is easy to fix by silencing notifications for the sub-editor, but I'm worried it would be confusing. Users haven't complained. Display-time aggregation might be a better fix.

Test Plan: {F189463}

Reviewers: btrahan, chad

Reviewed By: chad

Subscribers: epriestley

Maniphest Tasks: T5008, T5184

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

+31 -10
-5
src/applications/maniphest/editor/ManiphestTransactionEditor.php
··· 373 373 ->setOldValue(array($object->getPHID() => $old)) 374 374 ->setNewValue(array($object->getPHID() => $new)); 375 375 376 - // TODO: We should avoid notifiying users about these indirect 377 - // changes if they are getting a notification about the current 378 - // change, so you don't get a pile of extra notifications if you are 379 - // subscribed to this task. 380 - 381 376 id(new ManiphestTransactionEditor()) 382 377 ->setActor($this->getActor()) 383 378 ->setActingAsPHID($this->getActingAsPHID())
+31 -5
src/applications/maniphest/storage/ManiphestTransaction.php
··· 632 632 } 633 633 634 634 case self::TYPE_UNBLOCK: 635 + $blocker_phid = key($new); 636 + $old_status = head($old); 637 + $new_status = head($new); 635 638 636 - // TODO: We should probably not show these in feed; they're highly 637 - // redundant. For now, just use the normal titles. Right now, we can't 638 - // publish something to noficiations without also publishing it to feed. 639 - // Fix that, then stop these from rendering in feed only. 639 + $old_closed = ManiphestTaskStatus::isClosedStatus($old_status); 640 + $new_closed = ManiphestTaskStatus::isClosedStatus($new_status); 640 641 641 - break; 642 + $old_name = ManiphestTaskStatus::getTaskStatusName($old_status); 643 + $new_name = ManiphestTaskStatus::getTaskStatusName($new_status); 642 644 645 + if ($old_closed && !$new_closed) { 646 + return pht( 647 + '%s reopened %s, a task blocking %s, as "%s".', 648 + $this->renderHandleLink($author_phid), 649 + $this->renderHandleLink($blocker_phid), 650 + $this->renderHandleLink($object_phid), 651 + $new_name); 652 + } else if (!$old_closed && $new_closed) { 653 + return pht( 654 + '%s closed %s, a task blocking %s, as "%s".', 655 + $this->renderHandleLink($author_phid), 656 + $this->renderHandleLink($blocker_phid), 657 + $this->renderHandleLink($object_phid), 658 + $new_name); 659 + } else { 660 + return pht( 661 + '%s changed the status of %s, a task blocking %s, '. 662 + 'from "%s" to "%s".', 663 + $this->renderHandleLink($author_phid), 664 + $this->renderHandleLink($blocker_phid), 665 + $this->renderHandleLink($object_phid), 666 + $old_name, 667 + $new_name); 668 + } 643 669 644 670 case self::TYPE_OWNER: 645 671 if ($author_phid == $new) {