Bugzilla – Attachment 163206 Details for
Bug 35944
Bookings is not taken into account in CanBookBeRenewed
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Bug 35944: (QA follow-up) Tidy
Bug-35944-QA-follow-up-Tidy.patch (text/plain), 3.36 KB, created by
Nick Clemens (kidclamp)
on 2024-03-15 11:40:38 UTC
(
hide
)
Description:
Bug 35944: (QA follow-up) Tidy
Filename:
MIME Type:
Creator:
Nick Clemens (kidclamp)
Created:
2024-03-15 11:40:38 UTC
Size:
3.36 KB
patch
obsolete
>From f0fa5ee05f40787fdc9bd5319202047f6656e8f0 Mon Sep 17 00:00:00 2001 >From: Nick Clemens <nick@bywatersolutions.com> >Date: Fri, 15 Mar 2024 11:37:54 +0000 >Subject: [PATCH] Bug 35944: (QA follow-up) Tidy > >--- > C4/Circulation.pm | 2 +- > C4/SIP/ILS/Transaction/Renew.pm | 12 ++++++------ > t/db_dependent/Circulation.t | 4 ++-- > 3 files changed, 9 insertions(+), 9 deletions(-) > >diff --git a/C4/Circulation.pm b/C4/Circulation.pm >index 5b90cf0eccd..0947b513470 100644 >--- a/C4/Circulation.pm >+++ b/C4/Circulation.pm >@@ -3121,7 +3121,7 @@ sub CanBookBeRenewed { > } > > # CHECK FOR BOOKINGS >- if( $item->bookings->count ){ >+ if ( $item->bookings->count ) { > my $startdate = > ( C4::Context->preference('RenewalPeriodBase') eq 'date_due' ) > ? dt_from_string( $issue->date_due, 'sql' ) >diff --git a/C4/SIP/ILS/Transaction/Renew.pm b/C4/SIP/ILS/Transaction/Renew.pm >index 2f6dc61b31a..939f4abd114 100644 >--- a/C4/SIP/ILS/Transaction/Renew.pm >+++ b/C4/SIP/ILS/Transaction/Renew.pm >@@ -51,12 +51,12 @@ sub do_renew_for { > $self->{due} = $self->duedatefromissue($issue, $self->{item}->{itemnumber}); > $self->renewal_ok(1); > } else { >- $renewerror=~s/on_reserve/Item unavailable due to outstanding holds/; >- $renewerror=~s/booked/Item is booked for another borrower/; >- $renewerror=~s/too_many/Item has reached maximum renewals/; >- $renewerror=~s/too_unseen/Item has reached maximum consecutive renewals without being seen/; >- $renewerror=~s/item_denied_renewal/Item renewal is not allowed/; >- $renewerror=~s/item_issued_to_other_patron/Item already issued to other borrower/; >+ $renewerror =~ s/on_reserve/Item unavailable due to outstanding holds/; >+ $renewerror =~ s/booked/Item is booked for another borrower/; >+ $renewerror =~ s/too_many/Item has reached maximum renewals/; >+ $renewerror =~ s/too_unseen/Item has reached maximum consecutive renewals without being seen/; >+ $renewerror =~ s/item_denied_renewal/Item renewal is not allowed/; >+ $renewerror =~ s/item_issued_to_other_patron/Item already issued to other borrower/; > $self->screen_msg($renewerror); > $self->renewal_ok(0); > } >diff --git a/t/db_dependent/Circulation.t b/t/db_dependent/Circulation.t >index d1581350957..f35af9d754e 100755 >--- a/t/db_dependent/Circulation.t >+++ b/t/db_dependent/Circulation.t >@@ -1739,7 +1739,7 @@ subtest "CanBookBeRenewed | bookings" => sub { > my $schema = Koha::Database->schema; > $schema->storage->txn_begin; > >- t::lib::Mocks::mock_preference('RenewalPeriodBase', 'date_due'); >+ t::lib::Mocks::mock_preference( 'RenewalPeriodBase', 'date_due' ); > > my $renewing_patron = $builder->build_object( { class => 'Koha::Patrons' } ); > my $booked_patron = $builder->build_object( { class => 'Koha::Patrons' } ); >@@ -1763,7 +1763,7 @@ subtest "CanBookBeRenewed | bookings" => sub { > > # Proposed renewal would encroach on booking > my ( $renewok, $error ) = CanBookBeRenewed( $renewing_patron, $issue, 0 ); >- is( $renewok, 0, "Renewal not allowed as it would mean the item was not returned before the next booking" ); >+ is( $renewok, 0, "Renewal not allowed as it would mean the item was not returned before the next booking" ); > is( $error, 'booked', "Error is 'booked'" ); > > $schema->storage->txn_rollback; >-- >2.30.2
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Diff
View Attachment As Raw
Actions:
View
|
Diff
|
Splinter Review
Attachments on
bug 35944
:
162407
|
162408
|
162417
|
162418
|
162423
|
162424
|
163201
|
163202
|
163203
|
163204
|
163205
|
163206
|
163208
|
163209
|
163210
|
163211
|
163212
|
163213