Page MenuHomestyx hydra

No OneTemporary

diff --git a/src/applications/maniphest/command/ManiphestClaimEmailCommand.php b/src/applications/maniphest/command/ManiphestClaimEmailCommand.php
index 38919617c6..4a6a348dbb 100644
--- a/src/applications/maniphest/command/ManiphestClaimEmailCommand.php
+++ b/src/applications/maniphest/command/ManiphestClaimEmailCommand.php
@@ -1,29 +1,32 @@
<?php
final class ManiphestClaimEmailCommand
extends ManiphestEmailCommand {
public function getCommand() {
return 'claim';
}
public function getCommandSummary() {
- return pht('Assign yourself as the owner of a task.');
+ return pht(
+ 'Assign yourself as the owner of a task. To assign another user, '.
+ 'see `%s`.',
+ '!assign');
}
public function buildTransactions(
PhabricatorUser $viewer,
PhabricatorApplicationTransactionInterface $object,
PhabricatorMetaMTAReceivedMail $mail,
$command,
array $argv) {
$xactions = array();
$xactions[] = $object->getApplicationTransactionTemplate()
->setTransactionType(ManiphestTransaction::TYPE_OWNER)
->setNewValue($viewer->getPHID());
return $xactions;
}
}
diff --git a/src/applications/maniphest/command/ManiphestCloseEmailCommand.php b/src/applications/maniphest/command/ManiphestCloseEmailCommand.php
index a30f3a35f0..8104fd8b8d 100644
--- a/src/applications/maniphest/command/ManiphestCloseEmailCommand.php
+++ b/src/applications/maniphest/command/ManiphestCloseEmailCommand.php
@@ -1,29 +1,33 @@
<?php
final class ManiphestCloseEmailCommand
extends ManiphestEmailCommand {
public function getCommand() {
return 'close';
}
public function getCommandSummary() {
- return pht('Close a task.');
+ 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');
}
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;
}
}
diff --git a/src/applications/maniphest/command/ManiphestStatusEmailCommand.php b/src/applications/maniphest/command/ManiphestStatusEmailCommand.php
index aa74e33bec..dace0cb255 100644
--- a/src/applications/maniphest/command/ManiphestStatusEmailCommand.php
+++ b/src/applications/maniphest/command/ManiphestStatusEmailCommand.php
@@ -1,80 +1,82 @@
<?php
final class ManiphestStatusEmailCommand
extends ManiphestEmailCommand {
public function getCommand() {
return 'status';
}
public function getCommandSyntax() {
return '**!status** //status//';
}
public function getCommandSummary() {
return pht('Change the status of a task.');
}
public function getCommandDescription() {
$names = ManiphestTaskStatus::getTaskStatusMap();
$keywords = ManiphestTaskStatus::getTaskStatusKeywordsMap();
$table = array();
$table[] = '| '.pht('Status').' | '.pht('Keywords');
$table[] = '|---|---|';
foreach ($keywords as $status => $words) {
if (ManiphestTaskStatus::isDisabledStatus($status)) {
continue;
}
$words = implode(', ', $words);
$table[] = '| '.$names[$status].' | '.$words;
}
$table = implode("\n", $table);
return pht(
"To change the status of a task, specify the desired status, like ".
"`%s`. This table shows the configured names for statuses.\n\n%s\n\n".
"If you specify an invalid status, the command is ignored. This ".
- "command has no effect if you do not specify a status.",
+ "command has no effect if you do not specify a status.\n\n".
+ "To quickly close a task, see `%s`.",
'!status invalid',
- $table);
+ $table,
+ '!close');
}
public function buildTransactions(
PhabricatorUser $viewer,
PhabricatorApplicationTransactionInterface $object,
PhabricatorMetaMTAReceivedMail $mail,
$command,
array $argv) {
$xactions = array();
$target = phutil_utf8_strtolower(head($argv));
$status = null;
$keywords = ManiphestTaskStatus::getTaskStatusKeywordsMap();
foreach ($keywords as $key => $words) {
foreach ($words as $word) {
if ($word == $target) {
$status = $key;
break;
}
}
}
if ($status === null) {
return array();
}
if (ManiphestTaskStatus::isDisabledStatus($status)) {
return array();
}
$xactions[] = $object->getApplicationTransactionTemplate()
->setTransactionType(ManiphestTransaction::TYPE_STATUS)
->setNewValue($status);
return $xactions;
}
}

File Metadata

Mime Type
text/x-diff
Expires
Thu, Aug 14, 7:11 PM (2 d, 2 h ago)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
196404
Default Alt Text
(4 KB)

Event Timeline