[Koha-bugs] [Bug 11857] Number of patrons on a patron list not accurate
bugzilla-daemon at bugs.koha-community.org
bugzilla-daemon at bugs.koha-community.org
Mon Jun 9 05:20:08 CEST 2014
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=11857
Bernardo Gonzalez Kriegel <bgkriegel at gmail.com> changed:
What |Removed |Added
----------------------------------------------------------------------------
Attachment #28674|0 |1
is obsolete| |
--- Comment #5 from Bernardo Gonzalez Kriegel <bgkriegel at 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/7250
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 at gmail.com>
Work as described, no koha-qa errors.
--
You are receiving this mail because:
You are watching all bug changes.
More information about the Koha-bugs
mailing list