@recaptime-dev's working patches + fork for Phorge, a community fork of Phabricator. (Upstream dev and stable branches are at upstream/main and upstream/stable respectively.) hq.recaptime.dev/wiki/Phorge
phorge phabricator
1
fork

Configure Feed

Select the types of activity you want to include in your feed.

Fix task + commit associating

Summary: we weren't actually removing any edges. now we do.

Test Plan: had a commit associated with task x; removed association. had a commit associated with task x; removed association while adding a different one.

Reviewers: floatinglomas, epriestley

Reviewed By: epriestley

CC: aran, Koolvin

Maniphest Tasks: T1256

Differential Revision: https://secure.phabricator.com/D2509

+9 -1
+9 -1
src/applications/search/controller/attach/PhabricatorSearchAttachController.php
··· 68 68 case self::ACTION_EDGE: 69 69 $edge_type = $this->getEdgeType($object_type, $attach_type); 70 70 71 + $old_phids = PhabricatorEdgeQuery::loadDestinationPHIDs( 72 + $this->phid, 73 + $edge_type); 74 + $add_phids = $phids; 75 + $rem_phids = array_diff($old_phids, $add_phids); 71 76 $editor = id(new PhabricatorEdgeEditor()); 72 - foreach ($phids as $phid) { 77 + foreach ($add_phids as $phid) { 73 78 $editor->addEdge($this->phid, $edge_type, $phid); 79 + } 80 + foreach ($rem_phids as $phid) { 81 + $editor->removeEdge($this->phid, $edge_type, $phid); 74 82 } 75 83 $editor->save(); 76 84