1
0
Fork 0
mirror of https://we.phorge.it/source/phorge.git synced 2024-12-23 05:50:55 +01:00

Hide "X created Y, a subtask of P." feed stories again

Summary: Fixes T12787. Modular Transactions don't actually support `shouldHideForFeed()`. I'll add some discussion to the task.

Test Plan: Created a subtask, saw no more "X reopened Y, a subtask of P" feed story.

Reviewers: chad

Reviewed By: chad

Maniphest Tasks: T12787

Differential Revision: https://secure.phabricator.com/D18058
This commit is contained in:
epriestley 2017-06-01 07:58:10 -07:00
parent fbb7673439
commit 995c1503e7
2 changed files with 16 additions and 9 deletions

View file

@ -40,6 +40,22 @@ final class ManiphestTransaction
return parent::shouldGenerateOldValue();
}
public function shouldHideForFeed() {
// NOTE: Modular transactions don't currently support this, and it has
// very few callsites, and it's publish-time rather than display-time.
// This should probably become a supported, display-time behavior. For
// discussion, see T12787.
// Hide "alice created X, a task blocking Y." from feed because it
// will almost always appear adjacent to "alice created Y".
$is_new = $this->getMetadataValue('blocker.new');
if ($is_new) {
return true;
}
return parent::shouldHideForFeed();
}
public function getRequiredHandlePHIDs() {
$phids = parent::getRequiredHandlePHIDs();

View file

@ -9,15 +9,6 @@ final class ManiphestTaskUnblockTransaction
return null;
}
public function shouldHideForFeed() {
// Hide "alice created X, a task blocking Y." from feed because it
// will almost always appear adjacent to "alice created Y".
$is_new = $this->getMetadataValue('blocker.new');
if ($is_new) {
return true;
}
}
public function getActionName() {
$old = $this->getOldValue();
$new = $this->getNewValue();