Page MenuHomePhabricator

D8237.id19603.diff
No OneTemporary

D8237.id19603.diff

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.

File Metadata

Mime Type
text/plain
Expires
Fri, Mar 14, 6:59 PM (1 w, 3 d ago)
Storage Engine
blob
Storage Format
Encrypted (AES-256-CBC)
Storage Handle
7666750
Default Alt Text
D8237.id19603.diff (1 KB)

Event Timeline