{"record":{"id":"4f9954cec4a59486","repo":"phacility/phabricator","slug":"you-can-not-reopen-this-revision-because-it-is-not","errorCode":null,"errorMessage":"You can not reopen this revision because it is not closed. Only closed revisions can be reopened.","messagePattern":"You can not reopen this revision because it is not closed\\. Only closed revisions can be reopened\\.","errorType":"validation","errorClass":"Exception","httpStatus":null,"severity":"error","filePath":"src/applications/differential/xaction/DifferentialRevisionReopenTransaction.php","lineNumber":48,"sourceCode":"    return 400;\n  }\n\n  public function getActionName() {\n    return pht('Reopened');\n  }\n\n  public function generateOldValue($object) {\n    return !$object->isClosed();\n  }\n\n  public function applyInternalEffects($object, $value) {\n    $status_review = DifferentialRevisionStatus::NEEDS_REVIEW;\n    $object->setModernRevisionStatus($status_review);\n  }\n\n  protected function validateAction($object, PhabricatorUser $viewer) {\n    if (!$object->isPublished()) {\n      throw new Exception(\n        pht(\n          'You can not reopen this revision because it is not closed. '.\n          'Only closed revisions can be reopened.'));\n    }\n\n    $config_key = 'differential.allow-reopen';\n    if (!PhabricatorEnv::getEnvConfig($config_key)) {\n      throw new Exception(\n        pht(\n          'You can not reopen this revision because configuration prevents '.\n          'any revision from being reopened. You can change this behavior '.\n          'by adjusting the \"%s\" setting in Config.',\n          $config_key));\n    }\n  }\n\n  public function getTitle() {\n    return pht(","sourceCodeStart":30,"sourceCodeEnd":66,"githubUrl":"https://github.com/phacility/phabricator/blob/5720a38cfe95b00ca4be5016dd0d2f3195f4fa04/src/applications/differential/xaction/DifferentialRevisionReopenTransaction.php#L30-L66","documentation":"State guard in DifferentialRevisionReopenTransaction::validateAction: reopen is refused because the revision is not in a published/closed state (isPublished returned false). Only closed revisions can be reopened — open, draft, or abandoned revisions have no closed state to undo, so the reopen transition does not apply to them.","triggerScenarios":"Thrown at src/applications/differential/xaction/DifferentialRevisionReopenTransaction.php:48 when the library encounters an invalid state.","commonSituations":"See trigger scenarios.","solutions":["Check the revision status: abandoned revisions should be reclaimed (not reopened) and open ones need no action","If the revision is published and you want to continue work, first enable reopening via config (see the related allow-reopen error) and then retry","Ensure you are acting on the intended revision and that its state has not changed since the page loaded"],"exampleFix":null,"handlingStrategy":"validation","validationCode":null,"typeGuard":null,"tryCatchPattern":null,"preventionTips":[],"tags":[],"backgroundTag":null,"analyzedSha":"5720a38cfe95b00ca4be5016dd0d2f3195f4fa04","analyzedAt":"2026-08-21T05:07:25.672Z","contentChangedAt":"2026-08-21T05:07:25.672Z","schemaVersion":2},"datasetVersion":"2026-09-23T08:17:48.524Z"}