[Bug 11857] New: Number of patrons on a patron list not accurate
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=11857 Bug ID: 11857 Summary: Number of patrons on a patron list not accurate Change sponsored?: --- Product: Koha Version: master Hardware: All OS: All Status: NEW Severity: normal Priority: P5 - low Component: Patrons Assignee: koha-bugs@lists.koha-community.org Reporter: m.de.rooy@rijksmuseum.nl QA Contact: testopia@bugs.koha-community.org CC: gmcharlt@gmail.com, kyle.m.hall@gmail.com I added one patron to a patron list. On the Patron lists form it says that the list contains 3 patrons. The table looked like this at that moment: +-----------------------+----------------+----------------+ | patron_list_patron_id | patron_list_id | borrowernumber | +-----------------------+----------------+----------------+ | 19 | 3 | 23 | +-----------------------+----------------+----------------+ -- You are receiving this mail because: You are the assignee for the bug. You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=11857 --- Comment #1 from M. de Rooy <m.de.rooy@rijksmuseum.nl> --- Just mentioning that when I saw Koha/List/Patron.pm for the first time, I really had no idea what it was. Too much abstraction perhaps :) Since we already have lists (virtual shelves), I would have preferred a class like PatronList. Adding something different in the Koha/List folder would probably just add to the confusion. -- You are receiving this mail because: You are the assignee for the bug. You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=11857 --- Comment #2 from M. de Rooy <m.de.rooy@rijksmuseum.nl> --- And even more confusing: pref AddPatronLists.. Has nothing to do with patron lists at all. -- You are receiving this mail because: You are the assignee for the bug. You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=11857 Fridolin SOMERS <fridolyn.somers@biblibre.com> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |fridolyn.somers@biblibre.co | |m Assignee|koha-bugs@lists.koha-commun |fridolyn.somers@biblibre.co |ity.org |m -- You are receiving this mail because: You are the assignee for the bug. You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=11857 Fridolin SOMERS <fridolyn.somers@biblibre.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|NEW |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=11857 --- Comment #3 from Fridolin SOMERS <fridolyn.somers@biblibre.com> --- Created attachment 28674 --> http://bugs.koha-community.org/bugzilla3/attachment.cgi?id=28674&action=edit Bug 11857 - Number of patrons on a patron list not accurate When creating a patron list with only 1 patron, the patron lists page says that the list contains 3 patrons. When creating a patron list with only 1 patron, it works fine. This is caused by the fact that access on "patron_list_patrons" Koha::Schema::Result::PatronList object retruns an hash if one result and an array if more results. See similar problem at http://permalink.gmane.org/gmane.comp.lang.perl.modules.template-toolkit/725... This patch replaces by the call on resultset and then the use of "count" method. Test plan : - Go to patron lists : /cgi-bin/koha/patron_lists/lists.pl - Create a new patron list LIO - Add one patron - Create a new patron list LIM - Add 2 patrons - Go to patron lists : /cgi-bin/koha/patron_lists/lists.pl => Without this patch you see : Name Patrons in list LIO 3 LIM 2 => With this patch you see : Name Patrons in list LIO 1 LIM 2 -- You are receiving this mail because: You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=11857 Fridolin SOMERS <fridolyn.somers@biblibre.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Depends on| |10565 -- You are receiving this mail because: You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=11857 --- Comment #4 from Fridolin SOMERS <fridolyn.somers@biblibre.com> --- I'm not 100% sure how the patch works, I'm new to DBIx. -- You are receiving this mail because: You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=11857 Koha Team AMU <koha.aixmarseille@gmail.com> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |koha.aixmarseille@gmail.com -- You are receiving this mail because: You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=11857 Bernardo Gonzalez Kriegel <bgkriegel@gmail.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #28674|0 |1 is obsolete| | --- Comment #5 from Bernardo Gonzalez Kriegel <bgkriegel@gmail.com> --- Created attachment 28725 --> http://bugs.koha-community.org/bugzilla3/attachment.cgi?id=28725&action=edit [SIGNED-OFF] Bug 11857 - Number of patrons on a patron list not accurate When creating a patron list with only 1 patron, the patron lists page says that the list contains 3 patrons. When creating a patron list with only 1 patron, it works fine. This is caused by the fact that access on "patron_list_patrons" Koha::Schema::Result::PatronList object retruns an hash if one result and an array if more results. See similar problem at http://permalink.gmane.org/gmane.comp.lang.perl.modules.template-toolkit/725... This patch replaces by the call on resultset and then the use of "count" method. Test plan : - Go to patron lists : /cgi-bin/koha/patron_lists/lists.pl - Create a new patron list LIO - Add one patron - Create a new patron list LIM - Add 2 patrons - Go to patron lists : /cgi-bin/koha/patron_lists/lists.pl => Without this patch you see : Name Patrons in list LIO 3 LIM 2 => With this patch you see : Name Patrons in list LIO 1 LIM 2 Signed-off-by: Bernardo Gonzalez Kriegel <bgkriegel@gmail.com> Work as described, no koha-qa errors. -- You are receiving this mail because: You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=11857 Bernardo Gonzalez Kriegel <bgkriegel@gmail.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|Needs Signoff |Signed Off CC| |bgkriegel@gmail.com -- You are receiving this mail because: You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=11857 Katrin Fischer <katrin.fischer@bsz-bw.de> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|Signed Off |Passed QA -- You are receiving this mail because: You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=11857 Katrin Fischer <katrin.fischer@bsz-bw.de> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #28725|0 |1 is obsolete| | --- Comment #6 from Katrin Fischer <katrin.fischer@bsz-bw.de> --- Created attachment 28728 --> http://bugs.koha-community.org/bugzilla3/attachment.cgi?id=28728&action=edit [PASSED QA] Bug 11857 - Number of patrons on a patron list not accurate When creating a patron list with only 1 patron, the patron lists page says that the list contains 3 patrons. When creating a patron list with only 1 patron, it works fine. This is caused by the fact that access on "patron_list_patrons" Koha::Schema::Result::PatronList object returns an hash if one result and an array if more results. See similar problem at http://permalink.gmane.org/gmane.comp.lang.perl.modules.template-toolkit/725... This patch replaces by the call on resultset and then the use of "count" method. Test plan : - Go to patron lists : /cgi-bin/koha/patron_lists/lists.pl - Create a new patron list LIO - Add one patron - Create a new patron list LIM - Add 2 patrons - Go to patron lists : /cgi-bin/koha/patron_lists/lists.pl => Without this patch you see : Name Patrons in list LIO 3 LIM 2 => With this patch you see : Name Patrons in list LIO 1 LIM 2 Signed-off-by: Bernardo Gonzalez Kriegel <bgkriegel@gmail.com> Work as described, no koha-qa errors. Signed-off-by: Katrin Fischer <Katrin.Fischer.83@web.de> Passes all tests and QA script. Confirmed the problem and that the patch fixes it. -- You are receiving this mail because: You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=11857 Tomás Cohen Arazi <tomascohen@gmail.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|Passed QA |Pushed to Master CC| |tomascohen@gmail.com --- Comment #7 from Tomás Cohen Arazi <tomascohen@gmail.com> --- Patch pushed to master. Thanks Fridolin! -- You are receiving this mail because: You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=11857 Galen Charlton <gmcharlt@gmail.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|Pushed to Master |Pushed to Stable --- Comment #8 from Galen Charlton <gmcharlt@gmail.com> --- Pushed to 3.16.x for inclusion in 3.16.2. -- You are receiving this mail because: You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=11857 Owen Leonard <oleonard@myacpl.org> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |katrin.fischer@bsz-bw.de --- Comment #9 from Owen Leonard <oleonard@myacpl.org> --- *** Bug 11950 has been marked as a duplicate of this bug. *** -- You are receiving this mail because: You are watching all bug changes.
participants (1)
-
bugzilla-daemon@bugs.koha-community.org