{"record":{"id":"becb105eb256f6e4","repo":"phacility/phabricator","slug":"task-status-s-has-unrecognized-value-for-loc","errorCode":null,"errorMessage":"Task status (\"%s\") has unrecognized value for \"locked\" configuration (\"%s\"). Supported values are: \"%s\", \"%s\".","messagePattern":"Task status \\(\"(.+?)\"\\) has unrecognized value for \"locked\" configuration \\(\"(.+?)\"\\)\\. Supported values are: \"(.+?)\", \"(.+?)\"\\.","errorType":"validation","errorClass":"Exception","httpStatus":null,"severity":"error","filePath":"src/applications/maniphest/constants/ManiphestTaskStatus.php","lineNumber":315,"sourceCode":"          'mfa' => 'optional bool',\n        ));\n    }\n\n    // Supported values are \"comments\" or \"edits\". For backward compatibility,\n    // \"true\" is an alias of \"comments\".\n\n    foreach ($config as $key => $value) {\n      $locked = idx($value, 'locked', false);\n      if ($locked === true || $locked === false) {\n        continue;\n      }\n\n      if ($locked === self::LOCKED_EDITS ||\n          $locked === self::LOCKED_COMMENTS) {\n        continue;\n      }\n\n      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(","sourceCodeStart":297,"sourceCodeEnd":333,"githubUrl":"https://github.com/phacility/phabricator/blob/5720a38cfe95b00ca4be5016dd0d2f3195f4fa04/src/applications/maniphest/constants/ManiphestTaskStatus.php#L297-L333","documentation":"The optional 'locked' field of a maniphest.statuses entry may be boolean true/false, or one of the two string constants ManiphestTaskStatus::LOCKED_COMMENTS or LOCKED_EDITS ('locked-comments', 'locked-edits'). Any other value — a string like 'yes', an integer 1, or null-ish placeholders — throws this Exception listing the status, the bad value, and the two supported strings.","triggerScenarios":"A config entry like {\"archived\": {\"name\": \"Archived\", \"locked\": \"true\"}} (string 'true' instead of boolean) or {\"locked\": 1}. The $locked === true/=== false and the two string comparisons all fail, so the Exception fires.","commonSituations":"Hand-written JSON where booleans were quoted. Scripts generating config from a CSV/spreadsheet where the locked column contains 'yes'/'no' or 1/0. Copying examples from forum posts that predate the string lock modes.","solutions":["Use real JSON booleans for simple locking: \"locked\": true or \"locked\": false.","Use the exact strings \"locked-comments\" or \"locked-edits\" to disable only comments or only edits on that status.","Drop the 'locked' key entirely when the status should not be locked (false is the default)."],"exampleFix":"// before\n'archived' => array('name' => 'Archived', 'locked' => 'true'),\n\n// after\n'archived' => array('name' => 'Archived', 'locked' => true),\n// or: 'locked' => 'locked-comments'","handlingStrategy":"validation","validationCode":"function is_valid_locked($v) {\n  return $v === true || $v === false\n    || $v === 'locked-comments' || $v === 'locked-edits';\n}\nforeach ($statuses as $constant => $spec) {\n  if (isset($spec['locked']) && !is_valid_locked($spec['locked'])) {\n    throw new InvalidArgumentException(\"Bad 'locked' for '$constant'\");\n  }\n}","typeGuard":"function is_locked_value($v) { return $v === true || $v === false || $v === 'locked-comments' || $v === 'locked-edits'; }","tryCatchPattern":null,"preventionTips":["Use unquoted JSON booleans; quoted 'true' is a string and invalid.","Only the exact strings 'locked-comments'/'locked-edits' are accepted for partial locks.","Omit 'locked' when no locking is needed."],"tags":["phabricator","maniphest","configuration","status","locked-status","enum-validation"],"backgroundTag":"enum-value-validation","analyzedSha":"5720a38cfe95b00ca4be5016dd0d2f3195f4fa04","analyzedAt":"2026-08-21T05:07:25.672Z","schemaVersion":2},"datasetVersion":"2026-08-21T13:17:26.733Z"}