From e944cf8ff48edf520e46ea71e0de910a874c9c22 Mon Sep 17 00:00:00 2001 From: epriestley Date: Mon, 25 Nov 2013 14:55:06 -0800 Subject: [PATCH] Propagate "edit policy" and "view policy" when creating a new template task Summary: Fixes T4158. Two possible refinements: - Maybe we should make all of these things respect `ManiphestCapabilityEditAssign::CAPABILITY`, etc. I think it's reasonable either way, and this is probably more intuitive and useful for most cases. - Maybe we should check that you can see the policies before copying them. Again, this is sort of reasonable either way. Test Plan: Created a new task from a template, saw that it inherited policies. Reviewers: btrahan, hach-que Reviewed By: hach-que CC: aran Maniphest Tasks: T4158 Differential Revision: https://secure.phabricator.com/D7649 --- .../maniphest/controller/ManiphestTaskEditController.php | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/applications/maniphest/controller/ManiphestTaskEditController.php b/src/applications/maniphest/controller/ManiphestTaskEditController.php index 3d9be734d2..6f58e52647 100644 --- a/src/applications/maniphest/controller/ManiphestTaskEditController.php +++ b/src/applications/maniphest/controller/ManiphestTaskEditController.php @@ -370,6 +370,8 @@ final class ManiphestTaskEditController extends ManiphestController { $task->setProjectPHIDs($template_task->getProjectPHIDs()); $task->setOwnerPHID($template_task->getOwnerPHID()); $task->setPriority($template_task->getPriority()); + $task->setViewPolicy($template_task->getViewPolicy()); + $task->setEditPolicy($template_task->getEditPolicy()); $template_fields = PhabricatorCustomField::getObjectFields( $template_task,