Bugzilla – Attachment 117508 Details for
Bug 25690
SIP should not allow to check out an item in transfer because of a hold to another patron
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Bug 25690: SIP2: Don't allow checking out attached hold that is being transferred
Bug-25690-SIP2-Dont-allow-checking-out-attached-ho.patch (text/plain), 2.08 KB, created by
Joonas Kylmälä
on 2021-03-02 13:00:25 UTC
(
hide
)
Description:
Bug 25690: SIP2: Don't allow checking out attached hold that is being transferred
Filename:
MIME Type:
Creator:
Joonas Kylmälä
Created:
2021-03-02 13:00:25 UTC
Size:
2.08 KB
patch
obsolete
>From 30a0a02b940eb5871a2d0a99cf3970e4127a9bb4 Mon Sep 17 00:00:00 2001 >From: =?UTF-8?q?Joonas=20Kylm=C3=A4l=C3=A4?= <joonas.kylmala@helsinki.fi> >Date: Wed, 17 Feb 2021 14:28:03 +0200 >Subject: [PATCH] Bug 25690: SIP2: Don't allow checking out attached hold that > is being transferred > >Items that are attached to a hold and being transferred (found = T) is >final decision and you cannot checkout those to other patrons. > >To test (if you have applied all patches from bug 25690): > 1) prove t/db_dependent/SIP/Transaction.t => passes > >To test (if you don't have all patches): > 1) Create hold and set pickup library to something else where the > item is at > 2) Return the item and it should confirm the hold and start transfer > 3) Apply this patch > 4) Try to checkout this item now to some other patron via SIP2 and > notice it doesn't allow it > 5) Revert this patch > 6) Notice you can now checkout somebody else's hold that is being transferred! > >Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com> >--- > C4/SIP/ILS/Item.pm | 4 ++-- > 1 file changed, 2 insertions(+), 2 deletions(-) > >diff --git a/C4/SIP/ILS/Item.pm b/C4/SIP/ILS/Item.pm >index e787ed1aee..4a6c09826b 100644 >--- a/C4/SIP/ILS/Item.pm >+++ b/C4/SIP/ILS/Item.pm >@@ -108,8 +108,8 @@ sub new { > my $biblio = Koha::Biblios->find( $self->{biblionumber} ); > my $holds = $biblio->current_holds->unblessed; > $self->{hold_queue} = $holds; >- $self->{hold_attached} = [( grep { defined $_->{found} and ( $_->{found} eq 'W' or $_->{found} eq 'P' ) } @{$self->{hold_queue}} )]; >- $self->{pending_queue} = [( grep {(! defined $_->{found}) or ( $_->{found} ne 'W' and $_->{found} ne 'P' ) } @{$self->{hold_queue}} )]; >+ $self->{hold_attached} = [( grep { defined $_->{found} and ( $_->{found} eq 'W' or $_->{found} eq 'P' or $_->{found} eq 'T' ) } @{$self->{hold_queue}} )]; >+ $self->{pending_queue} = [( grep {(! defined $_->{found}) or ( $_->{found} ne 'W' and $_->{found} ne 'P' and $_->{found} ne 'T' ) } @{$self->{hold_queue}} )]; > $self->{title} = $biblio->title; > $self->{author} = $biblio->author; > bless $self, $type; >-- >2.11.0
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 25690
:
116948
|
116949
|
116950
|
116951
|
117000
|
117001
|
117002
|
117003
|
117004
|
117062
|
117063
|
117064
|
117065
|
117066
|
117067
|
117374
|
117507
|
117508
|
117509
|
117510
|
117511
|
117512
|
117513
|
117519
|
117520
|
117521
|
117522
|
117523
|
117524
|
117525
|
117674