Bug 16966: [QA Follow-up] Check count, not size in template

The method size is not covered by tests at koha-tmpl/intranet-tmpl/prog/en/modules/tools/cleanborrowers.tt line 163.
The method size is not covered by tests at koha-tmpl/intranet-tmpl/prog/en/modules/tools/cleanborrowers.tt line 183.

Script cleanborrowers passes patrons_to_delete and patrons_to_anonymize to
the template. One is an array ref where we should use 'size', the other is a
Koha::Patrons object where we should use 'count'.
If we don't, we will not anonymize a lot of records ;)

Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>

Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
This commit is contained in:
Marcel de Rooy 2017-02-27 13:21:18 +01:00 committed by Kyle M Hall
parent b4cd5faeb0
commit abdf2319cd
1 changed files with 4 additions and 4 deletions

View File

@ -160,7 +160,7 @@
<legend>Warnings</legend>
<ul>
<li>[% patrons_to_delete.size || 0 %] patrons will be deleted</li>
<li>[% patrons_to_anonymize.size || 0 %] patron's checkout histories will be anonymized</li>
<li>[% patrons_to_anonymize.count || 0 %] patron's checkout histories will be anonymized</li>
</ul>
<br />
@ -177,9 +177,9 @@
<input type="hidden" name="do_delete" value="[% patrons_to_delete.size %]" /></fieldset>
[% END %]
[% IF patrons_to_anonymize.size %]
Checkout history for [% patrons_to_anonymize.size %] patrons will be anonymized
<input type="hidden" name="do_anonym" value="[% patrons_to_anonymize.size %]" />
[% IF patrons_to_anonymize.count %]
Checkout history for [% patrons_to_anonymize.count %] patrons will be anonymized
<input type="hidden" name="do_anonym" value="[% patrons_to_anonymize.count %]" />
[% END %]
<input type="hidden" name="step" value="3" />