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)
committerLucas Gass <lucas@bywatersolutions.com>
Tue, 20 Oct 2020 13:56:17 +0000 (13:56 +0000)
commit937e831ea300042e7be89fc9524bb871edaf23ba
tree7f440e911ff6cd5dffe612c88d15ff8032c150bc
parent69ed68593166a389a3305cb2f39f650b0ff5c86d
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>
(cherry picked from commit b048d155bf18d794d2ac97eaafc6f0fc00996018)

Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
C4/Record.pm
t/db_dependent/Record/marcrecord2csv.t