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

Use transactions properly when building tasks from email

Summary: Fixes T5859. This doesn't change much, but makes the transaction record a little more accurate and activates stuff like `#hashtags` and `{F123}` causing policy associations.

Test Plan: Used `bin/mail receive-test` and mail receiver script to send bug mail, saw hashtags imply projects.

Reviewers: btrahan

Reviewed By: btrahan

Subscribers: epriestley

Maniphest Tasks: T5859

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

+12 -10
+12 -10
src/applications/maniphest/mail/ManiphestReplyHandler.php
··· 57 57 58 58 $is_unsub = false; 59 59 if ($is_new_task) { 60 - // If this is a new task, create a "User created this task." transaction 61 - // and then set the title and description. 62 - $xaction = clone $template; 63 - $xaction->setTransactionType(ManiphestTransaction::TYPE_STATUS); 64 - $xaction->setNewValue(ManiphestTaskStatus::getDefaultStatus()); 65 - $xactions[] = $xaction; 60 + $task = ManiphestTask::initializeNewTask($user); 66 61 67 - $task->setAuthorPHID($user->getPHID()); 68 - $task->setTitle(nonempty($mail->getSubject(), 'Untitled Task')); 69 - $task->setDescription($body); 70 - $task->setPriority(ManiphestTaskPriority::getDefaultPriority()); 62 + $xactions[] = id(new ManiphestTransaction()) 63 + ->setTransactionType(ManiphestTransaction::TYPE_STATUS) 64 + ->setNewValue(ManiphestTaskStatus::getDefaultStatus()); 65 + 66 + $xactions[] = id(new ManiphestTransaction()) 67 + ->setTransactionType(ManiphestTransaction::TYPE_TITLE) 68 + ->setNewValue(nonempty($mail->getSubject(), pht('Untitled Task'))); 69 + 70 + $xactions[] = id(new ManiphestTransaction()) 71 + ->setTransactionType(ManiphestTransaction::TYPE_DESCRIPTION) 72 + ->setNewValue($body); 71 73 72 74 } else { 73 75