@recaptime-dev's working patches + fork for Phorge, a community fork of Phabricator. (Upstream dev and stable branches are at upstream/main and upstream/stable respectively.) hq.recaptime.dev/wiki/Phorge
phorge phabricator
1
fork

Configure Feed

Select the types of activity you want to include in your feed.

Fix an issue where the "viewer" is not passed to Bulk Edit controls properly

Summary:
See PHI1442. If you have a bulk-editable datasource field with a composite datasource, it can currently fatal on the bulk edit workflow because the viewer is not passed correctly.

The error looks something like this:

> Argument 1 passed to PhabricatorDatasourceEngine::setViewer() must be an instance of PhabricatorUser, null given, called in /Users/epriestley/dev/core/lib/phabricator/src/applications/typeahead/datasource/PhabricatorTypeaheadCompositeDatasource.php on line 231

Test Plan: Configured a Maniphest custom field with a composite datasource, then tried a bulk edit. Things worked cleanly instead of fataling.

Differential Revision: https://secure.phabricator.com/D20841

+6 -1
+2 -1
src/applications/transactions/bulk/type/BulkTokenizerParameterType.php
··· 22 22 $template = new AphrontTokenizerTemplateView(); 23 23 $template_markup = $template->render(); 24 24 25 - $datasource = $this->getDatasource(); 25 + $datasource = $this->getDatasource() 26 + ->setViewer($this->getViewer()); 26 27 27 28 return array( 28 29 'markup' => (string)hsprintf('%s', $template_markup),
+4
src/applications/transactions/editengine/PhabricatorEditEngine.php
··· 2523 2523 } 2524 2524 2525 2525 final public function newBulkEditMap() { 2526 + $viewer = $this->getViewer(); 2527 + 2526 2528 $config = $this->loadDefaultConfiguration(); 2527 2529 if (!$config) { 2528 2530 throw new Exception( ··· 2541 2543 if ($bulk_type === null) { 2542 2544 continue; 2543 2545 } 2546 + 2547 + $bulk_type->setViewer($viewer); 2544 2548 2545 2549 $bulk_label = $type->getBulkEditLabel(); 2546 2550 if ($bulk_label === null) {