Page MenuHomePhabricator

D18888.id45334.diff
No OneTemporary

D18888.id45334.diff

diff --git a/src/applications/transactions/bulk/type/BulkTokenizerParameterType.php b/src/applications/transactions/bulk/type/BulkTokenizerParameterType.php
--- a/src/applications/transactions/bulk/type/BulkTokenizerParameterType.php
+++ b/src/applications/transactions/bulk/type/BulkTokenizerParameterType.php
@@ -23,7 +23,6 @@
$template_markup = $template->render();
$datasource = $this->getDatasource();
- $limit = null;
return array(
'markup' => (string)hsprintf('%s', $template_markup),
@@ -31,7 +30,7 @@
'src' => $datasource->getDatasourceURI(),
'browseURI' => $datasource->getBrowseURI(),
'placeholder' => $datasource->getPlaceholderText(),
- 'limit' => $limit,
+ 'limit' => $datasource->getLimit(),
),
'value' => null,
);
diff --git a/src/applications/transactions/editfield/PhabricatorTokenizerEditField.php b/src/applications/transactions/editfield/PhabricatorTokenizerEditField.php
--- a/src/applications/transactions/editfield/PhabricatorTokenizerEditField.php
+++ b/src/applications/transactions/editfield/PhabricatorTokenizerEditField.php
@@ -60,6 +60,10 @@
$datasource = $this->newDatasource()
->setViewer($this->getViewer());
+ if ($this->getIsSingleValue()) {
+ $datasource->setLimit(1);
+ }
+
return id(new BulkTokenizerParameterType())
->setDatasource($datasource);
}
diff --git a/src/infrastructure/customfield/standard/PhabricatorStandardCustomFieldTokenizer.php b/src/infrastructure/customfield/standard/PhabricatorStandardCustomFieldTokenizer.php
--- a/src/infrastructure/customfield/standard/PhabricatorStandardCustomFieldTokenizer.php
+++ b/src/infrastructure/customfield/standard/PhabricatorStandardCustomFieldTokenizer.php
@@ -68,6 +68,11 @@
protected function newBulkParameterType() {
$datasource = $this->getDatasource();
+ $limit = $this->getFieldConfigValue('limit');
+ if ($limit) {
+ $datasource->setLimit($limit);
+ }
+
return id(new BulkTokenizerParameterType())
->setDatasource($datasource);
}

File Metadata

Mime Type
text/plain
Expires
Wed, Nov 27, 11:47 PM (20 h, 8 m)
Storage Engine
blob
Storage Format
Encrypted (AES-256-CBC)
Storage Handle
6797224
Default Alt Text
D18888.id45334.diff (2 KB)

Event Timeline