Bug 9019: Return item fields in ILS-DI GetRecords
authorJulian Maurice <julian.maurice@biblibre.com>
Wed, 7 Nov 2012 09:51:49 +0000 (10:51 +0100)
committerJared Camins-Esakov <jcamins@cpbibliography.com>
Tue, 11 Dec 2012 13:33:04 +0000 (08:33 -0500)
Signed-off-by: Srikanth Dhondi <srikanth@catalyst.net.nz>
Signed-off-by: Katrin Fischer <Katrin.Fischer.83@web.de>
1) Activate ILS-DI in system preferencs
2) Access http://.../cgi-bin/koha/ilsdi.pl to see documentation
3) Try http://.../cgi-bin/koha/ilsdi.pl?service=GetRecords&id=12+14
   with various valid biblionumbers for your system
4) Verify 952 is included in the <marcxml> and all other data displays
   correctly

All tests pass.

http://bugs.koha-community.org/show_bug.cgi?id=9010
Signed-off-by: Jared Camins-Esakov <jcamins@cpbibliography.com>
C4/ILSDI/Services.pm

index 5a62954..68cbdb3 100644 (file)
@@ -197,6 +197,12 @@ sub GetRecords {
             $biblioitem->{code} = "RecordNotFound";
         }
 
+        my $embed_items = 1;
+        my $record = GetMarcBiblio($biblionumber, $embed_items);
+        if ($record) {
+            $biblioitem->{marcxml} = $record->as_xml_record();
+        }
+
         # We don't want MARC to be displayed
         delete $biblioitem->{'marc'};