[Bug 30909] New: Regression, Permanent shelving location is always updated when editing location if both are mapped to MARC fields
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=30909 Bug ID: 30909 Summary: Regression, Permanent shelving location is always updated when editing location if both are mapped to MARC fields Change sponsored?: --- Product: Koha Version: master Hardware: All OS: All Status: NEW Severity: major Priority: P5 - low Component: Cataloging Assignee: koha-bugs@lists.koha-community.org Reporter: andrew@bywatersolutions.com QA Contact: testopia@bugs.koha-community.org CC: m.de.rooy@rijksmuseum.nl, nick@bywatersolutions.com Depends on: 27526, 27837 This issue was corrected in bug 27837, but bug 27526 led to a regression of that fix. To recreate: 1 - Map permanent_location to a marc field 2 - Expose that field in the item editor 3 - Change the location of the item and retain the permanent location on saving 4 - note that permanent location has changed anyway Referenced Bugs: https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=27526 [Bug 27526] Remove Mod/AddItemFromMarc from additem.pl https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=27837 [Bug 27837] Permanent location is reverted to location when location updated and permanent_location mapped to MARC field -- 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=30909 Katrin Fischer <katrin.fischer@bsz-bw.de> changed: What |Removed |Added ---------------------------------------------------------------------------- Keywords| |regression -- 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=30909 Jonathan Druart <jonathan.druart+koha@gmail.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|NEW |Needs Signoff -- 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=30909 --- Comment #1 from Jonathan Druart <jonathan.druart+koha@gmail.com> --- Created attachment 135748 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=135748&action=edit Bug 30909: Retain permanent_location if mapped If items.permanent_location is mapped to a MARC subfields we must retain the value, not using items.location Test plan: 1 - Map permanent_location to a marc field 2 - Expose that field in the item editor 3 - Change the location of the item and retain the permanent location on saving 4 - note that permanent location has not changed Test the different other situation, when adding and editing: Empty the field, change only location, change only permanent_location, etc. -- 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=30909 Jonathan Druart <jonathan.druart+koha@gmail.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Assignee|koha-bugs@lists.koha-commun |jonathan.druart+koha@gmail. |ity.org |com CC| |jonathan.druart+koha@gmail. | |com --- Comment #2 from Jonathan Druart <jonathan.druart+koha@gmail.com> --- Hum, maybe the batch mod tool is affected as well. -- 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=30909 --- Comment #3 from Andrew Fuerste-Henry <andrew@bywatersolutions.com> --- (In reply to Jonathan Druart from comment #2)
Hum, maybe the batch mod tool is affected as well.
I can confirm this issue also exists in the batch mod tool. Thanks! -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=30909 David Nind <david@davidnind.com> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |david@davidnind.com --- Comment #4 from David Nind <david@davidnind.com> --- I would like to test this, but I'm not familiar enough with locations and MARC to do step 1 and 2 in the bug test plan. Could you advise on how to do steps 1(c) and 2(c) in my revised test plan (based on bug 27837)? Apologies for such a basic question! Also, does this bug address editing using batch item modification, or is an updated patch required? Thanks! Revised test plan: 1. Map permanent_location to a marc field: a. go to Administration > Catalog > Koha to MARC mapping b. locate items.permanent_location then select Add c. QUESTION - which field code and subfield code do I map it to? 2. Expose that field in the item editor: a. go to Administration > Catalog > MARC bibliographic framework b. select the MARC framework for BKS c. QUESTION - which MARC field do I use for permanent_location to get this to show in the item editor? 3. Edit an item, changing location to X and permanent location to Y, save. 4. Confirm record shows location=X, permanent_location=Y. 5. Edit item again, change location to Z, do not change permanent location, save. 6. Confirm location and permanent_location both equal Z. 7. Run through steps 3-6 using batch item modification for a record with multiple items (record details page > Select all the items under the holdings tab > Modify selected items). 8. Apply patch, flush_memcached, restart_all. 9. Repeat steps 3-7. 10. Confirm location=Z, permanent location=Y. 11. Run the tests: prove t/db_dependent/Items.t -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=30909 --- Comment #5 from Katrin Fischer <katrin.fischer@bsz-bw.de> --- I believe you need to map to a free 952. An option could be a new subfield L you create and make visible in the BKS framework. It needs to be on tab 10 (items). -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=30909 --- Comment #6 from David Nind <david@davidnind.com> --- (In reply to Katrin Fischer from comment #5)
I believe you need to map to a free 952. An option could be a new subfield L you create and make visible in the BKS framework. It needs to be on tab 10 (items).
Thanks Katrin! I will that. -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=30909 --- Comment #7 from David Nind <david@davidnind.com> --- I couldn't get steps 1 and 2 of the bug test plan to work correctly - will leave for someone who knows what they should be doing here. I'm sure it is something relatively simple that I'm not getting! For step 2c below, after I press OK the page reloads but there is nothing shown for permanent_location. When I test the frameworks, I get this error: items.permanent_location mapped: The following mappings exist for items.permanent_location, and they shouldn't. Framework code Framework description Tag Subfield BKS Books, Booklets, Workbooks 952 L This is what I did/intended to do: 1. Create and expose a new 952 subfield in the item editor: a. Administration > Catalog > MARC bibliographic framework b. Select the BKS MARC framework c. Add a new subfield for 952 - L, use the same settings as 952$c, except name as Permanent shelving location 2. Map permanent_location to a marc field: a. Administration > Catalog > Koha to MARC mapping b. Locate items.permanent_location then select Add c. Map to a new 952 field, for example 952,L d. Rebuild the marc mappings: remove the duplicate 010 for record 72, then misc/batchRebuildBiblioTables.pl -c will run without errors 3. Edit an item, changing location to X and permanent location to Y, save (for example: location = New materials shelf, Permanent shelving location = General stacks). 4. Confirm record shows location=X, permanent_location=Y (for example: location = New materials shelf, Permanent shelving location = General stacks). 5. Edit item again, change location to Z, do not change permanent location, save (for example: Children's area). 6. Run through steps 3-6 using batch item modification for a record with multiple items (record details page > Select all the items under the holdings tab > Modify selected items). ==> Not: new 952 subfield is not shown, so you can't use the batch item modification 8. Apply patch, flush_memcached, restart_all. 9. Repeat steps 3-6. 10. Confirm location=Z, permanent location=Y. 11. Run the tests: prove t/db_dependent/Items.t Notes: - When you add a mapping: the instructions say: "Adding a mapping for: items.permanent_location. Please enter field tag and subfield code, separated by a comma. (For control fields: add '@' as subfield code.) The change will be applied immediately." - However, at the top of the page it says: "If you make any change to the mappings, you must ask your administrator to run misc/batchRebuildBiblioTables.pl." - Not sure which is right here and hwteher this shouldbe logged as a new bug. -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=30909 Katrin Fischer <katrin.fischer@bsz-bw.de> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|Needs Signoff |Failed QA --- Comment #8 from Katrin Fischer <katrin.fischer@bsz-bw.de> --- I have tried to test this, but I can't replicate the problem, could this have been fixed otherwise? To recreate: 1 - Map permanent_location to a marc field 2 - Expose that field in the item editor I used 952k, tab 10, visibile in editor, AV = LOC. Updated Koha-to-MARC-mappings to map to permanent_location. 3 - Change the location of the item and retain the permanent location on saving My item had no locations set. I set permanent location and locatoon to different values and saved. 4 - note that permanent location has changed anyway The fields kept the values I set, nothing was changed unexectedly. Maybe I am missing something? -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=30909 Jonathan Druart <jonathan.druart+koha@gmail.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|Failed QA |Needs Signoff --- Comment #9 from Jonathan Druart <jonathan.druart+koha@gmail.com> --- (In reply to Katrin Fischer from comment #8)
I have tried to test this, but I can't replicate the problem, could this have been fixed otherwise?
To recreate: 1 - Map permanent_location to a marc field 2 - Expose that field in the item editor
I used 952k, tab 10, visibile in editor, AV = LOC. Updated Koha-to-MARC-mappings to map to permanent_location.
3 - Change the location of the item and retain the permanent location on saving
My item had no locations set. I set permanent location and locatoon to different values and saved.
4 - note that permanent location has changed anyway
The fields kept the values I set, nothing was changed unexectedly.
Maybe I am missing something?
Create an item, set location=Audio Visual (AV), save => permanent location is AV Edit again, set location=Child's area (CHILD), don't modify permanent location, save => permanent location is CHILD -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=30909 --- Comment #10 from Andrew Fuerste-Henry <andrewfh@dubcolib.org> --- Confirming current incorrect behavior: 1: create new subfield in DEFAULT framework, 952$k, visible in editor, managed in tab 10, tied to LOC auth value 2: In Koha to MARC mapping, find items.permanent_location and add a mapping to 952$k 3: Find a bib and item in the default framework 4: Edit the item, see that both the 952$c and 952$k are visible in the editor -- In my test, both fields started at a value of "General Stacks" 5: change both values and save the item, confirm both values change and save successfully -- I set 952$c to Audio Visual and 952$k to Fiction 6: edit again, change only 952$c, save -- I changed 952$c to On Display and left 952$k set to Fiction THIS IS WHERE THINGS GO WRONG. After saving that change, both 952$c AND 952$k are set to On Display, even though I only changed the 952$c. -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=30909 --- Comment #11 from Andrew Fuerste-Henry <andrewfh@dubcolib.org> ---
Notes: - When you add a mapping: the instructions say: "Adding a mapping for: items.permanent_location. Please enter field tag and subfield code, separated by a comma. (For control fields: add '@' as subfield code.) The change will be applied immediately." - However, at the top of the page it says: "If you make any change to the mappings, you must ask your administrator to run misc/batchRebuildBiblioTables.pl." - Not sure which is right here and hwteher this shouldbe logged as a new bug.
Agreed on all of this. The format of "952,k" is confusingly nonstandard, I'd love to see it normalized to "952$k." I believe those two notes about immediate changes and rebuilds are meant to convey that any mapping change will be applied to new and edited records immediately but that existing records will need a rebuild to reflect the change. This could certainly be explained more clearly. -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=30909 ByWater Sandboxes <bws.sandboxes@gmail.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #135748|0 |1 is obsolete| | --- Comment #12 from ByWater Sandboxes <bws.sandboxes@gmail.com> --- Created attachment 137873 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=137873&action=edit Bug 30909: Retain permanent_location if mapped If items.permanent_location is mapped to a MARC subfields we must retain the value, not using items.location Test plan: 1 - Map permanent_location to a marc field 2 - Expose that field in the item editor 3 - Change the location of the item and retain the permanent location on saving 4 - note that permanent location has not changed Test the different other situation, when adding and editing: Empty the field, change only location, change only permanent_location, etc. Signed-off-by: andrew <andrewfh@dubcolib.org> -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=30909 Andrew Fuerste-Henry <andrewfh@dubcolib.org> changed: What |Removed |Added ---------------------------------------------------------------------------- Summary|Regression, Permanent |Regression, Permanent |shelving location is always |shelving location is always |updated when editing |updated when editing |location if both are mapped |location VIA ADDITEM.PL if |to MARC fields |both are mapped to MARC | |fields -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=30909 Andrew Fuerste-Henry <andrewfh@dubcolib.org> 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=30909 Andrew Fuerste-Henry <andrewfh@dubcolib.org> changed: What |Removed |Added ---------------------------------------------------------------------------- Blocks| |31187 Referenced Bugs: https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=31187 [Bug 31187] Regression, Permanent shelving location is always updated when editing location VIA BATCH ITEM MOD if both are mapped to MARC fields -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=30909 Joonas Kylmälä <joonas.kylmala@iki.fi> changed: What |Removed |Added ---------------------------------------------------------------------------- QA Contact|testopia@bugs.koha-communit |joonas.kylmala@iki.fi |y.org | CC| |joonas.kylmala@iki.fi -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=30909 Joonas Kylmälä <joonas.kylmala@iki.fi> 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=30909 Joonas Kylmälä <joonas.kylmala@iki.fi> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #137873|0 |1 is obsolete| | --- Comment #13 from Joonas Kylmälä <joonas.kylmala@iki.fi> --- Created attachment 137884 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=137884&action=edit Bug 30909: Retain permanent_location if mapped If items.permanent_location is mapped to a MARC subfields we must retain the value, not using items.location Test plan: 1 - Map permanent_location to a marc field 2 - Expose that field in the item editor 3 - Change the location of the item and retain the permanent location on saving 4 - note that permanent location has not changed Test the different other situation, when adding and editing: Empty the field, change only location, change only permanent_location, etc. Signed-off-by: andrew <andrewfh@dubcolib.org> Signed-off-by: Joonas Kylmälä <joonas.kylmala@iki.fi> -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=30909 --- Comment #14 from Joonas Kylmälä <joonas.kylmala@iki.fi> --- Fixes the issue as advertised, passing QA. On an unrelated note whilst testing this bug I noticed that we seem to have a cache invalidation problem with Koha to MARC mapping. After removing the 952$k mapping to items.permanent_location I had to restart all koha services (i guess memcached would have been plenty) for the functionality to return to original, that is, when location is updated also permanent_location is updated. -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=30909 --- Comment #15 from Jonathan Druart <jonathan.druart+koha@gmail.com> --- (In reply to Joonas Kylmälä from comment #14)
Fixes the issue as advertised, passing QA.
On an unrelated note whilst testing this bug I noticed that we seem to have a cache invalidation problem with Koha to MARC mapping. After removing the 952$k mapping to items.permanent_location I had to restart all koha services (i guess memcached would have been plenty) for the functionality to return to original, that is, when location is updated also permanent_location is updated.
I guess it's because we are flushing the marc structure for the default framework only in admin/koha2marclinks.pl. -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=30909 Jonathan Druart <jonathan.druart+koha@gmail.com> changed: What |Removed |Added ---------------------------------------------------------------------------- See Also| |https://bugs.koha-community | |.org/bugzilla3/show_bug.cgi | |?id=31194 --- Comment #16 from Jonathan Druart <jonathan.druart+koha@gmail.com> --- Opened bug 31194. -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=30909 Tomás Cohen Arazi <tomascohen@gmail.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|Passed QA |Pushed to master Version(s)| |22.11.00 released in| | -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=30909 --- Comment #17 from Tomás Cohen Arazi <tomascohen@gmail.com> --- Pushed to master for 22.11. Nice work everyone, thanks! -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=30909 Lucas Gass <lucas@bywatersolutions.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Resolution|--- |FIXED Status|Pushed to master |RESOLVED CC| |lucas@bywatersolutions.com --- Comment #18 from Lucas Gass <lucas@bywatersolutions.com> --- Missing dependencies for 22.05.x -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=30909 Lucas Gass <lucas@bywatersolutions.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|RESOLVED |REOPENED Resolution|FIXED |--- --- Comment #19 from Lucas Gass <lucas@bywatersolutions.com> --- I'm wrong this is NOT missing 22.05 dependencies. Backported to 22.05.x for 22.05.05 -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=30909 Lucas Gass <lucas@bywatersolutions.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Version(s)|22.11.00 |22.11.00, 22.05.05 released in| | Status|REOPENED |Needs Signoff -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=30909 Lucas Gass <lucas@bywatersolutions.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=30909 Lucas Gass <lucas@bywatersolutions.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=30909 Lucas Gass <lucas@bywatersolutions.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|Passed QA |Pushed to stable -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=30909 Arthur Suzuki <arthur.suzuki@biblibre.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Version(s)|22.11.00, 22.05.05 |22.11.00,21.11, 22.05.05 released in| | -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=30909 --- Comment #20 from Arthur Suzuki <arthur.suzuki@biblibre.com> --- Thanks! Pushed to 21.11 for 21.11.12 -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=30909 Victor Grousset/tuxayo <victor@tuxayo.net> changed: What |Removed |Added ---------------------------------------------------------------------------- Resolution|--- |FIXED Status|Pushed to stable |RESOLVED CC| |victor@tuxayo.net --- Comment #21 from Victor Grousset/tuxayo <victor@tuxayo.net> --- Missing dependencies for 21.05.x, it shouldn't be affected, no backport. Nothing to document it seems, marking resolved. -- You are receiving this mail because: You are watching all bug changes.
participants (1)
-
bugzilla-daemon@bugs.koha-community.org