{"record":{"id":"99f4c29c0c8fbf77","repo":"phacility/phabricator","slug":"status-s-is-marked-as-the-default-status-for-cl","errorCode":null,"errorMessage":"Status \"%s\" is marked as the default status for closing tasks, but is not a closed status. It should be a closed status.","messagePattern":"Status \"(.+?)\" is marked as the default status for closing tasks, but is not a closed status\\. It should be a closed status\\.","errorType":"validation","errorClass":"Exception","httpStatus":null,"severity":"error","filePath":"src/applications/maniphest/constants/ManiphestTaskStatus.php","lineNumber":354,"sourceCode":"            '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;\n        case self::SPECIAL_CLOSED:\n          if (empty($value['closed'])) {\n            throw new Exception(\n              pht(\n                'Status \"%s\" is marked as the default status for closing '.\n                'tasks, but is not a closed status. It should be a closed '.\n                'status.',\n                $key));\n          }\n          break;\n        case self::SPECIAL_DUPLICATE:\n          if (empty($value['closed'])) {\n            throw new Exception(\n              pht(\n                'Status \"%s\" is marked as the status for closing tasks as '.\n                'duplicates, but it is not a closed status. It should '.\n                'be a closed status.',\n                $key));\n          }\n          break;\n      }","sourceCodeStart":336,"sourceCodeEnd":372,"githubUrl":"https://github.com/phacility/phabricator/blob/5720a38cfe95b00ca4be5016dd0d2f3195f4fa04/src/applications/maniphest/constants/ManiphestTaskStatus.php#L336-L372","documentation":"A status marked \"special\": \"closed\" is the status tasks move to on normal close, so it must itself be a closed status. The validator's SPECIAL_CLOSED case throws when that entry lacks \"closed\": true, because closing a task into an open status would corrupt open/closed semantics (burn-down, board behavior).","triggerScenarios":"maniphest.statuses entry like {\"resolved\": {\"name\": \"Resolved\", \"special\": \"closed\"}} with no \"closed\": true — renaming or rebuilding statuses and dropping the closed flag from the close-target.","commonSituations":"Editing display names by rewriting whole entries and omitting the closed flag. Introducing a custom 'Completed' close status copied from an open status template but keeping the special role.","solutions":["Add \"closed\": true to whichever status carries \"special\": \"closed\".","Keep the canonical pattern: close-target statuses (resolved, invalid, wontfix) all set \"closed\": true; only the special one is REQUIRED to.","Diff your custom statuses against the shipped defaults to confirm every special status has matching closed-ness."],"exampleFix":"// before\n'resolved' => array('name' => 'Resolved', 'special' => 'closed'),\n\n// after\n'resolved' => array('name' => 'Resolved', 'closed' => true, 'special' => 'closed'),","handlingStrategy":"validation","validationCode":"foreach ($statuses as $constant => $spec) {\n  if (idx($spec, 'special') === 'closed' && empty($spec['closed'])) {\n    throw new InvalidArgumentException(\"Close-default status '$constant' must set closed: true\");\n  }\n}","typeGuard":null,"tryCatchPattern":null,"preventionTips":["The 'special': 'closed' status must include \"closed\": true.","Rewrite whole entries carefully so the closed flag survives renames.","Check all three special statuses after each status config change."],"tags":["phabricator","maniphest","configuration","status","special-role","semantic-validation"],"backgroundTag":"config-consistency-error","analyzedSha":"5720a38cfe95b00ca4be5016dd0d2f3195f4fa04","analyzedAt":"2026-08-21T05:07:25.672Z","schemaVersion":2},"datasetVersion":"2026-08-21T11:28:35.574Z"}