Uploaded image for project: 'mod-circulation'
  1. mod-circulation
  2. CIRC-923

Issue with 'HoldShelfExpirationDate'

    XMLWordPrintable

    Details

    • Type: Bug
    • Status: Closed (View Workflow)
    • Priority: P2
    • Resolution: Cannot Reproduce
    • Affects Version/s: None
    • Fix Version/s: None
    • Labels:
    • Template:
      Standard Bug Write-Up Format
    • Sprint:
      EPAM-Veg Sprint 98, EPAM-Veg Sprint 99
    • Story Points:
      2
    • Development Team:
      Vega
    • Affected Institution:
      MO State
    • Epic Link:

      Description

      Overview:
      A scheduled notice was generated when in fact it was not supposed to be or not expected to be generated

      Steps to Reproduce:
      In MSU, a scheduled notice was generated but never sent. While investigating the cause, we figured that the scheduled notice should not have been generated in the first place.

      There was a 'Hold' request made for an item whose details are below:

      {
          "id": "e5f9f0c5-fb30-433e-a370-c624505c3e8b",
          "item": {
              "title": "24 hours in nowhere / Dusti Bowling.",
              "barcode": "32356008864934",
              "identifiers": [
                .....removed for brevity
              ]
          },
          "itemId": "42b370a0-1712-472a-853b-87138a7bb123",
          "status": "Closed - Filled",
          "metadata": {
              "createdDate": "2020-08-31T13:51:59.32",
              "updatedDate": "2020-09-09T17:11:04.794+0000",
              "createdByUserId": "71c140e3-4aa1-4503-95ca-95cea4c168ad",
              "updatedByUserId": "71c140e3-4aa1-4503-95ca-95cea4c168ad"
          },
          "requester": {
              "barcode": "***",
              "lastName": "***",
              "firstName": "***",
              "middleName": "***"
          },
          "requestDate": "2020-08-31T13:51:58.000+0000",
          "requestType": "Hold",
          "requesterId": "7ff330a4-0efb-4a19-8dcf-9ff28745c063",
          "fulfilmentPreference": "Hold Shelf",
          "pickupServicePointId": "5d75d8a9-4fda-417f-b6cb-70a061c1720b",
          "holdShelfExpirationDate": "{color:red}2020-09-12T04:59:59.773+0000{color}"
      }
      

      The above request was closed on 9/9/2020.

      A "Recall"request for the same item was made on 09/08. Request details below:

      {
          "id": "9edc6eee-20e9-441b-aae9-dc2cf50545a6",
          "item": {
              "title": "24 hours in nowhere / Dusti Bowling.",
              "barcode": "32356008864934",
              "identifiers": [
                  ..redacted
              ]
          },
          "itemId": "42b370a0-1712-472a-853b-87138a7bb123",
          "status": "Open - Not yet filled",
          "metadata": {
              "createdDate": "2020-09-08T13:42:44.155",
              "updatedDate": "2020-09-08T13:42:44.155+0000",
              "createdByUserId": "05174b3e-9d8f-4cfc-94f2-b3e437d4f94d",
              "updatedByUserId": "05174b3e-9d8f-4cfc-94f2-b3e437d4f94d"
          },
          "position": 1,
          "requester": {
              "barcode": "***",
              "lastName": "***",
              "firstName": "***",
              "middleName": "***"
          },
          "requestDate": "2020-09-08T13:42:43.000+0000",
          "requestType": "Recall",
          "requesterId": "89058cc4-4f5b-4514-b117-931039dbbecf",
          "fulfilmentPreference": "Hold Shelf",
          "pickupServicePointId": "5d75d8a9-4fda-417f-b6cb-70a061c1720b",
          "holdShelfExpirationDate": "{color:red}2020-09-12T04:59:59.773+0000{color}"
      }
      

      Please note how the "holdShelfExpirationDate": "2020-09-12T04:59:59.773+0000" has been computed to be the same for both requests.

      This particular pickup service point has "holdShelfExpiryPeriod":

      { "duration": 7, "intervalId": "Days" }

      Couple of loans associated with the above item:
      Loan 1 Details:

      {
          "id": "01e4f1ed-7359-418c-8955-f753385de1f0",
          "action": "checkedin",
          "itemId": "42b370a0-1712-472a-853b-87138a7bb123",
          "status": {
              "name": "Closed"
          },
          "userId": "05ea60e9-f92b-46d6-907c-081b9e4e7852",
          "dueDate": "2020-09-21T04:00:00.000+0000",
          "loanDate": "2020-03-24T13:18:31+00:00",
          "metadata": {
              "createdDate": "2020-06-05T23:09:58.051",
              "updatedDate": "2020-09-04T13:19:40.952+0000",
              "createdByUserId": "873bbfa4-7f40-4bd0-aa27-027494a4b5e9",
              "updatedByUserId": "71c140e3-4aa1-4503-95ca-95cea4c168ad"
          },
          "itemStatus": "Awaiting pickup",
          "returnDate": "2020-09-04T13:19:39.000Z",
          "loanPolicyId": "6ae1efaf-1876-4724-be4a-fec624ca4434",
          "lostItemPolicyId": "6d66ef56-258c-4443-a962-950aff191c22",
          "systemReturnDate": "2020-09-04T13:19:40.736+0000",
          "overdueFinePolicyId": "0ff34490-726e-44d5-ba01-2a6111df60cc",
          "checkinServicePointId": "5d75d8a9-4fda-417f-b6cb-70a061c1720b",
          "checkoutServicePointId": "83d474aa-ee99-4924-8704-a03e3c56e0d9",
          "patronGroupIdAtCheckout": "503a81cd-6c26-400f-b620-14c08943697c"
      }
      

      Loan 2 Details:

      {
          "id": "8f4dc747-0215-489a-9b5e-c9f031b5d678",
          "action": "checkedout",
          "itemId": "42b370a0-1712-472a-853b-87138a7bb123",
          "status": {
              "name": "Open"
          },
          "userId": "7ff330a4-0efb-4a19-8dcf-9ff28745c063",
          "dueDate": "2020-09-24T04:59:59.000+0000",
          "loanDate": "2020-09-09T17:11:03Z",
          "metadata": {
              "createdDate": "2020-09-09T17:11:04.965",
              "updatedDate": "2020-09-09T17:11:04.965+0000",
              "createdByUserId": "71c140e3-4aa1-4503-95ca-95cea4c168ad",
              "updatedByUserId": "71c140e3-4aa1-4503-95ca-95cea4c168ad"
          },
          "itemStatus": "Checked out",
          "loanPolicyId": "2b6e2e16-1c56-40d4-94b1-d7c97acf72a4",
          "lostItemPolicyId": "6d66ef56-258c-4443-a962-950aff191c22",
          "overdueFinePolicyId": "0ff34490-726e-44d5-ba01-2a6111df60cc",
          "checkoutServicePointId": "5d75d8a9-4fda-417f-b6cb-70a061c1720b",
          "dueDateChangedByRecall": true,
          "patronGroupIdAtCheckout": "3830aef4-20c4-4e6e-b7bc-59e93817a9aa",
          "itemEffectiveLocationIdAtCheckOut": "d6edbf17-61b2-4d46-bae3-a229454a3b3f"
      }
      

      Scheduled notice that was generated:

      {
        "scheduledNotices": [
          {
            "id": "1bb31354-eb69-4999-a131-4e32669ebe95",
            "requestId": "9edc6eee-20e9-441b-aae9-dc2cf50545a6",
            "recipientUserId": "89058cc4-4f5b-4514-b117-931039dbbecf",
            "nextRunTime": "{color:red}2020-09-12T04:59:59.773+0000{color}",
            "triggeringEvent": "Hold expiration",
            "noticeConfig": {
              "timing": "Upon At",
              "templateId": "7ead83e9-70ba-41ea-9eb9-cd3ffe6a7c55",
              "format": "Email",
              "sendInRealTime": true
            },
            "metadata": {
              "createdDate": "2020-09-08T13:42:44.309+0000",
              "createdByUserId": "05174b3e-9d8f-4cfc-94f2-b3e437d4f94d",
              "updatedDate": "2020-09-08T13:42:44.309+0000",
              "updatedByUserId": "05174b3e-9d8f-4cfc-94f2-b3e437d4f94d"
            }
          }
        ],
        "totalRecords": 1
      }
      

      Expected Results:
      1. Scheduled notice should not have been generated with nextRunTime as 2020-09-12T04:59:59.773+0000
      2. "holdShelfExpirationDate": "2020-09-12T04:59:59.773+0000" should not have been same for both requests

      Actual Results:
      1. Scheduled notice was generated that's probably unnecessary.
      2. Looks like there is an issue with how "holdShelfExpirationDate" is being calculated

      Additional Information:
      URL: https://msu.folio.ebsco.com

      Interested parties:
      Darcy Branchini, Brooks Travis

        TestRail: Results

          Attachments

            Issue Links

              Activity

                People

                Assignee:
                OleksandrVidinieiev Oleksandr Vidinieiev
                Reporter:
                sduvvuri Sobha Duvvuri
                Votes:
                0 Vote for this issue
                Watchers:
                5 Start watching this issue

                  Dates

                  Created:
                  Updated:
                  Resolved:

                    TestRail: Runs

                      TestRail: Cases