When editing a subtyped object, use edit forms of the same subtype

Summary:
Ref T12314. When we pick an "Edit" form for a subtyped object, only consider forms with the same subtype.

For example, editing an "Animal" uses the forms with subtype "animal" which are marked as edit forms.

This also makes "Create Subtask" carry the parent task's type.

Test Plan:
  - Edited an Animal, got an animal edit form.
  - Edited a normal task, got a normal task form.
  - Edited a paste, got the normal workflow.

Reviewers: chad

Reviewed By: chad

Maniphest Tasks: T12314

Differential Revision: https://secure.phabricator.com/D17445
This commit is contained in:
epriestley
2017-03-01 17:01:21 -08:00
parent 4948a21959
commit 7eab75410a
4 changed files with 44 additions and 11 deletions

View File

@@ -910,7 +910,7 @@ final class PhabricatorProjectBoardViewController
// for each column or board?
$edit_config = id(new ManiphestEditEngine())
->setViewer($viewer)
->loadDefaultEditConfiguration();
->loadDefaultEditConfiguration(new ManiphestTask());
if ($edit_config) {
$form_key = $edit_config->getIdentifier();
$create_uri = "/maniphest/task/edit/form/{$form_key}/";