Page Menu
Home
Phabricator
Search
Configure Global Search
Log In
Files
F15379150
D8237.id19603.diff
No One
Temporary
Actions
View File
Edit File
Delete File
View Transforms
Subscribe
Mute Notifications
Award Token
Flag For Later
Size
1 KB
Referenced Files
None
Subscribers
None
D8237.id19603.diff
View Options
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
Details
Attached
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)
Attached To
Mode
D8237: Respect project closure states in fulltext search and handles
Attached
Detach File
Event Timeline
Log In to Comment