Page Menu
Home
Phabricator
Search
Configure Global Search
Log In
Files
F13981340
D10229.id.diff
No One
Temporary
Actions
View File
Edit File
Delete File
View Transforms
Subscribe
Mute Notifications
Award Token
Flag For Later
Size
1 KB
Referenced Files
None
Subscribers
None
D10229.id.diff
View Options
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
Details
Attached
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)
Attached To
Mode
D10229: Use transactions properly when building tasks from email
Attached
Detach File
Event Timeline
Log In to Comment