mirror of
https://we.phorge.it/source/phorge.git
synced 2024-11-10 00:42:41 +01:00
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.
This commit is contained in:
parent
7d96870570
commit
5050389fce
1 changed files with 7 additions and 0 deletions
|
@ -733,6 +733,13 @@ abstract class PhabricatorApplicationTransactionEditor
|
|||
// We are the Herald editor, so stop work here and return the updated
|
||||
// transactions.
|
||||
return $xactions;
|
||||
} else if ($this->getIsInverseEdgeEditor()) {
|
||||
// If we're applying inverse edge transactions, don't trigger Herald.
|
||||
// From a product perspective, the current set of inverse edges (most
|
||||
// often, mentions) aren't things users would expect to trigger Herald.
|
||||
// From a technical perspective, objects loaded by the inverse editor may
|
||||
// not have enough data to execute rules. At least for now, just stop
|
||||
// Herald from executing when applying inverse edges.
|
||||
} else if ($this->shouldApplyHeraldRules($object, $xactions)) {
|
||||
// We are not the Herald editor, so try to apply Herald rules.
|
||||
$herald_xactions = $this->applyHeraldRules($object, $xactions);
|
||||
|
|
Loading…
Reference in a new issue