mirror of
https://we.phorge.it/source/phorge.git
synced 2024-11-10 00:42:41 +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:
parent
85424e7472
commit
c41c593388
1 changed files with 5 additions and 3 deletions
|
@ -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)
|
||||
|
|
Loading…
Reference in a new issue