From 29ed0b7eb6968d329e30c193f64d34e65cf7c093 Mon Sep 17 00:00:00 2001
From: Nick Clemens <nick@bywatersolutions.com>
Date: Thu, 7 Jun 2018 14:03:11 +0000
Subject: [PATCH] Bug 20893: batchRebuildItemsTables.pl has incorrect parameter

To test:
1 - run batchRebuildItemsTables.pl with a valid biblionumber
   perl /usr/share/koha/bin/batchRebuildItemsTables.pl --where biblio.biblionumber=38483  -c
2 - Note it says 'undefined biblionumber
3 - Apply patch
4 - Do it again
5 - It works!

Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: Julian Maurice <julian.maurice@biblibre.com>
---
 misc/batchRebuildItemsTables.pl | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/misc/batchRebuildItemsTables.pl b/misc/batchRebuildItemsTables.pl
index e0499c0cab..0e611dd701 100755
--- a/misc/batchRebuildItemsTables.pl
+++ b/misc/batchRebuildItemsTables.pl
@@ -69,7 +69,7 @@ while ( my ( $biblionumber, $biblioitemnumber, $frameworkcode ) = $sth->fetchrow
     $count++;
     warn $count unless $count % 1000;
     my $record = GetMarcBiblio({
-        biblionummber => $biblionumber,
+        biblionumber => $biblionumber,
         embed_items   => 1 });
     unless ($record) { push @errors, "bad record biblionumber $biblionumber"; next; }
 
-- 
2.17.1