Bugzilla – Attachment 153663 Details for
Bug 34258
Cannot renew item via SIP2
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Bug 34258: pass an unblessed hash to AddIssue()
Bug-34258-pass-an-unblessed-hash-to-AddIssue.patch (text/plain), 2.04 KB, created by
Martin Renvoize (ashimema)
on 2023-07-19 14:21:42 UTC
(
hide
)
Description:
Bug 34258: pass an unblessed hash to AddIssue()
Filename:
MIME Type:
Creator:
Martin Renvoize (ashimema)
Created:
2023-07-19 14:21:42 UTC
Size:
2.04 KB
patch
obsolete
>From 379dd34686e06be91fae4dc2ac63f835b98e9b1d Mon Sep 17 00:00:00 2001 >From: Andreas Roussos <a.roussos@dataly.gr> >Date: Thu, 13 Jul 2023 16:01:47 +0000 >Subject: [PATCH] Bug 34258: pass an unblessed hash to AddIssue() > >In Koha 23.05, we lost the ability to renew an item via SIP2. > >The relevant commit is ddc2906b77 from Bug 31735, where the >file C4/SIP/ILS/Transaction/Renew.pm was modified to no longer >pass an unblessed $patron hash to C4::Circulation::AddIssue() > >This patch fixes that. > >Test plan: > >1) Using the SIP emulator, check out an item to a patron, then > try to renew it. Example commands for a KTD instance: > > $ misc/sip_cli_emulator.pl -a localhost -p 6001 -l CPL -su term1 -sp term1 -m checkout --patron koha --item 3999900000001 > $ misc/sip_cli_emulator.pl -a localhost -p 6001 -l CPL -su term1 -sp term1 -m renew --patron koha --item 3999900000001 > > Notice that the second command will fail! > >2) Apply this patch. > >3) Repeat the 2nd command -- this time the renewal should work. > >4) Run the SIP-related unit tests, they should all pass: > > $ prove t/db_dependent/SIP/ > t/db_dependent/SIP/ILS.t .......... ok > t/db_dependent/SIP/Message.t ...... ok > t/db_dependent/SIP/Patron.t ....... ok > t/db_dependent/SIP/SIPServer.t .... ok > t/db_dependent/SIP/Transaction.t .. ok > >Signed-off-by: Emily Lamancusa <emily.lamancusa@montgomerycountymd.gov> >Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com> >--- > C4/SIP/ILS/Transaction/Renew.pm | 2 +- > 1 file changed, 1 insertion(+), 1 deletion(-) > >diff --git a/C4/SIP/ILS/Transaction/Renew.pm b/C4/SIP/ILS/Transaction/Renew.pm >index f48bee4cfe..b3e3889655 100644 >--- a/C4/SIP/ILS/Transaction/Renew.pm >+++ b/C4/SIP/ILS/Transaction/Renew.pm >@@ -46,7 +46,7 @@ sub do_renew_for { > > } > if ($renewokay){ >- my $issue = AddIssue( $patron, $self->{item}->id, undef, 0 ); >+ my $issue = AddIssue( $patron->unblessed, $self->{item}->id, undef, 0 ); > $self->{due} = $self->duedatefromissue($issue, $self->{item}->{itemnumber}); > $self->renewal_ok(1); > } else { >-- >2.41.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 34258
:
153416
|
153417
|
153427
|
153428
| 153663 |
153664
|
153665