Changeset View
Changeset View
Standalone View
Standalone View
src/applications/maniphest/mail/ManiphestReplyHandler.php
| Show First 20 Lines • Show All 51 Lines • ▼ Show 20 Lines | $content_source = PhabricatorContentSource::newForSource( | ||||
| array( | array( | ||||
| 'id' => $mail->getID(), | 'id' => $mail->getID(), | ||||
| )); | )); | ||||
| $template = new ManiphestTransaction(); | $template = new ManiphestTransaction(); | ||||
| $is_unsub = false; | $is_unsub = false; | ||||
| if ($is_new_task) { | if ($is_new_task) { | ||||
| // If this is a new task, create a "User created this task." transaction | $task = ManiphestTask::initializeNewTask($user); | ||||
| // 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()); | $xactions[] = id(new ManiphestTransaction()) | ||||
| $task->setTitle(nonempty($mail->getSubject(), 'Untitled Task')); | ->setTransactionType(ManiphestTransaction::TYPE_STATUS) | ||||
| $task->setDescription($body); | ->setNewValue(ManiphestTaskStatus::getDefaultStatus()); | ||||
| $task->setPriority(ManiphestTaskPriority::getDefaultPriority()); | |||||
| $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 { | } else { | ||||
| $command = $body_data['command']; | $command = $body_data['command']; | ||||
| $command_value = $body_data['command_value']; | $command_value = $body_data['command_value']; | ||||
| $ttype = PhabricatorTransactions::TYPE_COMMENT; | $ttype = PhabricatorTransactions::TYPE_COMMENT; | ||||
| $new_value = null; | $new_value = null; | ||||
| ▲ Show 20 Lines • Show All 106 Lines • Show Last 20 Lines | |||||