Bug 37332 - Renewal due date and renew as unseen fields not respected when renewing an item from the patron account
Summary: Renewal due date and renew as unseen fields not respected when renewing an it...
Status: Needs documenting
Alias: None
Product: Koha
Classification: Unclassified
Component: Circulation (show other bugs)
Version: Main
Hardware: All All
: P5 - low major
Assignee: Emily Lamancusa
QA Contact: Kyle M Hall
URL:
Keywords:
: 36407 (view as bug list)
Depends on: 36084
Blocks: 36192 37189
  Show dependency treegraph
 
Reported: 2024-07-11 18:27 UTC by Andrew Fuerste-Henry
Modified: 2024-08-29 18:38 UTC (History)
13 users (show)

See Also:
Change sponsored?: ---
Patch complexity: ---
Documentation contact:
Documentation submission:
Text to go in the release notes:
This fixes two issues when renewing items for patrons in the staff interface (Patrons > selected patron > Check out > Checkouts table). The "Renew as unseen" checkbox and the custom renewal due date field were both ignored. With these changes, the functionality to change the renewal due date and process a renewal as an unseen renewal once again work as intended.
Version(s) released in:
24.11.00,24.05.02
Circulation function:


Attachments
Bug 37332: Handle custom renewal date parameter in svc (2.74 KB, patch)
2024-07-16 14:52 UTC, Emily Lamancusa
Details | Diff | Splinter Review
Bug 37332: Fix unseen and customer renewal date parameters in svc (3.47 KB, patch)
2024-07-16 15:31 UTC, Emily Lamancusa
Details | Diff | Splinter Review
Bug 37332: Fix unseen and customer renewal date parameters in svc (3.53 KB, patch)
2024-07-17 19:34 UTC, ByWater Sandboxes
Details | Diff | Splinter Review
Bug 37332: Fix unseen and customer renewal date parameters in svc (3.58 KB, patch)
2024-07-18 15:35 UTC, Kyle M Hall
Details | Diff | Splinter Review

Note You need to log in before you can comment on or make changes to this bug.
Description Andrew Fuerste-Henry 2024-07-11 18:27:07 UTC
When renewing an item from a patron's record, a due date entered in the "Renewal due date" field is not enforced. Instead, Koha uses the due date that the circulation rules would have set. I've confirmed this behavior on my production site running 24.05 and on my KTD running both 24.05 and main.

I'm not sure what happened after bug 36393, which appears to have fixed this issue once.
Comment 1 Andrew Fuerste-Henry 2024-07-11 18:35:05 UTC
I am able to manually set a due date when renewing from the Renew page in the circulation module.
Comment 2 CJ Lynce 2024-07-11 18:42:20 UTC
We are experiencing the same behavior on 24.05 when renewing from the user's account page.

To reproduce
1. Check out item to borrower
   1-2. For greater identification of issue, select a custom 
        due date for checkout that does not match the circ rule.
2. Access the borrowers account and view current checkouts.
3. Check box next to item for renew
   3-1. If restrict early renewals, Ensure you have a circ rule 
        that allows for early renewal, or AllowRenewalLimitOverride 
        is allow, and check the override renewal restrictions box
4. Specify a custom due date in 'Renewal Due Date' box - chose a date
   that does not match the circ rule
5. Click 'Renew selected items'
6. Access the borrowers account and view current checkouts.
   Note: that the new due date does not match the one we selected, and 
   instead matches the date calculated by the circ rule
Comment 3 Lucas Gass 2024-07-11 19:04:06 UTC

*** This bug has been marked as a duplicate of bug 36459 ***
Comment 4 Andrew Fuerste-Henry 2024-07-11 19:46:02 UTC
Lucas and I have discussed this and agreed it is distinct from 35459
Comment 5 Emily Lamancusa 2024-07-16 12:55:53 UTC
*** Bug 36407 has been marked as a duplicate of this bug. ***
Comment 6 Emily Lamancusa 2024-07-16 14:52:54 UTC Comment hidden (obsolete)
Comment 7 Emily Lamancusa 2024-07-16 15:31:15 UTC
Created attachment 169048 [details] [review]
Bug 37332: Fix unseen and customer renewal date parameters in svc

To test:
0. Enable unseen renewals
    i. Set the system preference UnseenRenewals to Allowed
    ii. Edit the circulation rules to specify the maximum number of
        unseen renewals allowed
1. Check out an item to a patron
2. In the checkouts table on that patron's account, check the "Renew"
   checkbox for that item
3. Select a custom renewal date using the Renewal due date flatpicker
4. Check the checkbox labeled "Renew as unseen if appropriate"
4. Click Renew selected items
--> The item renews, but its new due date follows the renewal period
    specified in the circulation rules, regardless of what date was
    entered in the Renewal due date field
--> The checkout still has all of its unseen renewals remaining,
    indicating that the renewal was not processed as an unseen renewal
5. Enter another custom renewal date and renew checkout with the Renew
   all button
--> Same result
6. Apply patch and restart_all
7. Repeat test plan
--> Custom renewal date is now respected
--> Number of unseen renewals remaining decreases when "Renew as unseen"
    checkbox is checked
8. Renew the item with the "Renew as unseen" checkbox unchecked
--> Confirm that number of unseen renewals is reset (i.e. the checkout
    once again has all of its unseen renewals remaining), indicating
    that the renewal was processed as a "seen" renewal
Comment 8 Emily Lamancusa 2024-07-16 15:35:30 UTC
Looks like the cause was bug 36084 - the line to get the due_date and unseen parameters in the new svc handler was commented out. Uncommenting it seems to fix the issue (plus the related issue where the "Renew as unseen" checkbox was also being ignored).
Comment 9 ByWater Sandboxes 2024-07-17 19:34:26 UTC
Created attachment 169108 [details] [review]
Bug 37332: Fix unseen and customer renewal date parameters in svc

To test:
0. Enable unseen renewals
    i. Set the system preference UnseenRenewals to Allowed
    ii. Edit the circulation rules to specify the maximum number of
        unseen renewals allowed
1. Check out an item to a patron
2. In the checkouts table on that patron's account, check the "Renew"
   checkbox for that item
3. Select a custom renewal date using the Renewal due date flatpicker
4. Check the checkbox labeled "Renew as unseen if appropriate"
4. Click Renew selected items
--> The item renews, but its new due date follows the renewal period
    specified in the circulation rules, regardless of what date was
    entered in the Renewal due date field
--> The checkout still has all of its unseen renewals remaining,
    indicating that the renewal was not processed as an unseen renewal
5. Enter another custom renewal date and renew checkout with the Renew
   all button
--> Same result
6. Apply patch and restart_all
7. Repeat test plan
--> Custom renewal date is now respected
--> Number of unseen renewals remaining decreases when "Renew as unseen"
    checkbox is checked
8. Renew the item with the "Renew as unseen" checkbox unchecked
--> Confirm that number of unseen renewals is reset (i.e. the checkout
    once again has all of its unseen renewals remaining), indicating
    that the renewal was processed as a "seen" renewal

Signed-off-by: CJ Lynce <cj.lynce@westlakelibrary.org>
Comment 10 Kyle M Hall 2024-07-18 15:35:28 UTC
Created attachment 169146 [details] [review]
Bug 37332: Fix unseen and customer renewal date parameters in svc

To test:
0. Enable unseen renewals
    i. Set the system preference UnseenRenewals to Allowed
    ii. Edit the circulation rules to specify the maximum number of
        unseen renewals allowed
1. Check out an item to a patron
2. In the checkouts table on that patron's account, check the "Renew"
   checkbox for that item
3. Select a custom renewal date using the Renewal due date flatpicker
4. Check the checkbox labeled "Renew as unseen if appropriate"
4. Click Renew selected items
--> The item renews, but its new due date follows the renewal period
    specified in the circulation rules, regardless of what date was
    entered in the Renewal due date field
--> The checkout still has all of its unseen renewals remaining,
    indicating that the renewal was not processed as an unseen renewal
5. Enter another custom renewal date and renew checkout with the Renew
   all button
--> Same result
6. Apply patch and restart_all
7. Repeat test plan
--> Custom renewal date is now respected
--> Number of unseen renewals remaining decreases when "Renew as unseen"
    checkbox is checked
8. Renew the item with the "Renew as unseen" checkbox unchecked
--> Confirm that number of unseen renewals is reset (i.e. the checkout
    once again has all of its unseen renewals remaining), indicating
    that the renewal was processed as a "seen" renewal

Signed-off-by: CJ Lynce <cj.lynce@westlakelibrary.org>

Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Comment 11 Katrin Fischer 2024-07-18 15:57:24 UTC
Pushed for 24.11!

Well done everyone, thank you!
Comment 12 Lucas Gass 2024-07-18 21:54:33 UTC
Backported to 24.05.x for upcoming 24.05.02
Comment 13 Fridolin Somers 2024-07-19 09:49:32 UTC
Depends on Bug 36084 not in 23.11.x
Comment 14 David Nind 2024-07-19 22:25:20 UTC
I've had a go at a release note, but I'm not sure I have described it correctly. Please update to correct it.
Comment 15 Emily Lamancusa 2024-07-22 18:22:24 UTC
(In reply to David Nind from comment #14)
> I've had a go at a release note, but I'm not sure I have described it
> correctly. Please update to correct it.

Thanks, David! In this case, one patch fixed two separate issues, which muddied the waters a bit. I clarified the release notes and updated the bug title to match.
Comment 16 David Nind 2024-07-29 02:46:50 UTC
(In reply to Emily Lamancusa from comment #15)
> (In reply to David Nind from comment #14)
> > I've had a go at a release note, but I'm not sure I have described it
> > correctly. Please update to correct it.
> 
> Thanks, David! In this case, one patch fixed two separate issues, which
> muddied the waters a bit. I clarified the release notes and updated the bug
> title to match.

Thanks Emily!
Comment 17 David Nind 2024-07-29 21:46:38 UTC
Thanks Emily for the updates to release note!

I removed "patch" from the release note. While developers use the term a lot, I think mere mortals don't use it all that much - even though they probably know what it means!
Comment 18 Isabel Pineda 2024-07-30 14:15:21 UTC
I reported this bug too in comment #10 of bug 36393 and in bug 37189. Today I updated Koha to version 24.05.02 and  I see here (https://koha-community.org/koha-24-05-02-released/) that the bug is supposed to be fixed. But when I try to renew an item with a custom renewal date, it still gets overridden by the hard due date in the circulation rules.

In the system preferences, AllowRenewalLimitOverride is set to "Allow".
Comment 19 Katrin Fischer 2024-07-31 09:30:48 UTC
(In reply to Isabel Pineda from comment #18)
> I reported this bug too in comment #10 of bug 36393 and in bug 37189. Today
> I updated Koha to version 24.05.02 and  I see here
> (https://koha-community.org/koha-24-05-02-released/) that the bug is
> supposed to be fixed. But when I try to renew an item with a custom renewal
> date, it still gets overridden by the hard due date in the circulation rules.
> 
> In the system preferences, AllowRenewalLimitOverride is set to "Allow".

Hi Isabel, that's not good. Could you please create a new bug report linking to this one with "depends"? We will need a new bug number for any follow-up as this was already in a released version. Thanks!
Comment 20 Katrin Fischer 2024-07-31 09:46:19 UTC
(In reply to Katrin Fischer from comment #19)
> (In reply to Isabel Pineda from comment #18)
> > I reported this bug too in comment #10 of bug 36393 and in bug 37189. Today
> > I updated Koha to version 24.05.02 and  I see here
> > (https://koha-community.org/koha-24-05-02-released/) that the bug is
> > supposed to be fixed. But when I try to renew an item with a custom renewal
> > date, it still gets overridden by the hard due date in the circulation rules.
> > 
> > In the system preferences, AllowRenewalLimitOverride is set to "Allow".
> 
> Hi Isabel, that's not good. Could you please create a new bug report linking
> to this one with "depends"? We will need a new bug number for any follow-up
> as this was already in a released version. Thanks!

Sorry, just found bug 37189, so we can continue there.