1
0
Fork 0
mirror of https://we.phorge.it/source/phorge.git synced 2025-01-19 19:21:10 +01:00

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
This commit is contained in:
epriestley 2013-11-25 14:55:06 -08:00
parent 8b19465a9d
commit e944cf8ff4

View file

@ -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,