Bugzilla – Attachment 171248 Details for
Bug 37651
biblio->current_holds and item->current_holds do not respect ConfirmFutureHolds
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Bug 37651: Add ConfirmFutureHolds to biblio->current_holds
Bug-37651-Add-ConfirmFutureHolds-to-biblio-current.patch (text/plain), 1.61 KB, created by
Marcel de Rooy
on 2024-09-10 12:20:43 UTC
(
hide
)
Description:
Bug 37651: Add ConfirmFutureHolds to biblio->current_holds
Filename:
MIME Type:
Creator:
Marcel de Rooy
Created:
2024-09-10 12:20:43 UTC
Size:
1.61 KB
patch
obsolete
>From c5aae0eb5196e165c3f4f46623d75b97ed26405b Mon Sep 17 00:00:00 2001 >From: Marcel de Rooy <m.de.rooy@rijksmuseum.nl> >Date: Thu, 15 Aug 2024 16:09:26 +0200 >Subject: [PATCH] Bug 37651: Add ConfirmFutureHolds to biblio->current_holds >Content-Type: text/plain; charset=utf-8 > >Test plan: >Easy way is to run the unit tests in the next patch. >One call of biblio->current_holds is hidden in acqui/parcel.pl. The >table column "Item holds / Total holds" should now make a difference >for an order referring to an item having future holds. > >Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl> >--- > Koha/Biblio.pm | 11 ++++++----- > 1 file changed, 6 insertions(+), 5 deletions(-) > >diff --git a/Koha/Biblio.pm b/Koha/Biblio.pm >index 8029be8e43..993f35c314 100644 >--- a/Koha/Biblio.pm >+++ b/Koha/Biblio.pm >@@ -704,18 +704,19 @@ sub holds { > > =head3 current_holds > >-my $holds = $biblio->current_holds >+ my $holds = $biblio->current_holds > >-Return the holds placed on this bibliographic record. >-It does not include future holds. >+ Return the holds placed on this bibliographic record. >+ Respects the lookahead days in ConfirmFutureHolds pref. > > =cut > > sub current_holds { > my ($self) = @_; >- my $dtf = Koha::Database->new->schema->storage->datetime_parser; >+ my $dtf = Koha::Database->new->schema->storage->datetime_parser; >+ my $dt = dt_from_string()->add( days => C4::Context->preference('ConfirmFutureHolds') || 0 ); > return $self->holds( >- { reservedate => { '<=' => $dtf->format_date(dt_from_string) } } ); >+ { reservedate => { '<=' => $dtf->format_date($dt) } } ); > } > > =head3 biblioitem >-- >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 37651
:
171247
| 171248 |
171249
|
171250