[Bug 37710] New: Remove the marc link when removing an item from a bundle
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=37710 Bug ID: 37710 Summary: Remove the marc link when removing an item from a bundle Change sponsored?: --- Product: Koha Version: Main Hardware: All OS: All Status: NEW Severity: enhancement Priority: P5 - low Component: Cataloging Assignee: koha-bugs@lists.koha-community.org Reporter: baptiste.wojtkowski@biblibre.com QA Contact: testopia@bugs.koha-community.org CC: m.de.rooy@rijksmuseum.nl A new functionality to automatically add a new MARC link has been added in Bug 29560 (Add option to create MARC links when adding items to bundles). There should also be a way to remove this link when removing the item from the bundle. Moreover I don't know if this should be a second bug but since the link is not removed, there can be multiple links if the item is added to a new bundle. -- 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=37710 Baptiste Wojtkowski (bwoj) <baptiste.wojtkowski@biblibre.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|NEW |Needs Signoff Patch complexity|--- |Small patch -- 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=37710 --- Comment #1 from Baptiste Wojtkowski (bwoj) <baptiste.wojtkowski@biblibre.com> --- Created attachment 171832 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=171832&action=edit Bug 37710: Remove the marc link when removing an item from a bundle A new functionality to automatically add a new MARC link has been added in Bug 29560 (Add option to create MARC links when adding items to bundles). There should also be a way to remove this link when removing the item from the bundle. Moreover I don't know if this should be a second bug but since the link is not removed, there can be multiple links if the item is added to a new bundle. TEST PLAN: 1 - Create a bundle on an item by changing the 7th character of the leader to c (go to the marc, click on the button at the right of the field 000 and change the bibliographical level to collection). 2 - Add an item to the bundle (on the biblio, exemplars will have a button "manage bundle"->add_to_bundle, fill in a barcode and check "add MARC link") 3 - Check on the MARC that field 461 (UNIMARC) or 773 (MARC21) is propperly filled 4 - Remove the item from the bundle 5 - Check that the marc field is still there and remove it manually 6 - APPLY PATCH 7 - Repeat 2-5 -> the field should have been automatically removed -- 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=37710 Lucas Gass <lucas@bywatersolutions.com> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |lucas@bywatersolutions.com Status|Needs Signoff |Failed QA Assignee|koha-bugs@lists.koha-commun |baptiste.wojtkowski@biblibr |ity.org |e.com --- Comment #2 from Lucas Gass <lucas@bywatersolutions.com> --- Can we get some unit tests to cover unlink_marc_host? -- 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=37710 Baptiste Wojtkowski (bwoj) <baptiste.wojtkowski@biblibre.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|Failed QA |Needs Signoff -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=37710 Baptiste Wojtkowski (bwoj) <baptiste.wojtkowski@biblibre.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #171832|0 |1 is obsolete| | --- Comment #3 from Baptiste Wojtkowski (bwoj) <baptiste.wojtkowski@biblibre.com> --- Created attachment 171933 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=171933&action=edit Bug 37710: 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=37710 --- Comment #4 from Baptiste Wojtkowski (bwoj) <baptiste.wojtkowski@biblibre.com> --- Created attachment 171934 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=171934&action=edit Bug 37710: Remove the marc link when removing an item from a bundle A new functionality to automatically add a new MARC link has been added in Bug 29560 (Add option to create MARC links when adding items to bundles). There should also be a way to remove this link when removing the item from the bundle. Moreover I don't know if this should be a second bug but since the link is not removed, there can be multiple links if the item is added to a new bundle. TEST PLAN: 1 - Apply tests and prove t/db_dependent/Koha/Biblio.t -> should fail 2 - Create a bundle on an item by changing the 7th character of the leader to c (go to the marc, click on the button at the right of the field 000 and change the bibliographical level to collection). 3 - Add an item to the bundle (on the biblio, exemplars will have a button "manage bundle"->add_to_bundle, fill in a barcode and check "add MARC link") 4 - Check on the MARC that field 461 (UNIMARC) or 773 (MARC21) is propperly filled 5 - Remove the item from the bundle 6 - Check that the marc field is still there and remove it manually 7 - APPLY PATCH 8 - Repeat 2-5 -> the field should have been automatically removed 9 - Run tests -> should pass Note: as for link_marc_host, tests assume you are using MARC21 -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=37710 Baptiste Wojtkowski (bwoj) <baptiste.wojtkowski@biblibre.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Depends on| |37996 Referenced Bugs: https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=37996 [Bug 37996] Links created by link_marc_host do not contain 773$0 in MARC21 -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=37710 --- Comment #5 from Baptiste Wojtkowski (bwoj) <baptiste.wojtkowski@biblibre.com> --- Note : In order to prove the behavior properly, I had to create Bug 37996 -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=37710 Baptiste Wojtkowski (bwoj) <baptiste.wojtkowski@biblibre.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Blocks| |38093 Referenced Bugs: https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=38093 [Bug 38093] Bundles: Add MARC link options should also add a link in 462 -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=37710 Thibault Keromnès <thibault.keromnes@univ-paris8.fr> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #171933|0 |1 is obsolete| | --- Comment #6 from Thibault Keromnès <thibault.keromnes@univ-paris8.fr> --- Created attachment 176427 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=176427&action=edit Bug 37710: Add unit tests Signed-off-by: Thibault Keromnes <thibault.keromnes@univ-paris8.fr> -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=37710 Thibault Keromnès <thibault.keromnes@univ-paris8.fr> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #171934|0 |1 is obsolete| | --- Comment #7 from Thibault Keromnès <thibault.keromnes@univ-paris8.fr> --- Created attachment 176428 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=176428&action=edit Bug 37710: Remove the marc link when removing an item from a bundle A new functionality to automatically add a new MARC link has been added in Bug 29560 (Add option to create MARC links when adding items to bundles). There should also be a way to remove this link when removing the item from the bundle. Moreover I don't know if this should be a second bug but since the link is not removed, there can be multiple links if the item is added to a new bundle. TEST PLAN: 1 - Apply tests and prove t/db_dependent/Koha/Biblio.t -> should fail 2 - Create a bundle on an item by changing the 7th character of the leader to c (go to the marc, click on the button at the right of the field 000 and change the bibliographical level to collection). 3 - Add an item to the bundle (on the biblio, exemplars will have a button "manage bundle"->add_to_bundle, fill in a barcode and check "add MARC link") 4 - Check on the MARC that field 461 (UNIMARC) or 773 (MARC21) is propperly filled 5 - Remove the item from the bundle 6 - Check that the marc field is still there and remove it manually 7 - APPLY PATCH 8 - Repeat 2-5 -> the field should have been automatically removed 9 - Run tests -> should pass Note: as for link_marc_host, tests assume you are using MARC21 Signed-off-by: Thibault Keromnes <thibault.keromnes@univ-paris8.fr> -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=37710 Thibault Keromnès <thibault.keromnes@univ-paris8.fr> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |thibault.keromnes@univ-pari | |s8.fr 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=37710 Jonathan Druart <jonathan.druart@gmail.com> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |jonathan.druart@gmail.com --- Comment #8 from Jonathan Druart <jonathan.druart@gmail.com> --- Should not we unlink from remove_from_bundle? -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=37710 --- Comment #9 from Jonathan Druart <jonathan.druart@gmail.com> --- Should not we unlink from Koha::Item->remove_from_bundle? -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=37710 --- Comment #10 from Baptiste Wojtkowski (bwoj) <baptiste.wojtkowski@biblibre.com> --- (In reply to Jonathan Druart from comment #9)
Should not we unlink from Koha::Item->remove_from_bundle?
In my opinion, here we want that add_to_bundle and remove_from_bundle work the same way. Since add_to_bundle requires calling link_marc_host aside, I would say that we want to build remove_from_bundle the same way, don't you think ? Hereafter a call to add_to_bundle in Koha/REST/V1/Items.pm 327 my $link = $item->add_to_bundle( $bundle_item, $options ); 328 if ($add_link) { 329 $bundle_item->biblio->link_marc_host( { host => $item->biblio } ); 330 } -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=37710 --- Comment #11 from Jonathan Druart <jonathan.druart@gmail.com> --- I will ask the question differently. We have other remove_from_bundle calls: circ/returns.pl: $verify_item->remove_from_bundle; Do we want to unlink there? -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=37710 Lucas Gass (lukeg) <lucas@bywatersolutions.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|Signed Off |BLOCKED --- Comment #12 from Lucas Gass (lukeg) <lucas@bywatersolutions.com> --- Since the dependency is FQA I will set this one to BLOCKED for now. -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=37710 Bug 37710 depends on bug 37996, which changed state. Bug 37996 Summary: Links created by link_marc_host should contain 773$0 in MARC21 https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=37996 What |Removed |Added ---------------------------------------------------------------------------- Status|Failed QA |RESOLVED Resolution|--- |DUPLICATE -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=37710 Martin Renvoize (ashimema) <martin.renvoize@openfifth.co.uk> changed: What |Removed |Added ---------------------------------------------------------------------------- Depends on| |22439 Referenced Bugs: https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=22439 [Bug 22439] Duplicated code in PrepHostMarcField and prepare_host_field -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=37710 Arthur Suzuki <arthur.suzuki@biblibre.com> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |arthur.suzuki@biblibre.com Depends on|37996 | Referenced Bugs: https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=37996 [Bug 37996] Links created by link_marc_host should contain 773$0 in MARC21 -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=37710 --- Comment #13 from Arthur Suzuki <arthur.suzuki@biblibre.com> --- trying to rebase on 22439 and removing dependancy to the resolve duplicate 37996. I managed to get the unit tests pass with minor changes but the test plan is missing "EasyAnalyticalRecords" should be set to 1. -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=37710 Arthur Suzuki <arthur.suzuki@biblibre.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|BLOCKED |Signed Off -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=37710 Arthur Suzuki <arthur.suzuki@biblibre.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #176427|0 |1 is obsolete| | Attachment #176428|0 |1 is obsolete| | --- Comment #14 from Arthur Suzuki <arthur.suzuki@biblibre.com> --- Created attachment 190957 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=190957&action=edit Bug 37710: Add unit tests Signed-off-by: Thibault Keromnes <thibault.keromnes@univ-paris8.fr> -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=37710 --- Comment #15 from Arthur Suzuki <arthur.suzuki@biblibre.com> --- Created attachment 190958 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=190958&action=edit Bug 37710: Remove the marc link when removing an item from a bundle A new functionality to automatically add a new MARC link has been added in Bug 29560 (Add option to create MARC links when adding items to bundles). There should also be a way to remove this link when removing the item from the bundle. Moreover I don't know if this should be a second bug but since the link is not removed, there can be multiple links if the item is added to a new bundle. TEST PLAN: 1 - Apply tests and prove t/db_dependent/Koha/Biblio.t -> should fail 2 - Create a bundle on an item by changing the 7th character of the leader to c (go to the marc, click on the button at the right of the field 000 and change the bibliographical level to collection). 3 - Add an item to the bundle (on the biblio, exemplars will have a button "manage bundle"->add_to_bundle, fill in a barcode and check "add MARC link") 4 - Check on the MARC that field 461 (UNIMARC) or 773 (MARC21) is propperly filled 5 - Remove the item from the bundle 6 - Check that the marc field is still there and remove it manually 7 - APPLY PATCH 8 - Repeat 2-5 -> the field should have been automatically removed 9 - Run tests -> should pass Note: as for link_marc_host, tests assume you are using MARC21 Signed-off-by: Thibault Keromnes <thibault.keromnes@univ-paris8.fr> -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=37710 Arthur Suzuki <arthur.suzuki@biblibre.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #190958|0 |1 is obsolete| | --- Comment #16 from Arthur Suzuki <arthur.suzuki@biblibre.com> --- Created attachment 190959 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=190959&action=edit Bug 37710: Remove the marc link when removing an item from a bundle A new functionality to automatically add a new MARC link has been added in Bug 29560 (Add option to create MARC links when adding items to bundles). There should also be a way to remove this link when removing the item from the bundle. Moreover I don't know if this should be a second bug but since the link is not removed, there can be multiple links if the item is added to a new bundle. TEST PLAN: 1 - Apply tests and prove t/db_dependent/Koha/Biblio.t -> should fail 2 - Set system preference "EasyAnalyticalRecords" to 1. 3 - Create a bundle on an item by changing the 7th character of the leader to c (go to the marc, click on the button at the right of the field 000 and change the bibliographical level to collection). 4 - Add an item to the bundle (on the biblio, exemplars will have a button "manage bundle"->add_to_bundle, fill in a barcode and check "add MARC link") 5 - Check on the MARC that field 461 (UNIMARC) or 773 (MARC21) is propperly filled 6 - Remove the item from the bundle 7 - Check that the marc field is still there and remove it manually 8 - APPLY PATCH 9 - Repeat 2-5 -> the field should have been automatically removed 10 - Run tests -> should pass Note: as for link_marc_host, tests assume you are using MARC21 Signed-off-by: Thibault Keromnes <thibault.keromnes@univ-paris8.fr> -- You are receiving this mail because: You are watching all bug changes.
participants (1)
-
bugzilla-daemon@bugs.koha-community.org