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

No correlation between location and cost quantity

    XMLWordPrintable

    Details

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

      Description

      Overview
      Able to successfully create an order with quantity specified in cost is greater than quantity specified in location for electronic Resources.
      Note: The check is in place for Physical Resources and on electronic resources it fails if the quantity in location exceeds the quantity in cost.

      Steps to reproduce

      curl -X POST \
        http://folio-testing-backend01.aws.indexdata.com:9130/orders/composite-orders \
        -H 'Content-Type: application/json' \
        -H 'X-Okapi-Tenant: diku' \
        -H 'cache-control: no-cache' \
        -H 'x-okapi-token: $OKAPITOKEN' \
        -d '{
        "approved": true,
        "assignedTo": "ab18897b-0e40-4f31-896b-9c9adc979a88",
        "manualPo": false,
        "notes": [
          "ABCDEFGHIJKLMNO",
          "ABCDEFGHIJKLMNOPQRST",
          "ABCDEFGHIJKLMNOPQRSTUV"
        ],
        "orderType": "One-Time",
        "reEncumber": false,
        "vendor": "d0fb5aa0-cdf1-11e8-a8d5-f2801f1b9fd1",
        "workflowStatus": "Open",
        "metadata": {
          "createdDate": "2010-10-08T03:53:00.000",
          "createdByUserId": "ab18897b-0e40-4f31-896b-9c9adc979a88"
        },
        "compositePoLines": [
          {
            "acquisitionMethod": "Purchase At Vendor System",
            "alerts": [
              {
                "alert": "Receipt overdue"
              }
            ],
            "cancellationRestriction": false,
            "cancellationRestrictionNote": "ABCDEFGHIJKLMNOPQRSTUVW",
            "claims": [
              {
                "claimed": false,
                "sent": "2018-10-09T00:00:00.000Z",
                "grace": 30
              }
            ],
            "collection": false,
            "contributors": [
              {
                "contributor": "Ed Mashburn",
                "contributorType": "fbdd42a8-e47d-4694-b448-cc571d1b44c3"
              }
            ],
            "cost": {
              "currency": "USD",
              "listUnitPriceElectronic": 24.99,
              "quantityElectronic": 4
            },
            "description": "ABCDEFGH",
            "details": {
              "receivingNote": "ABCDEFGHIJKL",
              "productIds": [
                {
                  "productId": "9780764354113",
                  "productIdType": "ISBN"
                }
              ],
              "materialTypes": [
                "1a54b431-2e4f-452d-9cae-9cee66c9a892"
              ],
              "subscriptionFrom": "2018-10-09T00:00:00.000Z",
              "subscriptionInterval": 824,
              "subscriptionTo": "2020-10-09T00:00:00.000Z"
            },
            "donor": "ABCDEFGHIJKLM",
            "eresource": {
              "activated": false,
              "activationDue": 10,
              "createInventory": true,
              "trial": false,
              "expectedActivation": "2018-10-09T00:00:00.000Z",
              "userLimit": 10,
              "accessProvider": "d0fb5aa0-cdf1-11e8-a8d5-f2801f1b9fd1"
            },
            "locations": [
              {
                "locationId": "53cf956f-c1df-410b-8bea-27f712cca7c0",
                "quantity": 3,
                "quantityElectronic": 3,
                "quantityPhysical" :1
              }
            ],
            "orderFormat": "Electronic Resource",
            "owner": "ABCDEFGHIJKLMNOPQRSTUVWXYZABC",
            "paymentStatus": "Awaiting Payment",
            "poLineDescription": "ABCDEFGHIJKLMNOPQRSTUVWXY",
            "poLineNumber": "268758-03",
            "publicationDate": "2017",
            "publisher": "Schiffer Publishing",
            "receiptDate": "2018-10-09T00:00:00.000Z",
            "receiptStatus": "Awaiting Receipt",
            
            "requester": "Leo Bulero",
            "rush": true,
            "selector": "ABCD",
            "source": {
              "code": "ABCDEFGHIJKLMNOPQRSTUVWXYZABC",
              "description": "ABCDEFGHIJKLMNO"
            },
            "tags": [
              "ABCDEFGHIJKLMNOPQRSTU",
              "ABCDEFG",
              "ABCDEFGHIJKLMNOPQRSTU",
              "ABCDEFGHIJKLMNO"
            ],
            "title": "Kayak Fishing in the Northern Gulf Coast",
            "vendorDetail": {
              "instructions": "ABCDEFG",
              "noteFromVendor": "ABCDEFGHIKJKLMNOP",
              "refNumber": "123456-78",
              "refNumberType": "Supplier'\''s unique order line reference number",
              "vendorAccount": "8910-10"
            },
            "metadata": {
              "createdDate": "2010-10-08T03:53:00.000",
              "createdByUserId": "ab18897b-0e40-4f31-896b-9c9adc979a88"
            }
          }
        ]
      }'
      

      Successfully created Order

      {
          "id": "69eac897-095c-42a2-a7c8-c0f137257ddf",
          "approved": true,
          "assignedTo": "ab18897b-0e40-4f31-896b-9c9adc979a88",
          "dateOrdered": "2019-03-25T15:44:44.439+0000",
          "manualPo": false,
          "notes": [
              "ABCDEFGHIJKLMNO",
              "ABCDEFGHIJKLMNOPQRST",
              "ABCDEFGHIJKLMNOPQRSTUV"
          ],
          "poNumber": "10065",
          "orderType": "One-Time",
          "reEncumber": false,
          "totalEstimatedPrice": 99.96,
          "totalItems": 4,
          "vendor": "d0fb5aa0-cdf1-11e8-a8d5-f2801f1b9fd1",
          "workflowStatus": "Open",
          "compositePoLines": [
              {
                  "id": "35d7c2ca-c970-49f0-950d-3446bb3a0afa",
                  "instanceId": "da0e1fbd-0796-4c6b-91ed-02a6c9423071",
                  "acquisitionMethod": "Purchase At Vendor System",
                  "alerts": [
                      {
                          "id": "be77eba5-946a-4d50-8c2b-f0bd42e0929a",
                          "alert": "Receipt overdue"
                      }
                  ],
                  "cancellationRestriction": false,
                  "cancellationRestrictionNote": "ABCDEFGHIJKLMNOPQRSTUVW",
                  "claims": [
                      {
                          "claimed": false,
                          "sent": "2018-10-09T00:00:00.000+0000",
                          "grace": 30
                      }
                  ],
                  "collection": false,
                  "contributors": [
                      {
                          "contributor": "Ed Mashburn",
                          "contributorType": "fbdd42a8-e47d-4694-b448-cc571d1b44c3"
                      }
                  ],
                  "cost": {
                      "listUnitPriceElectronic": 24.99,
                      "currency": "USD",
                      "discountType": "percentage",
                      "quantityElectronic": 4,
                      "poLineEstimatedPrice": 99.96
                  },
                  "description": "ABCDEFGH",
                  "details": {
                      "receivingNote": "ABCDEFGHIJKL",
                      "productIds": [
                          {
                              "productId": "9780764354113",
                              "productIdType": "ISBN"
                          }
                      ],
                      "materialTypes": [
                          "1a54b431-2e4f-452d-9cae-9cee66c9a892"
                      ],
                      "subscriptionFrom": "2018-10-09T00:00:00.000+0000",
                      "subscriptionInterval": 824,
                      "subscriptionTo": "2020-10-09T00:00:00.000+0000"
                  },
                  "donor": "ABCDEFGHIJKLM",
                  "eresource": {
                      "activated": false,
                      "activationDue": 10,
                      "createInventory": true,
                      "trial": false,
                      "expectedActivation": "2018-10-09T00:00:00.000+0000",
                      "userLimit": 10,
                      "accessProvider": "d0fb5aa0-cdf1-11e8-a8d5-f2801f1b9fd1"
                  },
                  "fundDistribution": [],
                  "locations": [
                      {
                          "locationId": "53cf956f-c1df-410b-8bea-27f712cca7c0",
                          "quantity": 3,
                          "quantityElectronic": 3,
                          "quantityPhysical": 1
                      }
                  ],
                  "orderFormat": "Electronic Resource",
                  "owner": "ABCDEFGHIJKLMNOPQRSTUVWXYZABC",
                  "paymentStatus": "Awaiting Payment",
                  "poLineDescription": "ABCDEFGHIJKLMNOPQRSTUVWXY",
                  "poLineNumber": "10065-1",
                  "publicationDate": "2017",
                  "publisher": "Schiffer Publishing",
                  "purchaseOrderId": "69eac897-095c-42a2-a7c8-c0f137257ddf",
                  "receiptDate": "2018-10-09T00:00:00.000+0000",
                  "receiptStatus": "Awaiting Receipt",
                  "reportingCodes": [],
                  "requester": "Leo Bulero",
                  "rush": true,
                  "selector": "ABCD",
                  "source": {
                      "code": "ABCDEFGHIJKLMNOPQRSTUVWXYZABC",
                      "description": "ABCDEFGHIJKLMNO"
                  },
                  "tags": [
                      "ABCDEFGHIJKLMNOPQRSTU",
                      "ABCDEFG",
                      "ABCDEFGHIJKLMNOPQRSTU",
                      "ABCDEFGHIJKLMNO"
                  ],
                  "title": "Kayak Fishing in the Northern Gulf Coast",
                  "vendorDetail": {
                      "instructions": "ABCDEFG",
                      "noteFromVendor": "ABCDEFGHIKJKLMNOP",
                      "refNumber": "123456-78",
                      "refNumberType": "Supplier's unique order line reference number",
                      "vendorAccount": "8910-10"
                  },
                  "metadata": {
                      "createdDate": "2010-10-08T03:53:00.000+0000",
                      "createdByUserId": "ab18897b-0e40-4f31-896b-9c9adc979a88"
                  }
              }
          ],
          "metadata": {
              "createdDate": "2019-03-25T15:44:44.363+0000",
              "createdByUserId": "a0790176-4ab5-5a7b-8ea7-a178259e895f",
              "updatedDate": "2019-03-25T15:44:44.363+0000",
              "updatedByUserId": "a0790176-4ab5-5a7b-8ea7-a178259e895f"
          }
      }
      

      Expected

      • Error stating that the quantity specified cost and locations must match
      • Add Unit tests and API tests to cover this scenario

        TestRail: Results

          Attachments

            Issue Links

              Activity

                People

                Assignee:
                piotr_kalashuk Piotr Kalashuk
                Reporter:
                KVupp Kruthi Vuppala
                Tester Assignee:
                Piotr Kalashuk Piotr Kalashuk
                Votes:
                0 Vote for this issue
                Watchers:
                3 Start watching this issue

                  Dates

                  Created:
                  Updated:
                  Resolved:

                    TestRail: Runs

                      TestRail: Cases