Bug 26414: Unable to export Withdrawn status using CSV profile
authorAlexis Ripetti <alexis.ripetti@inLibro.com>
Fri, 11 Sep 2020 20:11:55 +0000 (16:11 -0400)
committerJonathan Druart <jonathan.druart@bugs.koha-community.org>
Mon, 28 Sep 2020 13:07:39 +0000 (15:07 +0200)
commitb048d155bf18d794d2ac97eaafc6f0fc00996018
treeb5e877a7db1cb40e80903c439bf4cbcd44322cf8
parent34b9c061f347da750f4565a57012c9caab93f925
Bug 26414: Unable to export Withdrawn status using CSV profile

When using CSV profiles to export MARC records, it is impossible to export the withdrawn status. I suspect it is because withdrawn is in 952$0 and 0 is considered null rather than an actual 0.

Test Plan :
1) Go to Tools > CSV profiles
2) Click on New CSV profile
3) Enter a profile name (ex. Simple record)
4) In the Profile MARC fields field enter the following (for MARC21)
245a|100a|952o|9520
5) Save your profile
6) Go to Search and search for something
7) Add a couple of things in your cart
8) Go to your cart
9) Click on Download and choose your CSV profile
10) Open the file and notice the 9520 column contains the whole of the 952 field and not just the withdrawn status
11) Apply patch
12) Redo steps 9) and 10)

Signed-off-by: David Nind <david@davidnind.com>
Signed-off-by: David Nind <david@davidnind.com>
Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
C4/Record.pm
t/db_dependent/Record/marcrecord2csv.t