Summary: | KohaToMarcMapped columns sharing same field with biblio(item)number are removed. | ||
---|---|---|---|
Product: | Koha | Reporter: | Olli-Antti Kivilahti <olli-antti.kivilahti> |
Component: | Architecture, internals, and plumbing | Assignee: | Olli-Antti Kivilahti <olli-antti.kivilahti> |
Status: | CLOSED FIXED | QA Contact: | Testopia <testopia> |
Severity: | major | ||
Priority: | P5 - low | CC: | f.demians, jonathan.druart, julian.maurice, kyle, m.de.rooy, nick, tubaclarinet |
Version: | unspecified | ||
Hardware: | All | ||
OS: | All | ||
Change sponsored?: | --- | Patch complexity: | --- |
Documentation contact: | Documentation submission: | ||
Text to go in the release notes: | Version(s) released in: | ||
Circulation function: | |||
Attachments: |
Bug 16556 - KohaToMarcMapped columns sharing same field with biblio(item)number are removed.
Bug 16556 - KohaToMarcMapped columns sharing same field with biblio(item)number are removed. Bug 16556 - KohaToMarcMapped columns sharing same field with biblio(item)number are removed. |
Description
Olli-Antti Kivilahti
2016-05-19 14:12:01 UTC
Created attachment 51622 [details] [review] Bug 16556 - KohaToMarcMapped columns sharing same field with biblio(item)number are removed. REPLICATE ISSUE: 1. Map biblio.frameworkcode to 999$b 2. Map biblio.biblionumber to 999$c 3. Add a record with something in 999$b 4. 999$b is removed by C4::Biblio::AddBiblio() After this patch, the field used by biblio.biblionumber or biblioitems.biblioitemnumber is not removed and created anew, thus dropping all existing additions. There is no point in dropping the field in any case, since we can just replace the existing subfields in-place with no need to recreate the whole field. UNIT TESTS INCLUDED C4::Biblio::_koha_marc_update_bib_ids() does the dark deed. This looks like a bug, not an enh :) Olli-Antti Kivilahti, I was taking a look at this bug and I could not find any patch or test plan. Will you please add these to this bug report? Thank you, Christopher Davis > I was taking a look at this bug and I could not find any patch or test plan. > Will you please add these to this bug report? There is one attachment to this bug report and it is the patch. The patch's commit message contains the test plan. See Comment 1. Created attachment 55083 [details] [review] Bug 16556 - KohaToMarcMapped columns sharing same field with biblio(item)number are removed. REPLICATE ISSUE: 1. Map biblio.frameworkcode to 999$b 2. Map biblio.biblionumber to 999$c 3. Add a record with something in 999$b 4. 999$b is removed by C4::Biblio::AddBiblio() After this patch, the field used by biblio.biblionumber or biblioitems.biblioitemnumber is not removed and created anew, thus dropping all existing additions. There is no point in dropping the field in any case, since we can just replace the existing subfields in-place with no need to recreate the whole field. UNIT TESTS INCLUDED Signed-off-by: Chris Cormack <chrisc@catalyst.net.nz> Created attachment 55141 [details] [review] Bug 16556 - KohaToMarcMapped columns sharing same field with biblio(item)number are removed. REPLICATE ISSUE: 1. Map biblio.frameworkcode to 999$b 2. Map biblio.biblionumber to 999$c 3. Add a record with something in 999$b 4. 999$b is removed by C4::Biblio::AddBiblio() After this patch, the field used by biblio.biblionumber or biblioitems.biblioitemnumber is not removed and created anew, thus dropping all existing additions. There is no point in dropping the field in any case, since we can just replace the existing subfields in-place with no need to recreate the whole field. UNIT TESTS INCLUDED Signed-off-by: Chris Cormack <chrisc@catalyst.net.nz> Signed-off-by: Nick Clemens <nick@bywatersolutions.com> Works nicely, but 999 data loss is a problem Rancor/Adv Cataloging editor - I don't know if we can require this patchset to fix that as well or if it should be a separate bug (In reply to Nick Clemens from comment #8) > Works nicely, but 999 data loss is a problem Rancor/Adv Cataloging editor - > I don't know if we can require this patchset to fix that as well or if it > should be a separate bug I say file a separate bug. Better to have it partially fixed than totally broken I say. Pushed to master for 16.11, thanks Olli! Pushed in 16.05. Will be in 16.05.04. Pushed to 3.22.x, will be in 3.22.11 |