@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.

Respect tokenizer limits in the bulk editor

Summary: Ref T13025. This makes limits (for fields like "Assign To") work in the bulk editor, so you can't type "Assign to: x, y, z" anymore.

Test Plan: Hit limit for "Assign to" and a custom project field. No limit for "Add subscribers".

Reviewers: amckinley

Reviewed By: amckinley

Maniphest Tasks: T13025

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

+10 -2
+1 -2
src/applications/transactions/bulk/type/BulkTokenizerParameterType.php
··· 23 23 $template_markup = $template->render(); 24 24 25 25 $datasource = $this->getDatasource(); 26 - $limit = null; 27 26 28 27 return array( 29 28 'markup' => (string)hsprintf('%s', $template_markup), ··· 31 30 'src' => $datasource->getDatasourceURI(), 32 31 'browseURI' => $datasource->getBrowseURI(), 33 32 'placeholder' => $datasource->getPlaceholderText(), 34 - 'limit' => $limit, 33 + 'limit' => $datasource->getLimit(), 35 34 ), 36 35 'value' => null, 37 36 );
+4
src/applications/transactions/editfield/PhabricatorTokenizerEditField.php
··· 60 60 $datasource = $this->newDatasource() 61 61 ->setViewer($this->getViewer()); 62 62 63 + if ($this->getIsSingleValue()) { 64 + $datasource->setLimit(1); 65 + } 66 + 63 67 return id(new BulkTokenizerParameterType()) 64 68 ->setDatasource($datasource); 65 69 }
+5
src/infrastructure/customfield/standard/PhabricatorStandardCustomFieldTokenizer.php
··· 68 68 protected function newBulkParameterType() { 69 69 $datasource = $this->getDatasource(); 70 70 71 + $limit = $this->getFieldConfigValue('limit'); 72 + if ($limit) { 73 + $datasource->setLimit($limit); 74 + } 75 + 71 76 return id(new BulkTokenizerParameterType()) 72 77 ->setDatasource($datasource); 73 78 }