@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.

Don't run Herald when applying inverse edge transactions

Summary: Fixes T6727. Repro is: mention a task on another task, in a comment.

The inverse edge editor applying the "alincoln mentioned this in <other task>" transaction doesn't have enough data to execute Herald rules.

Just don't try to execute the rules, since they don't make much sesne from a product perspective and are tricky from a technical perspective.

Test Plan: Commented on `T1` with `T2` in comment body and a Herald rule that examines subscribers.

Reviewers: btrahan

NOTE: Cowboy committing this since any task mention fatals.

+7
+7
src/applications/transactions/editor/PhabricatorApplicationTransactionEditor.php
··· 733 733 // We are the Herald editor, so stop work here and return the updated 734 734 // transactions. 735 735 return $xactions; 736 + } else if ($this->getIsInverseEdgeEditor()) { 737 + // If we're applying inverse edge transactions, don't trigger Herald. 738 + // From a product perspective, the current set of inverse edges (most 739 + // often, mentions) aren't things users would expect to trigger Herald. 740 + // From a technical perspective, objects loaded by the inverse editor may 741 + // not have enough data to execute rules. At least for now, just stop 742 + // Herald from executing when applying inverse edges. 736 743 } else if ($this->shouldApplyHeraldRules($object, $xactions)) { 737 744 // We are not the Herald editor, so try to apply Herald rules. 738 745 $herald_xactions = $this->applyHeraldRules($object, $xactions);