Bug 34495 - AutomaticConfirmTransfer does not confirm if the check-in form is resubmitted
Summary: AutomaticConfirmTransfer does not confirm if the check-in form is resubmitted
Status: NEW
Alias: None
Product: Koha
Classification: Unclassified
Component: Circulation (show other bugs)
Version: Main
Hardware: All All
: P5 - low minor
Assignee: Bugs List
QA Contact: Testopia
URL:
Keywords:
Depends on: 33300
Blocks:
  Show dependency treegraph
 
Reported: 2023-08-08 15:05 UTC by Emily Lamancusa (emlam)
Modified: 2023-08-08 15:05 UTC (History)
2 users (show)

See Also:
Change sponsored?: ---
Patch complexity: ---
Documentation contact:
Documentation submission:
Text to go in the release notes:
Version(s) released in:
Circulation function:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Emily Lamancusa (emlam) 2023-08-08 15:05:10 UTC
Bug 29792 added a new system preference, AutomaticConfirmTransfer, to control the behavior of a transfer when the user clicked away from the "Wrong Transfer" modal without selecting anything. (assuming TransfersBlockCirc is set to "Don't block")

With the syspref set to automatically confirm, it works as intended if the user literally clicks away from the modal using the mouse. However, if the user submits the check-in form again without selecting an option on the modal (i.e. by scanning the next item, or accidentally double-scanning the item initiating the transfer), then the transfer is not confirmed.

It looks like this is happening because the automatic confirmation is triggered when the modal is hidden by Bootstrap event. If the check-in form is resubmitted, it doesn't actively hide the modal before reloading the page, so the automatic confirmation is not triggered.


To reproduce:
0. Configure sysprefs and circulation rules:
    a. TransfersBlockCirc to Don't block
    b. AutomaticConfirmTransfer to Do
    c. In the circulation rules, set the default return policy to "Item returns home"
1. Find an item that belongs to a different library and check it in
2. When the transfer modal appears, click away from the modal.
   -> Notice the animation - the modal appears to fade upwards.
3. Query the transfer table
   -> Notice that there is a transfer with values for daterequested and datesent
4. Check the item in again
5. When the Wrong Transfer modal appears, click away from the modal.
   -> Notice the animation - the modal appears to fade upwards.
6. Query the transfer table
   -> Notice that the previous transfer was canceled, and there is a new transfer
      with values for daterequested and datesent
7. Repeat steps 1-6, except instead of clicking away from the modals, press Enter on
   the keyboard instead
   -> Notice that the animation no longer appears - the modals simply disappear when
      the page is reloaded
   -> Notice that after the Wrong Transfer modal is bypassed like this, the transfer
      table shows that the previous transfer was canceled, and there is a new
      transfer with a value for daterequested but no value for datesent