1
0
Fork 0
mirror of https://we.phorge.it/source/phorge.git synced 2024-12-18 19:40:55 +01:00
phorge-phorge/src/applications/maniphest/engineextension/ManiphestProjectNameFulltextEngineExtension.php
epriestley aab1574e33 Remove TYPE_SEARCH_DIDUPDATEINDEX event
Summary:
Ref T9979. This event had one weird callsite and no known third-party callers. It can be done more cleanly as an extension, now.

This index is used to allow us to "Group By: Project" in Maniphest without joining into the Projects database.

Test Plan:
  - Ran a query with "Group By: Project" in Maniphest.
  - Renamed project "Apples" to "Zebras".
  - Reloaded page.
  - UI properly moved "Zebras" tasks to the bottom of the list.

Reviewers: chad

Reviewed By: chad

Maniphest Tasks: T9979

Differential Revision: https://secure.phabricator.com/D14836
2015-12-21 17:23:59 -08:00

25 lines
566 B
PHP

<?php
final class ManiphestProjectNameFulltextEngineExtension
extends PhabricatorFulltextEngineExtension {
const EXTENSIONKEY = 'maniphest.project.name';
public function getExtensionName() {
return pht('Maniphest Project Name Cache');
}
public function shouldIndexFulltextObject($object) {
return ($object instanceof PhabricatorProject);
}
public function indexFulltextObject(
$object,
PhabricatorSearchAbstractDocument $document) {
ManiphestNameIndex::updateIndex(
$object->getPHID(),
$object->getName());
}
}