{"record":{"id":"7d15a9e332555aeb","repo":"phacility/phabricator","slug":"you-have-not-chosen-any-edits-to-apply","errorCode":null,"errorMessage":"You have not chosen any edits to apply.","messagePattern":"You have not chosen any edits to apply\\.","errorType":"validation","errorClass":"Exception","httpStatus":null,"severity":"warning","filePath":"src/applications/transactions/bulk/PhabricatorBulkEngine.php","lineNumber":416,"sourceCode":"\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');\n    if ($raw_xactions) {\n      $raw_xactions = phutil_json_decode($raw_xactions);\n    } else {\n      $raw_xactions = array();\n    }\n\n    if (!$raw_xactions) {\n      throw new Exception(\n        pht(\n          'You have not chosen any edits to apply.'));\n    }\n\n    $edit_engine = id($this->newEditEngine())\n      ->setViewer($viewer);\n\n    $xactions = $edit_engine->newRawBulkTransactions($raw_xactions);\n\n    $cancel_uri = $this->getCancelURI();\n    $done_uri = $this->getDoneURI();\n\n    $job = PhabricatorWorkerBulkJob::initializeNewJob(\n      $viewer,\n      new PhabricatorEditEngineBulkJobType(),\n      array(\n        'objectPHIDs' => mpull($objects, 'getPHID'),\n        'xactions' => $xactions,","sourceCodeStart":398,"sourceCodeEnd":434,"githubUrl":"https://github.com/phacility/phabricator/blob/5720a38cfe95b00ca4be5016dd0d2f3195f4fa04/src/applications/transactions/bulk/PhabricatorBulkEngine.php#L398-L434","documentation":"The bulk edit request must carry an 'xactions' POST field containing a JSON array of raw edit transactions. When the field is absent or decodes to an empty array, no edits were chosen and the engine aborts before constructing the edit engine transactions.","triggerScenarios":"Submitting the bulk edit dialog without defining any edits; a client sending an empty JSON array; automated posts omitting the field entirely.","commonSituations":"Users clicking through the workflow without adding an edit rule; scripts posting an empty xactions payload.","solutions":["Define at least one edit (a field plus an operation) in the dialog before submitting","If scripting, ensure the xactions value is a non-empty JSON array of valid transaction descriptions","Log the outgoing payload to confirm the client actually serialized the edits"],"exampleFix":"// before: submitting with no edits\n$_POST['xactions'] = '[]';\n\n// after: at least one concrete edit\n$_POST['xactions'] = phutil_json_encode(array(\n  array(\n    'type' => 'title.set',\n    'value' => 'Bulk-edited title',\n  ),\n));","handlingStrategy":"validation","validationCode":"// Client-side: build and check the payload before submitting.\n$xactions = array(/* user-defined edits */);\nif (!$xactions) {\n  // block submit: no edits chosen\n}\n$request->setStr('xactions', phutil_json_encode($xactions));","typeGuard":null,"tryCatchPattern":null,"preventionTips":["Require at least one edit rule before enabling the submit control","Log the outgoing xactions JSON when automating bulk edits"],"tags":["bulk-edit","xactions","validation","json"],"backgroundTag":"missing-request-data","analyzedSha":"5720a38cfe95b00ca4be5016dd0d2f3195f4fa04","analyzedAt":"2026-08-21T05:07:25.672Z","schemaVersion":2},"datasetVersion":"2026-08-21T11:28:35.574Z"}