https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=39419

Brendan Lawlor <[email protected]> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
 Attachment #206473|0                           |1
        is obsolete|                            |

--- Comment #55 from Brendan Lawlor <[email protected]> ---
Comment on attachment 206473
  --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=206473
Bug 39419: (folow-up) Set both expiration dates when placing holds in opac and
staff interface

>From 1b31bd70ebd10f6da9f06c040da2d219ff63c625 Mon Sep 17 00:00:00 2001
>From: Brendan Lawlor <[email protected]>
>Date: Wed, 15 Apr 2026 17:35:15 +0000
>Subject: [PATCH] Bug 39419: (folow-up) Set both expiration dates when placing
> holds in opac and staff interface
>
>This patch sets both the expirationdate and patron_expiration date when 
>placing holds
>in the opac and staff interface as is consistent with current behavior.
>
>Test plan:
>1. Place some holds:
>   a) in the staff interface with setting a 'Hold expires on date'
>   b) in the opac with setting a 'Hold not needed after'
>2. Run this query in ktd --dbshell
>   select borrowernumber, expirationdate, patron_expiration_date from reserves;
>3. Note both expirationdate and patron_expiration_date are set in the holds
>
>Note: Editing the date in the Expiration column on the records' Holds tab
>only updates the expirationdate, which is consistent with current behavior.
>
>Sponsored-by: CLAMS
>Signed-off-by: Andrew Fuerste Henry <[email protected]>
>
>Signed-off-by: Jonathan Druart <[email protected]>
>---
> opac/opac-reserve.pl    | 25 ++++++-------
> reserve/placerequest.pl | 77 +++++++++++++++++++++--------------------
> 2 files changed, 53 insertions(+), 49 deletions(-)
>
>diff --git a/opac/opac-reserve.pl b/opac/opac-reserve.pl
>index a1f7d26f5bd..507485fdaf9 100755
>--- a/opac/opac-reserve.pl
>+++ b/opac/opac-reserve.pl
>@@ -295,18 +295,19 @@ if ( $op eq 'cud-place_reserve' ) {
>         if ($canreserve) {
>             my $reserve_id = AddReserve(
>                 {
>-                    branchcode       => $branch,
>-                    borrowernumber   => $borrowernumber,
>-                    biblionumber     => $biblioNum,
>-                    priority         => $rank,
>-                    reservation_date => $startdate,
>-                    expiration_date  => $patron_expiration_date,
>-                    notes            => $notes,
>-                    title            => $biblio->title,
>-                    itemnumber       => $itemNum,
>-                    found            => undef,
>-                    itemtype         => $itemtype,
>-                    item_group_id    => $item_group_id,
>+                    branchcode             => $branch,
>+                    borrowernumber         => $borrowernumber,
>+                    biblionumber           => $biblioNum,
>+                    priority               => $rank,
>+                    reservation_date       => $startdate,
>+                    expiration_date        => $patron_expiration_date,
>+                    patron_expiration_date => $patron_expiration_date,
>+                    notes                  => $notes,
>+                    title                  => $biblio->title,
>+                    itemnumber             => $itemNum,
>+                    found                  => undef,
>+                    itemtype               => $itemtype,
>+                    item_group_id          => $item_group_id,
>                 }
>             );
>             if ($reserve_id) {
>diff --git a/reserve/placerequest.pl b/reserve/placerequest.pl
>index 166775dc97b..63328eda3bf 100755
>--- a/reserve/placerequest.pl
>+++ b/reserve/placerequest.pl
>@@ -106,18 +106,19 @@ if ( $op eq 'cud-placerequest' && $patron ) {
>                     {
>                         my $reserve_id = AddReserve(
>                             {
>-                                branchcode       => $item_pickup_location,
>-                                borrowernumber   => $patron->borrowernumber,
>-                                biblionumber     => $biblionumber,
>-                                priority         => $hold_priority,
>-                                reservation_date => $startdate,
>-                                expiration_date  => $expirationdate,
>-                                notes            => $notes,
>-                                title            => $title,
>-                                itemnumber       => $checkitem,
>-                                found            => undef,
>-                                itemtype         => $itemtype,
>-                                non_priority     => $non_priority,
>+                                branchcode             => 
>$item_pickup_location,
>+                                borrowernumber         => 
>$patron->borrowernumber,
>+                                biblionumber           => $biblionumber,
>+                                priority               => $hold_priority,
>+                                reservation_date       => $startdate,
>+                                expiration_date        => $expirationdate,
>+                                patron_expiration_date => $expirationdate,
>+                                notes                  => $notes,
>+                                title                  => $title,
>+                                itemnumber             => $checkitem,
>+                                found                  => undef,
>+                                itemtype               => $itemtype,
>+                                non_priority           => $non_priority,
>                                 supplyill        => $supplyill,
>                                 iso18626_payload => \%iso18626_payload,
>                             }
>@@ -138,18 +139,19 @@ if ( $op eq 'cud-placerequest' && $patron ) {
>             if ( $can_override || CanBookBeReserved( $patron->borrowernumber, 
> $biblionumber )->{status} eq 'OK' ) {
>                 my $reserve_id = AddReserve(
>                     {
>-                        branchcode       => $bibinfo->{pickup},
>-                        borrowernumber   => $patron->borrowernumber,
>-                        biblionumber     => $biblionumber,
>-                        priority         => $bibinfo->{rank},
>-                        reservation_date => $startdate,
>-                        expiration_date  => $expirationdate,
>-                        notes            => $notes,
>-                        title            => $bibinfo->{title},
>-                        itemnumber       => undef,
>-                        found            => undef,
>-                        itemtype         => $itemtype,
>-                        non_priority     => $non_priority,
>+                        branchcode             => $bibinfo->{pickup},
>+                        borrowernumber         => $patron->borrowernumber,
>+                        biblionumber           => $biblionumber,
>+                        priority               => $bibinfo->{rank},
>+                        reservation_date       => $startdate,
>+                        expiration_date        => $expirationdate,
>+                        patron_expiration_date => $expirationdate,
>+                        notes                  => $notes,
>+                        title                  => $bibinfo->{title},
>+                        itemnumber             => undef,
>+                        found                  => undef,
>+                        itemtype               => $itemtype,
>+                        non_priority           => $non_priority,
> 
>                         # supplyill        => $supplyill, FIXME: How does 
> supplyill work with multi-hold?
>                         # iso18626_payload => \%iso18626_payload,
>@@ -165,19 +167,20 @@ if ( $op eq 'cud-placerequest' && $patron ) {
>                 if ( $can_override || CanBookBeReserved( 
> $patron->borrowernumber, $biblionumber )->{status} eq 'OK' ) {
>                     my $reserve_id = AddReserve(
>                         {
>-                            branchcode       => $branch,
>-                            borrowernumber   => $patron->borrowernumber,
>-                            biblionumber     => $biblionumber,
>-                            priority         => $rank[0],
>-                            reservation_date => $startdate,
>-                            expiration_date  => $expirationdate,
>-                            notes            => $notes,
>-                            title            => $title,
>-                            itemnumber       => undef,
>-                            found            => undef,
>-                            itemtype         => $itemtype,
>-                            non_priority     => $non_priority,
>-                            item_group_id    => $item_group_id,
>+                            branchcode             => $branch,
>+                            borrowernumber         => $patron->borrowernumber,
>+                            biblionumber           => $biblionumber,
>+                            priority               => $rank[0],
>+                            reservation_date       => $startdate,
>+                            expiration_date        => $expirationdate,
>+                            patron_expiration_date => $expirationdate,
>+                            notes                  => $notes,
>+                            title                  => $title,
>+                            itemnumber             => undef,
>+                            found                  => undef,
>+                            itemtype               => $itemtype,
>+                            non_priority           => $non_priority,
>+                            item_group_id          => $item_group_id,
>                             supplyill        => $supplyill,
>                             iso18626_payload => \%iso18626_payload,
>                         }
>-- 
>2.43.0
>

-- 
You are receiving this mail because:
You are watching all bug changes.
_______________________________________________
Koha-bugs mailing list -- [email protected]
To unsubscribe send an email to [email protected]
website : http://www.koha-community.org/
git : http://git.koha-community.org/
bugs : http://bugs.koha-community.org/

Reply via email to