Herald rule match project and its milestones


Is there a way to have a global herald rule for maniphest tasks with project tag condition to also match tasks in milestones of the selected projects?


Workaround by modifying HeraldProjectsField. This is enough in my use case for now:


final class HeraldProjectsField extends HeraldField {
  public function getHeraldFieldValue($object) {
    $projectPHIDs = PhabricatorEdgeQuery::loadDestinationPHIDs(

    // Include parent projects for milestone projects tagged to the task
    $projects = id(new PhabricatorProjectQuery())

    foreach ($projects as $project) {
      if ($project->isMilestone()) {
        $projectPHIDs[] = $project

    return $projectPHIDs;

closed #3