{"record":{"id":"c8214404b792153a","repo":"phacility/phabricator","slug":"two-different-task-priorities-s-and-s-have","errorCode":null,"errorMessage":"Two different task priorities (\"%s\" and \"%s\") have the same keyword (\"%s\"). Keywords must uniquely identify priorities.","messagePattern":"Two different task priorities \\(\"(.+?)\" and \"(.+?)\"\\) have the same keyword \\(\"(.+?)\"\\)\\. Keywords must uniquely identify priorities\\.","errorType":"validation","errorClass":"Exception","httpStatus":null,"severity":"error","filePath":"src/applications/maniphest/constants/ManiphestTaskPriority.php","lineNumber":247,"sourceCode":"          '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));\n        }\n\n        $all_keywords[$keyword] = $value['name'];\n      }\n    }\n  }\n\n}\n","sourceCodeStart":229,"sourceCodeEnd":262,"githubUrl":"https://github.com/phacility/phabricator/blob/5720a38cfe95b00ca4be5016dd0d2f3195f4fa04/src/applications/maniphest/constants/ManiphestTaskPriority.php#L229-L262","documentation":"Priority keywords must uniquely identify a priority across the whole maniphest.priorities map. The validator accumulates every keyword in $all_keywords keyed by keyword -> priority name; when a later level reuses a keyword already claimed by a different priority, it throws with (new name, previous name, keyword). This matters because mail/Places commands like '!priority high' resolve by keyword alone.","triggerScenarios":"Two levels both listing 'high': {\"90\": {\"name\": \"High\", \"keywords\": [\"high\"]}, \"80\": {\"name\": \"Very High\", \"keywords\": [\"high\", \"urgent\"]}}. The second occurrence triggers the exception.","commonSituations":"Merging two priority configs (e.g. after a team merger) where both defined 'high'. Copy-pasting a level and editing the name but forgetting the keywords list. Renaming a priority but keeping the old keyword on the new one.","solutions":["Give each level disjoint keywords, e.g. 'high' and 'higher'/'unbreak-now', never the same token twice.","After editing, scan the config for duplicate keywords programmatically before saving.","If a keyword genuinely must move to another level, delete it from the old level's list in the same edit."],"exampleFix":"// before\n'90' => array('name' => 'High',      'keywords' => array('high')),\n'80' => array('name' => 'Very High', 'keywords' => array('high', 'urgent')),\n\n// after\n'90' => array('name' => 'High',      'keywords' => array('high')),\n'80' => array('name' => 'Very High', 'keywords' => array('very-high', 'urgent')))","handlingStrategy":"validation","validationCode":"$seen = array();\nforeach ($priorities as $const => $spec) {\n  foreach ($spec['keywords'] as $kw) {\n    if (isset($seen[$kw])) {\n      throw new InvalidArgumentException(\"Keyword '$kw' used by both {$seen[$kw]} and {$spec['name']}\");\n    }\n    $seen[$kw] = $spec['name'];\n  }\n}","typeGuard":null,"tryCatchPattern":null,"preventionTips":["Run a duplicate-keyword scan over the config before every save.","When moving a keyword between levels, remove it from the old list in the same edit.","Prefer distinct prefixed slugs when merging priority schemes."],"tags":["phabricator","maniphest","configuration","priority","duplicate-keyword"],"backgroundTag":"duplicate-config-key","analyzedSha":"5720a38cfe95b00ca4be5016dd0d2f3195f4fa04","analyzedAt":"2026-08-21T05:07:25.672Z","schemaVersion":2},"datasetVersion":"2026-08-21T11:28:35.574Z"}