Page Menu
Home
Phabricator
Search
Configure Global Search
Log In
Files
F14008210
D8193.diff
No One
Temporary
Actions
View File
Edit File
Delete File
View Transforms
Subscribe
Mute Notifications
Award Token
Flag For Later
Size
2 KB
Referenced Files
None
Subscribers
None
D8193.diff
View Options
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
Details
Attached
Mime Type
text/plain
Expires
Wed, Oct 30, 5:38 PM (2 w, 6 d ago)
Storage Engine
blob
Storage Format
Encrypted (AES-256-CBC)
Storage Handle
6719584
Default Alt Text
D8193.diff (2 KB)
Attached To
Mode
D8193: Support "only the first time" in Maniphest
Attached
Detach File
Event Timeline
Log In to Comment