Bugzilla – Attachment 117820 Details for
Bug 27879
Koha::Hold::is_at_destination function should be removed
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Bug 27879: Don't allow set holds to be waiting if not at pickup location
Bug-27879-Dont-allow-set-holds-to-be-waiting-if-no.patch (text/plain), 1.47 KB, created by
Joonas Kylmälä
on 2021-03-05 11:37:26 UTC
(
hide
)
Description:
Bug 27879: Don't allow set holds to be waiting if not at pickup location
Filename:
MIME Type:
Creator:
Joonas Kylmälä
Created:
2021-03-05 11:37:26 UTC
Size:
1.47 KB
patch
obsolete
>From 2581fc0afd011900aa97845664786e577680186d Mon Sep 17 00:00:00 2001 >From: =?UTF-8?q?Joonas=20Kylm=C3=A4l=C3=A4?= <joonas.kylmala@helsinki.fi> >Date: Fri, 5 Mar 2021 13:08:03 +0200 >Subject: [PATCH] Bug 27879: Don't allow set holds to be waiting if not at > pickup location > >If the item is not at pickup location when setting the hold to be >waiting it would be clearly error because then the status should be in >transit instead. >--- > Koha/Exceptions/Hold.pm | 4 ++++ > Koha/Hold.pm | 4 ++++ > 2 files changed, 8 insertions(+) > >diff --git a/Koha/Exceptions/Hold.pm b/Koha/Exceptions/Hold.pm >index 65d7b9d9a9..4ba3beedc3 100644 >--- a/Koha/Exceptions/Hold.pm >+++ b/Koha/Exceptions/Hold.pm >@@ -32,6 +32,10 @@ use Exception::Class ( > isa => 'Koha::Exceptions::Hold', > description => 'The supplied pickup location is not valid' > } >+ 'Koha::Exceptions::Hold::NotAtPickupLocation' => { >+ isa => 'Koha::Exceptions::Hold', >+ description => "Hold can't be set waiting for an item that is not at pickup location" >+ } > ); > > sub full_message { >diff --git a/Koha/Hold.pm b/Koha/Hold.pm >index 892fb20cd5..3d14f2b2a6 100644 >--- a/Koha/Hold.pm >+++ b/Koha/Hold.pm >@@ -178,6 +178,10 @@ sub set_transfer { > sub set_waiting { > my ( $self, $desk_id ) = @_; > >+ if ($self->item->holdingbranch ne $self->branchcode) { >+ Koha::Exceptions::Hold::NotAtPickupLocation->throw; >+ } >+ > $self->priority(0); > > my $today = dt_from_string(); >-- >2.17.1
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 27879
: 117820 |
117821