From 86dbf1d17d20fb177c0fd8e60563a7c661af05ba Mon Sep 17 00:00:00 2001 From: epriestley Date: Mon, 4 Aug 2014 12:03:36 -0700 Subject: [PATCH] Recognize Maniphest task description as a remarkup block Summary: Ref T4589. We don't recognize task descriptions as remarkup blocks, so `{F...}` references in them do not get attached to the objects, and thus no policy exemption is created. Recognize them, which activates `{F...}` and `@mentions`. We probably have a few more of these in other applications, but it's not a big deal to clean them up as they arise. Test Plan: Uploaded a file to a task in the description field, saw it attach and get a policy exemption. Reviewers: btrahan Reviewed By: btrahan Subscribers: epriestley Maniphest Tasks: T4589 Differential Revision: https://secure.phabricator.com/D10139 --- .../maniphest/storage/ManiphestTransaction.php | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/src/applications/maniphest/storage/ManiphestTransaction.php b/src/applications/maniphest/storage/ManiphestTransaction.php index e663a17c7b..4e297534ed 100644 --- a/src/applications/maniphest/storage/ManiphestTransaction.php +++ b/src/applications/maniphest/storage/ManiphestTransaction.php @@ -43,6 +43,18 @@ final class ManiphestTransaction return parent::shouldGenerateOldValue(); } + public function getRemarkupBlocks() { + $blocks = parent::getRemarkupBlocks(); + + switch ($this->getTransactionType()) { + case self::TYPE_DESCRIPTION: + $blocks[] = $this->getNewValue(); + break; + } + + return $blocks; + } + public function getRequiredHandlePHIDs() { $phids = parent::getRequiredHandlePHIDs();