Bugzilla – Attachment 64896 Details for
Bug 18277
Koha::Biblio - Remove GetBiblionumberFromItemnumber
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Bug 18277: [QA Follow-up] Additional polishing
Bug-18277-QA-Follow-up-Additional-polishing.patch (text/plain), 2.22 KB, created by
Marcel de Rooy
on 2017-07-07 08:35:54 UTC
(
hide
)
Description:
Bug 18277: [QA Follow-up] Additional polishing
Filename:
MIME Type:
Creator:
Marcel de Rooy
Created:
2017-07-07 08:35:54 UTC
Size:
2.22 KB
patch
obsolete
>From 9b2cf9fedd1001f6822ed9bc2c861cb6b863e382 Mon Sep 17 00:00:00 2001 >From: Marcel de Rooy <m.de.rooy@rijksmuseum.nl> >Date: Fri, 7 Jul 2017 09:55:54 +0200 >Subject: [PATCH] Bug 18277: [QA Follow-up] Additional polishing >Content-Type: text/plain; charset=utf-8 > >Fix POD error in Biblio.pm, as reported by qa tools: > Apparent command =cut not preceded by blank line > >Resolve crash in t/db_dependent/Items/DelItem.t: > Can't call method "biblio" on an undefined value at C4/Items.pm line 669. > >Add find test in tools/batchMod.pl. Increase readability of map statement. > >Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl> >--- > C4/Biblio.pm | 1 + > C4/Items.pm | 2 +- > tools/batchMod.pl | 7 ++++++- > 3 files changed, 8 insertions(+), 2 deletions(-) > >diff --git a/C4/Biblio.pm b/C4/Biblio.pm >index 284b4a2..953964c 100644 >--- a/C4/Biblio.pm >+++ b/C4/Biblio.pm >@@ -1442,6 +1442,7 @@ sub GetMarcPrice { > =head2 MungeMarcPrice > > Return the best guess at what the actual price is from a price field. >+ > =cut > > sub MungeMarcPrice { >diff --git a/C4/Items.pm b/C4/Items.pm >index 2e5fbc7..036b4f7 100644 >--- a/C4/Items.pm >+++ b/C4/Items.pm >@@ -666,7 +666,7 @@ sub DelItem { > > unless ($biblionumber) { > my $item = Koha::Items->find( $itemnumber ); >- $biblionumber = $item->biblio->biblionumber; >+ $biblionumber = $item ? $item->biblio->biblionumber : undef; > } > > # If there is no biblionumber for the given itemnumber, there is nothing to delete >diff --git a/tools/batchMod.pl b/tools/batchMod.pl >index 7c87c7f..a1407eb 100755 >--- a/tools/batchMod.pl >+++ b/tools/batchMod.pl >@@ -125,7 +125,12 @@ if ($op eq "action") { > my @simple_items_display = map { > my $itemnumber = $_; > my $item = Koha::Items->find($itemnumber); >- { itemnumber => $itemnumber, barcode => ($item->barcode || q||), biblionumber => $item->biblio->biblionumber }} @itemnumbers; >+ { >+ itemnumber => $itemnumber, >+ barcode => $item ? ( $item->barcode // q{} ) : q{}, >+ biblionumber => $item ? $item->biblio->biblionumber : q{}, >+ }; >+ } @itemnumbers; > $template->param("simple_items_display" => \@simple_items_display); > } > >-- >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 18277
:
61127
|
61128
|
61129
|
61130
|
63301
|
63302
|
63303
|
63304
|
64819
|
64820
|
64821
|
64822
|
64892
|
64893
|
64894
|
64895
| 64896