[Bug 35588] New: marcrecord2csv retrieves authorised values incorrectly for fields
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=35588 Bug ID: 35588 Summary: marcrecord2csv retrieves authorised values incorrectly for fields Change sponsored?: --- Product: Koha Version: master Hardware: All OS: All Status: NEW Severity: normal Priority: P5 - low Component: Tools Assignee: koha-bugs@lists.koha-community.org Reporter: dcook@prosentient.com.au QA Contact: testopia@bugs.koha-community.org If marcrecord2csv takes a field and not a field/subfield combination, it will fetch all the authorised values for all subfields. However, since the hashref is keyed against the authorised values themselves, authorised values for different categories can overwrite each other, which means the wrong description can potentially be output. -- You are receiving this mail because: You are watching all bug changes. You are the assignee for the bug.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=35588 David Cook <dcook@prosentient.com.au> changed: What |Removed |Added ---------------------------------------------------------------------------- See Also| |https://bugs.koha-community | |.org/bugzilla3/show_bug.cgi | |?id=35579 -- You are receiving this mail because: You are the assignee for the bug. You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=35588 David Cook <dcook@prosentient.com.au> changed: What |Removed |Added ---------------------------------------------------------------------------- Depends on| |35579 Referenced Bugs: https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=35579 [Bug 35579] marcrecord2csv searches authorised values inefficiently -- You are receiving this mail because: You are watching all bug changes. You are the assignee for the bug.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=35588 David Cook <dcook@prosentient.com.au> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|NEW |Needs Signoff -- You are receiving this mail because: You are the assignee for the bug. You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=35588 --- Comment #1 from David Cook <dcook@prosentient.com.au> --- Created attachment 159937 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=159937&action=edit Bug 35588: Scope authorised value desc lookup according to field/subfield This patch ensures that the authorised value descriptions looked up are for the correct field/subfield designated in the CSV profile. Test plan: 0. Do not apply the patch yet! 1. Go to http://localhost:8081/cgi-bin/koha/tools/csv-profiles.pl 2. Add a CSV profile with the default values and using the following for the "Profile MARC fields": 000|001|003|005|006|007|008|010|015|016|020|022|040|050|082|100|110| 111|130|240|243|245|246|247|250|260|300|336|337|338|440|490|500|501| 505|520|530|600|610|611|630|648|650|651|690|700|710|711|856|887|942|995 3. Create a new List 4. Add all the database's bibs to that list using SQL like the following (where the shelfnumber equals the number for your list): insert into virtualshelfcontents (shelfnumber,biblionumber,borrowernumber) select 1,biblionumber,51 from biblio; 5. Go to that list in the staff interface 6. Download that list using your CSV profile 7. Apply the patch 8. koha-plack --reload kohadev 9. Download that list using your CSV profile 10. Note that the output is a little slower, but still quick enough. 11. Note that the output is a bit different. For records like "Gairm", the output will end in "1" instead of "Yes". This is correct, because this subfield isn't an authorised value!!! -- You are receiving this mail because: You are watching all bug changes. You are the assignee for the bug.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=35588 David Cook <dcook@prosentient.com.au> changed: What |Removed |Added ---------------------------------------------------------------------------- Assignee|koha-bugs@lists.koha-commun |dcook@prosentient.com.au |ity.org | -- You are receiving this mail because: You are watching all bug changes. You are the assignee for the bug.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=35588 David Cook <dcook@prosentient.com.au> changed: What |Removed |Added ---------------------------------------------------------------------------- Summary|marcrecord2csv retrieves |marcrecord2csv retrieves |authorised values |authorised values |incorrectly for fields |incorrectly for subfields -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=35588 David Cook <dcook@prosentient.com.au> changed: What |Removed |Added ---------------------------------------------------------------------------- Summary|marcrecord2csv retrieves |marcrecord2csv retrieves |authorised values |authorised values |incorrectly for subfields |incorrectly for fields -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=35588 David Nind <david@davidnind.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|Needs Signoff |Signed Off -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=35588 David Nind <david@davidnind.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #159937|0 |1 is obsolete| | --- Comment #2 from David Nind <david@davidnind.com> --- Created attachment 159978 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=159978&action=edit Bug 35588: Scope authorised value desc lookup according to field/subfield This patch ensures that the authorised value descriptions looked up are for the correct field/subfield designated in the CSV profile. Test plan: 0. Do not apply the patch yet! 1. Go to http://localhost:8081/cgi-bin/koha/tools/csv-profiles.pl 2. Add a CSV profile with the default values and using the following for the "Profile MARC fields": 000|001|003|005|006|007|008|010|015|016|020|022|040|050|082|100|110| 111|130|240|243|245|246|247|250|260|300|336|337|338|440|490|500|501| 505|520|530|600|610|611|630|648|650|651|690|700|710|711|856|887|942|995 3. Create a new List 4. Add all the database's bibs to that list using SQL like the following (where the shelfnumber equals the number for your list): insert into virtualshelfcontents (shelfnumber,biblionumber,borrowernumber) select 1,biblionumber,51 from biblio; 5. Go to that list in the staff interface 6. Download that list using your CSV profile 7. Apply the patch 8. koha-plack --reload kohadev 9. Download that list using your CSV profile 10. Note that the output is a little slower, but still quick enough. 11. Note that the output is a bit different. For records like "Gairm", the output will end in "1" instead of "Yes". This is correct, because this subfield isn't an authorised value!!! Signed-off-by: David Nind <david@davidnind.com> -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=35588 David Nind <david@davidnind.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Text to go in the| |This fixes the CSV export release notes| |of records so that | |authorized values are | |exported correctly. It | |ensures that the authorized | |value descriptions looked | |up are for the correct | |field/subfield designated | |in the CSV profile. | |Example: If the 942$s | |(Serial record flag) for a | |record has a value of "1", | |it was previously exported | |as "Yes" even though it | |wasn't an authorized value. CC| |david@davidnind.com --- Comment #3 from David Nind <david@davidnind.com> --- Testing notes (using KTD): 1. Download speeds (using Web Developer Tools > Network feature in Firefox): . Before: 1 request 270.81 kB / 336 B transferred Finish: 47.14 s . Refreshed browser, flush_memcached, restart_all (so everything fresh) . After : 1 request 270.80 kB / 336 B transferred Finish: 4.23 s 2. Compared downloaded files using a diff tool - differences as indicated in step 11 noted. I had a go at the release notes, but this may need some more work! -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=35588 --- Comment #4 from David Cook <dcook@prosentient.com.au> --- (In reply to David Nind from comment #3)
Testing notes (using KTD):
1. Download speeds (using Web Developer Tools > Network feature in Firefox): . Before: 1 request 270.81 kB / 336 B transferred Finish: 47.14 s . Refreshed browser, flush_memcached, restart_all (so everything fresh) . After : 1 request 270.80 kB / 336 B transferred Finish: 4.23 s
2. Compared downloaded files using a diff tool - differences as indicated in step 11 noted.
I had a go at the release notes, but this may need some more work!
I think you did a great job on the release notes. Thanks for taking care of that! -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=35588 Julian Maurice <julian.maurice@biblibre.com> changed: What |Removed |Added ---------------------------------------------------------------------------- QA Contact|testopia@bugs.koha-communit |julian.maurice@biblibre.com |y.org | CC| |julian.maurice@biblibre.com -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=35588 Julian Maurice <julian.maurice@biblibre.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #159978|0 |1 is obsolete| | --- Comment #5 from Julian Maurice <julian.maurice@biblibre.com> --- Created attachment 160237 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=160237&action=edit Bug 35588: Scope authorised value desc lookup according to field/subfield This patch ensures that the authorised value descriptions looked up are for the correct field/subfield designated in the CSV profile. Test plan: 0. Do not apply the patch yet! 1. Go to http://localhost:8081/cgi-bin/koha/tools/csv-profiles.pl 2. Add a CSV profile with the default values and using the following for the "Profile MARC fields": 000|001|003|005|006|007|008|010|015|016|020|022|040|050|082|100|110| 111|130|240|243|245|246|247|250|260|300|336|337|338|440|490|500|501| 505|520|530|600|610|611|630|648|650|651|690|700|710|711|856|887|942|995 3. Create a new List 4. Add all the database's bibs to that list using SQL like the following (where the shelfnumber equals the number for your list): insert into virtualshelfcontents (shelfnumber,biblionumber,borrowernumber) select 1,biblionumber,51 from biblio; 5. Go to that list in the staff interface 6. Download that list using your CSV profile 7. Apply the patch 8. koha-plack --reload kohadev 9. Download that list using your CSV profile 10. Note that the output is a little slower, but still quick enough. 11. Note that the output is a bit different. For records like "Gairm", the output will end in "1" instead of "Yes". This is correct, because this subfield isn't an authorised value!!! Signed-off-by: David Nind <david@davidnind.com> Signed-off-by: Julian Maurice <julian.maurice@biblibre.com> -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=35588 --- Comment #6 from Julian Maurice <julian.maurice@biblibre.com> --- Created attachment 160238 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=160238&action=edit Bug 35588: Tidy up t/db_dependent/AuthorisedValues.t Signed-off-by: Julian Maurice <julian.maurice@biblibre.com> -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=35588 Julian Maurice <julian.maurice@biblibre.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|Signed Off |Passed QA -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=35588 Katrin Fischer <katrin.fischer@bsz-bw.de> changed: What |Removed |Added ---------------------------------------------------------------------------- Version(s)| |24.05.00 released in| | Status|Passed QA |Pushed to master -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=35588 --- Comment #7 from Katrin Fischer <katrin.fischer@bsz-bw.de> --- Pushed for 24.05! Well done everyone, thank you! -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=35588 Fridolin Somers <fridolin.somers@biblibre.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Version(s)|24.05.00 |24.05.00,23.11.02 released in| | Status|Pushed to master |Pushed to stable CC| |fridolin.somers@biblibre.co | |m --- Comment #8 from Fridolin Somers <fridolin.somers@biblibre.com> --- Pushed to 23.11.x for 23.11.02 -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=35588 Lucas Gass <lucas@bywatersolutions.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|Pushed to stable |Pushed to oldstable CC| |lucas@bywatersolutions.com Version(s)|24.05.00,23.11.02 |24.05.00,23.11.02,23.05.08 released in| | --- Comment #9 from Lucas Gass <lucas@bywatersolutions.com> --- Backported to 23.05.x for upcoming 23.05.08 -- You are receiving this mail because: You are watching all bug changes.
participants (1)
-
bugzilla-daemon@bugs.koha-community.org