phacility/phabricator · error · Exception

You can not plan changes to a draft revision.

Error message

You can not plan changes to a draft revision.

What it means

Draft guard inside DifferentialRevisionPlanChangesTransaction::validateAction(): the revision is still in Draft status and the request originated from the web UI. Per PHI346, drafts may still be moved to 'Changes Planned' through the API/conduit (preserving 'arc diff --plan-changes' behavior), but the web UI path is blocked, so this fires specifically when a web content source attempts the transition on an unpromoted draft.

Solutions

  1. First publish the draft (e.g. 'Request Review' or let builds promote it), then plan changes from the web UI
  2. Use the API/CLI path ('arc diff --plan-changes'), which remains permitted for drafts during this prototype period
  3. If you are the author wanting to keep iterating privately, leaving the revision in draft is usually sufficient
Defensive patterns

Strategy: validation

When it happens

Trigger: Thrown at src/applications/differential/xaction/DifferentialRevisionPlanChangesTransaction.php:73 when the library encounters an invalid state.

Common situations: See trigger scenarios.


AI-assisted analysis of phacility/phabricator@5720a38cfe (2026-08-21). Data as JSON: /api/errors/06035adb6c5860dc. Report an issue: GitHub.

Appendix: source

Thrown at src/applications/differential/xaction/DifferentialRevisionPlanChangesTransaction.php:73

  public function applyInternalEffects($object, $value) {
    $status_planned = DifferentialRevisionStatus::CHANGES_PLANNED;
    $object->setModernRevisionStatus($status_planned);
  }

  protected function validateAction($object, PhabricatorUser $viewer) {
    if ($object->isDraft()) {

      // See PHI346. Until the "Draft" state fully unprototypes, allow drafts
      // to be moved to "changes planned" via the API. This preserves the
      // behavior of "arc diff --plan-changes". We still prevent this
      // transition from the web UI.
      // TODO: Remove this once drafts leave prototype.

      $editor = $this->getEditor();
      $type_web = PhabricatorWebContentSource::SOURCECONST;
      if ($editor->getContentSource()->getSource() == $type_web) {
        throw new Exception(
          pht('You can not plan changes to a draft revision.'));
      }
    }

    if ($object->isChangePlanned()) {
      throw new Exception(
        pht(
          'You can not request review of this revision because this '.
          'revision is already under review and the action would have '.
          'no effect.'));
    }

    if ($object->isClosed()) {
      throw new Exception(
        pht(
          'You can not plan changes to this this revision because it has '.
          'already been closed.'));
    }

View on GitHub (pinned to 5720a38cfe)