[Bug 9535] New: Patron card creator "Remove duplicates" function doesn't work
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=9535 Bug ID: 9535 Summary: Patron card creator "Remove duplicates" function doesn't work Classification: Unclassified Change sponsored?: --- Product: Koha Version: master Hardware: All OS: All Status: NEW Severity: normal Priority: P5 - low Component: Tools Assignee: cnighswonger@foundations.edu Reporter: oleonard@myacpl.org If I add patrons to a batch in the patron card creator, then click the "Remove duplicates" button, all but the first patron in my batch is removed even though the rest were not duplicates. -- You are receiving this mail because: You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=9535 Katrin Fischer <katrin.fischer@bsz-bw.de> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |katrin.fischer@bsz-bw.de Severity|normal |major --- Comment #1 from Katrin Fischer <katrin.fischer@bsz-bw.de> --- Upping severity a bit - this is a quite annoying bug! -- You are receiving this mail because: You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=9535 Chris Nighswonger <cnighswonger@foundations.edu> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|NEW |ASSIGNED --- Comment #2 from Chris Nighswonger <cnighswonger@foundations.edu> --- I won't have time to work up a patch until later next week, but here's the fix: C4::Creators::Batch line 202 should read as follows: my @duplicate_items = grep{$_->{'item_number'} ? $seen{$_->{'item_number'}}++ : $seen{$_->{'borrower_number'}}++} @{$self->{'items'}}; -- You are receiving this mail because: You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=9535 --- Comment #3 from Chris Nighswonger <cnighswonger@foundations.edu> --- Created attachment 17130 --> http://bugs.koha-community.org/bugzilla3/attachment.cgi?id=17130&action=edit Proposed Fix -- You are receiving this mail because: You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=9535 Chris Nighswonger <cnighswonger@foundations.edu> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|ASSIGNED |Needs Signoff Patch complexity|--- |Trivial patch -- You are receiving this mail because: You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=9535 Owen Leonard <oleonard@myacpl.org> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|Needs Signoff |Signed Off -- You are receiving this mail because: You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=9535 Owen Leonard <oleonard@myacpl.org> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #17130|0 |1 is obsolete| | --- Comment #4 from Owen Leonard <oleonard@myacpl.org> --- Created attachment 17132 --> http://bugs.koha-community.org/bugzilla3/attachment.cgi?id=17132&action=edit [SIGNED-OFF] Bug 9535 - Patron card creator "Remove duplicates" function doesn't work This bug was due to a difference in field names used in the item data for items versus patrons. This patch adds a ternary to discern between the two. To test: Before applying patch: 1. Create a batch of patroncards with one duplicate. 2. Run the de-duplication on the batch. 3. Note that all patrons beyond the first in the batch are now deleted. After applying patch: 4. Repeat steps 1-2. 5. Note that only the duplicate patron is removed. Signed-off-by: Chris Nighswonger <cnighswonger@foundations.edu> Signed-off-by: Owen Leonard <oleonard@myacpl.org> Tested successfully with both patron card batches and label batches. -- You are receiving this mail because: You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=9535 Jonathan Druart <jonathan.druart@biblibre.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|Signed Off |Passed QA CC| |jonathan.druart@biblibre.co | |m QA Contact| |jonathan.druart@biblibre.co | |m --- Comment #5 from Jonathan Druart <jonathan.druart@biblibre.com> --- QA comment: Works great. With the patch, I added some duplicates, clicked on the "Remove duplicates" button and the deduplication works as expected. Marked as Passed QA. -- You are receiving this mail because: You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=9535 Jonathan Druart <jonathan.druart@biblibre.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #17132|0 |1 is obsolete| | --- Comment #6 from Jonathan Druart <jonathan.druart@biblibre.com> --- Created attachment 17161 --> http://bugs.koha-community.org/bugzilla3/attachment.cgi?id=17161&action=edit Bug 9535 - Patron card creator "Remove duplicates" function doesn't work This bug was due to a difference in field names used in the item data for items versus patrons. This patch adds a ternary to discern between the two. To test: Before applying patch: 1. Create a batch of patroncards with one duplicate. 2. Run the de-duplication on the batch. 3. Note that all patrons beyond the first in the batch are now deleted. After applying patch: 4. Repeat steps 1-2. 5. Note that only the duplicate patron is removed. Signed-off-by: Chris Nighswonger <cnighswonger@foundations.edu> Signed-off-by: Owen Leonard <oleonard@myacpl.org> Tested successfully with both patron card batches and label batches. Signed-off-by: Jonathan Druart <jonathan.druart@biblibre.com> Add indentation for readability -- You are receiving this mail because: You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=9535 Jared Camins-Esakov <jcamins@cpbibliography.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|Passed QA |Pushed to Master --- Comment #7 from Jared Camins-Esakov <jcamins@cpbibliography.com> --- This patch has been pushed to master. -- You are receiving this mail because: You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=9535 Chris Cormack <chris@bigballofwax.co.nz> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|Pushed to Master |Pushed to Stable CC| |chris@bigballofwax.co.nz --- Comment #8 from Chris Cormack <chris@bigballofwax.co.nz> --- Pushed to 3.10.x and 3.8.x will be in 3.10.5 and 3.8.12 -- You are receiving this mail because: You are watching all bug changes.
participants (1)
-
bugzilla-daemon@bugs.koha-community.org