Uploaded image for project: 'mod-orders'
  1. mod-orders
  2. MODORDERS-368

Can't update POL with a specified instanceId.

    XMLWordPrintable

    Details

    • Template:
    • Sprint:
      ACQ Sprint 85
    • Story Points:
      2
    • Development Team:
      Thunderjet

      Description

      Overview

      If update the order line with specified instanceId, an error will be returned:

      "errors" : [ {
          "message" : "{\"errors\":[{\"message\":\"Unrecognized field \\\"instanceId\\\" (class org.folio.rest.jaxrs.model.PoLine), not marked as ignorable (38 known properties: \\\"details\\\", \\\"agreementId\\\", \\\"receiptDate\\\", \\\"purchaseOrderId\\\", \\\"cancellationRestriction\\\", \\\"receiptStatus\\\", \\\"cost\\\", \\\"acquisitionMethod\\\", \\\"checkinItems\\\", \\\"alerts\\\", \\\"paymentStatus\\\", \\\"tags\\\", \\\"id\\\", \\\"collection\\\", \\\"selector\\\", \\\"orderFormat\\\", \\\"donor\\\", \\\"fundDistribution\\\", \\\"titleOrPackage\\\", \\\"metadata\\\", \\\"eresource\\\", \\\"claims\\\", \\\"contributors\\\", \\\"vendorDetail\\\", \\\"publicationDate\\\", \\\"description\\\", \\\"edition\\\", \\\"physical\\\", \\\"reportingCodes\\\", \\\"cancellationRestrictionNote\\\", \\\"locations\\\", \\\"poLineDescription\\\", \\\"isPackage\\\", \\\"poLineNumber\\\", \\\"publisher\\\", \\\"requester\\\", \\\"rush\\\", \\\"source\\\"])\\n at [Source: (String)\\\"{\\\"id\\\":\\\"4e863e7b-e6e7-467c-a521-943e3423a7eb\\\",\\\"checkinItems\\\":false,\\\"instanceId\\\":\\\"2b94c631-fca9-4892-a730-03ee529ffe2a\\\",\\\"acquisitionMethod\\\":\\\"Approval Plan\\\",\\\"alerts\\\":[],\\\"claims\\\":[],\\\"collection\\\":false,\\\"contributors\\\":[{\\\"contributor\\\":\\\"Pratchett, Terry\\\",\\\"contributorNameTypeId\\\":\\\"2b94c631-fca9-4892-a730-03ee529ffe2a\\\"}],\\\"cost\\\":{\\\"listUnitPrice\\\":1.0,\\\"currency\\\":\\\"USD\\\",\\\"discountType\\\":\\\"percentage\\\",\\\"quantityPhysical\\\":3,\\\"poLineEstimatedPrice\\\":3.0},\\\"details\\\":{\\\"productIds\\\":[{\\\"productId\\\":\\\"9780552142359\\\",\\\"productIdTy\\\"[truncated 1107 chars]; line: 1, column: 81] (through reference chain: org.folio.rest.jaxrs.model.PoLine[\\\"instanceId\\\"])\",\"type\":\"1\",\"code\":\"-1\",\"parameters\":[{\"key\":\"\",\"value\":\"\"}]}]}",
          "code" : "genericError",
          "parameters" : [ ]
        } ],
        "total_records" : 1
      }
      

      Expected

      PUT /orders/composite-orders/<id>

      • For each POL:
        • if isPackage == true and an instanceId is provided → return an error
        • if isPackage == false and an instanceId is provided → update the title record

      PUT /orders/order-lines/<id>

      • if isPackage == true and an instanceId is provided → return an error
      • if isPackage == false and an instanceId is provided → update the title record

      See https://wiki.folio.org/pages/viewpage.action?pageId=25729689#SupportingPackageOrders(WIP)-order-lines

      Background

      This is caused because mod-orders and mod-orders-storage use different schemas here... While the compossite-po-line schema still has an instanceId field, the poLine schema no longer does. Instead this information is captured in the associated title record.

      Acceptance Criteria

      • The bug is fixed
      • Unit tests are updated
      • API tests are updated

        TestRail: Results

          Attachments

            Issue Links

              Activity

                People

                Assignee:
                yauheni_kuzmianok Yauheni Kuzmianok
                Reporter:
                aliaksandr_pautau Aliaksandr Pautau
                Tester Assignee:
                Craig McNally Craig McNally
                Votes:
                0 Vote for this issue
                Watchers:
                3 Start watching this issue

                  Dates

                  Created:
                  Updated:
                  Resolved:

                    TestRail: Runs

                      TestRail: Cases