{"record":{"id":"d611b4fba9dea73e","repo":"phacility/phabricator","slug":"you-can-not-mark-this-comment-as-complete-you-did","errorCode":null,"errorMessage":"You can not mark this comment as complete: you did not author the commit and the comment is not a draft you wrote.","messagePattern":"You can not mark this comment as complete: you did not author the commit and the comment is not a draft you wrote\\.","errorType":"exception","errorClass":"Exception","httpStatus":null,"severity":"error","filePath":"src/applications/diffusion/controller/DiffusionInlineCommentController.php","lineNumber":79,"sourceCode":"      ->setViewer($viewer)\n      ->withPHIDs(array($inline->getCommitPHID()))\n      ->executeOne();\n    if (!$commit) {\n      throw new Exception(pht('Failed to load commit.'));\n    }\n\n    $owner_phid = $commit->getAuthorPHID();\n    $viewer_phid = $viewer->getPHID();\n    $viewer_is_owner = ($owner_phid && ($owner_phid == $viewer_phid));\n    $viewer_is_author = ($viewer_phid == $inline->getAuthorPHID());\n    $is_draft = $inline->isDraft();\n\n    if ($viewer_is_owner) {\n      // You can mark inlines on your own commits as \"Done\".\n    } else if ($viewer_is_author && $is_draft) {\n      // You can mark your own unsubmitted inlines as \"Done\".\n    } else {\n      throw new Exception(\n        pht(\n          'You can not mark this comment as complete: you did not author '.\n          'the commit and the comment is not a draft you wrote.'));\n    }\n\n    return $inline;\n  }\n\n  protected function canEditInlineComment(\n    PhabricatorUser $viewer,\n    PhabricatorAuditInlineComment $inline) {\n\n    // Only the author may edit a comment.\n    if ($inline->getAuthorPHID() != $viewer->getPHID()) {\n      return false;\n    }\n\n    // Saved comments may not be edited.","sourceCodeStart":61,"sourceCodeEnd":97,"githubUrl":"https://github.com/phacility/phabricator/blob/5720a38cfe95b00ca4be5016dd0d2f3195f4fa04/src/applications/diffusion/controller/DiffusionInlineCommentController.php#L61-L97","documentation":"Error \"You can not mark this comment as complete: you did not author the commit and the comment is not a draft you wrote.\" thrown in phacility/phabricator.","triggerScenarios":"Thrown at src/applications/diffusion/controller/DiffusionInlineCommentController.php:79 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"}