Page Menu
Home
Phabricator
Search
Configure Global Search
Log In
Files
F15458635
D8529.id20253.diff
No One
Temporary
Actions
View File
Edit File
Delete File
View Transforms
Subscribe
Mute Notifications
Award Token
Flag For Later
Size
3 KB
Referenced Files
None
Subscribers
None
D8529.id20253.diff
View Options
diff --git a/src/applications/herald/adapter/HeraldManiphestTaskAdapter.php b/src/applications/herald/adapter/HeraldManiphestTaskAdapter.php
--- a/src/applications/herald/adapter/HeraldManiphestTaskAdapter.php
+++ b/src/applications/herald/adapter/HeraldManiphestTaskAdapter.php
@@ -1,14 +1,16 @@
<?php
-/**
- * @group herald
- */
final class HeraldManiphestTaskAdapter extends HeraldAdapter {
private $task;
private $ccPHIDs = array();
private $assignPHID;
private $projectPHIDs = array();
+ private $emailPHIDs = array();
+
+ public function getEmailPHIDs() {
+ return $this->emailPHIDs;
+ }
public function getAdapterApplicationClass() {
return 'PhabricatorApplicationManiphest';
@@ -98,6 +100,7 @@
case HeraldRuleTypeConfig::RULE_TYPE_GLOBAL:
return array(
self::ACTION_ADD_CC,
+ self::ACTION_EMAIL,
self::ACTION_ASSIGN_TASK,
self::ACTION_ADD_PROJECTS,
self::ACTION_NOTHING,
@@ -105,6 +108,7 @@
case HeraldRuleTypeConfig::RULE_TYPE_PERSONAL:
return array(
self::ACTION_ADD_CC,
+ self::ACTION_EMAIL,
self::ACTION_FLAG,
self::ACTION_ASSIGN_TASK,
self::ACTION_NOTHING,
@@ -161,7 +165,16 @@
$result[] = new HeraldApplyTranscript(
$effect,
true,
- pht('Added address to cc list.'));
+ pht('Added addresses to cc list.'));
+ break;
+ case self::ACTION_EMAIL:
+ foreach ($effect->getTarget() as $phid) {
+ $this->emailPHIDs[] = $phid;
+ }
+ $result[] = new HeraldApplyTranscript(
+ $effect,
+ true,
+ pht('Added addresses to email list.'));
break;
case self::ACTION_FLAG:
$result[] = parent::applyFlagEffect(
diff --git a/src/applications/herald/storage/HeraldRule.php b/src/applications/herald/storage/HeraldRule.php
--- a/src/applications/herald/storage/HeraldRule.php
+++ b/src/applications/herald/storage/HeraldRule.php
@@ -17,7 +17,7 @@
protected $isDisabled = 0;
protected $triggerObjectPHID;
- protected $configVersion = 33;
+ protected $configVersion = 34;
// phids for which this rule has been applied
private $ruleApplied = self::ATTACHABLE;
diff --git a/src/applications/maniphest/editor/ManiphestTransactionEditor.php b/src/applications/maniphest/editor/ManiphestTransactionEditor.php
--- a/src/applications/maniphest/editor/ManiphestTransactionEditor.php
+++ b/src/applications/maniphest/editor/ManiphestTransactionEditor.php
@@ -3,6 +3,8 @@
final class ManiphestTransactionEditor
extends PhabricatorApplicationTransactionEditor {
+ private $heraldEmailPHIDs = array();
+
public function getTransactionTypes() {
$types = parent::getTransactionTypes();
@@ -271,7 +273,17 @@
}
protected function getMailCC(PhabricatorLiskDAO $object) {
- return $object->getCCPHIDs();
+ $phids = array();
+
+ foreach ($object->getCCPHIDs() as $phid) {
+ $phids[] = $phid;
+ }
+
+ foreach ($this->heraldEmailPHIDs as $phid) {
+ $phids[] = $phid;
+ }
+
+ return $phids;
}
protected function buildReplyHandler(PhabricatorLiskDAO $object) {
@@ -361,6 +373,8 @@
$object->save();
}
+ $this->heraldEmailPHIDs = $adapter->getEmailPHIDs();
+
$xactions = array();
$assign_phid = $adapter->getAssignPHID();
File Metadata
Details
Attached
Mime Type
text/plain
Expires
Tue, Apr 1, 5:41 AM (2 w, 1 d ago)
Storage Engine
blob
Storage Format
Encrypted (AES-256-CBC)
Storage Handle
7702135
Default Alt Text
D8529.id20253.diff (3 KB)
Attached To
Mode
D8529: Add "Send an email" action to Herald for Maniphest
Attached
Detach File
Event Timeline
Log In to Comment