mirror of
https://we.phorge.it/source/phorge.git
synced 2024-12-23 22:10:55 +01:00
Add "unblock" and "column" mail tags to Maniphest
Summary: Fixes T5769. Fixes T5861. Add mail tags for "unblock" and "column change". Test Plan: Did unblocks and column changes, verified the mail got the right mailtags and recipient nondelivery flags. Reviewers: chad, btrahan Reviewed By: btrahan Subscribers: epriestley Maniphest Tasks: T5861, T5769 Differential Revision: https://secure.phabricator.com/D10241
This commit is contained in:
parent
0420754d73
commit
8ef1ea63dd
3 changed files with 38 additions and 24 deletions
|
@ -438,19 +438,23 @@ final class ManiphestTransactionEditor
|
|||
|
||||
public function getMailTagsMap() {
|
||||
return array(
|
||||
MetaMTANotificationType::TYPE_MANIPHEST_STATUS =>
|
||||
ManiphestTransaction::MAILTAG_STATUS =>
|
||||
pht("A task's status changes."),
|
||||
MetaMTANotificationType::TYPE_MANIPHEST_OWNER =>
|
||||
ManiphestTransaction::MAILTAG_OWNER =>
|
||||
pht("A task's owner changes."),
|
||||
MetaMTANotificationType::TYPE_MANIPHEST_PRIORITY =>
|
||||
ManiphestTransaction::MAILTAG_PRIORITY =>
|
||||
pht("A task's priority changes."),
|
||||
MetaMTANotificationType::TYPE_MANIPHEST_CC =>
|
||||
pht("A task's CCs change."),
|
||||
MetaMTANotificationType::TYPE_MANIPHEST_PROJECTS =>
|
||||
ManiphestTransaction::MAILTAG_CC =>
|
||||
pht("A task's subscribers change."),
|
||||
ManiphestTransaction::MAILTAG_PROJECTS =>
|
||||
pht("A task's associated projects change."),
|
||||
MetaMTANotificationType::TYPE_MANIPHEST_COMMENT =>
|
||||
ManiphestTransaction::MAILTAG_UNBLOCK =>
|
||||
pht('One of the tasks a task is blocked by changes status.'),
|
||||
ManiphestTransaction::MAILTAG_COLUMN =>
|
||||
pht('A task is moved between columns on a workboard.'),
|
||||
ManiphestTransaction::MAILTAG_COMMENT =>
|
||||
pht('Someone comments on a task.'),
|
||||
MetaMTANotificationType::TYPE_MANIPHEST_OTHER =>
|
||||
ManiphestTransaction::MAILTAG_OTHER =>
|
||||
pht('Other task activity not listed above occurs.'),
|
||||
);
|
||||
}
|
||||
|
|
|
@ -20,6 +20,18 @@ final class ManiphestTransaction
|
|||
// so any transactions render correctly.
|
||||
const TYPE_ATTACH = 'attach';
|
||||
|
||||
|
||||
const MAILTAG_STATUS = 'maniphest-status';
|
||||
const MAILTAG_OWNER = 'maniphest-owner';
|
||||
const MAILTAG_PRIORITY = 'maniphest-priority';
|
||||
const MAILTAG_CC = 'maniphest-cc';
|
||||
const MAILTAG_PROJECTS = 'maniphest-projects';
|
||||
const MAILTAG_COMMENT = 'maniphest-comment';
|
||||
const MAILTAG_COLUMN = 'maniphest-column';
|
||||
const MAILTAG_UNBLOCK = 'maniphest-unblock';
|
||||
const MAILTAG_OTHER = 'maniphest-other';
|
||||
|
||||
|
||||
public function getApplicationName() {
|
||||
return 'maniphest';
|
||||
}
|
||||
|
@ -828,32 +840,38 @@ final class ManiphestTransaction
|
|||
$tags = array();
|
||||
switch ($this->getTransactionType()) {
|
||||
case self::TYPE_STATUS:
|
||||
$tags[] = MetaMTANotificationType::TYPE_MANIPHEST_STATUS;
|
||||
$tags[] = self::MAILTAG_STATUS;
|
||||
break;
|
||||
case self::TYPE_OWNER:
|
||||
$tags[] = MetaMTANotificationType::TYPE_MANIPHEST_OWNER;
|
||||
$tags[] = self::MAILTAG_OWNER;
|
||||
break;
|
||||
case self::TYPE_CCS:
|
||||
$tags[] = MetaMTANotificationType::TYPE_MANIPHEST_CC;
|
||||
$tags[] = self::MAILTAG_CC;
|
||||
break;
|
||||
case PhabricatorTransactions::TYPE_EDGE:
|
||||
switch ($this->getMetadataValue('edge:type')) {
|
||||
case PhabricatorProjectObjectHasProjectEdgeType::EDGECONST:
|
||||
$tags[] = MetaMTANotificationType::TYPE_MANIPHEST_PROJECTS;
|
||||
$tags[] = self::MAILTAG_PROJECTS;
|
||||
break;
|
||||
default:
|
||||
$tags[] = MetaMTANotificationType::TYPE_MANIPHEST_OTHER;
|
||||
$tags[] = self::MAILTAG_OTHER;
|
||||
break;
|
||||
}
|
||||
break;
|
||||
case self::TYPE_PRIORITY:
|
||||
$tags[] = MetaMTANotificationType::TYPE_MANIPHEST_PRIORITY;
|
||||
$tags[] = self::MAILTAG_PRIORITY;
|
||||
break;
|
||||
case self::TYPE_UNBLOCK:
|
||||
$tags[] = self::MAILTAG_UNBLOCK;
|
||||
break;
|
||||
case self::TYPE_PROJECT_COLUMN:
|
||||
$tags[] = self::MAILTAG_COLUMN;
|
||||
break;
|
||||
case PhabricatorTransactions::TYPE_COMMENT:
|
||||
$tags[] = MetaMTANotificationType::TYPE_MANIPHEST_COMMENT;
|
||||
$tags[] = self::MAILTAG_COMMENT;
|
||||
break;
|
||||
default:
|
||||
$tags[] = MetaMTANotificationType::TYPE_MANIPHEST_OTHER;
|
||||
$tags[] = self::MAILTAG_OTHER;
|
||||
break;
|
||||
}
|
||||
return $tags;
|
||||
|
|
|
@ -11,14 +11,6 @@ final class MetaMTANotificationType
|
|||
const TYPE_DIFFERENTIAL_REVIEW_REQUEST = 'differential-review-request';
|
||||
const TYPE_DIFFERENTIAL_OTHER = 'differential-other';
|
||||
|
||||
const TYPE_MANIPHEST_STATUS = 'maniphest-status';
|
||||
const TYPE_MANIPHEST_OWNER = 'maniphest-owner';
|
||||
const TYPE_MANIPHEST_PRIORITY = 'maniphest-priority';
|
||||
const TYPE_MANIPHEST_CC = 'maniphest-cc';
|
||||
const TYPE_MANIPHEST_PROJECTS = 'maniphest-projects';
|
||||
const TYPE_MANIPHEST_COMMENT = 'maniphest-comment';
|
||||
const TYPE_MANIPHEST_OTHER = 'maniphest-other';
|
||||
|
||||
const TYPE_PHOLIO_STATUS = 'pholio-status';
|
||||
const TYPE_PHOLIO_COMMENT = 'pholio-comment';
|
||||
const TYPE_PHOLIO_UPDATED = 'pholio-updated';
|
||||
|
|
Loading…
Reference in a new issue