View | Details | Raw Unified | Return to bug 14364
Collapse All | Expand All

(-)a/C4/Reserves.pm (-27 / +116 lines)
Lines 452-458 sub CanItemBeReserved{ Link Here
452
    my $dbh             = C4::Context->dbh;
452
    my $dbh             = C4::Context->dbh;
453
    my $ruleitemtype; # itemtype of the matching issuing rule
453
    my $ruleitemtype; # itemtype of the matching issuing rule
454
    my $allowedreserves = 0;
454
    my $allowedreserves = 0;
455
            
455
456
    # we retrieve borrowers and items informations #
456
    # we retrieve borrowers and items informations #
457
    # item->{itype} will come for biblioitems if necessery
457
    # item->{itype} will come for biblioitems if necessery
458
    my $item = GetItem($itemnumber);
458
    my $item = GetItem($itemnumber);
Lines 488-495 sub CanItemBeReserved{ Link Here
488
                                LEFT JOIN borrowers USING (borrowernumber)
488
                                LEFT JOIN borrowers USING (borrowernumber)
489
                            WHERE borrowernumber = ?
489
                            WHERE borrowernumber = ?
490
                                ";
490
                                ";
491
    
491
492
    
492
493
    my $branchcode   = "";
493
    my $branchcode   = "";
494
    my $branchfield  = "reserves.branchcode";
494
    my $branchfield  = "reserves.branchcode";
495
495
Lines 500-511 sub CanItemBeReserved{ Link Here
500
        $branchfield = "borrowers.branchcode";
500
        $branchfield = "borrowers.branchcode";
501
        $branchcode = $borrower->{branchcode};
501
        $branchcode = $borrower->{branchcode};
502
    }
502
    }
503
    
503
504
    # we retrieve rights 
504
    # we retrieve rights
505
    $sth->execute($borrower->{'categorycode'}, $item->{'itype'}, $branchcode);
505
    $sth->execute($borrower->{'categorycode'}, $item->{'itype'}, $branchcode);
506
    if(my $rights = $sth->fetchrow_hashref()){
506
    if(my $rights = $sth->fetchrow_hashref()){
507
        $ruleitemtype    = $rights->{itemtype};
507
        $ruleitemtype    = $rights->{itemtype};
508
        $allowedreserves = $rights->{reservesallowed}; 
508
        $allowedreserves = $rights->{reservesallowed};
509
    }else{
509
    }else{
510
        $ruleitemtype = '*';
510
        $ruleitemtype = '*';
511
    }
511
    }
Lines 513-519 sub CanItemBeReserved{ Link Here
513
    # we retrieve count
513
    # we retrieve count
514
514
515
    $querycount .= "AND $branchfield = ?";
515
    $querycount .= "AND $branchfield = ?";
516
    
516
517
    # If using item-level itypes, fall back to the record
517
    # If using item-level itypes, fall back to the record
518
    # level itemtype if the hold has no associated item
518
    # level itemtype if the hold has no associated item
519
    $querycount .=
519
    $querycount .=
Lines 523-529 sub CanItemBeReserved{ Link Here
523
      if ( $ruleitemtype ne "*" );
523
      if ( $ruleitemtype ne "*" );
524
524
525
    my $sthcount = $dbh->prepare($querycount);
525
    my $sthcount = $dbh->prepare($querycount);
526
    
526
527
    if($ruleitemtype eq "*"){
527
    if($ruleitemtype eq "*"){
528
        $sthcount->execute($borrowernumber, $branchcode);
528
        $sthcount->execute($borrowernumber, $branchcode);
529
    }else{
529
    }else{
Lines 737-744 sub GetReservesToBranch { Link Here
737
    my $dbh = C4::Context->dbh;
737
    my $dbh = C4::Context->dbh;
738
    my $sth = $dbh->prepare(
738
    my $sth = $dbh->prepare(
739
        "SELECT reserve_id,borrowernumber,reservedate,itemnumber,timestamp
739
        "SELECT reserve_id,borrowernumber,reservedate,itemnumber,timestamp
740
         FROM reserves 
740
         FROM reserves
741
         WHERE priority='0' 
741
         WHERE priority='0'
742
           AND branchcode=?"
742
           AND branchcode=?"
743
    );
743
    );
744
    $sth->execute( $frombranch );
744
    $sth->execute( $frombranch );
Lines 763-769 sub GetReservesForBranch { Link Here
763
763
764
    my $query = "
764
    my $query = "
765
        SELECT reserve_id,borrowernumber,reservedate,itemnumber,waitingdate
765
        SELECT reserve_id,borrowernumber,reservedate,itemnumber,waitingdate
766
        FROM   reserves 
766
        FROM   reserves
767
        WHERE   priority='0'
767
        WHERE   priority='0'
768
        AND found='W'
768
        AND found='W'
769
    ";
769
    ";
Lines 1016-1022 sub CancelExpiredReserves { Link Here
1016
            }
1016
            }
1017
1017
1018
            if ( $do_cancel ) {
1018
            if ( $do_cancel ) {
1019
                CancelReserve({ reserve_id => $res->{'reserve_id'}, charge_cancel_fee => 1 });
1019
                CancelReserve(
1020
                    {
1021
                        reserve_id => $res->{'reserve_id'},
1022
                        autofill   => C4::Context->preference('ExpireReservesAutoFill'),
1023
                        charge_cancel_fee => 1,
1024
                    }
1025
                );
1020
            }
1026
            }
1021
        }
1027
        }
1022
    }
1028
    }
Lines 1041-1047 sub AutoUnsuspendReserves { Link Here
1041
1047
1042
=head2 CancelReserve
1048
=head2 CancelReserve
1043
1049
1044
  CancelReserve({ reserve_id => $reserve_id, [ biblionumber => $biblionumber, borrowernumber => $borrrowernumber, itemnumber => $itemnumber, ] [ charge_cancel_fee => 1 ] });
1050
  CancelReserve({ reserve_id => $reserve_id, [ biblionumber => $biblionumber, borrowernumber => $borrrowernumber, itemnumber => $itemnumber, charge_cancel_fee => 1, autofill => $autofill ] });
1045
1051
1046
Cancels a reserve. If C<charge_cancel_fee> is passed and the C<ExpireReservesMaxPickUpDelayCharge> syspref is set, charge that fee to the patron's account.
1052
Cancels a reserve. If C<charge_cancel_fee> is passed and the C<ExpireReservesMaxPickUpDelayCharge> syspref is set, charge that fee to the patron's account.
1047
1053
Lines 1051-1060 sub CancelReserve { Link Here
1051
    my ( $params ) = @_;
1057
    my ( $params ) = @_;
1052
1058
1053
    my $reserve_id = $params->{'reserve_id'};
1059
    my $reserve_id = $params->{'reserve_id'};
1060
    my $autofill   = $params->{autofill};
1061
1054
    # Filter out only the desired keys; this will insert undefined values for elements missing in
1062
    # Filter out only the desired keys; this will insert undefined values for elements missing in
1055
    # \%params, but GetReserveId filters them out anyway.
1063
    # \%params, but GetReserveId filters them out anyway.
1056
    $reserve_id = GetReserveId( { biblionumber => $params->{'biblionumber'}, borrowernumber => $params->{'borrowernumber'}, itemnumber => $params->{'itemnumber'} } ) unless ( $reserve_id );
1064
    $reserve_id = GetReserveId( { biblionumber => $params->{'biblionumber'}, borrowernumber => $params->{'borrowernumber'}, itemnumber => $params->{'itemnumber'} } ) unless ( $reserve_id );
1057
1065
1066
1058
    return unless ( $reserve_id );
1067
    return unless ( $reserve_id );
1059
1068
1060
    my $dbh = C4::Context->dbh;
1069
    my $dbh = C4::Context->dbh;
Lines 1094-1099 sub CancelReserve { Link Here
1094
        if ( $charge && $params->{'charge_cancel_fee'} ) {
1103
        if ( $charge && $params->{'charge_cancel_fee'} ) {
1095
            manualinvoice($reserve->{'borrowernumber'}, $reserve->{'itemnumber'}, 'Hold waiting too long', 'F', $charge);
1104
            manualinvoice($reserve->{'borrowernumber'}, $reserve->{'itemnumber'}, 'Hold waiting too long', 'F', $charge);
1096
        }
1105
        }
1106
1107
        # only attempt to autofill canceled holds that were found and waiting
1108
        if ( $autofill && $reserve->{itemnumber} && $reserve->{found} && $reserve->{found} eq 'W' ) {
1109
            my ( undef, $next_hold ) = CheckReserves( $reserve->{'itemnumber'} );
1110
            if ($next_hold) {
1111
                my $is_transfer = $reserve->{branchcode} ne $next_hold->{branchcode};
1112
1113
                ModReserveAffect(
1114
                    {
1115
                        itemnumber     => $reserve->{itemnumber},
1116
                        borrowernumber => $next_hold->{borrowernumber},
1117
                        is_transfer    => $is_transfer,
1118
                        notify_library => 1,
1119
                    }
1120
                );
1121
1122
                ModItemTransfer( $reserve->{itemnumber}, $reserve->{branchcode}, $next_hold->{branchcode} )
1123
                  if $is_transfer;
1124
            }
1125
        }
1097
    }
1126
    }
1098
1127
1099
    return $reserve;
1128
    return $reserve;
Lines 1294-1300 take care of the waiting status Link Here
1294
=cut
1323
=cut
1295
1324
1296
sub ModReserveAffect {
1325
sub ModReserveAffect {
1297
    my ( $itemnumber, $borrowernumber,$transferToDo ) = @_;
1326
    my ( $params ) = @_;
1327
1328
    my $itemnumber     = $params->{itemnumber};
1329
    my $borrowernumber = $params->{borrowernumber};
1330
    my $transferToDo   = $params->{is_transfer};
1331
    my $notify_library = $params->{notify_library};
1332
1298
    my $dbh = C4::Context->dbh;
1333
    my $dbh = C4::Context->dbh;
1299
1334
1300
    # we want to attach $itemnumber to $borrowernumber, find the biblionumber
1335
    # we want to attach $itemnumber to $borrowernumber, find the biblionumber
Lines 1339-1346 sub ModReserveAffect { Link Here
1339
    }
1374
    }
1340
    $sth = $dbh->prepare($query);
1375
    $sth = $dbh->prepare($query);
1341
    $sth->execute( $itemnumber, $borrowernumber,$biblionumber);
1376
    $sth->execute( $itemnumber, $borrowernumber,$biblionumber);
1342
    _koha_notify_reserve( $itemnumber, $borrowernumber, $biblionumber ) if ( !$transferToDo && !$already_on_shelf );
1377
1378
    _koha_notify_reserve(
1379
        {
1380
            itemnumber     => $itemnumber,
1381
            borrowernumber => $borrowernumber,
1382
            biblionumber   => $biblionumber,
1383
            notify_library => $notify_library,
1384
        }
1385
    ) if ( !$transferToDo && !$already_on_shelf );
1386
1343
    _FixPriority( { biblionumber => $biblionumber } );
1387
    _FixPriority( { biblionumber => $biblionumber } );
1388
1344
    if ( C4::Context->preference("ReturnToShelvingCart") ) {
1389
    if ( C4::Context->preference("ReturnToShelvingCart") ) {
1345
      CartToShelf( $itemnumber );
1390
      CartToShelf( $itemnumber );
1346
    }
1391
    }
Lines 1385-1391 sub ModReserveMinusPriority { Link Here
1385
    my $dbh   = C4::Context->dbh;
1430
    my $dbh   = C4::Context->dbh;
1386
    my $query = "
1431
    my $query = "
1387
        UPDATE reserves
1432
        UPDATE reserves
1388
        SET    priority = 0 , itemnumber = ? 
1433
        SET    priority = 0 , itemnumber = ?
1389
        WHERE  reserve_id = ?
1434
        WHERE  reserve_id = ?
1390
    ";
1435
    ";
1391
    my $sth_upd = $dbh->prepare($query);
1436
    my $sth_upd = $dbh->prepare($query);
Lines 1600-1606 sub ToggleLowestPriority { Link Here
1600
1645
1601
    my $sth = $dbh->prepare( "UPDATE reserves SET lowestPriority = NOT lowestPriority WHERE reserve_id = ?");
1646
    my $sth = $dbh->prepare( "UPDATE reserves SET lowestPriority = NOT lowestPriority WHERE reserve_id = ?");
1602
    $sth->execute( $reserve_id );
1647
    $sth->execute( $reserve_id );
1603
    
1648
1604
    _FixPriority({ reserve_id => $reserve_id, rank => '999999' });
1649
    _FixPriority({ reserve_id => $reserve_id, rank => '999999' });
1605
}
1650
}
1606
1651
Lines 1784-1790 sub _FixPriority { Link Here
1784
            $priority[$j]->{'reserve_id'}
1829
            $priority[$j]->{'reserve_id'}
1785
        );
1830
        );
1786
    }
1831
    }
1787
    
1832
1788
    $sth = $dbh->prepare( "SELECT reserve_id FROM reserves WHERE lowestPriority = 1 ORDER BY priority" );
1833
    $sth = $dbh->prepare( "SELECT reserve_id FROM reserves WHERE lowestPriority = 1 ORDER BY priority" );
1789
    $sth->execute();
1834
    $sth->execute();
1790
1835
Lines 1919-1925 sub _Findgroupreserve { Link Here
1919
1964
1920
=head2 _koha_notify_reserve
1965
=head2 _koha_notify_reserve
1921
1966
1922
  _koha_notify_reserve( $itemnumber, $borrowernumber, $biblionumber );
1967
_koha_notify_reserve(
1968
    {
1969
        itemnumber     => $itemnumber,
1970
        borrowernumber => $borrowernumber,
1971
        biblionumber   => $biblionumber,
1972
        notify_library => $notify_library
1973
    }
1974
);
1923
1975
1924
Sends a notification to the patron that their hold has been filled (through
1976
Sends a notification to the patron that their hold has been filled (through
1925
ModReserveAffect, _not_ ModReserveFill)
1977
ModReserveAffect, _not_ ModReserveFill)
Lines 1946-1952 The following tables are availalbe witin the notice: Link Here
1946
=cut
1998
=cut
1947
1999
1948
sub _koha_notify_reserve {
2000
sub _koha_notify_reserve {
1949
    my ($itemnumber, $borrowernumber, $biblionumber) = @_;
2001
    my ( $params ) = @_;
2002
2003
    my $itemnumber     = $params->{itemnumber};
2004
    my $borrowernumber = $params->{borrowernumber};
2005
    my $biblionumber   = $params->{biblionumber};
2006
    my $notify_library = $params->{notify_library};
1950
2007
1951
    my $dbh = C4::Context->dbh;
2008
    my $dbh = C4::Context->dbh;
1952
    my $borrower = C4::Members::GetMember(borrowernumber => $borrowernumber);
2009
    my $borrower = C4::Members::GetMember(borrowernumber => $borrowernumber);
Lines 1997-2008 sub _koha_notify_reserve { Link Here
1997
            return;
2054
            return;
1998
        }
2055
        }
1999
2056
2000
        C4::Letters::EnqueueLetter( {
2057
        C4::Letters::EnqueueLetter(
2001
            letter => $letter,
2058
            {
2002
            borrowernumber => $borrowernumber,
2059
                letter                 => $letter,
2003
            from_address => $admin_email_address,
2060
                borrowernumber         => $borrowernumber,
2004
            message_transport_type => $mtt,
2061
                from_address           => $admin_email_address,
2005
        } );
2062
                message_transport_type => $mtt,
2063
            }
2064
        );
2006
    };
2065
    };
2007
2066
2008
    while ( my ( $mtt, $letter_code ) = each %{ $messagingprefs->{transports} } ) {
2067
    while ( my ( $mtt, $letter_code ) = each %{ $messagingprefs->{transports} } ) {
Lines 2019-2025 sub _koha_notify_reserve { Link Here
2019
    if (! $notification_sent) {
2078
    if (! $notification_sent) {
2020
        &$send_notification('print', 'HOLD');
2079
        &$send_notification('print', 'HOLD');
2021
    }
2080
    }
2022
    
2081
2082
    if ($notify_library) {
2083
        my $letter = C4::Letters::GetPreparedLetter(
2084
            module      => 'reserves',
2085
            letter_code => 'HOLD_CHANGED',
2086
            branchcode  => $reserve->{branchcode},
2087
            substitute  => { today => C4::Dates->new()->output() },
2088
            tables      => {
2089
                'branches'  => $branch_details,
2090
                'borrowers' => $borrower,
2091
                'biblio'    => $biblionumber,
2092
                'reserves'  => $reserve,
2093
                'items'     => $reserve->{'itemnumber'},
2094
            },
2095
        );
2096
2097
        my $email =
2098
             C4::Context->preference('ExpireReservesAutoFillEmail')
2099
          || $branch_details->{'branchemail'}
2100
          || C4::Context->preference('KohaAdminEmailAddress');
2101
2102
        C4::Letters::EnqueueLetter(
2103
            {
2104
                letter                 => $letter,
2105
                borrowernumber         => $borrowernumber,
2106
                message_transport_type => 'email',
2107
                from_address           => $email,
2108
                to_address             => $email,
2109
            }
2110
        );
2111
    }
2023
}
2112
}
2024
2113
2025
=head2 _ShiftPriorityByDateAndPriority
2114
=head2 _ShiftPriorityByDateAndPriority
(-)a/C4/SIP/ILS/Transaction/Checkin.pm (-4 / +14 lines)
Lines 99-111 sub do_checkin { Link Here
99
        $self->hold($messages->{ResFound});
99
        $self->hold($messages->{ResFound});
100
        if ($branch eq $messages->{ResFound}->{branchcode}) {
100
        if ($branch eq $messages->{ResFound}->{branchcode}) {
101
            $self->alert_type('01');
101
            $self->alert_type('01');
102
            ModReserveAffect( $messages->{ResFound}->{itemnumber},
102
            ModReserveAffect(
103
                $messages->{ResFound}->{borrowernumber}, 0);
103
                {
104
                    itemnumber     => $messages->{ResFound}->{itemnumber},
105
                    borrowernumber => $messages->{ResFound}->{borrowernumber},
106
                    is_transfer    => 0,
107
                }
108
            );
104
109
105
        } else {
110
        } else {
106
            $self->alert_type('02');
111
            $self->alert_type('02');
107
            ModReserveAffect( $messages->{ResFound}->{itemnumber},
112
            ModReserveAffect(
108
                $messages->{ResFound}->{borrowernumber}, 1);
113
                {
114
                    itemnumber     => $messages->{ResFound}->{itemnumber},
115
                    borrowernumber => $messages->{ResFound}->{borrowernumber},
116
                    is_transfer    => 1,
117
                }
118
            );
109
            ModItemTransfer( $messages->{ResFound}->{itemnumber},
119
            ModItemTransfer( $messages->{ResFound}->{itemnumber},
110
                $branch,
120
                $branch,
111
                $messages->{ResFound}->{branchcode}
121
                $messages->{ResFound}->{branchcode}
(-)a/circ/branchtransfers.pl (-1 / +1 lines)
Lines 89-95 if ( $request eq "KillWaiting" ) { Link Here
89
}
89
}
90
elsif ( $request eq "SetWaiting" ) {
90
elsif ( $request eq "SetWaiting" ) {
91
    my $item = $query->param('itemnumber');
91
    my $item = $query->param('itemnumber');
92
    ModReserveAffect( $item, $borrowernumber );
92
    ModReserveAffect( { itemnumber => $item, borrowernumber => $borrowernumber } );
93
    $ignoreRs    = 1;
93
    $ignoreRs    = 1;
94
    $setwaiting  = 1;
94
    $setwaiting  = 1;
95
    $reqmessage  = 1;
95
    $reqmessage  = 1;
(-)a/circ/returns.pl (-2 / +3 lines)
Lines 158-166 if ( $query->param('resbarcode') ) { Link Here
158
        my $diffBranchSend = ($userenv_branch ne $diffBranchReturned) ? $diffBranchReturned : undef;
158
        my $diffBranchSend = ($userenv_branch ne $diffBranchReturned) ? $diffBranchReturned : undef;
159
        # diffBranchSend tells ModReserveAffect whether document is expected in this library or not,
159
        # diffBranchSend tells ModReserveAffect whether document is expected in this library or not,
160
        # i.e., whether to apply waiting status
160
        # i.e., whether to apply waiting status
161
        ModReserveAffect( $item, $borrowernumber, $diffBranchSend);
161
        ModReserveAffect( { itemnumber => $item, borrowernumber => $borrowernumber, is_transfer => $diffBranchSend } );
162
    }
162
    }
163
#   check if we have other reserves for this document, if we have a return send the message of transfer
163
164
    # check if we have other reserves for this document, if we have a return send the message of transfer
164
    my ( $messages, $nextreservinfo ) = GetOtherReserves($item);
165
    my ( $messages, $nextreservinfo ) = GetOtherReserves($item);
165
166
166
    my $borr = GetMember( borrowernumber => $nextreservinfo );
167
    my $borr = GetMember( borrowernumber => $nextreservinfo );
(-)a/installer/data/mysql/atomicupdate/bug_14364.sql (+13 lines)
Line 0 Link Here
1
INSERT INTO systempreferences ( `variable`, `value`, `options`, `explanation`, `type` ) VALUES
2
('ExpireReservesAutoFill','0',NULL,'Automatically fill the next hold with a automatically canceled expired waiting hold.','YesNo'),
3
('ExpireReservesAutoFillEmail','', NULL,'If ExpireReservesAutoFill and an email is defined here, the email notification for the change in the hold will be sent to this address.','Free');
4
5
INSERT INTO letter(module,code,branchcode,name,is_html,title,content,message_transport_type)
6
VALUES ( 'reserves', 'HOLD_CHANGED', '', 'Canceled Hold Available for Different Patron', '0', 'Canceled Hold Available for Different Patron', 'The patron picking up <<biblio.title>> (<<items.barcode>>) has changed to <<borrowers.firstname>> <<borrowers.surname>> (<<borrowers.cardnumber>>).
7
8
Please update the hold information for this item.
9
10
Title: <<biblio.title>>
11
Author: <<biblio.author>>
12
Copy: <<items.copynumber>>
13
Pickup location: <<branches.branchname>>', 'email');
(-)a/installer/data/mysql/de-DE/mandatory/sample_notices.sql (+9 lines)
Lines 147-149 VALUES ( 'circulation', 'OVERDUES_SLIP', '', 'Ãœberfälligkeiten (Quittung)', '0 Link Here
147
INSERT INTO `letter` (module, code, branchcode, name, is_html, title, content, message_transport_type)
147
INSERT INTO `letter` (module, code, branchcode, name, is_html, title, content, message_transport_type)
148
VALUES ('members','PASSWORD_RESET','','Online password reset',1,'Koha password recovery','<html>\r\n<p>This email has been sent in response to your password recovery request for the account <strong><<user>></strong>.\r\n</p>\r\n<p>\r\nYou can now create your new password using the following link:\r\n<br/><a href=\"<<passwordreseturl>>\"><<passwordreseturl>></a>\r\n</p>\r\n<p>This link will be valid for 2 days from this email\'s reception, then you must reapply if you do not change your password.</p>\r\n<p>Thank you.</p>\r\n</html>\r\n','email'
148
VALUES ('members','PASSWORD_RESET','','Online password reset',1,'Koha password recovery','<html>\r\n<p>This email has been sent in response to your password recovery request for the account <strong><<user>></strong>.\r\n</p>\r\n<p>\r\nYou can now create your new password using the following link:\r\n<br/><a href=\"<<passwordreseturl>>\"><<passwordreseturl>></a>\r\n</p>\r\n<p>This link will be valid for 2 days from this email\'s reception, then you must reapply if you do not change your password.</p>\r\n<p>Thank you.</p>\r\n</html>\r\n','email'
149
);
149
);
150
INSERT INTO letter(module,code,branchcode,name,is_html,title,content,message_transport_type)
151
    VALUES ( 'reserves', 'HOLD_CHANGED', '', 'Canceled Hold Available for Different Patron', '0', 'Canceled Hold Available for Different Patron', 'The patron picking up <<biblio.title>> (<<items.barcode>>) has changed to <<borrowers.firstname>> <<borrowers.surname>> (<<borrowers.cardnumber>>).
152
153
            Please update the hold information for this item.
154
155
            Title: <<biblio.title>>
156
            Author: <<biblio.author>>
157
            Copy: <<items.copynumber>>
158
            Pickup location: <<branches.branchname>>', 'email');
(-)a/installer/data/mysql/en/mandatory/sample_notices.sql (+9 lines)
Lines 166-168 VALUES ( 'circulation', 'OVERDUES_SLIP', '', 'Overdues Slip', '0', 'OVERDUES_SLI Link Here
166
INSERT INTO `letter` (module, code, branchcode, name, is_html, title, content, message_transport_type)
166
INSERT INTO `letter` (module, code, branchcode, name, is_html, title, content, message_transport_type)
167
VALUES ('members','PASSWORD_RESET','','Online password reset',1,'Koha password recovery','<html>\r\n<p>This email has been sent in response to your password recovery request for the account <strong><<user>></strong>.\r\n</p>\r\n<p>\r\nYou can now create your new password using the following link:\r\n<br/><a href=\"<<passwordreseturl>>\"><<passwordreseturl>></a>\r\n</p>\r\n<p>This link will be valid for 2 days from this email\'s reception, then you must reapply if you do not change your password.</p>\r\n<p>Thank you.</p>\r\n</html>\r\n','email'
167
VALUES ('members','PASSWORD_RESET','','Online password reset',1,'Koha password recovery','<html>\r\n<p>This email has been sent in response to your password recovery request for the account <strong><<user>></strong>.\r\n</p>\r\n<p>\r\nYou can now create your new password using the following link:\r\n<br/><a href=\"<<passwordreseturl>>\"><<passwordreseturl>></a>\r\n</p>\r\n<p>This link will be valid for 2 days from this email\'s reception, then you must reapply if you do not change your password.</p>\r\n<p>Thank you.</p>\r\n</html>\r\n','email'
168
);
168
);
169
INSERT INTO letter(module,code,branchcode,name,is_html,title,content,message_transport_type)
170
    VALUES ( 'reserves', 'HOLD_CHANGED', '', 'Canceled Hold Available for Different Patron', '0', 'Canceled Hold Available for Different Patron', 'The patron picking up <<biblio.title>> (<<items.barcode>>) has changed to <<borrowers.firstname>> <<borrowers.surname>> (<<borrowers.cardnumber>>).
171
172
            Please update the hold information for this item.
173
174
            Title: <<biblio.title>>
175
            Author: <<biblio.author>>
176
            Copy: <<items.copynumber>>
177
            Pickup location: <<branches.branchname>>', 'email');
(-)a/installer/data/mysql/es-ES/mandatory/sample_notices.sql (+9 lines)
Lines 161-163 VALUES ( 'circulation', 'OVERDUES_SLIP', '', 'Overdues Slip', '0', 'OVERDUES_SLI Link Here
161
INSERT INTO `letter` (module, code, branchcode, name, is_html, title, content, message_transport_type)
161
INSERT INTO `letter` (module, code, branchcode, name, is_html, title, content, message_transport_type)
162
VALUES ('members','PASSWORD_RESET','','Online password reset',1,'Koha password recovery','<html>\r\n<p>This email has been sent in response to your password recovery request for the account <strong><<user>></strong>.\r\n</p>\r\n<p>\r\nYou can now create your new password using the following link:\r\n<br/><a href=\"<<passwordreseturl>>\"><<passwordreseturl>></a>\r\n</p>\r\n<p>This link will be valid for 2 days from this email\'s reception, then you must reapply if you do not change your password.</p>\r\n<p>Thank you.</p>\r\n</html>\r\n','email'
162
VALUES ('members','PASSWORD_RESET','','Online password reset',1,'Koha password recovery','<html>\r\n<p>This email has been sent in response to your password recovery request for the account <strong><<user>></strong>.\r\n</p>\r\n<p>\r\nYou can now create your new password using the following link:\r\n<br/><a href=\"<<passwordreseturl>>\"><<passwordreseturl>></a>\r\n</p>\r\n<p>This link will be valid for 2 days from this email\'s reception, then you must reapply if you do not change your password.</p>\r\n<p>Thank you.</p>\r\n</html>\r\n','email'
163
);
163
);
164
INSERT INTO letter(module,code,branchcode,name,is_html,title,content,message_transport_type)
165
    VALUES ( 'reserves', 'HOLD_CHANGED', '', 'Canceled Hold Available for Different Patron', '0', 'Canceled Hold Available for Different Patron', 'The patron picking up <<biblio.title>> (<<items.barcode>>) has changed to <<borrowers.firstname>> <<borrowers.surname>> (<<borrowers.cardnumber>>).
166
167
Please update the hold information for this item.
168
169
Title: <<biblio.title>>
170
Author: <<biblio.author>>
171
Copy: <<items.copynumber>>
172
Pickup location: <<branches.branchname>>', 'email');
(-)a/installer/data/mysql/fr-FR/1-Obligatoire/sample_notices.sql (+9 lines)
Lines 162-164 VALUES ( 'circulation', 'OVERDUES_SLIP', '', 'Overdues Slip', '0', 'OVERDUES_SLI Link Here
162
INSERT INTO `letter` (module, code, branchcode, name, is_html, title, content, message_transport_type)
162
INSERT INTO `letter` (module, code, branchcode, name, is_html, title, content, message_transport_type)
163
VALUES ('members','PASSWORD_RESET','','Online password reset',1,'Koha password recovery','<html>\r\n<p>This email has been sent in response to your password recovery request for the account <strong><<user>></strong>.\r\n</p>\r\n<p>\r\nYou can now create your new password using the following link:\r\n<br/><a href=\"<<passwordreseturl>>\"><<passwordreseturl>></a>\r\n</p>\r\n<p>This link will be valid for 2 days from this email\'s reception, then you must reapply if you do not change your password.</p>\r\n<p>Thank you.</p>\r\n</html>\r\n','email'
163
VALUES ('members','PASSWORD_RESET','','Online password reset',1,'Koha password recovery','<html>\r\n<p>This email has been sent in response to your password recovery request for the account <strong><<user>></strong>.\r\n</p>\r\n<p>\r\nYou can now create your new password using the following link:\r\n<br/><a href=\"<<passwordreseturl>>\"><<passwordreseturl>></a>\r\n</p>\r\n<p>This link will be valid for 2 days from this email\'s reception, then you must reapply if you do not change your password.</p>\r\n<p>Thank you.</p>\r\n</html>\r\n','email'
164
);
164
);
165
INSERT INTO letter(module,code,branchcode,name,is_html,title,content,message_transport_type)
166
    VALUES ( 'reserves', 'HOLD_CHANGED', '', 'Canceled Hold Available for Different Patron', '0', 'Canceled Hold Available for Different Patron', 'The patron picking up <<biblio.title>> (<<items.barcode>>) has changed to <<borrowers.firstname>> <<borrowers.surname>> (<<borrowers.cardnumber>>).
167
168
Please update the hold information for this item.
169
170
Title: <<biblio.title>>
171
Author: <<biblio.author>>
172
Copy: <<items.copynumber>>
173
Pickup location: <<branches.branchname>>', 'email');
(-)a/installer/data/mysql/nb-NO/1-Obligatorisk/sample_notices.sql (+9 lines)
Lines 181-183 VALUES ( 'circulation', 'OVERDUES_SLIP', '', 'Overdues Slip', '0', 'OVERDUES_SLI Link Here
181
INSERT INTO `letter` (module, code, branchcode, name, is_html, title, content, message_transport_type)
181
INSERT INTO `letter` (module, code, branchcode, name, is_html, title, content, message_transport_type)
182
VALUES ('members','PASSWORD_RESET','','Online password reset',1,'Koha password recovery','<html>\r\n<p>This email has been sent in response to your password recovery request for the account <strong><<user>></strong>.\r\n</p>\r\n<p>\r\nYou can now create your new password using the following link:\r\n<br/><a href=\"<<passwordreseturl>>\"><<passwordreseturl>></a>\r\n</p>\r\n<p>This link will be valid for 2 days from this email\'s reception, then you must reapply if you do not change your password.</p>\r\n<p>Thank you.</p>\r\n</html>\r\n','email'
182
VALUES ('members','PASSWORD_RESET','','Online password reset',1,'Koha password recovery','<html>\r\n<p>This email has been sent in response to your password recovery request for the account <strong><<user>></strong>.\r\n</p>\r\n<p>\r\nYou can now create your new password using the following link:\r\n<br/><a href=\"<<passwordreseturl>>\"><<passwordreseturl>></a>\r\n</p>\r\n<p>This link will be valid for 2 days from this email\'s reception, then you must reapply if you do not change your password.</p>\r\n<p>Thank you.</p>\r\n</html>\r\n','email'
183
);
183
);
184
INSERT INTO letter(module,code,branchcode,name,is_html,title,content,message_transport_type)
185
    VALUES ( 'reserves', 'HOLD_CHANGED', '', 'Canceled Hold Available for Different Patron', '0', 'Canceled Hold Available for Different Patron', 'The patron picking up <<biblio.title>> (<<items.barcode>>) has changed to <<borrowers.firstname>> <<borrowers.surname>> (<<borrowers.cardnumber>>).
186
187
Please update the hold information for this item.
188
189
Title: <<biblio.title>>
190
Author: <<biblio.author>>
191
Copy: <<items.copynumber>>
192
Pickup location: <<branches.branchname>>', 'email');
(-)a/installer/data/mysql/pl-PL/mandatory/sample_notices.sql (+9 lines)
Lines 159-161 VALUES ( 'circulation', 'OVERDUES_SLIP', '', 'Overdues Slip', '0', 'OVERDUES_SLI Link Here
159
INSERT INTO `letter` (module, code, branchcode, name, is_html, title, content, message_transport_type)
159
INSERT INTO `letter` (module, code, branchcode, name, is_html, title, content, message_transport_type)
160
VALUES ('members','PASSWORD_RESET','','Online password reset',1,'Koha password recovery','<html>\r\n<p>This email has been sent in response to your password recovery request for the account <strong><<user>></strong>.\r\n</p>\r\n<p>\r\nYou can now create your new password using the following link:\r\n<br/><a href=\"<<passwordreseturl>>\"><<passwordreseturl>></a>\r\n</p>\r\n<p>This link will be valid for 2 days from this email\'s reception, then you must reapply if you do not change your password.</p>\r\n<p>Thank you.</p>\r\n</html>\r\n','email'
160
VALUES ('members','PASSWORD_RESET','','Online password reset',1,'Koha password recovery','<html>\r\n<p>This email has been sent in response to your password recovery request for the account <strong><<user>></strong>.\r\n</p>\r\n<p>\r\nYou can now create your new password using the following link:\r\n<br/><a href=\"<<passwordreseturl>>\"><<passwordreseturl>></a>\r\n</p>\r\n<p>This link will be valid for 2 days from this email\'s reception, then you must reapply if you do not change your password.</p>\r\n<p>Thank you.</p>\r\n</html>\r\n','email'
161
);
161
);
162
INSERT INTO letter(module,code,branchcode,name,is_html,title,content,message_transport_type)
163
VALUES ( 'reserves', 'HOLD_CHANGED', '', 'Canceled Hold Available for Different Patron', '0', 'Canceled Hold Available for Different Patron', 'The patron picking up <<biblio.title>> (<<items.barcode>>) has changed to <<borrowers.firstname>> <<borrowers.surname>> (<<borrowers.cardnumber>>).
164
165
Please update the hold information for this item.
166
167
Title: <<biblio.title>>
168
Author: <<biblio.author>>
169
Copy: <<items.copynumber>>
170
Pickup location: <<branches.branchname>>', 'email');
(-)a/installer/data/mysql/ru-RU/mandatory/sample_notices.sql (+9 lines)
Lines 161-163 VALUES ( 'circulation', 'OVERDUES_SLIP', '', 'Overdues Slip', '0', 'OVERDUES_SLI Link Here
161
INSERT INTO `letter` (module, code, branchcode, name, is_html, title, content, message_transport_type)
161
INSERT INTO `letter` (module, code, branchcode, name, is_html, title, content, message_transport_type)
162
VALUES ('members','PASSWORD_RESET','','Online password reset',1,'Koha password recovery','<html>\r\n<p>This email has been sent in response to your password recovery request for the account <strong><<user>></strong>.\r\n</p>\r\n<p>\r\nYou can now create your new password using the following link:\r\n<br/><a href=\"<<passwordreseturl>>\"><<passwordreseturl>></a>\r\n</p>\r\n<p>This link will be valid for 2 days from this email\'s reception, then you must reapply if you do not change your password.</p>\r\n<p>Thank you.</p>\r\n</html>\r\n','email'
162
VALUES ('members','PASSWORD_RESET','','Online password reset',1,'Koha password recovery','<html>\r\n<p>This email has been sent in response to your password recovery request for the account <strong><<user>></strong>.\r\n</p>\r\n<p>\r\nYou can now create your new password using the following link:\r\n<br/><a href=\"<<passwordreseturl>>\"><<passwordreseturl>></a>\r\n</p>\r\n<p>This link will be valid for 2 days from this email\'s reception, then you must reapply if you do not change your password.</p>\r\n<p>Thank you.</p>\r\n</html>\r\n','email'
163
);
163
);
164
INSERT INTO letter(module,code,branchcode,name,is_html,title,content,message_transport_type)
165
VALUES ( 'reserves', 'HOLD_CHANGED', '', 'Canceled Hold Available for Different Patron', '0', 'Canceled Hold Available for Different Patron', 'The patron picking up <<biblio.title>> (<<items.barcode>>) has changed to <<borrowers.firstname>> <<borrowers.surname>> (<<borrowers.cardnumber>>).
166
167
Please update the hold information for this item.
168
169
Title: <<biblio.title>>
170
Author: <<biblio.author>>
171
Copy: <<items.copynumber>>
172
Pickup location: <<branches.branchname>>', 'email');
(-)a/installer/data/mysql/sysprefs.sql (+2 lines)
Lines 138-143 INSERT INTO systempreferences ( `variable`, `value`, `options`, `explanation`, ` Link Here
138
('EnableSearchHistory','0','','Enable or disable search history','YesNo'),
138
('EnableSearchHistory','0','','Enable or disable search history','YesNo'),
139
('EnhancedMessagingPreferences','0','','If ON, allows patrons to select to receive additional messages about items due or nearly due.','YesNo'),
139
('EnhancedMessagingPreferences','0','','If ON, allows patrons to select to receive additional messages about items due or nearly due.','YesNo'),
140
('expandedSearchOption','0',NULL,'If ON, set advanced search to be expanded by default','YesNo'),
140
('expandedSearchOption','0',NULL,'If ON, set advanced search to be expanded by default','YesNo'),
141
('ExpireReservesAutoFill','0',NULL,'Automatically fill the next hold with a automatically canceled expired waiting hold.','YesNo'),
142
('ExpireReservesAutoFillEmail','', NULL,'If ExpireReservesAutoFill and an email is defined here, the email notification for the change in the hold will be sent to this address.','Free'),
141
('ExpireReservesMaxPickUpDelay','0','','Enabling this allows holds to expire automatically if they have not been picked by within the time period specified in ReservesMaxPickUpDelay','YesNo'),
143
('ExpireReservesMaxPickUpDelay','0','','Enabling this allows holds to expire automatically if they have not been picked by within the time period specified in ReservesMaxPickUpDelay','YesNo'),
142
('ExpireReservesMaxPickUpDelayCharge','0',NULL,'If ExpireReservesMaxPickUpDelay is enabled, and this field has a non-zero value, than a borrower whose waiting hold has expired will be charged this amount.','free'),
144
('ExpireReservesMaxPickUpDelayCharge','0',NULL,'If ExpireReservesMaxPickUpDelay is enabled, and this field has a non-zero value, than a borrower whose waiting hold has expired will be charged this amount.','free'),
143
('ExpireReservesOnHolidays', '1', NULL, 'If false, reserves at a library will not be canceled on days the library is not open.', 'YesNo'),
145
('ExpireReservesOnHolidays', '1', NULL, 'If false, reserves at a library will not be canceled on days the library is not open.', 'YesNo'),
(-)a/installer/data/mysql/uk-UA/mandatory/sample_notices.sql (+9 lines)
Lines 160-162 VALUES ( 'circulation', 'OVERDUES_SLIP', '', 'Overdues Slip', '0', 'OVERDUES_SLI Link Here
160
INSERT INTO `letter` (module, code, branchcode, name, is_html, title, content, message_transport_type)
160
INSERT INTO `letter` (module, code, branchcode, name, is_html, title, content, message_transport_type)
161
VALUES ('members','PASSWORD_RESET','','Online password reset',1,'Koha password recovery','<html>\r\n<p>This email has been sent in response to your password recovery request for the account <strong><<user>></strong>.\r\n</p>\r\n<p>\r\nYou can now create your new password using the following link:\r\n<br/><a href=\"<<passwordreseturl>>\"><<passwordreseturl>></a>\r\n</p>\r\n<p>This link will be valid for 2 days from this email\'s reception, then you must reapply if you do not change your password.</p>\r\n<p>Thank you.</p>\r\n</html>\r\n','email'
161
VALUES ('members','PASSWORD_RESET','','Online password reset',1,'Koha password recovery','<html>\r\n<p>This email has been sent in response to your password recovery request for the account <strong><<user>></strong>.\r\n</p>\r\n<p>\r\nYou can now create your new password using the following link:\r\n<br/><a href=\"<<passwordreseturl>>\"><<passwordreseturl>></a>\r\n</p>\r\n<p>This link will be valid for 2 days from this email\'s reception, then you must reapply if you do not change your password.</p>\r\n<p>Thank you.</p>\r\n</html>\r\n','email'
162
);
162
);
163
INSERT INTO letter(module,code,branchcode,name,is_html,title,content,message_transport_type)
164
VALUES ( 'reserves', 'HOLD_CHANGED', '', 'Canceled Hold Available for Different Patron', '0', 'Canceled Hold Available for Different Patron', 'The patron picking up <<biblio.title>> (<<items.barcode>>) has changed to <<borrowers.firstname>> <<borrowers.surname>> (<<borrowers.cardnumber>>).
165
166
Please update the hold information for this item.
167
168
Title: <<biblio.title>>
169
Author: <<biblio.author>>
170
Copy: <<items.copynumber>>
171
Pickup location: <<branches.branchname>>', 'email');
(-)a/koha-tmpl/intranet-tmpl/prog/en/modules/admin/preferences/circulation.pref (+10 lines)
Lines 497-502 Circulation: Link Here
497
                  no: "Don't allow"
497
                  no: "Don't allow"
498
            - "holds to expire automatically if they have not been picked by within the time period specified in ReservesMaxPickUpDelay"
498
            - "holds to expire automatically if they have not been picked by within the time period specified in ReservesMaxPickUpDelay"
499
        -
499
        -
500
            - pref: ExpireReservesAutoFill
501
              choices:
502
                  yes: "Do"
503
                  no: "Don't"
504
            - automatically fill the next hold using the item. If enabled, an email notification will be sent to either the email address defined in ExpireReservesAutoFillEmail, the item's holding library's email address, or the email address defined in KohaAdminEmailAddress in that order.
505
        -
506
            - Send email notification of the new hold filled with a canceled item to
507
            - pref: ExpireReservesAutoFillEmail
508
            - . If no address is defined here, the email will be sent to either the item's holding library or the email address defined in KohaAdminEmailAddress in that order.
509
        -
500
            - If using ExpireReservesMaxPickUpDelay, charge a borrower who allows his or her waiting hold to expire a fee of
510
            - If using ExpireReservesMaxPickUpDelay, charge a borrower who allows his or her waiting hold to expire a fee of
501
            - pref: ExpireReservesMaxPickUpDelayCharge
511
            - pref: ExpireReservesMaxPickUpDelayCharge
502
              class: currency
512
              class: currency
(-)a/t/db_dependent/Holds/RevertWaitingStatus.t (-1 / +1 lines)
Lines 81-87 foreach my $borrowernumber (@borrowernumbers) { Link Here
81
    );
81
    );
82
}
82
}
83
83
84
ModReserveAffect( $itemnumber, $borrowernumbers[0] );
84
ModReserveAffect( { itemnumber => $itemnumber, borrowernumber => $borrowernumbers[0] } );
85
C4::Circulation::AddIssue( GetMember( borrowernumber => $borrowernumbers[1] ),
85
C4::Circulation::AddIssue( GetMember( borrowernumber => $borrowernumbers[1] ),
86
    $item_barcode, my $datedue, my $cancelreserve = 'revert' );
86
    $item_barcode, my $datedue, my $cancelreserve = 'revert' );
87
87
(-)a/t/db_dependent/Reserves.t (-8 / +7 lines)
Lines 239-245 AddReserve('FPL', $requesters{'FPL'}, $bibnum2, Link Here
239
AddReserve('CPL',  $requesters{'CPL'}, $bibnum2,
239
AddReserve('CPL',  $requesters{'CPL'}, $bibnum2,
240
           $bibitems,  3, $resdate, $expdate, $notes,
240
           $bibitems,  3, $resdate, $expdate, $notes,
241
           $title,      $checkitem, $found);
241
           $title,      $checkitem, $found);
242
ModReserveAffect($itemnum_cpl, $requesters{'RPL'}, 0);
242
ModReserveAffect( { itemnumber => $itemnum_cpl, borrowernumber => $requesters{'RPL'}, is_transfer => 0 } );
243
243
244
# Now it should have different priorities.
244
# Now it should have different priorities.
245
my $title_reserves = GetReservesFromBiblionumber({biblionumber => $bibnum2});
245
my $title_reserves = GetReservesFromBiblionumber({biblionumber => $bibnum2});
Lines 359-370 is(exists $messages->{ResFound}?1:0, 1, 'AddReturn considers future reserve with Link Here
359
359
360
# test marking a hold as captured
360
# test marking a hold as captured
361
my $hold_notice_count = count_hold_print_messages();
361
my $hold_notice_count = count_hold_print_messages();
362
ModReserveAffect($itemnumber, $requesters{'CPL'}, 0);
362
ModReserveAffect( { itemnumber => $itemnumber, borrowernumber => $requesters{'CPL'}, is_transfer => 0 } );
363
my $new_count = count_hold_print_messages();
363
my $new_count = count_hold_print_messages();
364
is($new_count, $hold_notice_count + 1, 'patron notified when item set to waiting');
364
is($new_count, $hold_notice_count + 1, 'patron notified when item set to waiting');
365
365
366
# test that duplicate notices aren't generated
366
# test that duplicate notices aren't generated
367
ModReserveAffect($itemnumber, $requesters{'CPL'}, 0);
367
ModReserveAffect( { itemnumber => $itemnumber, borrowernumber => $requesters{'CPL'}, is_transfer => 0 } );
368
$new_count = count_hold_print_messages();
368
$new_count = count_hold_print_messages();
369
is($new_count, $hold_notice_count + 1, 'patron not notified a second time (bug 11445)');
369
is($new_count, $hold_notice_count + 1, 'patron not notified a second time (bug 11445)');
370
370
Lines 400-406 AddReserve('CPL', $requesters{'CPL'}, $bibnum, Link Here
400
@results= GetReservesFromItemnumber($itemnumber);
400
@results= GetReservesFromItemnumber($itemnumber);
401
is(defined $results[3]?1:0, 0, 'GetReservesFromItemnumber does not return a future item level hold');
401
is(defined $results[3]?1:0, 0, 'GetReservesFromItemnumber does not return a future item level hold');
402
# 9788c: GetReservesFromItemnumber returns future wait (confirmed future hold)
402
# 9788c: GetReservesFromItemnumber returns future wait (confirmed future hold)
403
ModReserveAffect( $itemnumber,  $requesters{'CPL'} , 0); #confirm hold
403
ModReserveAffect( { itemnumber => $itemnumber, borrowernumber => $requesters{'CPL'}, is_transfer => 0 } ); #confirm hold
404
@results= GetReservesFromItemnumber($itemnumber);
404
@results= GetReservesFromItemnumber($itemnumber);
405
is(defined $results[3]?1:0, 1, 'GetReservesFromItemnumber returns a future wait (confirmed future hold)');
405
is(defined $results[3]?1:0, 1, 'GetReservesFromItemnumber returns a future wait (confirmed future hold)');
406
# End of tests for bug 9788
406
# End of tests for bug 9788
Lines 425-431 AddReserve('CPL', $requesters{'CPL'}, $bibnum, Link Here
425
           $title,      $itemnumber, $found);
425
           $title,      $itemnumber, $found);
426
$p = C4::Reserves::CalculatePriority($bibnum);
426
$p = C4::Reserves::CalculatePriority($bibnum);
427
is($p, 2, 'CalculatePriority should now return priority 2');
427
is($p, 2, 'CalculatePriority should now return priority 2');
428
ModReserveAffect( $itemnumber,  $requesters{'CPL'} , 0);
428
ModReserveAffect( { itemnumber => $itemnumber, borrowernumber => $requesters{'CPL'}, is_transfer => 0 } );
429
$p = C4::Reserves::CalculatePriority($bibnum);
429
$p = C4::Reserves::CalculatePriority($bibnum);
430
is($p, 1, 'CalculatePriority should now return priority 1');
430
is($p, 1, 'CalculatePriority should now return priority 1');
431
#add another biblio hold, no resdate
431
#add another biblio hold, no resdate
Lines 483-489 is($cancancel, 1, 'Can user cancel its own reserve'); Link Here
483
$cancancel = CanReserveBeCanceledFromOpac($canres->{reserve_id}, $requesters{'FPL'});
483
$cancancel = CanReserveBeCanceledFromOpac($canres->{reserve_id}, $requesters{'FPL'});
484
is($cancancel, 0, 'Other user cant cancel reserve');
484
is($cancancel, 0, 'Other user cant cancel reserve');
485
485
486
ModReserveAffect($itemnumber, $requesters{'CPL'}, 1);
486
ModReserveAffect( { itemnumber => $itemnumber, borrowernumber => $requesters{'CPL'}, is_transfer => 1 } );
487
$cancancel = CanReserveBeCanceledFromOpac($canres->{reserve_id}, $requesters{'CPL'});
487
$cancancel = CanReserveBeCanceledFromOpac($canres->{reserve_id}, $requesters{'CPL'});
488
is($cancancel, 0, 'Reserve in transfer status cant be canceled');
488
is($cancancel, 0, 'Reserve in transfer status cant be canceled');
489
489
Lines 493-499 AddReserve('CPL', $requesters{'CPL'}, $item_bibnum, Link Here
493
           $title,      $checkitem, '');
493
           $title,      $checkitem, '');
494
(undef, $canres, undef) = CheckReserves($itemnumber);
494
(undef, $canres, undef) = CheckReserves($itemnumber);
495
495
496
ModReserveAffect($itemnumber, $requesters{'CPL'}, 0);
496
ModReserveAffect( { itemnumber => $itemnumber, borrowernumber => $requesters{'CPL'}, is_transfer => 0 } );
497
$cancancel = CanReserveBeCanceledFromOpac($canres->{reserve_id}, $requesters{'CPL'});
497
$cancancel = CanReserveBeCanceledFromOpac($canres->{reserve_id}, $requesters{'CPL'});
498
is($cancancel, 0, 'Reserve in waiting status cant be canceled');
498
is($cancancel, 0, 'Reserve in waiting status cant be canceled');
499
499
500
- 

Return to bug 14364