Differential D17593 Diff 42320 src/applications/transactions/editor/PhabricatorApplicationTransactionEditor.php
Changeset View
Changeset View
Standalone View
Standalone View
src/applications/transactions/editor/PhabricatorApplicationTransactionEditor.php
| Show First 20 Lines • Show All 2,114 Lines • ▼ Show 20 Lines | switch ($type) { | ||||
| $xactions, | $xactions, | ||||
| $type); | $type); | ||||
| break; | break; | ||||
| case PhabricatorTransactions::TYPE_SUBTYPE: | case PhabricatorTransactions::TYPE_SUBTYPE: | ||||
| $errors[] = $this->validateSubtypeTransactions( | $errors[] = $this->validateSubtypeTransactions( | ||||
| $object, | $object, | ||||
| $xactions, | $xactions, | ||||
| $type); | $type); | ||||
| /* XXX: This is nasty. We can't otherwise validate that a given field | |||||
| * is appropriate for the subtype, because we don't have access | |||||
| * to the EditEngine's configuration, if it even has one. | |||||
| * Ideally we should do this in two passes, where we sweep all | |||||
| * the transactions looking for a subtype, set it on the | |||||
| * TransactionEditor, and can then access that from validation. */ | |||||
| if ($this->getIsNewObject() && !empty($xactions)) { | |||||
| foreach ($xactions as $xaction) { | |||||
| $object->setEditEngineSubtype($xaction->getNewValue()); | |||||
| } | |||||
| } | |||||
| break; | break; | ||||
| case PhabricatorTransactions::TYPE_CUSTOMFIELD: | case PhabricatorTransactions::TYPE_CUSTOMFIELD: | ||||
| $groups = array(); | $groups = array(); | ||||
| foreach ($xactions as $xaction) { | foreach ($xactions as $xaction) { | ||||
| $groups[$xaction->getMetadataValue('customfield:key')][] = $xaction; | $groups[$xaction->getMetadataValue('customfield:key')][] = $xaction; | ||||
| } | } | ||||
| $field_list = PhabricatorCustomField::getObjectFields( | $field_list = PhabricatorCustomField::getObjectFields( | ||||
| ▲ Show 20 Lines • Show All 1,708 Lines • Show Last 20 Lines | |||||