{"record":{"id":"7ad5a17b9b23e55b","repo":"phacility/phabricator","slug":"you-can-not-close-this-revision-because-it-has-alr","errorCode":null,"errorMessage":"You can not close this revision because it has already been closed. Only open revisions can be closed.","messagePattern":"You can not close this revision because it has already been closed\\. Only open revisions can be closed\\.","errorType":"validation","errorClass":"Exception","httpStatus":null,"severity":"error","filePath":"src/applications/differential/xaction/DifferentialRevisionCloseTransaction.php","lineNumber":67,"sourceCode":"      $was_accepted);\n\n    // See T13300. When a revision is closed, we promote it out of \"Draft\"\n    // immediately. This usually happens when a user creates a draft revision\n    // and then lands the associated commit before the revision leaves draft.\n    $object->setShouldBroadcast(true);\n  }\n\n  protected function validateAction($object, PhabricatorUser $viewer) {\n    if ($this->hasEditor()) {\n      if ($this->getEditor()->getIsCloseByCommit()) {\n        // If we're closing a revision because we discovered a commit, we don't\n        // care what state it was in.\n        return;\n      }\n    }\n\n    if ($object->isClosed()) {\n      throw new Exception(\n        pht(\n          'You can not close this revision because it has already been '.\n          'closed. Only open revisions can be closed.'));\n    }\n\n    if (!$object->isAccepted()) {\n      throw new Exception(\n        pht(\n          'You can not close this revision because it has not been accepted. '.\n          'Revisions must be accepted before they can be closed.'));\n    }\n\n    $config_key = 'differential.always-allow-close';\n    if (!PhabricatorEnv::getEnvConfig($config_key)) {\n      if (!$this->isViewerRevisionAuthor($object, $viewer)) {\n        throw new Exception(\n          pht(\n            'You can not close this revision because you are not the '.","sourceCodeStart":49,"sourceCodeEnd":85,"githubUrl":"https://github.com/phacility/phabricator/blob/5720a38cfe95b00ca4be5016dd0d2f3195f4fa04/src/applications/differential/xaction/DifferentialRevisionCloseTransaction.php#L49-L85","documentation":"Error \"You can not close this revision because it has already been closed. Only open revisions can be closed.\" thrown in phacility/phabricator.","triggerScenarios":"Thrown at src/applications/differential/xaction/DifferentialRevisionCloseTransaction.php:67 when the library encounters an invalid state.","commonSituations":"See trigger scenarios.","solutions":[],"exampleFix":null,"handlingStrategy":null,"validationCode":null,"typeGuard":null,"tryCatchPattern":null,"preventionTips":[],"tags":[],"backgroundTag":null,"analyzedSha":"5720a38cfe95b00ca4be5016dd0d2f3195f4fa04","analyzedAt":"2026-08-21T05:07:25.672Z","schemaVersion":2},"datasetVersion":"2026-08-21T11:28:35.574Z"}