Bugzilla – Attachment 28725 Details for
Bug 11857
Number of patrons on a patron list not accurate
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
[SIGNED-OFF] Bug 11857 - Number of patrons on a patron list not accurate
SIGNED-OFF-Bug-11857---Number-of-patrons-on-a-patr.patch (text/plain), 2.15 KB, created by
Bernardo Gonzalez Kriegel
on 2014-06-09 03:20:08 UTC
(
hide
)
Description:
[SIGNED-OFF] Bug 11857 - Number of patrons on a patron list not accurate
Filename:
MIME Type:
Creator:
Bernardo Gonzalez Kriegel
Created:
2014-06-09 03:20:08 UTC
Size:
2.15 KB
patch
obsolete
>From 8862000d7d0802603a1f5a4ea5d810b322587bd6 Mon Sep 17 00:00:00 2001 >From: Fridolin Somers <fridolin.somers@biblibre.com> >Date: Thu, 5 Jun 2014 17:21:28 +0200 >Subject: [PATCH] [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@gmail.com> >Work as described, no koha-qa errors. >--- > .../prog/en/modules/patron_lists/lists.tt | 2 +- > 1 file changed, 1 insertion(+), 1 deletion(-) > >diff --git a/koha-tmpl/intranet-tmpl/prog/en/modules/patron_lists/lists.tt b/koha-tmpl/intranet-tmpl/prog/en/modules/patron_lists/lists.tt >index 8be8035..2703144 100644 >--- a/koha-tmpl/intranet-tmpl/prog/en/modules/patron_lists/lists.tt >+++ b/koha-tmpl/intranet-tmpl/prog/en/modules/patron_lists/lists.tt >@@ -51,7 +51,7 @@ > [% FOREACH l IN lists %] > <tr> > <td>[% l.name %]</td> >- <td>[% l.patron_list_patrons.size || 0 %]</td> >+ <td>[% l.patron_list_patrons_rs.count || 0 %]</td> > <td> > <a class="btn btn-mini" href="list.pl?patron_list_id=[% l.patron_list_id %]"> > <i class="icon-plus-sign"></i> Add patrons <i class="icon-user"></i> >-- >1.7.9.5
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Diff
View Attachment As Raw
Actions:
View
|
Diff
|
Splinter Review
Attachments on
bug 11857
:
28674
|
28725
|
28728