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

Overdue and Courtesy notices generated but not sent if loan has been renewed

    XMLWordPrintable

Details

    • EPAM-Veg Sprint 121
    • 3
    • Vega
    • R2 2021 Bugfix
    • Chalmers, Cornell, MO State, Okanagan College

    Description

      Overview: When a loan has been renewed, Overdue and Courtesy (due date-triggered) notices are generated, and eventually cleared, from scheduled-notice-storage, but not sent as emails to the user.
      Update from Julie: Only affects due date-triggered emails, ie. Aged to Lost is not affected.

      Preconditions:
      Circulation rules are configured to send overdue notices. For the sake of testing, I am using a loan policy with a short loan period, and a notice policy with one-time overdue notices configured to be sent in real-time throughout the day.

      Chalmers however reported this with long loans and overnight notices as well, affecting Overdue and Courtesy notices. It occurs when a loan has been renewed.

      Steps to Reproduce:

      1. Check out item A with a short loan period to yourself
      2. Verify in scheduled-notice-storage that an overdue notice has been generated for the loan, with nextSendDate based on the loan's due date. Yes!
      3. Wait for the loan to expire, and until you've received the overdue notice
      4. Verify that you've received the notice email. Yes!
      5. Check out item B with a short loan period to yourself
      6. Verify in scheduled-notice-storage that an overdue notice has been generated for the loan, with nextSendDate based on the loan's due date. Yes!
      7. Renew the loan.
      8. Verify in scheduled-notice-storage that an overdue notice has been generated for the loan, with nextSendDate based on the loan's new due date. Yes!
      9. Wait for the loan to expire, and until you've received the overdue notice

      Expected Results:
      You receive a notice email.

      Actual Results:
      You wait and wait, well past the nextRunTime of the notice in scheduled-notice-storage, but receive no notice email. Eventually the notice disappears from notice in scheduled-notice-storage – but you receive no email, and if you make a call to mod-email there is no sign of one having been sent.

      Additional Information:
      To try to pinpoint the issue, I performed the following additional steps:

      1. Make a GET request to loan-storage/loans to fetch the renewed loan (item B)
      2. In the returned loan object, change the action from "action": "renewed" to "action": "dueDateChanged"
      3. PUT the edited loan object back to loan-storage
      4. Verify in scheduled-notice-storage that an overdue notice has been generated for the loan, with nextSendDate based on the loan's due date (which is the same as after the renewal). Yes!
      5. Wait for the loan to expire, and until you've received the overdue notice
      6. Verify that you've received the notice email. Yes!

      URL: https://folio-iris.dev.folio.org/
      Interested parties: MarieWi Johanna

      TestRail: Results

        Attachments

          Issue Links

            Activity

              People

                OleksandrVidinieiev Oleksandr Vidinieiev
                lisams Lisa Sjögren (EBSCO)
                Votes:
                0 Vote for this issue
                Watchers:
                12 Start watching this issue

                Dates

                  Created:
                  Updated:
                  Resolved:

                  TestRail: Runs

                    TestRail: Cases