Bug 17420 - record export fails when itemtype on biblio - followup
authorFridolin Somers <fridolin.somers@biblibre.com>
Mon, 7 Nov 2016 15:07:01 +0000 (16:07 +0100)
committerJulian Maurice <julian.maurice@biblibre.com>
Wed, 30 Nov 2016 12:20:17 +0000 (13:20 +0100)
Same as previous patch for misc/export_records.pl.

Test plan :
- Use syspref item-level_itypes = biblio record
- Run misc/export_records.pl
=> Without patch you get an error : DBD::mysql::st execute failed: Unknown column 'biblioitems.itemtype' in 'where clause' ...
=> With patch you get a correct export file

Signed-off-by: Bernardo Gonzalez Kriegel <bgkriegel@gmail.com>
Export Ok, no errors.

Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Signed-off-by: Julian Maurice <julian.maurice@biblibre.com>

misc/export_records.pl

index 6566c40..4cd6c9e 100755 (executable)
@@ -144,7 +144,7 @@ if ( $record_type eq 'bibs' ) {
                 ?
                   C4::Context->preference('item-level_itypes')
                     ? ( 'items.itype' => $itemtype )
-                    : ( 'biblioitems.itemtype' => $itemtype )
+                    : ( 'me.itemtype' => $itemtype )
                 : ()
             ),