mirror of
https://we.phorge.it/source/phorge.git
synced 2024-11-23 23:32:40 +01:00
a115810912
Summary: Fixes T5614. Ref T4420. Other than the "users" datasource and a couple of others, many datasources ignore what the user typed and just return all results, then rely on the client to filter them. This works fine for rarely used ("legalpad documents") or always small ("task priorities", "applications") datasets, but is something we should graudally move away from as datasets get larger. Add a token table to projects, populate it, and use it to drive the datasource query. Additionally, expose it on the applicationsearch UI. Test Plan: - Ran migration. - Manually checked the table. - Searched for projects by name from ApplicationSearch. - Searched for projects by name from typeahead. - Manually checked the typeahead response. Reviewers: btrahan Reviewed By: btrahan Subscribers: epriestley Maniphest Tasks: T5614, T4420 Differential Revision: https://secure.phabricator.com/D9896
11 lines
262 B
PHP
11 lines
262 B
PHP
<?php
|
|
|
|
echo "Updating project datasource tokens...\n";
|
|
|
|
foreach (new LiskMigrationIterator(new PhabricatorProject()) as $project) {
|
|
$name = $project->getName();
|
|
echo "Updating project '{$name}'...\n";
|
|
$project->updateDatasourceTokens();
|
|
}
|
|
|
|
echo "Done.\n";
|