From b60d0c338a209003e88dd037ff133aa14204b65e Mon Sep 17 00:00:00 2001 From: Bob Trahan Date: Wed, 3 Sep 2014 13:08:52 -0700 Subject: [PATCH] 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 --- .../maniphest/controller/ManiphestTaskEditController.php | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/src/applications/maniphest/controller/ManiphestTaskEditController.php b/src/applications/maniphest/controller/ManiphestTaskEditController.php index b3d59b1ee8..c71712315a 100644 --- a/src/applications/maniphest/controller/ManiphestTaskEditController.php +++ b/src/applications/maniphest/controller/ManiphestTaskEditController.php @@ -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());