{"record":{"id":"b70b00061f91be67","repo":"phacility/phabricator","slug":"query-does-not-match-any-objects","errorCode":null,"errorMessage":"Query does not match any objects.","messagePattern":"Query does not match any objects\\.","errorType":"validation","errorClass":"Exception","httpStatus":null,"severity":"warning","filePath":"src/applications/transactions/bulk/PhabricatorBulkEngine.php","lineNumber":390,"sourceCode":"              'table',\n              array(\n                'sigil' => 'bulk-actions',\n                'class' => 'bulk-edit-table',\n              ),\n              '')))\n      ->appendChild(\n        id(new AphrontFormSubmitControl())\n          ->setValue(pht('Continue'))\n          ->addCancelButton($cancel_uri));\n  }\n\n  private function buildEditResponse() {\n    $viewer = $this->getViewer();\n    $controller = $this->getController();\n    $request = $controller->getRequest();\n\n    if (!$this->objectList) {\n      throw new Exception(pht('Query does not match any objects.'));\n    }\n\n    if (!$this->editableList) {\n      throw new Exception(\n        pht(\n          'Query does not match any objects you have permission to edit.'));\n    }\n\n    // Restrict the selection set to objects the user can actually edit.\n    $objects = array_intersect_key($this->editableList, $this->targetList);\n\n    if (!$objects) {\n      throw new Exception(\n        pht(\n          'You have not selected any objects to edit.'));\n    }\n\n    $raw_xactions = $request->getStr('xactions');","sourceCodeStart":372,"sourceCodeEnd":408,"githubUrl":"https://github.com/phacility/phabricator/blob/5720a38cfe95b00ca4be5016dd0d2f3195f4fa04/src/applications/transactions/bulk/PhabricatorBulkEngine.php#L372-L408","documentation":"Before building the edit UI, the bulk engine verifies the query matched at least one object (objectList). An empty result set aborts the flow since there is nothing to bulk edit.","triggerScenarios":"Entering bulk edit from a saved query whose constraints match zero objects: overly narrow or contradictory filters, or a stale saved query whose referenced projects/labels no longer exist.","commonSituations":"Old saved queries predating renames or deletions; filters that combine mutually exclusive constraints.","solutions":["Loosen or fix the query constraints until it matches objects; test the same query in the normal search UI first","Recreate the saved query if it is stale","Confirm you are querying an object type the search engine actually covers"],"exampleFix":null,"handlingStrategy":"validation","validationCode":"// Run the same saved query first and require a non-empty result set.\n$query = $search_engine->buildQueryFromSavedQuery($saved)\n  ->setViewer($viewer);\n$objects = $query->execute();\nif (!$objects) {\n  // tell the user the query matches nothing; do not enter the bulk flow\n}","typeGuard":null,"tryCatchPattern":null,"preventionTips":["Test saved queries in the normal search UI before using them for bulk edit","Recreate saved queries after big renames, deletions, or migrations"],"tags":["bulk-edit","query","empty-results"],"backgroundTag":"empty-result-set","analyzedSha":"5720a38cfe95b00ca4be5016dd0d2f3195f4fa04","analyzedAt":"2026-08-21T05:07:25.672Z","schemaVersion":2},"datasetVersion":"2026-08-21T11:28:35.574Z"}