Browse Source

Bug 32610: Add date extended patron attribute handling to overdues report

This makes sure that the overdues report manages filters for
extended patron attributes of the type date correctly.

To test:
* Make sure you have at least one PA marked as 'searchable'
* Make sure your patron has at east one checked out item
* Go to circulation > overdues
* If you have no overdue items, check "Show any items currently checked out:"
* Verify the list of checkouts displays
* Verify the PA filter option displays with the calendar widget
* Limit to the date in your patron's record - list remains
* Limit to any other date - list empties

Signed-off-by: Philip Orr <philip.orr@lmscloud.de>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
main
Katrin Fischer 1 year ago
committed by Katrin Fischer
parent
commit
799a74364d
Signed by: kfischer GPG Key ID: 0EF6E2C03357A834
  1. 3
      circ/overdue.pl
  2. 22
      koha-tmpl/intranet-tmpl/prog/en/modules/circ/overdue.tt

3
circ/overdue.pl

@ -117,7 +117,7 @@ for my $attrcode (grep { /^patron_attr_filter_/ } $input->multi_param) {
}
my $have_pattr_filter_data = keys(%cgi_attrcode_to_attrvalues) > 0;
my @patron_attr_filter_loop; # array of [ domid cgivalue ismany isclone ordinal code description repeatable authorised_value_category ]
my @patron_attr_filter_loop; # array of [ domid cgivalue ismany isclone ordinal code description repeatable is_date authorised_value_category ]
my $patron_attrs = Koha::Patron::Attribute::Types->search_with_library_limits(
{
@ -133,6 +133,7 @@ while (my $attr = $patron_attrs->next ) {
code => $attr->code,
description => $attr->description,
repeatable => $attr->repeatable,
is_date => $attr->is_date,
authorised_value_category => $attr->authorised_value_category,
};
$row->{ordinal} = $ordinal;

22
koha-tmpl/intranet-tmpl/prog/en/modules/circ/overdue.tt

@ -208,10 +208,10 @@
[% ELSE %]<option value="lost">Lost card</option>[% END %]
</select>
</li>
[% FOREACH patron_attr_filter_loo IN patron_attr_filter_loop %]
<!-- domid cgivalue ismany isclone ordinal code description repeatable authorised_value_category -->
<li>
<label>[% patron_attr_filter_loo.description | html %]:</label>
[% FOREACH patron_attr_filter_loo IN patron_attr_filter_loop %]
<!-- domid cgivalue ismany isclone ordinal code description repeatable authorised_value_category -->
<li>
<label>[% patron_attr_filter_loo.description | html %]:</label>
[% IF ( patron_attr_filter_loo.authorised_value_category ) %]
[% SET authvals = AuthorisedValues.GetAuthValueDropbox( patron_attr_filter_loo.authorised_value_category ) %]
<select id="pattrodue-input-[% patron_attr_filter_loo.domid | html %]" name="patron_attr_filter_[% patron_attr_filter_loo.code | html %]" class="pattrodue-input">
@ -224,10 +224,12 @@
[% END %]
[% END %]
</select>
[% ELSE %]
[% ELSIF ( patron_attr_filter_loo.is_date ) %]
<input type="text" name="patron_attr_filter_[% patron_attr_filter_loo.code | html %]" value="[% patron_attr_filter_loo.cgivalue | html %]" class="flatpickr"/>
[% ELSE %]
<input type="text" name="patron_attr_filter_[% patron_attr_filter_loo.code | html %]" value="[% patron_attr_filter_loo.cgivalue | html %]"/>
[% END %]
[% IF ( patron_attr_filter_loo.repeatable ) %]
[% END %]
[% IF ( patron_attr_filter_loo.repeatable ) %]
<a href="#" class="btn btn-link clone-attribute" data-original-id="pattrodue-input-[% patron_attr_filter_loo.domid | html %]"><i class="fa fa-plus"></i> Add</a>
[% IF ( patron_attr_filter_loo.isclone ) %]
<a href="#" class="btn btn-link delete_clone"><i class="fa fa-times"></i> Delete</a>
@ -236,9 +238,9 @@
[% ELSE %]
<a href="#" class="btn btn-link delete_clone" style="display:none"><i class="fa fa-times"></i> Delete</a>
[% END %]
[% END %]
</li>
[% END %]
[% END %]
</li>
[% END %]
<li><label>Item type:</label><select name="itemtype" id="itemtype"><option value="">Any</option>
[% FOREACH itemtypeloo IN itemtypeloop %][% IF ( itemtypeloo.selected ) %]

Loading…
Cancel
Save