2015-04-01 17:40:42 +02:00
|
|
|
<?php
|
|
|
|
|
|
|
|
final class ManiphestCloseEmailCommand
|
|
|
|
extends ManiphestEmailCommand {
|
|
|
|
|
|
|
|
public function getCommand() {
|
|
|
|
return 'close';
|
|
|
|
}
|
|
|
|
|
2015-04-01 16:36:16 +02:00
|
|
|
public function getCommandSummary() {
|
2016-01-05 23:56:28 +01:00
|
|
|
return pht(
|
|
|
|
'Close a task. This changes the task status to the default closed '.
|
|
|
|
'status. For a more powerful (but less concise) way to change task '.
|
|
|
|
'statuses, see `%s`.',
|
|
|
|
'!status');
|
2015-04-01 16:36:16 +02:00
|
|
|
}
|
|
|
|
|
2015-04-01 17:40:42 +02:00
|
|
|
public function buildTransactions(
|
|
|
|
PhabricatorUser $viewer,
|
|
|
|
PhabricatorApplicationTransactionInterface $object,
|
|
|
|
PhabricatorMetaMTAReceivedMail $mail,
|
|
|
|
$command,
|
|
|
|
array $argv) {
|
|
|
|
$xactions = array();
|
|
|
|
|
|
|
|
$xactions[] = $object->getApplicationTransactionTemplate()
|
|
|
|
->setTransactionType(ManiphestTransaction::TYPE_STATUS)
|
|
|
|
->setNewValue(ManiphestTaskStatus::getDefaultClosedStatus());
|
|
|
|
|
|
|
|
return $xactions;
|
|
|
|
}
|
|
|
|
|
|
|
|
}
|