Bugzilla – Attachment 113394 Details for
Bug 26987
No property notforloan for Koha::Serial::Item
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Bug 26987: (bug 23463 follow-up) Fix serial receipt if makePreviousSerialAvailable
Bug-26987-bug-23463-follow-up-Fix-serial-receipt-i.patch (text/plain), 1.61 KB, created by
Jonathan Druart
on 2020-11-10 13:13:43 UTC
(
hide
)
Description:
Bug 26987: (bug 23463 follow-up) Fix serial receipt if makePreviousSerialAvailable
Filename:
MIME Type:
Creator:
Jonathan Druart
Created:
2020-11-10 13:13:43 UTC
Size:
1.61 KB
patch
obsolete
>From c54bc341448a55a90b78e560e6af80f35faea6ca Mon Sep 17 00:00:00 2001 >From: Jonathan Druart <jonathan.druart@bugs.koha-community.org> >Date: Tue, 10 Nov 2020 14:11:10 +0100 >Subject: [PATCH] Bug 26987: (bug 23463 follow-up) Fix serial receipt if > makePreviousSerialAvailable > >$serialitem is not a Koha::Item there, we need to fetch the item before. > >Test plan: >Turn makePreviousSerialAvailable on >Create a subscription >Receive an serial item, mark it "arrived" >Without this patch Koha explodes with >No property notforloan for Koha::Serial::Item at /usr/share/perl5/Exception/Class/Base.pm line 88 >Koha::Object::set('Koha::Serial::Item=HASH(0x55dd67c75700)', 'HASH(0x55dd672cec30)') called at /kohadevbox/koha/serials/serials-edit.pl line 273 > >With this patch applied the notforloan and itype values are correctly >set for the new serial item. >--- > serials/serials-edit.pl | 3 ++- > 1 file changed, 2 insertions(+), 1 deletion(-) > >diff --git a/serials/serials-edit.pl b/serials/serials-edit.pl >index afe9110b46..ad0deb50a4 100755 >--- a/serials/serials-edit.pl >+++ b/serials/serials-edit.pl >@@ -267,7 +267,8 @@ if ( $op and $op eq 'serialchangestatus' ) { > my $subscriptioninfos = GetSubscription($subscriptionids[$i]); > > # Changing the status to "available" and the itemtype according to the previousitemtype db field >- $serialitem->set( >+ my $item = Koha::Items->find($itemnumber); >+ $item->set( > { > notforloan => 0, > itype => $subscriptioninfos->{'previousitemtype'} >-- >2.20.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 26987
:
113394
|
113397
|
113496