1
0
Fork 0
mirror of https://we.phorge.it/source/phorge.git synced 2024-12-27 16:00:59 +01:00

Herald - make dry runs work for "apply once" rules after they have been applied

Summary: Fixes T3719

Test Plan: https://secure.phabricator.com/T3719#comment-7

Reviewers: epriestley

Reviewed By: epriestley

CC: Korvin, aran

Maniphest Tasks: T3719

Differential Revision: https://secure.phabricator.com/D6968
This commit is contained in:
Bob Trahan 2013-09-13 11:38:49 -07:00
parent 85424e7472
commit c41c593388

View file

@ -57,11 +57,13 @@ final class HeraldEngine {
foreach ($rules as $id => $rule) {
$this->stack = array();
try {
if (($rule->getRepetitionPolicy() ==
if (!$this->getDryRun() &&
($rule->getRepetitionPolicy() ==
HeraldRepetitionPolicyConfig::FIRST) &&
$rule->getRuleApplied($object->getPHID())) {
// This rule is only supposed to be applied a single time, and it's
// aleady been applied, so this is an automatic failure.
// This is not a dry run, and this rule is only supposed to be
// applied a single time, and it's already been applied...
// That means automatic failure.
$xscript = id(new HeraldRuleTranscript())
->setRuleID($id)
->setResult(false)