[Bug 31080] New: Block adding the bundle item to its own bundle
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=31080 Bug ID: 31080 Summary: Block adding the bundle item to its own bundle Change sponsored?: --- Product: Koha Version: 20.11 Hardware: All OS: All Status: NEW Severity: enhancement Priority: P5 - low Component: Circulation Assignee: koha-bugs@lists.koha-community.org Reporter: katrin.fischer@bsz-bw.de QA Contact: testopia@bugs.koha-community.org CC: gmcharlt@gmail.com, kyle.m.hall@gmail.com Depends on: 28854 At the moment it's possible to add the bundle item barcode to the bundle. The most prominent effect is, that the bundle can no longer be checked out, as a bundled item is blocked from circulation. So it's not super bad for a bug, but we should catch it with a nice error message if someone makes a copy&paste or scan error there. Referenced Bugs: https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=28854 [Bug 28854] Add ability to create bundles of items -- 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=31080 --- Comment #1 from Martin Renvoize <martin.renvoize@ptfs-europe.com> --- Created attachment 136975 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=136975&action=edit Bug 31080: Prevent bundles from being nested This is a follow-up for bug 28854 to prevent bundle type items from being nested in to other bundles. -- 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=31080 Martin Renvoize <martin.renvoize@ptfs-europe.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|NEW |Needs Signoff CC| |martin.renvoize@ptfs-europe | |.com -- 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=31080 Martin Renvoize <martin.renvoize@ptfs-europe.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Version|20.11 |master Severity|enhancement |normal Assignee|koha-bugs@lists.koha-commun |martin.renvoize@ptfs-europe |ity.org |.com -- 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=31080 --- Comment #2 from Katrin Fischer <katrin.fischer@bsz-bw.de> --- I think this doesn't quite work as supposed yet. 1) Find or create a record with bib-level:c 2) Add an item 3) Copy the barcode of the item and add it to the bundle for the same item --> It will be added without an error Adding any other bundle item works ok (not added) and gives the message added here. Are we missing a unit test? -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=31080 Katrin Fischer <katrin.fischer@bsz-bw.de> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|Needs Signoff |Failed QA -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=31080 --- Comment #3 from Martin Renvoize <martin.renvoize@ptfs-europe.com> --- Created attachment 137053 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=137053&action=edit Bug 31080: Unit tests Unit tests for add_to_bundle functionality that prevents bundle nesting. Test plan 1) Run t/db_dependent/Koha/Item.t 2) The test should fail 3) Apply the second patch 4) Re-run the test and watch it pass. -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=31080 Martin Renvoize <martin.renvoize@ptfs-europe.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #136975|0 |1 is obsolete| | --- Comment #4 from Martin Renvoize <martin.renvoize@ptfs-europe.com> --- Created attachment 137054 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=137054&action=edit Bug 31080: Prevent bundles from being nested This is a follow-up for bug 28854 to prevent bundle type items from being nested in to other bundles. -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=31080 Martin Renvoize <martin.renvoize@ptfs-europe.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|Failed QA |Needs Signoff --- Comment #5 from Martin Renvoize <martin.renvoize@ptfs-europe.com> --- Unit tests added and corrections made to adjust for feedback. -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=31080 Bug 31080 depends on bug 28854, which changed state. Bug 28854 Summary: Add ability to create bundles of items for circulation https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=28854 What |Removed |Added ---------------------------------------------------------------------------- Status|Pushed to master |RESOLVED Resolution|--- |FIXED -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=31080 Bug 31080 depends on bug 28854, which changed state. Bug 28854 Summary: Add ability to create bundles of items for circulation https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=28854 What |Removed |Added ---------------------------------------------------------------------------- Status|RESOLVED |Needs documenting Resolution|FIXED |--- -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=31080 --- Comment #6 from Martin Renvoize <martin.renvoize@ptfs-europe.com> --- Looks like this got forgotten about... -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=31080 Martin Renvoize <martin.renvoize@ptfs-europe.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #137053|0 |1 is obsolete| | --- Comment #7 from Martin Renvoize <martin.renvoize@ptfs-europe.com> --- Created attachment 140908 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=140908&action=edit Bug 31080: Unit tests Unit tests for add_to_bundle functionality that prevents bundle nesting. Test plan 1) Run t/db_dependent/Koha/Item.t 2) The test should fail 3) Apply the second patch 4) Re-run the test and watch it pass. -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=31080 Martin Renvoize <martin.renvoize@ptfs-europe.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #137054|0 |1 is obsolete| | --- Comment #8 from Martin Renvoize <martin.renvoize@ptfs-europe.com> --- Created attachment 140909 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=140909&action=edit Bug 31080: Prevent bundles from being nested This is a follow-up for bug 28854 to prevent bundle type items from being nested in to other bundles. -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=31080 --- Comment #9 from Martin Renvoize <martin.renvoize@ptfs-europe.com> --- Rebased for good measure.. be nice to see this follow-up get in within this cycle. -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=31080 Bug 31080 depends on bug 28854, which changed state. Bug 28854 Summary: Add ability to create bundles of items for circulation https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=28854 What |Removed |Added ---------------------------------------------------------------------------- Status|Needs documenting |RESOLVED Resolution|--- |FIXED -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=31080 Katrin Fischer <katrin.fischer@bsz-bw.de> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|Needs Signoff |Signed Off 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=31080 Katrin Fischer <katrin.fischer@bsz-bw.de> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #140908|0 |1 is obsolete| | --- Comment #10 from Katrin Fischer <katrin.fischer@bsz-bw.de> --- Created attachment 143991 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=143991&action=edit Bug 31080: Unit tests Unit tests for add_to_bundle functionality that prevents bundle nesting. Test plan 1) Run t/db_dependent/Koha/Item.t 2) The test should fail 3) Apply the second patch 4) Re-run the test and watch it pass. 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=31080 Katrin Fischer <katrin.fischer@bsz-bw.de> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #140909|0 |1 is obsolete| | --- Comment #11 from Katrin Fischer <katrin.fischer@bsz-bw.de> --- Created attachment 143992 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=143992&action=edit Bug 31080: Prevent bundles from being nested This is a follow-up for bug 28854 to prevent bundle type items from being nested in to other bundles. 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=31080 --- Comment #12 from Martin Renvoize <martin.renvoize@ptfs-europe.com> --- Shame this didn't make it in time for 22.11 -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=31080 Marcel de Rooy <m.de.rooy@rijksmuseum.nl> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |m.de.rooy@rijksmuseum.nl --- Comment #13 from Marcel de Rooy <m.de.rooy@rijksmuseum.nl> --- (In reply to Martin Renvoize from comment #12)
Shame this didn't make it in time for 22.11
It contains strings. Sorry ;) -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=31080 --- Comment #14 from Katrin Fischer <katrin.fischer@bsz-bw.de> --- We have had some incremental updates to the po files. Maybe we put this in Tomas queue and when something bad requires a string change, this could be pushed with it before we run another update. -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=31080 --- Comment #15 from Marcel de Rooy <m.de.rooy@rijksmuseum.nl> --- if ( ref($_) eq 'Koha::Exceptions::Object::DuplicateID' ) { return $c->render( status => 409, openapi => { error => 'Item is already bundled', key => $_->duplicate_id } ); } elsif ( ref($_) eq 'Koha::Exceptions::Item::Bundle::IsBundle' ) { return $c->render( status => 400, openapi => { error => 'Bundles cannot be nested' Somehow I wonder why we differentiate here between 400 and 409 ? 400 is the general failure, 409 is a conflict. The nested bundle could be a 409 too. But I would not mind having both on 400 as well. This seems inconsistent. No blocker, easily to be adjusted.. -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=31080 --- Comment #16 from Marcel de Rooy <m.de.rooy@rijksmuseum.nl> --- Dont forget the template btw: + } else if ( data.status === 400 ) { -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=31080 Marcel de Rooy <m.de.rooy@rijksmuseum.nl> 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=31080 Marcel de Rooy <m.de.rooy@rijksmuseum.nl> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #143991|0 |1 is obsolete| | --- Comment #17 from Marcel de Rooy <m.de.rooy@rijksmuseum.nl> --- Created attachment 144054 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=144054&action=edit Bug 31080: Unit tests Unit tests for add_to_bundle functionality that prevents bundle nesting. Test plan 1) Run t/db_dependent/Koha/Item.t 2) The test should fail 3) Apply the second patch 4) Re-run the test and watch it pass. Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de> Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl> -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=31080 Marcel de Rooy <m.de.rooy@rijksmuseum.nl> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #143992|0 |1 is obsolete| | --- Comment #18 from Marcel de Rooy <m.de.rooy@rijksmuseum.nl> --- Created attachment 144055 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=144055&action=edit Bug 31080: Prevent bundles from being nested This is a follow-up for bug 28854 to prevent bundle type items from being nested in to other bundles. Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de> Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl> -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=31080 Marcel de Rooy <m.de.rooy@rijksmuseum.nl> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |tomascohen@gmail.com QA Contact|testopia@bugs.koha-communit |m.de.rooy@rijksmuseum.nl |y.org | --- Comment #19 from Marcel de Rooy <m.de.rooy@rijksmuseum.nl> --- (In reply to Katrin Fischer from comment #14)
We have had some incremental updates to the po files. Maybe we put this in Tomas queue and when something bad requires a string change, this could be pushed with it before we run another update.
Tomás: Do as you please :) -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=31080 Tomás Cohen Arazi <tomascohen@gmail.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Version(s)| |22.11.00 released in| | Status|Passed QA |Pushed to master -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=31080 --- Comment #20 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=31080 Martin Renvoize <martin.renvoize@ptfs-europe.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Blocks| |32802 Referenced Bugs: https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=32802 [Bug 32802] Bundle handling JS should be moved to an asset -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=31080 Katrin Fischer <katrin.fischer@bsz-bw.de> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|Pushed to master |Needs documenting -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=31080 Martin Renvoize <martin.renvoize@ptfs-europe.com> changed: What |Removed |Added ---------------------------------------------------------------------------- CC|martin.renvoize@ptfs-europe | |.com | -- You are receiving this mail because: You are watching all bug changes.
participants (1)
-
bugzilla-daemon@bugs.koha-community.org