Index: src/applications/project/phid/PhabricatorProjectPHIDTypeProject.php =================================================================== --- src/applications/project/phid/PhabricatorProjectPHIDTypeProject.php +++ src/applications/project/phid/PhabricatorProjectPHIDTypeProject.php @@ -42,6 +42,10 @@ $handle->setName($name); $handle->setObjectName('#'.rtrim($project->getPhrictionSlug(), '/')); $handle->setURI("/project/view/{$id}/"); + + if ($project->isArchived()) { + $handle->setStatus(PhabricatorObjectHandleStatus::STATUS_CLOSED); + } } } Index: src/applications/project/search/PhabricatorProjectSearchIndexer.php =================================================================== --- src/applications/project/search/PhabricatorProjectSearchIndexer.php +++ src/applications/project/search/PhabricatorProjectSearchIndexer.php @@ -20,6 +20,15 @@ $this->indexSubscribers($doc); $this->indexCustomFields($doc, $project); + $doc->addRelationship( + $project->isArchived() + ? PhabricatorSearchRelationship::RELATIONSHIP_CLOSED + : PhabricatorSearchRelationship::RELATIONSHIP_OPEN, + $project->getPHID(), + PhabricatorProjectPHIDTypeProject::TYPECONST, + time()); + + // NOTE: This could be more full-featured, but for now we're mostly // interested in the side effects of indexing.