{"record":{"id":"a2fae86ddcae8e82","repo":"phacility/phabricator","slug":"configuration-has-two-statuses-both-marked-with-th","errorCode":null,"errorMessage":"Configuration has two statuses both marked with the special attribute \"%s\" (\"%s\" and \"%s\"). There should be only one.","messagePattern":"Configuration has two statuses both marked with the special attribute \"(.+?)\" \\(\"(.+?)\" and \"(.+?)\"\\)\\. There should be only one\\.","errorType":"validation","errorClass":"Exception","httpStatus":null,"severity":"error","filePath":"src/applications/maniphest/constants/ManiphestTaskStatus.php","lineNumber":333,"sourceCode":"      throw new Exception(\n        pht(\n          'Task status (\"%s\") has unrecognized value for \"locked\" '.\n          'configuration (\"%s\"). Supported values are: \"%s\", \"%s\".',\n          $key,\n          $locked,\n          self::LOCKED_COMMENTS,\n          self::LOCKED_EDITS));\n    }\n\n    $special_map = array();\n    foreach ($config as $key => $value) {\n      $special = idx($value, 'special');\n      if (!$special) {\n        continue;\n      }\n\n      if (isset($special_map[$special])) {\n        throw new Exception(\n          pht(\n            'Configuration has two statuses both marked with the special '.\n            'attribute \"%s\" (\"%s\" and \"%s\"). There should be only one.',\n            $special,\n            $special_map[$special],\n            $key));\n      }\n\n      switch ($special) {\n        case self::SPECIAL_DEFAULT:\n          if (!empty($value['closed'])) {\n            throw new Exception(\n              pht(\n                'Status \"%s\" is marked as default, but it is a closed '.\n                'status. The default status should be an open status.',\n                $key));\n          }\n          break;","sourceCodeStart":315,"sourceCodeEnd":351,"githubUrl":"https://github.com/phacility/phabricator/blob/5720a38cfe95b00ca4be5016dd0d2f3195f4fa04/src/applications/maniphest/constants/ManiphestTaskStatus.php#L315-L351","documentation":"The 'special' attribute marks a status as filling a unique system role: SPECIAL_DEFAULT (default for new tasks), SPECIAL_CLOSED (default when closing), SPECIAL_DUPLICATE (closing as duplicate). The validator tracks each special value in $special_map; if a second status claims a special role already taken, it throws with (special role, previous status constant, new status constant).","triggerScenarios":"Two entries with \"special\": \"default\" in maniphest.statuses, e.g. both 'open' and 'triage' marked default. Likewise duplicated 'closed' or 'duplicate' special values.","commonSituations":"Editing the default statuses to add a new 'triage' intake status and marking it default without removing \"special\": \"default\" from 'open'. Copy-pasting a closed status (e.g. 'resolved') to make 'wontfix' and leaving the \"special\": \"closed\" field in both.","solutions":["Keep exactly one status per special role: one default, one closed-default, one duplicate.","When introducing a replacement status, strip the 'special' key from the old status in the same config edit.","After editing, grep your config for each special value and confirm it appears exactly once."],"exampleFix":"// before\n'open'    => array('name' => 'Open',    'special' => 'default'),\n'triage'  => array('name' => 'Triage', 'special' => 'default'),\n\n// after\n'open'    => array('name' => 'Open'),\n'triage'  => array('name' => 'Triage', 'special' => 'default'),","handlingStrategy":"validation","validationCode":"$roles = array();\nforeach ($statuses as $constant => $spec) {\n  if (!empty($spec['special'])) {\n    if (isset($roles[$spec['special']])) {\n      throw new InvalidArgumentException(\"Special '{$spec['special']}' claimed by both {$roles[$spec['special']]} and $constant\");\n    }\n    $roles[$spec['special']] = $constant;\n  }\n}","typeGuard":null,"tryCatchPattern":null,"preventionTips":["Each special role (default/closed/duplicate) appears exactly once.","Strip the special marker from a status before assigning it elsewhere.","Grep the config for 'special' after every status edit."],"tags":["phabricator","maniphest","configuration","status","special-role","duplicate-role"],"backgroundTag":"duplicate-config-key","analyzedSha":"5720a38cfe95b00ca4be5016dd0d2f3195f4fa04","analyzedAt":"2026-08-21T05:07:25.672Z","schemaVersion":2},"datasetVersion":"2026-08-21T13:17:26.733Z"}