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)
committerAleisha Amohia <aleishaamohia@hotmail.com>
Tue, 27 Oct 2020 03:56:23 +0000 (16:56 +1300)
commit028b7e6b8d90ad67a152c105182af3151053352f
tree260bb3264c1e9ae89869d063a4f3d91948914f89
parent7499703bf0ff899dd28104c8f083c23aca01a438
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>
(cherry picked from commit 937e831ea300042e7be89fc9524bb871edaf23ba)

Signed-off-by: Aleisha Amohia <aleishaamohia@hotmail.com>
C4/Record.pm
t/db_dependent/Record/marcrecord2csv.t