1
0
Fork 0
mirror of https://we.phorge.it/source/phorge.git synced 2024-12-18 19:40:55 +01:00

Fix an issue where "Send an email to..." rules might be discarded

Summary: Fixes T8464. We could lose the additional users from "Send an email..." rules //if// Herald did not apply any other transactions to the task.

Test Plan:
  - Destroyed all Herald rules.
  - Created a single "Send an email to..." rule.
  - Created a task.
  - Saw target get an email.

Reviewers: btrahan, chad

Reviewed By: chad

Subscribers: epriestley

Maniphest Tasks: T8464

Differential Revision: https://secure.phabricator.com/D13245
This commit is contained in:
epriestley 2015-06-11 05:53:29 -07:00
parent 814b586f5d
commit a06618f879

View file

@ -936,14 +936,16 @@ abstract class PhabricatorApplicationTransactionEditor
$object, $object,
$herald_xactions); $herald_xactions);
$adapter = $this->getHeraldAdapter();
$this->heraldEmailPHIDs = $adapter->getEmailPHIDs();
$this->heraldForcedEmailPHIDs = $adapter->getForcedEmailPHIDs();
// Merge the new transactions into the transaction list: we want to // Merge the new transactions into the transaction list: we want to
// send email and publish feed stories about them, too. // send email and publish feed stories about them, too.
$xactions = array_merge($xactions, $herald_xactions); $xactions = array_merge($xactions, $herald_xactions);
} }
// If Herald did not generate transactions, we may still need to handle
// "Send an Email" rules.
$adapter = $this->getHeraldAdapter();
$this->heraldEmailPHIDs = $adapter->getEmailPHIDs();
$this->heraldForcedEmailPHIDs = $adapter->getForcedEmailPHIDs();
} }
$this->didApplyTransactions($xactions); $this->didApplyTransactions($xactions);