Bug 20465

Summary: misc/export_records.pl add possibility to export by branchcode
Product: Koha Reporter: Giuseppe Passanisi <giuseppepassanisi93>
Component: Command-line UtilitiesAssignee: Giuseppe Passanisi <giuseppepassanisi93>
Status: Failed QA --- QA Contact: Testopia <testopia>
Severity: enhancement    
Priority: P5 - low CC: giuseppepassanisi93, katrin.fischer, mtj, mtompset, robin
Version: Main   
Hardware: All   
OS: All   
Change sponsored?: --- Patch complexity: Small patch
Documentation contact: Documentation submission:
Text to go in the release notes:
Added support to export biblio by branchcode
Version(s) released in:
Attachments: export_records.pl enchanted with branchcode
Bug 20465: misc/export_records.pl add possibility to export by branchcode

Description Giuseppe Passanisi 2018-03-23 09:16:09 UTC
I was searching a way to export all books holded by a library, in a multi-libraries/single-instance context.
I realized a patch to support that.
Comment 1 Giuseppe Passanisi 2018-03-23 09:27:33 UTC
Created attachment 73164 [details] [review]
export_records.pl enchanted with branchcode

Tested with:
libri-koha@ec101041:~$ /usr/share/koha/bin/export_records.pl --holdingbranch=MI-ISL --format=xml --filename=test0003.xml
Comment 2 Mark Tompsett 2018-03-27 00:14:58 UTC
Created attachment 73298 [details] [review]
Bug 20465: misc/export_records.pl add possibility to export by branchcode

There was no way to export all books held by a library,
in a multi-libraries/single-instance context.
This patch supports that.

Tested with:
libri-koha@ec101041:~$ /usr/share/koha/bin/export_records.pl
--holdingbranch=MI-ISL --format=xml --filename=test0003.xml

NOTE: reset_all on kohadevbox has CPL, MPL, and FPL. Comparing
      barcodes uniquely is helpful to confirm. :)

Signed-off-by: Mark Tompsett <mtompset@hotmail.com>
Comment 3 Mark Tompsett 2018-03-27 00:16:29 UTC
Comment on attachment 73164 [details] [review]
export_records.pl enchanted with branchcode

This patch didn't apply nicely. Made the same changes into a version which is easily git-bz'able, and signed off the author's work.
Comment 4 Katrin Fischer 2018-04-22 11:08:23 UTC
I am a little concerned how the export tool in the GUI and the export script seem to drift apart. But not sure how far apart they are already.

In the GUI you can already select multiple branches (homebranch) for export, but can't select records by holdingbranch. 

Could you take a look into making your export tool work like the GUI for selecting records by homebranch? And then we could deal with the holdingbranch separately. If you need help, please let us know!


For the help:

Export biblio owned by a specific library

Libraries can't own records in Koha - so I think this would be a bit beter:

Export bibliographic records with items owend/held by a specific library.