1
0
Fork 0
mirror of https://we.phorge.it/source/phorge.git synced 2024-12-23 14:00:56 +01:00

Maniphest - always cc the user, including when creating from template

Summary: Ref T6031. I figure its totally cool to include the user creating the task as a subscriber, even if from the template case, so just do that there too. Code is written such that if the user wasn't already in the subscriber case they end up being the last person in the tokenizer. Theoretically this should make any users who didn't want to be automagically subscribed via the create from template case to remove themselves.

Test Plan: made a template from a task that didn't have me as a subscriber initially and observed i was a subscriber.

Reviewers: epriestley

Reviewed By: epriestley

Subscribers: epriestley, Korvin

Maniphest Tasks: T6031

Differential Revision: https://secure.phabricator.com/D10408
This commit is contained in:
Bob Trahan 2014-09-03 13:08:52 -07:00
parent b2d5968460
commit b60d0c338a

View file

@ -442,7 +442,10 @@ final class ManiphestTaskEditController extends ManiphestController {
->withIDs(array($template_id))
->executeOne();
if ($template_task) {
$task->setCCPHIDs($template_task->getCCPHIDs());
$cc_phids = array_unique(array_merge(
$template_task->getCCPHIDs(),
array($user->getPHID())));
$task->setCCPHIDs($cc_phids);
$task->attachProjectPHIDs($template_task->getProjectPHIDs());
$task->setOwnerPHID($template_task->getOwnerPHID());
$task->setPriority($template_task->getPriority());