{"record":{"id":"1c7236bc348ed380","repo":"phacility/phabricator","slug":"status-s-is-marked-as-the-status-for-closing-ta","errorCode":null,"errorMessage":"Status \"%s\" is marked as the status for closing tasks as duplicates, but it is not a closed status. It should be a closed status.","messagePattern":"Status \"(.+?)\" is marked as the status for closing tasks as duplicates, but it 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":364,"sourceCode":"              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      }\n\n      $special_map[$special] = $key;\n    }\n\n    // NOTE: We're not explicitly validating that we have at least one open\n    // and one closed status, because the DEFAULT and CLOSED specials imply\n    // that to be true. If those change in the future, that might become a\n    // reasonable thing to validate.\n\n    $required = array(","sourceCodeStart":346,"sourceCodeEnd":382,"githubUrl":"https://github.com/phacility/phabricator/blob/5720a38cfe95b00ca4be5016dd0d2f3195f4fa04/src/applications/maniphest/constants/ManiphestTaskStatus.php#L346-L382","documentation":"A status marked \"special\": \"duplicate\" is the status applied when a task is closed as a duplicate, and it must be a closed status. The validator's SPECIAL_DUPLICATE case throws when that entry lacks \"closed\": true, since merge/duplicate handling assumes the target status closes the task.","triggerScenarios":"maniphest.statuses entry like {\"duplicate\": {\"name\": \"Duplicate\", \"special\": \"duplicate\"}} without \"closed\": true — typically after renaming or hand-rebuilding the status list.","commonSituations":"Customizing statuses and rewriting the duplicate entry from an open-status template. Removing 'closed' from several statuses in a batch edit and accidentally including the duplicate one.","solutions":["Set \"closed\": true on the status that carries \"special\": \"duplicate\".","Model your duplicate status on the shipped one: {\"duplicate\": {\"name\": \"Duplicate\", \"closed\": true, \"special\": \"duplicate\", ...}}.","After any status edit, verify the three special statuses (default/closed/duplicate) all satisfy their open/closed requirements."],"exampleFix":"// before\n'duplicate' => array('name' => 'Duplicate', 'special' => 'duplicate'),\n\n// after\n'duplicate' => array('name' => 'Duplicate', 'closed' => true, 'special' => 'duplicate'),","handlingStrategy":"validation","validationCode":"foreach ($statuses as $constant => $spec) {\n  if (idx($spec, 'special') === 'duplicate' && empty($spec['closed'])) {\n    throw new InvalidArgumentException(\"Duplicate status '$constant' must set closed: true\");\n  }\n}","typeGuard":null,"tryCatchPattern":null,"preventionTips":["The 'special': 'duplicate' status must include \"closed\": true.","Do not batch-remove 'closed' flags without checking special roles.","Keep the shipped duplicate entry as the template."],"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"}