Summary: | Innocent changes to framework silently delete bibliographic data | ||
---|---|---|---|
Product: | Koha | Reporter: | Ian Bays <ian.bays> |
Component: | Cataloging | Assignee: | Bugs List <koha-bugs> |
Status: | NEW --- | QA Contact: | Testopia <testopia> |
Severity: | enhancement | ||
Priority: | P3 | CC: | a.roussos, esther.melander, flyingendpaper, janet.mcgowan, jonathan.druart, lauren_denny, lucy.vaux-harvey, m.de.rooy, martin.renvoize, mspinney |
Version: | Main | ||
Hardware: | All | ||
OS: | All | ||
See Also: | https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=31923 | ||
Change sponsored?: | --- | Patch complexity: | --- |
Documentation contact: | Documentation submission: | ||
Text to go in the release notes: | Version(s) released in: | ||
Circulation function: |
Description
Ian Bays
2021-02-19 10:36:19 UTC
This is the historical behaviour, and how it is intended to work. It could be nice to have an alert (that could be switched off the a syspref?), but I am considering it an enhancement request. Katrin, do you agree? Actually I was not aware of the setting "ignore" having this effect. The known thing is that you don't want to delete any field and subfield definitions as that will cause data loss. That's not great, but we have some documentation and warnings. For the "ignore" tab, I always assumed this was only a display setting as it's used to set the tab something is displayed on. So I think reading "Ignore" there as "don't display" is to be expected from user side. 1) Can we determin if the "ignore" always had this effect? I believe I have set "ignore" for some item fields in one of our oldest installations, but we never noticed any misbehaviour. 2) If we think this is not only to affect display, we definitely need to add at least a hint GUI wise. Maybe we should also add a list of "ignored" to the Bibliographic framework check to help people verify. Hi. The initial description includes a test plan that shows "ignore" deletes metadata. This was tested on recent versions including 20.11, but for completeness I went back to a 17.11 version and used a simpler method to verify the behaviour: We often set up a framework for (say) BK that sets (eg) the 022$a to ignore so I first checked this was the case on the system, then added a bib in the default framework and added an 022$a. I checked the biblio_metadata and it was present. I edited the record and changed frameworkcode from default to BK and saved. On inspection the 022$a has not present. Here is the SQL from this sequence: MariaDB [koha_ras]> select metadata from biblio_metadata where biblionumber = 37441; | <?xml version="1.0" encoding="UTF-8"?> <record xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://www.loc.gov/MARC21/slim http://www.loc.gov/standards/marcxml/schema/MARC21slim.xsd" xmlns="http://www.loc.gov/MARC21/slim"> <leader>00242nam a22001217a 4500</leader> <datafield tag="999" ind1=" " ind2=" "> <subfield code="c">37441</subfield> <subfield code="d">37441</subfield> </datafield> <controlfield tag="003">OSt</controlfield> <controlfield tag="005">20210323092844.0</controlfield> <controlfield tag="008">210323b ||||| |||| 00| 0 eng d</controlfield> <datafield tag="022" ind1=" " ind2=" "> <subfield code="a">1234</subfield> </datafield> <datafield tag="100" ind1=" " ind2=" "> <subfield code="a">Test</subfield> </datafield> <datafield tag="245" ind1=" " ind2=" "> <subfield code="a">Test</subfield> </datafield> <datafield tag="942" ind1=" " ind2=" "> <subfield code="2">ddc</subfield> <subfield code="c">MONO</subfield> </datafield> </record> | MariaDB [koha_ras]> select frameworkcode from biblio where biblionumber = 37441; +---------------+ | frameworkcode | +---------------+ | | +---------------+ MariaDB [koha_ras]> select tab from marc_subfield_structure where frameworkcode = '' and tagfield='022' and tagsubfield = 'a'; +------+ | tab | +------+ | 0 | +------+ MariaDB [koha_ras]> select frameworkcode from biblio where biblionumber = 37441; +---------------+ | frameworkcode | +---------------+ | BK | +---------------+ MariaDB [koha_ras]> select tab from marc_subfield_structure where frameworkcode = 'BK' and tagfield='022' and tagsubfield = 'a'; +------+ | tab | +------+ | -1 | +------+ MariaDB [koha_ras]> select metadata from biblio_metadata where biblionumber = 37441; | <?xml version="1.0" encoding="UTF-8"?> <record xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://www.loc.gov/MARC21/slim http://www.loc.gov/standards/marcxml/schema/MARC21slim.xsd" xmlns="http://www.loc.gov/MARC21/slim"> <leader>00216nam a22001097a 4500</leader> <datafield tag="999" ind1=" " ind2=" "> <subfield code="c">37441</subfield> <subfield code="d">37441</subfield> </datafield> <controlfield tag="003">OSt</controlfield> <controlfield tag="005">20210323094228.0</controlfield> <controlfield tag="008">210323b ||||| |||| 00| 0 eng d</controlfield> <datafield tag="100" ind1=" " ind2=" "> <subfield code="a">Test</subfield> </datafield> <datafield tag="245" ind1=" " ind2=" "> <subfield code="a">Test</subfield> </datafield> <datafield tag="942" ind1=" " ind2=" "> <subfield code="c">MONO</subfield> </datafield> </record> | 1 row in set (0.00 sec) MariaDB [koha_ras]> select value from systempreferences where variable like '%version%'; +------------+ | value | +------------+ | 17.1109000 | +------------+ Thx Ian. What do you think we shoudl do? Make this a display thing (only affecting the tab) or a warning/hint be ok? As yourself I had assumed that "ignore" would leave the data intact, so I initially thought it would be "best" if the data is preserved but it is just not pulled out for display. Because we understand it may take time to agree and implement we set about scripting changes to our frameworks to set all those that say "ignore" to a real tab but to set "hidden" to a value that hides it. However we discovered that the default framework has circa 13 subfields set to ignore including 999$a, $b and $c. If you set these to other than ignore the framework check fails. We have an amended script that reinstates the real tab number for all set to "ignore" except the 999 subfields. The script also copies tags and subfields from default where they had been deleted (or possibly not updated from the delivered defaults). Many people will never notice losing these bits of data as they don't see them, but if you've got your data from a rich source and save in a different framework you would not expect the rich data to be removed. A warning (if you are changing to a framework that will lose data for this record) might be a good first step until there is consensus on how to deal with it. With Bug 31923 - 'Ignore' tab description is misleading there is no at least a warning in the framework configuration. *** Bug 35135 has been marked as a duplicate of this bug. *** It seems like not all subfields set to 'ignore' are deleted. The 952 $6 & $9, 999$a, $b, $c, $d need to be set to ignore or the MARC Framework test will report errors. It feels like Koha is using these fields for system data and the 'ignore' tab allows it to do this. It would be helpful if the frameworks mentioned that the fields the system uses should not be touched or a new option for 'system' instead of 'ignore be used. Currently the tab 'ignore' can mean two things. One means it will delete the data from the record if the framework has the subfield set to ignore. The other is something that the system uses and no one should touch. |