Bugzilla – Attachment 74564 Details for
Bug 19974
Marking an item as 'lost' will not actually modify the current item (cataloguing/additem.pl)
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Bug 19974: Marking an item as 'lost' in additem.pl will not modify the current item
Bug-19974-Marking-an-item-as-lost-in-additempl-wil.patch (text/plain), 2.66 KB, created by
Séverine Queune
on 2018-04-19 14:28:22 UTC
(
hide
)
Description:
Bug 19974: Marking an item as 'lost' in additem.pl will not modify the current item
Filename:
MIME Type:
Creator:
Séverine Queune
Created:
2018-04-19 14:28:22 UTC
Size:
2.66 KB
patch
obsolete
>From 7c945bfacc7c943e6ca97d18e89ce3730e01f883 Mon Sep 17 00:00:00 2001 >From: charles <charles@inlibro.com> >Date: Mon, 15 Jan 2018 16:20:10 -0500 >Subject: [PATCH] Bug 19974: Marking an item as 'lost' in additem.pl will not > modify the current item > > TEST PLAN: > > 1) Log in with your superlibrarian account > 2) Borrow any book > 3) Visit your Checkouts page, and click 'Show Checkouts' > 4) Click on the item's barcode to visit the item's page > 5) On the item's page, click the 'Edit' button, and choose 'Edit items' > 6) In the items table, click the 'Actions->Edit' button of the item you borrowed > 7) Mark that item as lost (it should be the first row of the form) and click the button 'Save changes' > 8) Visit your Checkouts page. The item should still be there, despite BZ12363 claiming it should've been automagically returned > 8.1) Your koha-log should also output a warning message: 'DBIx::Class::Storage::DBI::select_single(): Query returned more than one row...' > 8.2) If you visit the item's page, the modification had no effect. It should not be marked as lost. > 9) APPLY PATCH > 10) Start back from step 2), but this time, after marking the item as lost, the item's page should > reflect the change, and the item you borrowed should've been automatically returned to the library > >Signed-off-by: Jean-Manuel Broust <jean-manuel.broust@univ-lyon2.fr> > >Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl> >Amended: Using $item->{itemnumber} instead of new variable. >--- > cataloguing/additem.pl | 4 ++-- > 1 file changed, 2 insertions(+), 2 deletions(-) > >diff --git a/cataloguing/additem.pl b/cataloguing/additem.pl >index a6aa25c..bd394c3 100755 >--- a/cataloguing/additem.pl >+++ b/cataloguing/additem.pl >@@ -687,20 +687,20 @@ if ($op eq "additem") { > # check that the barcode don't exist already > my $addedolditem = TransformMarcToKoha($itemtosave); > my $exist_itemnumber = get_item_from_barcode($addedolditem->{'barcode'}); >+ my $item = GetItem( $itemnumber ); > if ($exist_itemnumber && $exist_itemnumber != $itemnumber) { > push @errors,"barcode_not_unique"; > } else { > ModItemFromMarc($itemtosave,$biblionumber,$itemnumber); > $itemnumber=""; > } >- my $item = GetItem( $itemnumber ); > my $olditemlost = $item->{'itemlost'}; > > my ($lost_tag,$lost_subfield) = GetMarcFromKohaField("items.itemlost",''); > > my $newitemlost = $itemtosave->subfield( $lost_tag, $lost_subfield ); > if (($olditemlost eq '0' or $olditemlost eq '' ) and $newitemlost ge '1'){ >- LostItem($itemnumber); >+ LostItem( $item->{itemnumber} ); > } > $nextop="additem"; > } elsif ($op eq "delinkitem"){ >-- >2.1.4
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 19974
:
70525
|
73162
|
73163
|
73531
|
74106
|
74167
|
74238
|
74542
|
74564
|
74565
|
74566
|
74591
|
74594
|
74595
|
74596