Page Menu
Home
Phabricator
Search
Configure Global Search
Log In
Files
F14423038
D18619.id44708.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
D18619.id44708.diff
View Options
diff --git a/src/applications/differential/herald/DifferentialDiffAuthorProjectsHeraldField.php b/src/applications/differential/herald/DifferentialDiffAuthorProjectsHeraldField.php
--- a/src/applications/differential/herald/DifferentialDiffAuthorProjectsHeraldField.php
+++ b/src/applications/differential/herald/DifferentialDiffAuthorProjectsHeraldField.php
@@ -10,9 +10,14 @@
}
public function getHeraldFieldValue($object) {
- return PhabricatorEdgeQuery::loadDestinationPHIDs(
- $object->getAuthorPHID(),
- PhabricatorProjectMemberOfProjectEdgeType::EDGECONST);
+ $viewer = PhabricatorUser::getOmnipotentUser();
+
+ $projects = id(new PhabricatorProjectQuery())
+ ->setViewer($viewer)
+ ->withMemberPHIDs(array($object->getAuthorPHID()))
+ ->execute();
+
+ return mpull($projects, 'getPHID');
}
protected function getHeraldFieldStandardType() {
@@ -20,7 +25,7 @@
}
protected function getDatasource() {
- return new PhabricatorProjectOrUserDatasource();
+ return new PhabricatorProjectDatasource();
}
}
diff --git a/src/applications/differential/herald/DifferentialRevisionAuthorProjectsHeraldField.php b/src/applications/differential/herald/DifferentialRevisionAuthorProjectsHeraldField.php
--- a/src/applications/differential/herald/DifferentialRevisionAuthorProjectsHeraldField.php
+++ b/src/applications/differential/herald/DifferentialRevisionAuthorProjectsHeraldField.php
@@ -10,9 +10,14 @@
}
public function getHeraldFieldValue($object) {
- return PhabricatorEdgeQuery::loadDestinationPHIDs(
- $object->getAuthorPHID(),
- PhabricatorProjectMemberOfProjectEdgeType::EDGECONST);
+ $viewer = PhabricatorUser::getOmnipotentUser();
+
+ $projects = id(new PhabricatorProjectQuery())
+ ->setViewer($viewer)
+ ->withMemberPHIDs(array($object->getAuthorPHID()))
+ ->execute();
+
+ return mpull($projects, 'getPHID');
}
protected function getHeraldFieldStandardType() {
File Metadata
Details
Attached
Mime Type
text/plain
Expires
Thu, Dec 26, 8:27 AM (10 h, 42 m)
Storage Engine
blob
Storage Format
Encrypted (AES-256-CBC)
Storage Handle
6927616
Default Alt Text
D18619.id44708.diff (1 KB)
Attached To
Mode
D18619: Fix "Author's projects" Herald rules for revisions and diffs
Attached
Detach File
Event Timeline
Log In to Comment