Page MenuHomePhabricator

"Status set to invalid value." when using arc close.
Closed, ResolvedPublic

Description

Task T20 is created in Maniphest and is currently open.

$ arc close T20
Exception
ERR-INVALID-PARAMETER: Status set to invalid value.
(Run with --trace for a full exception trace.)
$ arc close T20 -s resolved
Exception
ERR-INVALID-PARAMETER: Status set to invalid value.
(Run with --trace for a full exception trace.)

I attempted to debug it a little bit and found that in ArcanistCloseWorkflow it matches resolved to 1 and sends that to the server.

In ConduitAPI_maniphest_Method it attempts to get a status of 1 but that's not found in the status map that is returned:

array (
  'open' => 'Open',
  'resolved' => 'Resolved',
  'wontfix' => 'Wontfix',
  'invalid' => 'Invalid',
  'duplicate' => 'Duplicate',
  'spite' => 'Spite',
)
// ...
$status = $request->getValue('status');
if ($status !== null) {
  $valid_statuses = ManiphestTaskStatus::getTaskStatusMap();
  if (!isset($valid_statuses[$status])) {
    throw id(new ConduitException('ERR-INVALID-PARAMETER'))
      ->setErrorDescription('Status set to invalid value.');
  }
// ...
}