From 0b5fcb36ae8c772b7d8fe910e764bac07800efbf Mon Sep 17 00:00:00 2001 From: epriestley Date: Sat, 26 Jul 2014 09:48:01 -0700 Subject: [PATCH] Use authoritative PHIDs for Herald "Task Projects" condition Summary: Fixes T5707. After work on T5245, the `$task` object may not have the correct set of task PHIDs attached to it when Herald is invoked. Instead, just fetch the authoritative set. This is simple, and Herald is not super performance sensitive (happens on a write) so hitting the DB once is fine. Test Plan: Created a task with projects, verified the projects field contained the correct values when processed by Herald. Reviewers: chad, btrahan, joshuaspence Reviewed By: joshuaspence Subscribers: epriestley Maniphest Tasks: T5707 Differential Revision: https://secure.phabricator.com/D10060 --- .../herald/adapter/HeraldManiphestTaskAdapter.php | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/applications/herald/adapter/HeraldManiphestTaskAdapter.php b/src/applications/herald/adapter/HeraldManiphestTaskAdapter.php index 476ab2e320..4376b2aded 100644 --- a/src/applications/herald/adapter/HeraldManiphestTaskAdapter.php +++ b/src/applications/herald/adapter/HeraldManiphestTaskAdapter.php @@ -140,7 +140,9 @@ final class HeraldManiphestTaskAdapter extends HeraldAdapter { case self::FIELD_CC: return $this->getTask()->getCCPHIDs(); case self::FIELD_PROJECTS: - return $this->getTask()->getProjectPHIDs(); + return PhabricatorEdgeQuery::loadDestinationPHIDs( + $this->getTask()->getPHID(), + PhabricatorProjectObjectHasProjectEdgeType::EDGECONST); case self::FIELD_TASK_PRIORITY: return $this->getTask()->getPriority(); }