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. To replicate: 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 I tried with different ways to write the MARC fields, but 952$0 just never shows alone. 245a|100a|952o|Withdrawn=952$0 245a|100a|952o|952$0 Caroline
Created attachment 109970 [details] [review] 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)
hi Why not just a plain my $subfieldtag = $2; and removing the WIP comment with the previous line? Regards Didier
Hi Alexis, whenever you plan to work on a patch for a bug, please assign it to yourself using the Asignee field. I've fixed it :)
Created attachment 110132 [details] [review] 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>
Hi Alexis, I believe the tests may need a bit more work to run on different installations: Processing additional checks OK! kohadev-koha@kohadevbox:/home/vagrant/kohaclone$ prove t/db_dependent/Record/marcrecord2csv.t t/db_dependent/Record/marcrecord2csv.t .. 1/13 # Failed test 'normal way: headers retrieved from the DB' # at t/db_dependent/Record/marcrecord2csv.t line 53. # got: '"TITLE STATEMENT"|"SUBJECT ADDED ENTRY--TOPICAL TERM" # "The art of computer programming,Donald E. Knuth.,0;The art of another title,Donald E. Knuth. II,1"|"Computer programming.,462;Computer algorithms.,499" # ' # expected: '"Mention du titre"|Vedette-matière--Sujet # "The art of computer programming,Donald E. Knuth.,0;The art of another title,Donald E. Knuth. II,1"|"Computer programming.,462;Computer algorithms.,499" # ' # Looks like you failed 1 test of 13. t/db_dependent/Record/marcrecord2csv.t .. Dubious, test returned 1 (wstat 256, 0x100) Failed 1/13 subtests
Created attachment 110479 [details] [review] 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>
(In reply to didier from comment #2) > hi > > Why not just a plain > my $subfieldtag = $2; > > and removing the WIP comment with the previous line? > > Regards > Didier Hi, I fixed it.
(In reply to Katrin Fischer from comment #5) > Hi Alexis, > > I believe the tests may need a bit more work to run on different > installations: Hi Katrin, I reseted the test that I had changed. The tests should now pass on your installation.
Created attachment 110492 [details] [review] 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>
Created attachment 110515 [details] [review] 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>
Created attachment 110851 [details] [review] Bug 26414: Tidy the tests
Created attachment 110852 [details] [review] Bug 26414: Tidy the tests
Pushed to master for 20.11, thanks to everybody involved!
Congratulations for your first patch pushed, Alexis! :)
backported to 20.05.x for 20.05.05
backported to 19.11.x for 19.11.11
Not backported to oldoldstable (19.05.x). Feel free to ask if it's needed.