phacility/phabricator · warning · Exception

You can not bucket results by required action without specif

Error message

You can not bucket results by required action without specifying "Responsible Users".

What it means

The 'Bucket by Required Action' result grouping organizes commits by what each responsible user must do (concerns raised, audits needed). It derives its groups from the query's 'Responsible Users' parameter; with that parameter empty there is nothing to bucket by, so buildResultGroups() throws rather than render an empty or meaningless bucket set.

Source

Thrown at src/applications/diffusion/query/DiffusionCommitRequiredActionResultBucket.php:22

  extends DiffusionCommitResultBucket {

  const BUCKETKEY = 'action';

  private $objects;

  public function getResultBucketName() {
    return pht('Bucket by Required Action');
  }

  protected function buildResultGroups(
    PhabricatorSavedQuery $query,
    array $objects) {

    $this->objects = $objects;

    $phids = $query->getEvaluatedParameter('responsiblePHIDs');
    if (!$phids) {
      throw new Exception(
        pht(
          'You can not bucket results by required action without '.
          'specifying "Responsible Users".'));
    }
    $phids = array_fuse($phids);

    $groups = array();

    $groups[] = $this->newGroup()
      ->setName(pht('Needs Attention'))
      ->setNoDataString(pht('None of your commits have active concerns.'))
      ->setObjects($this->filterConcernRaised($phids));

    $groups[] = $this->newGroup()
      ->setName(pht('Needs Verification'))
      ->setNoDataString(pht('No commits are awaiting your verification.'))
      ->setObjects($this->filterNeedsVerification($phids));

View on GitHub (pinned to 5720a38cfe)

Solutions

  1. Add one or more users to the 'Responsible Users' field of the query
  2. Or switch the result bucket to one that does not depend on responsible users (for example bucket by status or project)
  3. When building queries programmatically, set responsiblePHIDs in the same call that enables the bucket

Example fix

// before: bucket selected, no responsible users
$saved->setParameter('bucket', 'required');

// after: bucket plus the parameter it depends on
$saved->setParameter('bucket', 'required');
$saved->setParameter('responsiblePHIDs', array($viewer->getPHID()));
Defensive patterns

Strategy: validation

Validate before calling

// before selecting the bucket, verify its required parameter is present
$phids = $saved_query->getEvaluatedParameter('responsiblePHIDs');
if ($bucket_key === 'required' && (!$phids || !count($phids))) {
  // prompt for Responsible Users instead of building groups
}

Type guard

function bucketRequirementsSatisfied($bucket_key, array $parameters) {
  if ($bucket_key !== 'required') { return true; }
  return count(idx($parameters, 'responsiblePHIDs', array())) > 0;
}

Try / catch

try {
  $groups = $bucket->buildResultGroups($saved_query, $objects);
} catch (Exception $ex) {
  // render the query form with an error on the bucket selector
}

Prevention

When it happens

Trigger: A saved query or dashboard selects the 'Required Action' bucket without any users in the 'Responsible Users' field, for example when a personal commit search reuses someone else's bucket configuration and the responsible-user default is lost.

Common situations: Users experimenting with bucket options on commit searches; dashboards copied between users; API-driven queries that set the bucket but not responsiblePHIDs.

Related errors


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