Uploaded image for project: 'ui-orders'
  1. ui-orders
  2. UIOR-124

Unable to create a po_line w/ fund_distribution, or add a fund_distribution

    XMLWordPrintable

    Details

    • Type: Bug
    • Status: Closed (View Workflow)
    • Priority: P3
    • Resolution: Done
    • Affects Version/s: None
    • Fix Version/s: 1.2.0
    • Labels:
      None
    • Template:
    • Sprint:
      ACQ Sprint 56
    • Story Points:
      2
    • Development Team:
      Thunderjet

      Description

      When creating a po_line, an error is received if one or more fund_distributions are specified. This also occurs when adding a fund_distribution to an existing po_line.

      $ curl 'http://folio-testing-backend01.aws.indexdata.com:9130/orders/order-lines' -H "X-Okapi-Token: $TOKEN" -H 'Content-Type: application/json' --data-binary $'{
        "source": {
          "code": "FOLIO"
        },
        "cost": {
          "currency": "USD",
          "list_price": "9.99",
          "quantity_electronic": "1"
        },
        "vendor_detail": {
          "instructions": "",
          "ref_number": "111222333444555",
          "ref_number_type": "Internal vendor number"
        },
        "purchase_order_id": "2300aafd-6e66-4da8-8cf0-094379ebafe0",
        "po_line_number": "10063-1",
        "acquisition_method": "Purchase",
        "order_format": "Electronic Resource",
        "receipt_status": "Awaiting Receipt",
        "payment_status": "Awaiting Payment",
        "fund_distribution": [
          {
            "id": "65032151-39a5-4cef-8810-5350eb316300",
            "percentage": "50"
          },
          {
            "id": "fb7b70f1-b898-4924-a991-0e4b6312bb5f",
            "percentage": "50"
          }
        ],
        "title": "Dying Inside",
        "contributors": [
          {
            "contributor": "Robert Silverberg"
          }
        ],
        "publisher": "Blackstone Audio",
        "details": {
          "material_types": [
            "dd0bf600-dbd9-44ab-9ff2-e2a61a6539f1"
          ],
          "product_ids": [
            {
              "product_id": "9786033821048",
              "product_id_type": "ISBN"
            }
          ]
        },
        "publication_date": "2016",
        "eresource": {
          "access_provider": "94bb315f-dbaa-4a53-a468-019e8f6dd1a2",
          "create_inventory": true,
          "user_limit": "1"
        },
        "description": "The dude can read minds, but he\'s losing his ability to do so.",
        "id": "9c8878db-bf48-4195-809a-bfc9dc1bfc11"
      }'  -v
      *   Trying 3.92.84.231...
      * Connected to folio-testing-backend01.aws.indexdata.com (3.92.84.231) port 9130 (#0)
      > POST /orders/order-lines HTTP/1.1
      > Host: folio-testing-backend01.aws.indexdata.com:9130
      > User-Agent: curl/7.47.0
      > Accept: */*
      > X-Okapi-Token: eyJhbGciOiJIUzI1NiJ9.eyJzdWIiOiJkaWt1X2FkbWluIiwidXNlcl9pZCI6IjE4ZmIzZmM5LTgxN2QtNWNkMC04OTBhLTdiMDY2N2Q0NDMyNyIsImNhY2hlX2tleSI6IjY2OTE1NGE4LTRlZmEtNGQ0OS05YjEyLTY5YTQxMTdjZDJhNCIsImlhdCI6MTU0ODY4ODE3OCwidGVuYW50IjoiZGlrdSJ9.3wdrUMc2u4Ni0n5rbWwXu_o2X7g2l0cpp-0z_NEB_7E
      > Content-Type: application/json
      > Content-Length: 1096
      > Expect: 100-continue
      > 
      < HTTP/1.1 100 Continue
      * We are completely uploaded and fine
      < HTTP/1.1 422 Unprocessable Entity
      < X-Okapi-Trace: POST mod-authtoken-2.0.5-SNAPSHOT.41 http://10.36.1.203:9131/orders/order-lines : 202 923072us
      < X-Okapi-Trace: POST mod-audit-filter-0.0.5-SNAPSHOT.23 http://10.36.1.203:9161/orders/order-lines : 200 232us
      < X-Okapi-Trace: POST mod-orders-3.0.0-SNAPSHOT.91 http://10.36.1.203:9157/orders/order-lines : 422 2238us
      < Content-type: application/json
      < Transfer-Encoding: chunked
      < X-Okapi-Trace: POST mod-audit-filter-0.0.5-SNAPSHOT.23 http://10.36.1.203:9161/orders/order-lines : 200 482us
      < 
      * Connection #0 to host folio-testing-backend01.aws.indexdata.com left intact
      {"errors":[{"message":"may not be null","type":"1","code":"-1","parameters":[{"key":"fundDistribution[1].code","value":"null"}]},{"message":"may not be null","type":"1","code":"-1","parameters":[{"key":"fundDistribution[0].code","value":"null"}]}]}
      
      curl 'http://folio-testing-backend01.aws.indexdata.com:9130/orders/order-lines/61ccebd8-c9b4-4f11-b5bf-c3b0636c313e' -X PUT -H 'X-Okapi-Token: eyJhbGciOiJIUzI1NiJ9.eyJzdWIiOiJkaWt1X2FkbWluIiwidXNlcl9pZCI6IjE4ZmIzZmM5LTgxN2QtNWNkMC04OTBhLTdiMDY2N2Q0NDMyNyIsImNhY2hlX2tleSI6IjY2OTE1NGE4LTRlZmEtNGQ0OS05YjEyLTY5YTQxMTdjZDJhNCIsImlhdCI6MTU0ODY4ODE3OCwidGVuYW50IjoiZGlrdSJ9.3wdrUMc2u4Ni0n5rbWwXu_o2X7g2l0cpp-0z_NEB_7E' -H 'Content-Type: application/json' --data-binary '{
      >   "id": "61ccebd8-c9b4-4f11-b5bf-c3b0636c313e",
      >   "acquisition_method": "Purchase At Vendor System",
      >   "alerts": [],
      >   "claims": [],
      >   "contributors": [
      >     {
      >       "contributor": "Robert Silverberg"
      >     }
      >   ],
      >   "cost": {
      >     "id": "0a1f7366-c237-41b0-8183-cae2996565e6",
      >     "list_price": 9.99,
      >     "currency": "USD",
      >     "quantity_physical": 1,
      >     "po_line_id": "61ccebd8-c9b4-4f11-b5bf-c3b0636c313e"
      >   },
      >   "details": {
      >     "id": "61ce4b8c-03c7-4fd1-9b41-89cb9c7a5cdf",
      >     "product_ids": [
      >       {
      >         "product_id": "9781522608271",
      >         "product_id_type": "ISBN"
      >       }
      >     ],
      >     "material_types": [
      >       "1a54b431-2e4f-452d-9cae-9cee66c9a892"
      >     ],
      >     "po_line_id": "61ccebd8-c9b4-4f11-b5bf-c3b0636c313e"
      >   },
      >   "fund_distribution": [
      >     {
      >       "id": "65032151-39a5-4cef-8810-5350eb316300",
      >       "percentage": "100"
      >     }
      >   ],
      >   "order_format": "Physical Resource",
      >   "payment_status": "Awaiting Payment",
      >   "physical": {
      >     "id": "203cace3-c1f8-4f30-bc07-67d6d230f686",
      >     "material_supplier": "94bb315f-dbaa-4a53-a468-019e8f6dd1a2",
      >     "volumes": [],
      >     "po_line_id": "61ccebd8-c9b4-4f11-b5bf-c3b0636c313e"
      >   },
      >   "po_line_number": "10048-1",
      >   "publication_date": "2016",
      >   "publisher": "Brilliance",
      >   "purchase_order_id": "6e967b46-c0c0-4164-97c1-016df2e7bcea",
      >   "receipt_status": "Awaiting Receipt",
      >   "reporting_codes": [],
      >   "source": {
      >     "id": "259902fa-e79a-4aba-9b6c-f7f69d68a0bb",
      >     "code": "FOLIO"
      >   },
      >   "tags": [],
      >   "title": "The Book Of Skulls",
      >   "vendor_detail": {
      >     "id": "9a18b4f9-1489-4efa-8c25-c5425982675a",
      >     "instructions": "",
      >     "ref_number": "8675309",
      >     "ref_number_type": "Internal vendor number",
      >     "po_line_id": "61ccebd8-c9b4-4f11-b5bf-c3b0636c313e"
      >   },
      >   "metadata": {
      >     "createdDate": "2019-01-28T15:37:20.042+0000",
      >     "createdByUserId": "18fb3fc9-817d-5cd0-890a-7b0667d44327",
      >     "updatedDate": "2019-01-28T15:37:20.042+0000",
      >     "updatedByUserId": "18fb3fc9-817d-5cd0-890a-7b0667d44327"
      >   }
      > }' -v
      *   Trying 3.92.84.231...
      * Connected to folio-testing-backend01.aws.indexdata.com (3.92.84.231) port 9130 (#0)
      > PUT /orders/order-lines/61ccebd8-c9b4-4f11-b5bf-c3b0636c313e HTTP/1.1
      > Host: folio-testing-backend01.aws.indexdata.com:9130
      > User-Agent: curl/7.47.0
      > Accept: */*
      > X-Okapi-Token: eyJhbGciOiJIUzI1NiJ9.eyJzdWIiOiJkaWt1X2FkbWluIiwidXNlcl9pZCI6IjE4ZmIzZmM5LTgxN2QtNWNkMC04OTBhLTdiMDY2N2Q0NDMyNyIsImNhY2hlX2tleSI6IjY2OTE1NGE4LTRlZmEtNGQ0OS05YjEyLTY5YTQxMTdjZDJhNCIsImlhdCI6MTU0ODY4ODE3OCwidGVuYW50IjoiZGlrdSJ9.3wdrUMc2u4Ni0n5rbWwXu_o2X7g2l0cpp-0z_NEB_7E
      > Content-Type: application/json
      > Content-Length: 1980
      > Expect: 100-continue
      > 
      < HTTP/1.1 100 Continue
      * We are completely uploaded and fine
      < HTTP/1.1 422 Unprocessable Entity
      < X-Okapi-Trace: PUT mod-authtoken-2.0.5-SNAPSHOT.41 http://10.36.1.203:9131/orders/order-lines/61ccebd8-c9b4-4f11-b5bf-c3b0636c313e : 202 917409us
      < X-Okapi-Trace: PUT mod-audit-filter-0.0.5-SNAPSHOT.23 http://10.36.1.203:9161/orders/order-lines/61ccebd8-c9b4-4f11-b5bf-c3b0636c313e : 200 231us
      < X-Okapi-Trace: PUT mod-orders-3.0.0-SNAPSHOT.91 http://10.36.1.203:9157/orders/order-lines/61ccebd8-c9b4-4f11-b5bf-c3b0636c313e : 422 2340us
      < Content-type: application/json
      < Transfer-Encoding: chunked
      < X-Okapi-Trace: PUT mod-audit-filter-0.0.5-SNAPSHOT.23 http://10.36.1.203:9161/orders/order-lines/61ccebd8-c9b4-4f11-b5bf-c3b0636c313e : 200 441us
      < 
      * Connection #0 to host folio-testing-backend01.aws.indexdata.com left intact
      {"errors":[{"message":"may not be null","type":"1","code":"-1","parameters":[{"key":"fundDistribution[0].code","value":"null"}]}]}
      

        TestRail: Results

          Attachments

            Issue Links

              Activity

                People

                Assignee:
                dennisbridges Dennis Bridges
                Reporter:
                cmcnally Craig McNally
                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