-
Notifications
You must be signed in to change notification settings - Fork 9.4k
Closed
Labels
Component: SalesIssue: ConfirmedGate 3 Passed. Manual verification of the issue completed. Issue is confirmedGate 3 Passed. Manual verification of the issue completed. Issue is confirmedIssue: Format is validGate 1 Passed. Automatic verification of issue format passedGate 1 Passed. Automatic verification of issue format passedRelease Line: 2.1Reproduced on 2.1.xThe issue has been reproduced on latest 2.1 releaseThe issue has been reproduced on latest 2.1 releaseReproduced on 2.2.xThe issue has been reproduced on latest 2.2 releaseThe issue has been reproduced on latest 2.2 releaseReproduced on 2.3.xThe issue has been reproduced on latest 2.3 releaseThe issue has been reproduced on latest 2.3 releasenon-issue
Milestone
Description
Preconditions
- Magento 2.1
Steps to reproduce
- Create a custom module that add a field to quote and sales_order table
- Update the field in quote table and then place an order
Expected result
- The field value will get copied to the order table
Actual result
- The field does not get copy over to sales_order table
The issue seem to be cause by :
/vendor/magento/framework/Api/DataObjectHelper.php
Line 238
$secondObjectArray = $this->objectProcessor->buildOutputDataArray($secondDataObject, $interfaceName);
$this->_setDataValues($firstDataObject, $secondObjectArray, $interfaceName);
return $this;
vendor/magento/framework/Reflection/DataObjectProcessor.php
Line 75
public function buildOutputDataArray($dataObject, $dataObjectType)
{
$methods = $this->methodsMapProcessor->getMethodsMap($dataObjectType);
$outputData = [];
/** @var MethodReflection $method */
foreach (array_keys($methods) as $methodName) {
if (!$this->methodsMapProcessor->isMethodValidForDataField($dataObjectType, $methodName)) {
continue;
}
Since the method for the newly added db field is not defined in "\Magento\Sales\Api\Data\OrderInterface" it will not get copied in to "$secondObjectArray" therefore it will not get set in "$this->_setDataValues()"
MauroNigrele, giacmir, nbjohan, hostep, dnunez24 and 9 more7ochem
Metadata
Metadata
Assignees
Labels
Component: SalesIssue: ConfirmedGate 3 Passed. Manual verification of the issue completed. Issue is confirmedGate 3 Passed. Manual verification of the issue completed. Issue is confirmedIssue: Format is validGate 1 Passed. Automatic verification of issue format passedGate 1 Passed. Automatic verification of issue format passedRelease Line: 2.1Reproduced on 2.1.xThe issue has been reproduced on latest 2.1 releaseThe issue has been reproduced on latest 2.1 releaseReproduced on 2.2.xThe issue has been reproduced on latest 2.2 releaseThe issue has been reproduced on latest 2.2 releaseReproduced on 2.3.xThe issue has been reproduced on latest 2.3 releaseThe issue has been reproduced on latest 2.3 releasenon-issue