Skip to content

Join extension attributes are not added to Order and Order Items #14623

@k4emic

Description

@k4emic

Preconditions

  1. Magento 2.1.3
  2. 7.0.25-0ubuntu0.16.04.1

Steps to reproduce

  1. Define a Extension attribute for the relevant interfaces with a join table:
    <extension_attributes for="Magento\Sales\Api\Data\OrderItemInterface">
        <attribute code="some_id" type="string">
            <join reference_table="SOMETABLE" join_on_field="item_id" reference_field="item_id">
                <field>some_id</field>
            </join>
        </attribute>
    </extension_attributes>
    <extension_attributes for="Magento\Sales\Api\Data\OrderInterface">
        <attribute code="some_id" type="string">
            <join reference_table="SOMETABLE" join_on_field="quote_id" reference_field="quote_id">
                <field>some_id</field>
            </join>
        </attribute>
    </extension_attributes>
  1. Make sure there's matching data in the SOMETABLE table and the sales_order_item table
  2. Request order(s) or order items via REST

Expected result

  1. The "some_id" attribute should be included in the response for orders and order items

Actual result

  1. The extension attribute is not included in any of the two responses

This was partially fixed in #8035, but only for order search results

Metadata

Metadata

Assignees

Labels

Area: OrderComponent: SalesIssue: ConfirmedGate 3 Passed. Manual verification of the issue completed. Issue is confirmedPriority: P2A defect with this priority could have functionality issues which are not to expectations.Progress: PR in progressReproduced on 2.1.xThe issue has been reproduced on latest 2.1 releaseReproduced on 2.2.xThe issue has been reproduced on latest 2.2 releaseReproduced on 2.3.xThe issue has been reproduced on latest 2.3 releaseReproduced on 2.4.xThe issue has been reproduced on latest 2.4-develop branchSeverity: S2Major restrictions or short-term circumventions are required until a fix is available.Triage: Dev.ExperienceIssue related to Developer Experience and needs help with Triage to Confirm or Reject it

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions