{"record":{"id":"7ba2c8bc619f8c2e","repo":"phacility/phabricator","slug":"key-s-is-not-a-valid-priority-keyword-priority","errorCode":null,"errorMessage":"Key \"%s\" is not a valid priority keyword. Priority keywords must be 1-64 alphanumeric characters and cannot be exclusively digits. For example, \"%s\" or \"%s\" are reasonable choices.","messagePattern":"Key \"(.+?)\" is not a valid priority keyword\\. Priority keywords must be 1-64 alphanumeric characters and cannot be exclusively digits\\. For example, \"(.+?)\" or \"(.+?)\" are reasonable choices\\.","errorType":"validation","errorClass":"Exception","httpStatus":null,"severity":"error","filePath":"src/applications/maniphest/constants/ManiphestTaskPriority.php","lineNumber":235,"sourceCode":"          pht(\n            'Value for key \"%s\" should be a dictionary.',\n            $key));\n      }\n\n      PhutilTypeSpec::checkMap(\n        $value,\n        array(\n          'name' => 'string',\n          'keywords' => 'list<string>',\n          'short' => 'optional string',\n          'color' => 'optional string',\n          'disabled' => 'optional bool',\n        ));\n\n      $keywords = $value['keywords'];\n      foreach ($keywords as $keyword) {\n        if (!self::isValidPriorityKeyword($keyword)) {\n          throw new Exception(\n            pht(\n              'Key \"%s\" is not a valid priority keyword. Priority keywords '.\n              'must be 1-64 alphanumeric characters and cannot be '.\n              'exclusively digits. For example, \"%s\" or \"%s\" are '.\n              'reasonable choices.',\n              $keyword,\n              'low',\n              'critical'));\n        }\n\n        if (isset($all_keywords[$keyword])) {\n          throw new Exception(\n            pht(\n              'Two different task priorities (\"%s\" and \"%s\") have the same '.\n              'keyword (\"%s\"). Keywords must uniquely identify priorities.',\n              $value['name'],\n              $all_keywords[$keyword],\n              $keyword));","sourceCodeStart":217,"sourceCodeEnd":253,"githubUrl":"https://github.com/phacility/phabricator/blob/5720a38cfe95b00ca4be5016dd0d2f3195f4fa04/src/applications/maniphest/constants/ManiphestTaskPriority.php#L217-L253","documentation":"Every string in a priority level's 'keywords' list must satisfy isValidPriorityKeyword(): alphanumeric only, 1-64 characters, and not exclusively digits (regex /^(?![0-9]*$)[a-zA-Z0-9]+$/). Keywords are used in Places/priority commands and mail commands like '!priority high', so they must be parseable tokens; anything else throws with the bad keyword as the first %s.","triggerScenarios":"A keywords entry like 'very high' (space), 'p1!' (punctuation), '123' (all digits), '' (empty), or one longer than 64 characters in the maniphest.priorities config.","commonSituations":"Importing priority names from Jira/other trackers directly as keywords without slugification ('P1 - Urgent', 'Sev 1'). Unicode keywords ('höchste'). Keywords that are pure numbers because teams number their priorities.","solutions":["Use short lowercase slugs: 'unbreak-now', 'high', 'normal', 'low', 'wishlist'.","Strip punctuation, spaces, and accents; if the desired keyword is numeric like '1', prefix a letter ('p1') since all-digit keywords are rejected.","Keep it at or under 64 alphanumeric characters."],"exampleFix":"// before\n'keywords' => array('P1 - Urgent'),\n\n// after\n'keywords' => array('p1-urgent'),  // or simply 'urgent'","handlingStrategy":"validation","validationCode":"function is_valid_priority_keyword($keyword) {\n  return is_string($keyword)\n    && strlen($keyword) >= 1 && strlen($keyword) <= 64\n    && preg_match('/^(?![0-9]*$)[a-zA-Z0-9]+$/', $keyword) === 1;\n}\nforeach ($keywords as $kw) {\n  if (!is_valid_priority_keyword($kw)) { /* reject before saving */ }\n}","typeGuard":"function is_keyword_token($s) { return is_string($s) && preg_match('/^(?![0-9]*$)[a-zA-Z0-9]+$/', $s) === 1; }","tryCatchPattern":null,"preventionTips":["Slugify imported names (lowercase, strip punctuation/spaces) before using as keywords.","Never use all-digit keywords; prefix a letter ('p1').","Cap keywords at 64 alphanumeric characters."],"tags":["phabricator","maniphest","configuration","priority","keyword-validation","slug-format"],"backgroundTag":"identifier-format-validation","analyzedSha":"5720a38cfe95b00ca4be5016dd0d2f3195f4fa04","analyzedAt":"2026-08-21T05:07:25.672Z","schemaVersion":2},"datasetVersion":"2026-08-21T11:28:35.574Z"}