Page MenuHomePhabricator

D8193.diff
No OneTemporary

D8193.diff

Index: src/applications/herald/adapter/HeraldManiphestTaskAdapter.php
===================================================================
--- src/applications/herald/adapter/HeraldManiphestTaskAdapter.php
+++ src/applications/herald/adapter/HeraldManiphestTaskAdapter.php
@@ -19,6 +19,13 @@
'React to tasks being created or updated.');
}
+ public function getRepetitionOptions() {
+ return array(
+ HeraldRepetitionPolicyConfig::EVERY,
+ HeraldRepetitionPolicyConfig::FIRST,
+ );
+ }
+
public function supportsRuleType($rule_type) {
switch ($rule_type) {
case HeraldRuleTypeConfig::RULE_TYPE_GLOBAL:
Index: src/applications/herald/engine/HeraldEngine.php
===================================================================
--- src/applications/herald/engine/HeraldEngine.php
+++ src/applications/herald/engine/HeraldEngine.php
@@ -61,10 +61,14 @@
$effects = array();
foreach ($rules as $phid => $rule) {
$this->stack = array();
+
+ $policy_first = HeraldRepetitionPolicyConfig::FIRST;
+ $policy_first_int = HeraldRepetitionPolicyConfig::toInt($policy_first);
+ $is_first_only = ($rule->getRepetitionPolicy() == $policy_first_int);
+
try {
if (!$this->getDryRun() &&
- ($rule->getRepetitionPolicy() ==
- HeraldRepetitionPolicyConfig::FIRST) &&
+ $is_first_only &&
$rule->getRuleApplied($object->getPHID())) {
// This is not a dry run, and this rule is only supposed to be
// applied a single time, and it's already been applied...
Index: src/applications/herald/storage/HeraldRule.php
===================================================================
--- src/applications/herald/storage/HeraldRule.php
+++ src/applications/herald/storage/HeraldRule.php
@@ -17,7 +17,7 @@
protected $isDisabled = 0;
protected $triggerObjectPHID;
- protected $configVersion = 30;
+ protected $configVersion = 31;
// phids for which this rule has been applied
private $ruleApplied = self::ATTACHABLE;

File Metadata

Mime Type
text/plain
Expires
Wed, Nov 20, 2:20 PM (9 h, 40 m)
Storage Engine
blob
Storage Format
Encrypted (AES-256-CBC)
Storage Handle
6719584
Default Alt Text
D8193.diff (2 KB)

Event Timeline