Uploaded image for project: 'PUBLIC - Liferay Commerce'
  1. PUBLIC - Liferay Commerce
  2. COMMERCE-5767

externalReferenceCode doesn't persist in the CommerceAddress table

    Details

    • Type: Bug
    • Status: Resolved
    • Priority: Critical
    • Resolution: Fixed
    • Affects Version/s: 7.3, Master
    • Fix Version/s: Master
    • Component/s: Order Management
    • Labels:

      Description

      Issue
      The externalReferenceCode value doesn't persist in the database even after adding an address with a string via /headless-commerce-admin-account/v1.0

      Steps to Reproduce

      1. Sign in to http://localhost:8080/
      2. Go to http://localhost:8080/o/api?endpoint=http://localhost:8080/o/headless-commerce-admin-account/v1.0/openapi.json
      3. Find Account dropdown
      4. Find POST /v1.0/accounts
      5. Click "Try it Out"
      6. Add the following JSON:
        {
          "accountAddresses": [
            {
              "city": "ARTARMON",
              "countryISOCode": "AU",
              "defaultBilling": true,
              "defaultShipping": false,
              "description": "string",
              "externalReferenceCode": "ARTARMON1",
              "name": "ARTARMON1",
              "regionISOCode": "NSW",
              "street1": "Test1",
              "street2": "Test1",
              "street3": "1",
              "type": 1,
              "zip": "2064"
            },
            {
              "city": "ARTARMON",
              "countryISOCode": "AU",
              "defaultBilling": true,
              "defaultShipping": true,
              "description": "string",
              "externalReferenceCode": "ARTARMON2",
              "name": "ARTARMON2",
              "regionISOCode": "NSW",
              "street1": "Test1",
              "street2": "Test1",
              "street3": "1",
              "type": 2,
              "zip": "2064"
            }
          ],"externalReferenceCode": "TEST-Type-2",
          "name": "TEST Type 2",
          "type": 2
        }
        
      1. Check the CommerceAddress table.

      Expected Behavior
      externalReferenceCode row contains the externalReferenceCode listed in the two address fields in the JSON.

      Actual Behavior
      externalReferenceCode for the two entries is NULL.
      [^externalreferencecode.png]

      Reproduced in
      Liferay DXP 7.3 GA1 + Commerce
      7.3.X-private Commit: 0ca09aa31d4922a208466e76a6814f9d057c8730
      Master-private Commit: bb07e86043745b02f578135940c402e8405b8762

        Attachments

          Activity

            People

            Assignee:
            brian.chan Brian Chan
            Reporter:
            andrea.sbarra Andrea Sbarra
            Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

              Dates

              Created:
              Updated:
              Resolved:

                Packages

                Version Package
                Master