1
0
Fork 0
mirror of https://we.phorge.it/source/phorge.git synced 2024-11-19 05:12:41 +01:00

Add workboard link to emails about workboard changes

Summary: Fixes T4652, adding workboard link to emails

Test Plan: Move a task in a workboard from one column to another. Email notification should contain "WORKBOARD" section with link to that workboard

Reviewers: chad, epriestley, #blessed_reviewers

Reviewed By: epriestley, #blessed_reviewers

Subscribers: Korvin, epriestley

Maniphest Tasks: T4652

Differential Revision: https://secure.phabricator.com/D10889
This commit is contained in:
lkassianik 2014-11-20 17:25:02 -08:00 committed by epriestley
parent ff7a514af3
commit c2f0955e9b
2 changed files with 29 additions and 0 deletions

View file

@ -5312,6 +5312,7 @@ phutil_register_library_map(array(
'PhabricatorRepositoryDAO', 'PhabricatorRepositoryDAO',
'PhabricatorPolicyInterface', 'PhabricatorPolicyInterface',
'PhabricatorFlaggableInterface', 'PhabricatorFlaggableInterface',
'PhabricatorProjectInterface',
'PhabricatorTokenReceiverInterface', 'PhabricatorTokenReceiverInterface',
'PhabricatorSubscribableInterface', 'PhabricatorSubscribableInterface',
'PhabricatorMentionableInterface', 'PhabricatorMentionableInterface',

View file

@ -501,6 +501,34 @@ final class ManiphestTransactionEditor
pht('TASK DETAIL'), pht('TASK DETAIL'),
PhabricatorEnv::getProductionURI('/T'.$object->getID())); PhabricatorEnv::getProductionURI('/T'.$object->getID()));
$board_phids = array();
$type_column = ManiphestTransaction::TYPE_PROJECT_COLUMN;
foreach ($xactions as $xaction) {
if ($xaction->getTransactionType() == $type_column) {
$new = $xaction->getNewValue();
$project_phid = idx($new, 'projectPHID');
if ($project_phid) {
$board_phids[] = $project_phid;
}
}
}
if ($board_phids) {
$projects = id(new PhabricatorProjectQuery())
->setViewer($this->requireActor())
->withPHIDs($board_phids)
->execute();
foreach ($projects as $project) {
$body->addLinkSection(
pht('WORKBOARD'),
PhabricatorEnv::getProductionURI(
'/project/board/'.$project->getID().'/'));
}
}
return $body; return $body;
} }