phacility/phabricator · error · Exception

Status "%s" is marked as default, but it is a closed status.

Error message

Status "%s" is marked as default, but it is a closed status. The default status should be an open status.

What it means

A status marked with "special": "default" (the status new tasks get) must be an open status, i.e. its spec must not set "closed": true. The validator's SPECIAL_DEFAULT case throws naming the offending status constant when the default is also flagged closed.

Source

Thrown at src/applications/maniphest/constants/ManiphestTaskStatus.php:345

      $special = idx($value, 'special');
      if (!$special) {
        continue;
      }

      if (isset($special_map[$special])) {
        throw new Exception(
          pht(
            'Configuration has two statuses both marked with the special '.
            'attribute "%s" ("%s" and "%s"). There should be only one.',
            $special,
            $special_map[$special],
            $key));
      }

      switch ($special) {
        case self::SPECIAL_DEFAULT:
          if (!empty($value['closed'])) {
            throw new Exception(
              pht(
                'Status "%s" is marked as default, but it is a closed '.
                'status. The default status should be an open status.',
                $key));
          }
          break;
        case self::SPECIAL_CLOSED:
          if (empty($value['closed'])) {
            throw new Exception(
              pht(
                'Status "%s" is marked as the default status for closing '.
                'tasks, but is not a closed status. It should be a closed '.
                'status.',
                $key));
          }
          break;
        case self::SPECIAL_DUPLICATE:
          if (empty($value['closed'])) {

View on GitHub (pinned to 5720a38cfe)

Solutions

  1. Mark an open status as the default: keep "closed" unset/false on the default status.
  2. If you want tasks created directly into a closed-ish state, use an open status with a name like 'Deferred' instead of a closed one.
  3. Re-check the pair of fields ('special' and 'closed') together whenever you change either.

Example fix

// before
'done' => array('name' => 'Done', 'closed' => true, 'special' => 'default'),

// after
'open' => array('name' => 'Open', 'special' => 'default'),
Defensive patterns

Strategy: validation

Validate before calling

foreach ($statuses as $constant => $spec) {
  if (idx($spec, 'special') === 'default' && !empty($spec['closed'])) {
    throw new InvalidArgumentException("Default status '$constant' must be open");
  }
}

Prevention

When it happens

Trigger: maniphest.statuses entry like {"resolved": {"name": "Resolved", "closed": true, "special": "default"}} — every newly created task would otherwise be born closed.

Common situations: Repointing the default to a 'done'-style status during workflow experiments. Copying a closed status as a starting point for the new default and forgetting to remove the "closed" flag.

Related errors


AI-assisted analysis of phacility/phabricator@5720a38cfe (2026-08-21). Data as JSON: /api/errors/cfd821198bb96517. Report an issue: GitHub.