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

Receive 'protected fields can’t be modified' error for eresource fields on PO line that is a Physical Resource

    XMLWordPrintable

Details

    • Bug
    • Status: Closed (View Workflow)
    • P1
    • Resolution: Done
    • 12.3.2
    • 12.4.0
    • ACQ Sprint 141
    • 1
    • Thunderjet
    • Morning Glory (R2 2022)
    • Yes
    • MI State University/Library of Michigan
    • Implementation coding issue

    Description

      Overview:
      Steps to Reproduce:

      1. Issue can be observed in Lotus Bugfest (attempting to edit a PO Line on an Opened Order)
      2. https://bugfest-lotus.int.aws.folio.org/orders/view/2beca736-a16b-40fb-b460-08d5600c1672/po-line/edit/236cd00a-30b1-40d4-988e-3922d8e9fca8?limit=50&offset=0&qindex=metadata.createdDate&query=10%2F15%2F2021
      3. PO Line in Open Order is a 'Physical resource'
      4. A GET of PO line shows record has a "eresource" section https://okapi-bugfest-lotus.int.aws.folio.org/orders-storage/po-lines/236cd00a-30b1-40d4-988e-3922d8e9fca8
      5. Attempt to edit PO Line (changing a field which can be edited such as Receiving Note )

      Expected Results:

      Field is edited and saved.

      Actual Results:
      Receive error - protected fields can’t be modified
      Response from PUT https://okapi-bugfest-lotus.int.aws.folio.org/orders/order-lines/236cd00a-30b1-40d4-988e-3922d8e9fca8 (per below returns a 400. response and references eresource fields)
      {
      "errors" : [

      { "message" : "Protected fields can't be modified", "code" : "protectedFieldChanging", "parameters" : [ ], "protectedAndModifiedFields" : [ "eresource.createInventory", "eresource.trial" ] }

      ],
      "total_records" : 1
      }

      Additional Information:

      The problem is in the order line type and the presence of extra elements in it:

      • ("Electronic Resource") should contain only "eresource" element
      • ("P/E Mix") should contain both "physical" and "eresource" elements
      • ("Physical Resource") should contain only "physical" element
      • ("Other") should contain only "physical" element"

      Either a migration script is needed to correct PO Lines or update to logic for protected fields to ignore non applicable extra elements.

      Note:
      "A work around is to “unopen” the order and make the changes."

      Interested parties:

      TestRail: Results

        Attachments

          Issue Links

            Activity

              People

                dennisbridges Dennis Bridges
                cgodfrey Carole Godfrey
                Votes:
                0 Vote for this issue
                Watchers:
                3 Start watching this issue

                Dates

                  Created:
                  Updated:
                  Resolved:

                  TestRail: Runs

                    TestRail: Cases