Bugzilla – Attachment 10874 Details for
Bug 3701
If the ReturnToShelvingCart syspref is on, and something needs to go in transit, the shelving cart setting is overriding the transit.
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
BugFix - ReturnToShelvingCart
BugFix---ReturnToShelvingCart.patch (text/plain), 2.80 KB, created by
Jonathan Druart
on 2012-07-16 14:43:34 UTC
(
hide
)
Description:
BugFix - ReturnToShelvingCart
Filename:
MIME Type:
Creator:
Jonathan Druart
Created:
2012-07-16 14:43:34 UTC
Size:
2.80 KB
patch
obsolete
>From 88165a3b9894da48a2612ce7d17ba517a0fdc18f Mon Sep 17 00:00:00 2001 >From: Kyle M Hall <kyle.m.hall@gmail.com> >Date: Thu, 8 Oct 2009 12:13:13 +0000 >Subject: [PATCH] BugFix - ReturnToShelvingCart > >If the ReturnToShelvingCart syspref is on, and something needs to go in transit, >the shelving cart setting is overriding the transit. > >What seems to be happening is this: > * Item is checked in, and flagged as needing to go in transit from A to B. > * Item is immediately flagged as shelving cart, though. Current display says both shelving cart and in transit. > * After the cart-to-shelf script runs, item comes out of transit and > shows as being available at the destination library, although it hasn't > arrived yet and no one has manually checked it in. > >http://bugs.koha-community.org/show_bug.cgi?id=3701 > >Signed-off-by: Jonathan Druart <jonathan.druart@biblibre.com> >--- > C4/Items.pm | 9 +++++++-- > circ/returns.pl | 12 ++++++------ > 2 files changed, 13 insertions(+), 8 deletions(-) > >diff --git a/C4/Items.pm b/C4/Items.pm >index 2afe537..f041d8c 100644 >--- a/C4/Items.pm >+++ b/C4/Items.pm >@@ -190,8 +190,10 @@ sub CartToShelf { > } > > my $item = GetItem($itemnumber); >- $item->{location} = $item->{permanent_location}; >- ModItem($item, undef, $itemnumber); >+ if ( $item->{location} eq 'CART' ) { >+ $item->{location} = $item->{permanent_location}; >+ ModItem($item, undef, $itemnumber); >+ } > } > > =head2 AddItemFromMarc >@@ -542,6 +544,9 @@ sub ModItemTransfer { > > my $dbh = C4::Context->dbh; > >+ # Remove the 'shelving cart' location status if it is being used. >+ CartToShelf( $itemnumber ) if ( C4::Context->preference("ReturnToShelvingCart") ); >+ > #new entry in branchtransfers.... > my $sth = $dbh->prepare( > "INSERT INTO branchtransfers (itemnumber, frombranch, datesent, tobranch) >diff --git a/circ/returns.pl b/circ/returns.pl >index 38e9887..4b9986f 100755 >--- a/circ/returns.pl >+++ b/circ/returns.pl >@@ -212,12 +212,6 @@ if ($barcode) { > } > } > >- if ( C4::Context->preference("ReturnToShelvingCart") ) { >- my $item = GetItem( $itemnumber ); >- $item->{'location'} = 'CART'; >- ModItem( $item, $item->{'biblionumber'}, $item->{'itemnumber'} ); >- } >- > # > # save the return > # >@@ -226,6 +220,12 @@ if ($barcode) { > my $homeorholdingbranchreturn = C4::Context->preference('HomeOrHoldingBranchReturn'); > $homeorholdingbranchreturn ||= 'homebranch'; > >+ if ( C4::Context->preference("ReturnToShelvingCart") && !$messages->{'WasTransfered'} ) { >+ my $item = GetItem( $itemnumber ); >+ $item->{'location'} = 'CART'; >+ ModItem( $item, $item->{'biblionumber'}, $item->{'itemnumber'} ); >+ } >+ > # get biblio description > my $biblio = GetBiblioFromItemNumber($itemnumber); > # fix up item type for display >-- >1.7.7.3
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 3701
:
1524
|
10026
|
10871
|
10872
|
10873
|
10874
|
10908
|
11093