Page MenuHomePhabricator

D10229.id.diff
No OneTemporary

D10229.id.diff

diff --git a/src/applications/maniphest/mail/ManiphestReplyHandler.php b/src/applications/maniphest/mail/ManiphestReplyHandler.php
--- a/src/applications/maniphest/mail/ManiphestReplyHandler.php
+++ b/src/applications/maniphest/mail/ManiphestReplyHandler.php
@@ -57,17 +57,19 @@
$is_unsub = false;
if ($is_new_task) {
- // If this is a new task, create a "User created this task." transaction
- // and then set the title and description.
- $xaction = clone $template;
- $xaction->setTransactionType(ManiphestTransaction::TYPE_STATUS);
- $xaction->setNewValue(ManiphestTaskStatus::getDefaultStatus());
- $xactions[] = $xaction;
-
- $task->setAuthorPHID($user->getPHID());
- $task->setTitle(nonempty($mail->getSubject(), 'Untitled Task'));
- $task->setDescription($body);
- $task->setPriority(ManiphestTaskPriority::getDefaultPriority());
+ $task = ManiphestTask::initializeNewTask($user);
+
+ $xactions[] = id(new ManiphestTransaction())
+ ->setTransactionType(ManiphestTransaction::TYPE_STATUS)
+ ->setNewValue(ManiphestTaskStatus::getDefaultStatus());
+
+ $xactions[] = id(new ManiphestTransaction())
+ ->setTransactionType(ManiphestTransaction::TYPE_TITLE)
+ ->setNewValue(nonempty($mail->getSubject(), pht('Untitled Task')));
+
+ $xactions[] = id(new ManiphestTransaction())
+ ->setTransactionType(ManiphestTransaction::TYPE_DESCRIPTION)
+ ->setNewValue($body);
} else {

File Metadata

Mime Type
text/plain
Expires
Oct 20 2024, 3:53 PM (4 w, 2 d ago)
Storage Engine
blob
Storage Format
Encrypted (AES-256-CBC)
Storage Handle
6724220
Default Alt Text
D10229.id.diff (1 KB)

Event Timeline