Bug 25999 - Renewal due date not being honoured for items with holds
Summary: Renewal due date not being honoured for items with holds
Status: NEW
Alias: None
Product: Koha
Classification: Unclassified
Component: Circulation (show other bugs)
Version: Main
Hardware: All All
: P5 - low normal
Assignee: Bugs List
QA Contact: Testopia
URL:
Keywords:
Depends on: 7088
Blocks:
  Show dependency treegraph
 
Reported: 2020-07-16 15:34 UTC by Holly
Modified: 2024-03-17 16:31 UTC (History)
6 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 Holly 2020-07-16 15:34:48 UTC
Bug 7088 added the ability to override renewals for items that have holds by adding the "AllowRenewalOnHoldOverride" syspref. When this sys. pref. is enabled and the "Override renewal restrictions" option is ticked on the checkouts table on a patron account and then an "on hold" item is selected in the renewal column the "On hold due date" box appears. This allows a renewal date to be applied to items with holds on them.

For the most part, it works except in one scenario:

A new date is selected in the "Renewal due date" box. This also populates the "On hold due date" box. 

The content in the "On hold due date" box is deleted.

The selected items are renewed. 

The due date for the items with holds reverts to the parameters set for the patron category/item type combination in the fine and circulation rules. 

According to bug 7088 the item should be "renewed by falling back to the "Renewal due date" value if a value is not specified in the "On hold due date" input box""

Has anyone else had this issue?
Comment 1 Jonathan Druart 2020-07-30 07:53:08 UTC
Confirmed on master. Andrew, can you have a look please?
Comment 2 Jonathan Druart 2020-07-30 07:55:04 UTC
Only one value is passed to the renew script:
+            // Determine which due date we need to use
+            var dueDate = isOnReserve ?
+                $("#newonholdduedate input").val() :
+                $("#newduedate").val();
Comment 3 Jonathan Druart 2024-02-23 11:21:11 UTC
I have the feeling that AllowRenewalOnHoldOverride is never taken into account.

Asked on IRC earlier today, but still waiting for an answer


I need confirmation. On the checkouts table (circ/circulation.pl) we don't allow checkin if there are holds on the items.
We did it because the code is terrible and we don't manage that properly from this view
we now have "On hold" and the checkbox is not displayed
there is still JS code related to this feature, but I think it should be removed
hacking a bit the code I managed to get this input:
https://snipboard.io/haileC.jpg
"On hold due date"
Can you confirm that we should never see it? (and that I can remove the related code)
renew, not checkin
 AllowRenewalOnHoldOverride.
what's that?
the pref is off and I am seeing that: https://snipboard.io/1AprPK.jpg
all this is crazy, or I am missing something
my conclusion is that the pref is useless and the code related to "renew on hold" that is on the circ table can be removed

please confirm..
Comment 4 Katrin Fischer 2024-03-17 16:31:21 UTC
(In reply to Jonathan Druart from comment #3)
> I have the feeling that AllowRenewalOnHoldOverride is never taken into

I tested on current master and the GUI still appears to work as expected, but the due data calculation is wrong:

* Check out 39999000004571 to 42
* Renewal check box is visible
* Place a hold on the record for Henry
* Reload list of checkouts, check box is now replaced by "on hold"
* Set AllowRenewalOnHoldOverride to enable
* Reload list of checkouts page
* Renewal checkbox is still locked/"on hold"
* Check "Override renewal restrictions:" checkbox below table
* Renewal checkbox appears
* Check the checkbox - the hold due date input appears
* Set a hold due date and renew - the date is not taken into account.