Index: src/applications/conpherence/editor/ConpherenceEditor.php =================================================================== --- src/applications/conpherence/editor/ConpherenceEditor.php +++ src/applications/conpherence/editor/ConpherenceEditor.php @@ -400,7 +400,9 @@ return PhabricatorEnv::getEnvConfig('metamta.conpherence.subject-prefix'); } - protected function supportsFeed() { + protected function shouldPublishFeedStory( + PhabricatorLiskDAO $object, + array $xactions) { return false; } Index: src/applications/differential/editor/DifferentialTransactionEditor.php =================================================================== --- src/applications/differential/editor/DifferentialTransactionEditor.php +++ src/applications/differential/editor/DifferentialTransactionEditor.php @@ -785,7 +785,9 @@ return parent::requireCapabilities($object, $xaction); } - protected function supportsFeed() { + protected function shouldPublishFeedStory( + PhabricatorLiskDAO $object, + array $xactions) { return true; } Index: src/applications/files/editor/PhabricatorFileEditor.php =================================================================== --- src/applications/files/editor/PhabricatorFileEditor.php +++ src/applications/files/editor/PhabricatorFileEditor.php @@ -80,7 +80,9 @@ return $body; } - protected function supportsFeed() { + protected function shouldPublishFeedStory( + PhabricatorLiskDAO $object, + array $xactions) { return true; } Index: src/applications/legalpad/editor/LegalpadDocumentEditor.php =================================================================== --- src/applications/legalpad/editor/LegalpadDocumentEditor.php +++ src/applications/legalpad/editor/LegalpadDocumentEditor.php @@ -183,7 +183,9 @@ } - protected function supportsFeed() { + protected function shouldPublishFeedStory( + PhabricatorLiskDAO $object, + array $xactions) { return false; } Index: src/applications/macro/editor/PhabricatorMacroEditor.php =================================================================== --- src/applications/macro/editor/PhabricatorMacroEditor.php +++ src/applications/macro/editor/PhabricatorMacroEditor.php @@ -156,7 +156,9 @@ return PhabricatorEnv::getEnvConfig('metamta.macro.subject-prefix'); } - protected function supportsFeed() { + protected function shouldPublishFeedStory( + PhabricatorLiskDAO $object, + array $xactions) { return true; } } Index: src/applications/maniphest/editor/ManiphestTransactionEditor.php =================================================================== --- src/applications/maniphest/editor/ManiphestTransactionEditor.php +++ src/applications/maniphest/editor/ManiphestTransactionEditor.php @@ -251,19 +251,8 @@ PhabricatorLiskDAO $object, array $xactions) { - $should_mail = true; - if (count($xactions) == 1) { - $xaction = head($xactions); - switch ($xaction->getTransactionType()) { - case ManiphestTransaction::TYPE_SUBPRIORITY: - $should_mail = false; - break; - default: - $should_mail = true; - break; - } - } - return $should_mail; + $xactions = mfilter($xactions, 'shouldHide', true); + return $xactions; } protected function getMailSubjectPrefix() { @@ -318,8 +307,10 @@ return $body; } - protected function supportsFeed() { - return true; + protected function shouldPublishFeedStory( + PhabricatorLiskDAO $object, + array $xactions) { + return $this->shouldSendMail($object, $xactions); } protected function supportsSearch() { Index: src/applications/maniphest/storage/ManiphestTransaction.php =================================================================== --- src/applications/maniphest/storage/ManiphestTransaction.php +++ src/applications/maniphest/storage/ManiphestTransaction.php @@ -109,7 +109,7 @@ return true; } - return false; + return parent::shouldHide(); } public function getActionStrength() { Index: src/applications/paste/editor/PhabricatorPasteEditor.php =================================================================== --- src/applications/paste/editor/PhabricatorPasteEditor.php +++ src/applications/paste/editor/PhabricatorPasteEditor.php @@ -157,7 +157,9 @@ ->addHeader('Thread-Topic', "P{$id}"); } - protected function supportsFeed() { + protected function shouldPublishFeedStory( + PhabricatorLiskDAO $object, + array $xactions) { return true; } Index: src/applications/pholio/editor/PholioMockEditor.php =================================================================== --- src/applications/pholio/editor/PholioMockEditor.php +++ src/applications/pholio/editor/PholioMockEditor.php @@ -402,7 +402,9 @@ return PhabricatorEnv::getEnvConfig('metamta.pholio.subject-prefix'); } - protected function supportsFeed() { + protected function shouldPublishFeedStory( + PhabricatorLiskDAO $object, + array $xactions) { return true; } Index: src/applications/ponder/editor/PonderEditor.php =================================================================== --- src/applications/ponder/editor/PonderEditor.php +++ src/applications/ponder/editor/PonderEditor.php @@ -3,7 +3,9 @@ abstract class PonderEditor extends PhabricatorApplicationTransactionEditor { - protected function supportsFeed() { + protected function shouldPublishFeedStory( + PhabricatorLiskDAO $object, + array $xactions) { return true; } Index: src/applications/project/controller/PhabricatorProjectMoveController.php =================================================================== --- src/applications/project/controller/PhabricatorProjectMoveController.php +++ src/applications/project/controller/PhabricatorProjectMoveController.php @@ -105,7 +105,22 @@ $editor->applyTransactions($object, $xactions); - return id(new AphrontAjaxResponse())->setContent(array()); - } + $owner = null; + if ($object->getOwnerPHID()) { + $owner = id(new PhabricatorHandleQuery()) + ->setViewer($viewer) + ->withPHIDs(array($object->getOwnerPHID())) + ->executeOne(); + } + $card = id(new ProjectBoardTaskCard()) + ->setViewer($viewer) + ->setTask($object) + ->setOwner($owner) + ->setCanEdit(true) + ->getItem(); + + return id(new AphrontAjaxResponse())->setContent( + array('task' => $card)); + } } Index: src/applications/transactions/editor/PhabricatorApplicationTransactionEditor.php =================================================================== --- src/applications/transactions/editor/PhabricatorApplicationTransactionEditor.php +++ src/applications/transactions/editor/PhabricatorApplicationTransactionEditor.php @@ -597,7 +597,7 @@ ->queueDocumentForIndexing($object->getPHID()); } - if ($this->supportsFeed()) { + if ($this->shouldPublishFeedStory($object, $xactions)) { $mailed = array(); if ($mail) { $mailed = $mail->buildRecipientList(); @@ -1664,7 +1664,9 @@ /** * @task feed */ - protected function supportsFeed() { + protected function shouldPublishFeedStory( + PhabricatorLiskDAO $object, + array $xactions) { return false; } @@ -1729,6 +1731,7 @@ array $xactions, array $mailed_phids) { + $xactions = mfilter($xactions, 'shouldHideForFeed', true); $related_phids = $this->getFeedRelatedPHIDs($object, $xactions); $subscribed_phids = $this->getFeedNotifyPHIDs($object, $xactions); Index: src/applications/transactions/storage/PhabricatorApplicationTransaction.php =================================================================== --- src/applications/transactions/storage/PhabricatorApplicationTransaction.php +++ src/applications/transactions/storage/PhabricatorApplicationTransaction.php @@ -354,6 +354,10 @@ return $this->shouldHide(); } + public function shouldHideForFeed() { + return $this->shouldHide(); + } + public function getTitleForMail() { return id(clone $this)->setRenderingTarget('text')->getTitle(); } Index: webroot/rsrc/js/application/projects/behavior-project-boards.js =================================================================== --- webroot/rsrc/js/application/projects/behavior-project-boards.js +++ webroot/rsrc/js/application/projects/behavior-project-boards.js @@ -18,8 +18,10 @@ JX.DOM.alterClass(node, 'project-column-empty', !this.findItems().length); } - function onresponse(response) { - + function onresponse(response, item, list) { + list.unlock(); + JX.DOM.alterClass(item, 'drag-sending', false); + JX.DOM.replace(item, JX.$H(response.task)); } function ondrop(list, item, after, from) { @@ -37,10 +39,7 @@ var workflow = new JX.Workflow(config.moveURI, data) .setHandler(function(response) { - onresponse(response); - list.unlock(); - - JX.DOM.alterClass(item, 'drag-sending', false); + onresponse(response, item, list); }); workflow.start();