[Bug 27837] New: Permanent location is reverted to location when location updated and permanent_location mapped to MARC field
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=27837 Bug ID: 27837 Summary: Permanent location is reverted to location when location updated and permanent_location mapped to MARC field Change sponsored?: --- Product: Koha Version: master Hardware: All OS: All Status: NEW Severity: normal Priority: P5 - low Component: Cataloging Assignee: koha-bugs@lists.koha-community.org Reporter: nick@bywatersolutions.com QA Contact: testopia@bugs.koha-community.org CC: m.de.rooy@rijksmuseum.nl Generally the permanent_location and location should match, however, prior to bug 23463 one could: 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 - This created a 'temporary' location that was cleared upon next checkin Many libraries used this for adding items to displays. Since bug 23463, however, the item updates only fields that have changed - if one changes the location but not the permanent location then koha sees that no permanent location was set and reverts it to the location We need to force passing through the permanent_location if it is visible+mapped in the item edit form, regardless of whether it changes or not -- 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=27837 Nick Clemens <nick@bywatersolutions.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Depends on| |23463 Assignee|koha-bugs@lists.koha-commun |kyle@bywatersolutions.com |ity.org | Referenced Bugs: https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=23463 [Bug 23463] Move C4::Items CRUD subroutines to Koha::Item -- 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=27837 Jonathan Druart <jonathan.druart@bugs.koha-community.org> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |jonathan.druart@bugs.koha-c | |ommunity.org See Also| |https://bugs.koha-community | |.org/bugzilla3/show_bug.cgi | |?id=27545 --- Comment #1 from Jonathan Druart <jonathan.druart@bugs.koha-community.org> --- Can you have a look at bug 27545? I feel like the second patch will fix this. -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=27837 --- Comment #2 from Kyle M Hall <kyle@bywatersolutions.com> --- Created attachment 117570 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=117570&action=edit Bug 27837: Update permanent location if passed into ModItemFromMarc -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=27837 Kyle M Hall <kyle@bywatersolutions.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|NEW |Needs Signoff -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=27837 --- Comment #3 from Kyle M Hall <kyle@bywatersolutions.com> --- Created attachment 117572 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=117572&action=edit Bug 27837: Add unit tests -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=27837 --- Comment #4 from Kyle M Hall <kyle@bywatersolutions.com> --- (In reply to Jonathan Druart from comment #1)
Can you have a look at bug 27545? I feel like the second patch will fix this.
It does not. I ran some manual tests that failed, and also ran the unit tests from this patch set, which also failed. -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=27837 Andrew Fuerste-Henry <andrew@bywatersolutions.com> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |andrew@bywatersolutions.com --- Comment #5 from Andrew Fuerste-Henry <andrew@bywatersolutions.com> --- Test plan: 1 - Map permanent_location to a marc field 2 - Expose that field 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 - apply patch, restart 8 - repeat steps 3-5 9 - confirm location=Z, permanent location=Y 10 - 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=27837 Andrew Fuerste-Henry <andrew@bywatersolutions.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|Needs Signoff |Failed QA --- Comment #6 from Andrew Fuerste-Henry <andrew@bywatersolutions.com> --- Tests fail if permanent_location is mapped to something in Koha to MARC Mapping. root@kohadevbox:koha(master)$ prove t/db_dependent/Items.t t/db_dependent/Items.t .. 11/14 # Failed test 'new permanent location set as expected' # at t/db_dependent/Items.t line 1057. # got: 'A' # expected: 'B' # Failed test 'permanent location remains unchanged as expected' # at t/db_dependent/Items.t line 1078. # got: 'A' # expected: 'B' # Looks like you failed 2 tests of 6. # Failed test 'permanent_location' # at t/db_dependent/Items.t line 1079. # Looks like you failed 1 test of 6. # Failed test 'ModItemFromMarc' # at t/db_dependent/Items.t line 1082. # Looks like you failed 1 test of 14. t/db_dependent/Items.t .. Dubious, test returned 1 (wstat 256, 0x100) Failed 1/14 subtests Test Summary Report ------------------- t/db_dependent/Items.t (Wstat: 256 Tests: 14 Failed: 1) Failed test: 14 Non-zero exit status: 1 Files=1, Tests=14, 5 wallclock secs ( 0.02 usr 0.00 sys + 3.11 cusr 0.47 csys = 3.60 CPU) Result: FAIL -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=27837 Andrew Fuerste-Henry <andrew@bywatersolutions.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|Failed QA |Signed Off --- Comment #7 from Andrew Fuerste-Henry <andrew@bywatersolutions.com> --- Talked to Kyle, clarified expected behavior. Tests pass with patch applied but permanent_location not mapped in Koha to MARC Mapping. Once it's added to Koha to MARC Mapping, tests fail. This is expected behavior. -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=27837 Andrew Fuerste-Henry <andrew@bywatersolutions.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #117570|0 |1 is obsolete| | --- Comment #8 from Andrew Fuerste-Henry <andrew@bywatersolutions.com> --- Created attachment 117625 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=117625&action=edit Bug 27837: Update permanent location if passed into ModItemFromMarc Signed-off-by: Andrew Fuerste-Henry <andrew@bywatersolutions.com> -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=27837 Andrew Fuerste-Henry <andrew@bywatersolutions.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #117572|0 |1 is obsolete| | --- Comment #9 from Andrew Fuerste-Henry <andrew@bywatersolutions.com> --- Created attachment 117626 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=117626&action=edit Bug 27837: Add unit tests Signed-off-by: Andrew Fuerste-Henry <andrew@bywatersolutions.com> -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=27837 Andrew Fuerste-Henry <andrew@bywatersolutions.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #117625|0 |1 is obsolete| | --- Comment #10 from Andrew Fuerste-Henry <andrew@bywatersolutions.com> --- Created attachment 117627 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=117627&action=edit Bug 27837: Update permanent location if passed into ModItemFromMarc Signed-off-by: Andrew Fuerste-Henry <andrew@bywatersolutions.com> Signed-off-by: Rhonda Kuiper <rkuiper@roundrocktexas.gov> -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=27837 Andrew Fuerste-Henry <andrew@bywatersolutions.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #117626|0 |1 is obsolete| | --- Comment #11 from Andrew Fuerste-Henry <andrew@bywatersolutions.com> --- Created attachment 117628 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=117628&action=edit Bug 27837: Add unit tests Signed-off-by: Andrew Fuerste-Henry <andrew@bywatersolutions.com> Signed-off-by: Rhonda Signed-off-by: Rhonda Kuiper <rkuiper@roundrocktexas.gov> -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=27837 --- Comment #12 from Jonathan Druart <jonathan.druart@bugs.koha-community.org> --- Indeed, bug 27545 is only about item creation! The fix looks a bit weird but I didn't find some better, I've tried to fix at Koha::Item->store level but we definitely need to tell the column is dirty from ModItemFromMarc. However I think we should mock the situation where the tests are failing if the field is mapped. -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=27837 --- Comment #13 from Jonathan Druart <jonathan.druart@bugs.koha-community.org> --- Created attachment 117634 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=117634&action=edit Bug 27837: Prevent the tests to fail is the field is mapped -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=27837 Tomás Cohen Arazi <tomascohen@gmail.com> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |tomascohen@gmail.com QA Contact|testopia@bugs.koha-communit |tomascohen@gmail.com |y.org | -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=27837 Tomás Cohen Arazi <tomascohen@gmail.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|Signed Off |Passed QA --- Comment #14 from Tomás Cohen Arazi <tomascohen@gmail.com> --- Works as expected, tests and the QA script are happy. -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=27837 Tomás Cohen Arazi <tomascohen@gmail.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #117634|0 |1 is obsolete| | -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=27837 Tomás Cohen Arazi <tomascohen@gmail.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #117627|0 |1 is obsolete| | -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=27837 Tomás Cohen Arazi <tomascohen@gmail.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #117628|0 |1 is obsolete| | -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=27837 --- Comment #15 from Tomás Cohen Arazi <tomascohen@gmail.com> --- Created attachment 117728 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=117728&action=edit Bug 27837: Update permanent location if passed into ModItemFromMarc Signed-off-by: Andrew Fuerste-Henry <andrew@bywatersolutions.com> Signed-off-by: Rhonda Kuiper <rkuiper@roundrocktexas.gov> Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io> -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=27837 --- Comment #16 from Tomás Cohen Arazi <tomascohen@gmail.com> --- Created attachment 117729 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=117729&action=edit Bug 27837: Add unit tests Signed-off-by: Andrew Fuerste-Henry <andrew@bywatersolutions.com> Signed-off-by: Rhonda Kuiper <rkuiper@roundrocktexas.gov> Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io> -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=27837 --- Comment #17 from Tomás Cohen Arazi <tomascohen@gmail.com> --- Created attachment 117730 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=117730&action=edit Bug 27837: Prevent the tests to fail is the field is mapped Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io> -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=27837 --- Comment #18 from Kyle M Hall <kyle@bywatersolutions.com> --- Created attachment 117735 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=117735&action=edit Bug 27837: Permanent location to be empty string, check if defined -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=27837 Kyle M Hall <kyle@bywatersolutions.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|Passed QA |Signed Off -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=27837 Kyle M Hall <kyle@bywatersolutions.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #117735|0 |1 is obsolete| | --- Comment #19 from Kyle M Hall <kyle@bywatersolutions.com> --- Created attachment 117738 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=117738&action=edit Bug 27837: Permanent location to be empty string, check if key exists -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=27837 --- Comment #20 from Jonathan Druart <jonathan.druart@bugs.koha-community.org> --- Can you explain this follow-up, Kyle? What's the use case, how did you find it? We certainly need a couple of tests to cover it. -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=27837 --- Comment #21 from Katrin Fischer <katrin.fischer@bsz-bw.de> --- I've tested, QA script and unit tests pass. Also the following test plan checks out: Test plan: 1 - Map permanent_location to a marc field 2 - Expose that field 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 - apply patch, restart 8 - repeat steps 3-5 9 - confirm location=Z, permanent location=Y 10 - 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=27837 Katrin Fischer <katrin.fischer@bsz-bw.de> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|Signed Off |Passed QA Patch complexity|--- |Small patch -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=27837 Katrin Fischer <katrin.fischer@bsz-bw.de> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #117728|0 |1 is obsolete| | --- Comment #22 from Katrin Fischer <katrin.fischer@bsz-bw.de> --- Created attachment 120361 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=120361&action=edit Bug 27837: Update permanent location if passed into ModItemFromMarc Signed-off-by: Andrew Fuerste-Henry <andrew@bywatersolutions.com> Signed-off-by: Rhonda Kuiper <rkuiper@roundrocktexas.gov> Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io> Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de> -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=27837 Katrin Fischer <katrin.fischer@bsz-bw.de> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #117729|0 |1 is obsolete| | --- Comment #23 from Katrin Fischer <katrin.fischer@bsz-bw.de> --- Created attachment 120362 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=120362&action=edit Bug 27837: Add unit tests Signed-off-by: Andrew Fuerste-Henry <andrew@bywatersolutions.com> Signed-off-by: Rhonda Kuiper <rkuiper@roundrocktexas.gov> Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io> Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de> -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=27837 Katrin Fischer <katrin.fischer@bsz-bw.de> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #117730|0 |1 is obsolete| | --- Comment #24 from Katrin Fischer <katrin.fischer@bsz-bw.de> --- Created attachment 120363 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=120363&action=edit Bug 27837: Prevent the tests to fail is the field is mapped Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io> Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de> -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=27837 Katrin Fischer <katrin.fischer@bsz-bw.de> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #117738|0 |1 is obsolete| | --- Comment #25 from Katrin Fischer <katrin.fischer@bsz-bw.de> --- Created attachment 120364 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=120364&action=edit Bug 27837: Permanent location to be empty string, check if key exists Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de> -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=27837 Katrin Fischer <katrin.fischer@bsz-bw.de> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|Passed QA |Failed QA --- Comment #26 from Katrin Fischer <katrin.fischer@bsz-bw.de> --- (In reply to Jonathan Druart from comment #20)
Can you explain this follow-up, Kyle? What's the use case, how did you find it? We certainly need a couple of tests to cover it.
I read this as that we need 2 more unit tests that cover some more cases? Setting to failed QA to alert Kyle. -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=27837 Nick Clemens <nick@bywatersolutions.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #120361|0 |1 is obsolete| | Attachment #120362|0 |1 is obsolete| | Attachment #120363|0 |1 is obsolete| | Attachment #120364|0 |1 is obsolete| | --- Comment #27 from Nick Clemens <nick@bywatersolutions.com> --- Created attachment 120562 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=120562&action=edit Bug 27837: Update permanent location if passed into ModItemFromMarc Signed-off-by: Andrew Fuerste-Henry <andrew@bywatersolutions.com> Signed-off-by: Rhonda Kuiper <rkuiper@roundrocktexas.gov> Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io> Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de> -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=27837 --- Comment #28 from Nick Clemens <nick@bywatersolutions.com> --- Created attachment 120563 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=120563&action=edit Bug 27837: Add unit tests Signed-off-by: Andrew Fuerste-Henry <andrew@bywatersolutions.com> Signed-off-by: Rhonda Kuiper <rkuiper@roundrocktexas.gov> Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io> Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de> -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=27837 --- Comment #29 from Nick Clemens <nick@bywatersolutions.com> --- Created attachment 120564 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=120564&action=edit Bug 27837: Prevent the tests to fail is the field is mapped Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io> Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de> -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=27837 --- Comment #30 from Nick Clemens <nick@bywatersolutions.com> --- Created attachment 120565 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=120565&action=edit Bug 27837: Unit tests for blank permanent location -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=27837 --- Comment #31 from Nick Clemens <nick@bywatersolutions.com> --- Created attachment 120566 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=120566&action=edit Bug 27837: Permanent location to be empty string, check if key exists Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de> -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=27837 --- Comment #32 from Nick Clemens <nick@bywatersolutions.com> --- (In reply to Katrin Fischer from comment #26)
(In reply to Jonathan Druart from comment #20)
Can you explain this follow-up, Kyle? What's the use case, how did you find it? We certainly need a couple of tests to cover it.
I read this as that we need 2 more unit tests that cover some more cases? Setting to failed QA to alert Kyle.
I added Unit tests, but neither the tests nor testing in the staff client pass - it seems the followup doesn't fix the issue. Can you look Kyle? -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=27837 Kyle M Hall <kyle@bywatersolutions.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|Failed QA |Signed Off -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=27837 --- Comment #33 from Kyle M Hall <kyle@bywatersolutions.com> --- Created attachment 120616 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=120616&action=edit Bug 27837: Check the MARC directly, not the transformed item If permanent location is mapped, it will exist in the MARC. However, when we are transforming our item hash to MARC, we are losing our permanent location mapping, at least in unit tests. By checking the original MARC for the permenent location, we remove the risk of losing it the "empty" permenent location through the transformation process. We only need to know that it existed in the original item marc to know we need to update it in the database. -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=27837 --- Comment #34 from Kyle M Hall <kyle@bywatersolutions.com> --- Created attachment 120628 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=120628&action=edit Bug 27837: Always pass permanent location from items editor if it was defined By always passing permenent location from the items editor, we can know if permanent location was defined in the framework. This means we can know if we should update permanent location independently of location even if permenent location has an empty value. -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=27837 Kyle M Hall <kyle@bywatersolutions.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #120628|0 |1 is obsolete| | --- Comment #35 from Kyle M Hall <kyle@bywatersolutions.com> --- Created attachment 120629 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=120629&action=edit Bug 27837: Always pass permanent location from items editor if it was defined By always passing permenent location from the items editor, we can know if permanent location was defined in the framework. This means we can know if we should update permanent location independently of location even if permenent location has an empty value. -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=27837 Nick Clemens <nick@bywatersolutions.com> changed: What |Removed |Added ---------------------------------------------------------------------------- See Also| |https://bugs.koha-community | |.org/bugzilla3/show_bug.cgi | |?id=27526 -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=27837 Katrin Fischer <katrin.fischer@bsz-bw.de> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|Signed Off |Failed QA --- Comment #36 from Katrin Fischer <katrin.fischer@bsz-bw.de> --- I am a bit worried about the added warnings from running the tests with and without this patch set: With patch: kohadev-koha@kohadevbox:/home/vagrant/kohaclone$ prove t/db_dependent/Items.t t/db_dependent/Items.t .. 2/14 Use of uninitialized value in numeric eq (==) at t/db_dependent/Items.t line 247. Use of uninitialized value $tag in hash element at /usr/share/perl5/MARC/Record.pm line 202. Use of uninitialized value $tag in regexp compilation at /usr/share/perl5/MARC/Record.pm line 206. Use of uninitialized value $tag in hash element at /usr/share/perl5/MARC/Record.pm line 207. t/db_dependent/Items.t .. 12/14 Use of uninitialized value $tag in hash element at /usr/share/perl5/MARC/Record.pm line 202. Use of uninitialized value $tag in hash element at /usr/share/perl5/MARC/Record.pm line 202. Use of uninitialized value $tag in hash element at /usr/share/perl5/MARC/Record.pm line 202. Use of uninitialized value $tag in hash element at /usr/share/perl5/MARC/Record.pm line 202. t/db_dependent/Items.t .. ok All tests successful. Files=1, Tests=14, 11 wallclock secs ( 0.05 usr 0.01 sys + 7.52 cusr 1.11 csys = 8.69 CPU) Result: PASS Without patch: kohadev-koha@kohadevbox:/home/vagrant/kohaclone$ git checkout master Switched to branch 'master' Your branch is up-to-date with 'origin/master'. kohadev-koha@kohadevbox:/home/vagrant/kohaclone$ prove t/db_dependent/Items.t t/db_dependent/Items.t .. 2/14 Use of uninitialized value in numeric eq (==) at t/db_dependent/Items.t line 247. t/db_dependent/Items.t .. ok All tests successful. -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=27837 Nick Clemens <nick@bywatersolutions.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|Failed QA |Signed Off -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=27837 --- Comment #37 from Nick Clemens <nick@bywatersolutions.com> --- Created attachment 120832 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=120832&action=edit Bug 27837: (follow-up) Do not check subfield unless tag defined This was causing extra warnings when the permanent_location field was unmapped. We only need to check if there is a field defined as you can define a mapping without both a field and subfield, so the existence of one implies the other -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=27837 Martin Renvoize <martin.renvoize@ptfs-europe.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #120562|0 |1 is obsolete| | --- Comment #38 from Martin Renvoize <martin.renvoize@ptfs-europe.com> --- Created attachment 121044 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=121044&action=edit Bug 27837: Update permanent location if passed into ModItemFromMarc Signed-off-by: Andrew Fuerste-Henry <andrew@bywatersolutions.com> Signed-off-by: Rhonda Kuiper <rkuiper@roundrocktexas.gov> Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io> Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de> Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com> -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=27837 Martin Renvoize <martin.renvoize@ptfs-europe.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #120563|0 |1 is obsolete| | --- Comment #39 from Martin Renvoize <martin.renvoize@ptfs-europe.com> --- Created attachment 121045 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=121045&action=edit Bug 27837: Add unit tests Signed-off-by: Andrew Fuerste-Henry <andrew@bywatersolutions.com> Signed-off-by: Rhonda Kuiper <rkuiper@roundrocktexas.gov> Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io> Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de> Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com> -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=27837 Martin Renvoize <martin.renvoize@ptfs-europe.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #120564|0 |1 is obsolete| | --- Comment #40 from Martin Renvoize <martin.renvoize@ptfs-europe.com> --- Created attachment 121046 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=121046&action=edit Bug 27837: Prevent the tests to fail is the field is mapped Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io> Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de> Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com> -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=27837 Martin Renvoize <martin.renvoize@ptfs-europe.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #120565|0 |1 is obsolete| | --- Comment #41 from Martin Renvoize <martin.renvoize@ptfs-europe.com> --- Created attachment 121047 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=121047&action=edit Bug 27837: Unit tests for blank permanent location -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=27837 Martin Renvoize <martin.renvoize@ptfs-europe.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #120566|0 |1 is obsolete| | --- Comment #42 from Martin Renvoize <martin.renvoize@ptfs-europe.com> --- Created attachment 121048 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=121048&action=edit Bug 27837: Permanent location to be empty string, check if key exists Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de> Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com> -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=27837 Martin Renvoize <martin.renvoize@ptfs-europe.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #120616|0 |1 is obsolete| | --- Comment #43 from Martin Renvoize <martin.renvoize@ptfs-europe.com> --- Created attachment 121049 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=121049&action=edit Bug 27837: Check the MARC directly, not the transformed item If permanent location is mapped, it will exist in the MARC. However, when we are transforming our item hash to MARC, we are losing our permanent location mapping, at least in unit tests. By checking the original MARC for the permenent location, we remove the risk of losing it the "empty" permenent location through the transformation process. We only need to know that it existed in the original item marc to know we need to update it in the database. Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com> -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=27837 Martin Renvoize <martin.renvoize@ptfs-europe.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #120629|0 |1 is obsolete| | --- Comment #44 from Martin Renvoize <martin.renvoize@ptfs-europe.com> --- Created attachment 121050 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=121050&action=edit Bug 27837: Always pass permanent location from items editor if it was defined By always passing permenent location from the items editor, we can know if permanent location was defined in the framework. This means we can know if we should update permanent location independently of location even if permenent location has an empty value. Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com> -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=27837 Martin Renvoize <martin.renvoize@ptfs-europe.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #120832|0 |1 is obsolete| | --- Comment #45 from Martin Renvoize <martin.renvoize@ptfs-europe.com> --- Created attachment 121051 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=121051&action=edit Bug 27837: (follow-up) Do not check subfield unless tag defined This was causing extra warnings when the permanent_location field was unmapped. We only need to check if there is a field defined as you can define a mapping without both a field and subfield, so the existence of one implies the other Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com> -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=27837 --- Comment #46 from Martin Renvoize <martin.renvoize@ptfs-europe.com> --- Created attachment 121052 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=121052&action=edit Bug 27837: (QA follow-up) Minor Spelling/Typo correction Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com> -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=27837 Martin Renvoize <martin.renvoize@ptfs-europe.com> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |martin.renvoize@ptfs-europe | |.com Status|Signed Off |Passed QA --- Comment #47 from Martin Renvoize <martin.renvoize@ptfs-europe.com> --- Works as expected, nice use of TDD, tests all passing, QA script happy and no new warnings introduced now. Passing QA -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=27837 --- Comment #48 from Jonathan Druart <jonathan.druart+koha@gmail.com> --- Last patch will be squashed when pushed. -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=27837 Jonathan Druart <jonathan.druart+koha@gmail.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|Passed QA |Pushed to master Version(s)| |21.05.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=27837 --- Comment #49 from Jonathan Druart <jonathan.druart+koha@gmail.com> --- Pushed to master for 21.05, thanks to everybody involved! -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=27837 Fridolin Somers <fridolin.somers@biblibre.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Version(s)|21.05.00 |21.05.00,20.11.06 released in| | Status|Pushed to master |Pushed to stable CC| |fridolin.somers@biblibre.co | |m --- Comment #50 from Fridolin Somers <fridolin.somers@biblibre.com> --- Pushed to 20.11.x for 20.11.06 -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=27837 Andrew Fuerste-Henry <andrew@bywatersolutions.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Version(s)|21.05.00,20.11.06 |21.05.00,20.11.06,20.05.12 released in| | Status|Pushed to stable |Pushed to oldstable --- Comment #51 from Andrew Fuerste-Henry <andrew@bywatersolutions.com> --- Pushed to 20.05.x for 20.05.12 -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=27837 Victor Grousset/tuxayo <victor@tuxayo.net> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |victor@tuxayo.net Status|Pushed to oldstable |RESOLVED Resolution|--- |FIXED --- Comment #52 from Victor Grousset/tuxayo <victor@tuxayo.net> --- Not backported to oldoldstable (19.11.x). Feel free to ask if it's needed. -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=27837 Nick Clemens <nick@bywatersolutions.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Blocks| |28832 Referenced Bugs: https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=28832 [Bug 28832] Batch modification always clears permanent_location if it is mapped in frameworks -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=27837 Andrew Fuerste-Henry <andrew@bywatersolutions.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Blocks| |30909 Referenced Bugs: https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=30909 [Bug 30909] Regression, Permanent shelving location is always updated when editing location if both are mapped to MARC fields -- You are receiving this mail because: You are watching all bug changes.
participants (1)
-
bugzilla-daemon@bugs.koha-community.org