Bugzilla – Attachment 35953 Details for
Bug 13540
Item's permanent_location is set to CART|PROC if an Item is edited when it's location is CART|PROC.
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Bug 13540 - Item's permanent_location is set to CART|PROC when... - Followup 1
Bug-13540---Items-permanentlocation-is-set-to-CART.patch (text/plain), 1.98 KB, created by
Olli-Antti Kivilahti
on 2015-02-16 16:00:56 UTC
(
hide
)
Description:
Bug 13540 - Item's permanent_location is set to CART|PROC when... - Followup 1
Filename:
MIME Type:
Creator:
Olli-Antti Kivilahti
Created:
2015-02-16 16:00:56 UTC
Size:
1.98 KB
patch
obsolete
>From 7070e5f82fa627efc9c18f45e02cb07376683846 Mon Sep 17 00:00:00 2001 >From: Olli-Antti Kivilahti <olli-antti.kivilahti@jns.fi> >Date: Mon, 16 Feb 2015 17:50:10 +0200 >Subject: [PATCH] Bug 13540 - Item's permanent_location is set to CART|PROC > when... - Followup 1 > >To fix the failing test >"ReturnToShelvingCart: Adding a new Item with location also sets the permanent_location." > >When adding an Item, set the permanent_location to location if present. >This behaviour is consistent with ModItem where permanent_location is set to >location. >--- > C4/Items.pm | 1 + > t/db_dependent/Circulation.t | 2 +- > 2 files changed, 2 insertions(+), 1 deletion(-) > >diff --git a/C4/Items.pm b/C4/Items.pm >index 623b82e..edbc6d5 100644 >--- a/C4/Items.pm >+++ b/C4/Items.pm >@@ -2135,6 +2135,7 @@ sub _set_defaults_for_add { > my $item = shift; > $item->{dateaccessioned} ||= C4::Dates->new->output('iso'); > $item->{$_} ||= 0 for (qw( notforloan damaged itemlost withdrawn)); >+ $item->{permanent_location} = $item->{location} unless ($item->{permanent_location}); > } > > =head2 _koha_new_item >diff --git a/t/db_dependent/Circulation.t b/t/db_dependent/Circulation.t >index b09944a..54c23b8 100755 >--- a/t/db_dependent/Circulation.t >+++ b/t/db_dependent/Circulation.t >@@ -645,7 +645,7 @@ sub testReturnToShelvingCart { > $item->{biblionumber} > ); > my $addedItem = C4::Items::GetItem($addedItemnumber); >- ok($item->{permanent_location} eq $yetAnotherLocation && $item->{location} eq $yetAnotherLocation, "ReturnToShelvingCart: Adding a new Item with location also sets the permanent_location."); >+ ok($addedItem->{permanent_location} eq $yetAnotherLocation && $addedItem->{location} eq $yetAnotherLocation, "ReturnToShelvingCart: Adding a new Item with location also sets the permanent_location."); > > C4::Context->set_preference('ReturnToShelvingCart', $originalReturnToShelvingCart) unless $originalReturnToShelvingCart; #Set it to the original value > } >\ No newline at end of file >-- >1.7.9.5
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 13540
:
35038
|
35047
|
35055
|
35336
|
35337
|
35951
|
35952
| 35953 |
40183
|
40214
|
40878