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

PriceList PriceEntry upsert process throws a duplicated entry exception

    Details

      Description

      Creating LPP per our Slack conversation:

      Customer is executing PriceList and PriceEntry first sync process using the first run Talend job provided by Liferay Commerce team and we have observed an issue of DuplicateCommercePriceEntryException. Since it is invoking upsert process, it shouldn't have the exception thrown since it should just update if the data is available. Please find the attached log file.

      Attachments

      priceentry_upsert_duplication_exception_log.txt

      Steps to reproduce

      a) Create a price list (via API or frontend)
      b) Create a price entry on that price list using this API: https://app.swaggerhub.com/apis/liferayinc/commerce-admin-pricing/v1.0#/PriceEntry/post_priceLists__id__priceEntries_ (i.e. priceLists/[id]/priceEntries/). Don't include the fields: id, externalReferenceCode for the base object.
      c) Make a second call to that same API with almost the same data, just with some small modification. Any of the following fields which were included in the first request must be included and identical in the second request: priceListExternalReferenceCode, priceListId, sku, skuExternalReferenceCode

      Expected: The price entry created in step (b) should be modified with the data passed in in step (c).
      Observed: DuplicateCommercePriceEntryException

        Attachments

          Activity

            People

            • Assignee:
              alessandro.iovane Alessandro Iovane
              Reporter:
              alessandro.iovane Alessandro Iovane
            • Votes:
              0 Vote for this issue
              Watchers:
              0 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved:

                Packages

                Version Package
                2.0.7