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
- Add one or more users to the 'Responsible Users' field of the query
- Or switch the result bucket to one that does not depend on responsible users (for example bucket by status or project)
- 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 copying dashboards or saved queries between users, re-check dependent parameters like Responsible Users
- In code, always set responsiblePHIDs in the same change that enables the required-action bucket
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
- Request includes restricted parameter "%s", but this control
- To search for commits which are ancestors of particular refs
- Subversion does not support searching for ancestors of a par
- Mercurial does not currently support searching for ancestors
- The "Has MFA" query constraint may only be used by administr
AI-assisted analysis of phacility/phabricator@5720a38cfe (2026-08-21).
Data as JSON: /api/errors/d4d1bedb726db14c.
Report an issue: GitHub.