From 799a74364d0de429fbf3f2e13e80af53ebd39104 Mon Sep 17 00:00:00 2001 From: Katrin Fischer Date: Sat, 18 Mar 2023 10:54:14 +0000 Subject: [PATCH] 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 Signed-off-by: Martin Renvoize Signed-off-by: Katrin Fischer --- circ/overdue.pl | 3 ++- .../prog/en/modules/circ/overdue.tt | 22 ++++++++++--------- 2 files changed, 14 insertions(+), 11 deletions(-) diff --git a/circ/overdue.pl b/circ/overdue.pl index e2bb848d42..bc8a28d39f 100755 --- a/circ/overdue.pl +++ b/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; diff --git a/koha-tmpl/intranet-tmpl/prog/en/modules/circ/overdue.tt b/koha-tmpl/intranet-tmpl/prog/en/modules/circ/overdue.tt index 76c56bea10..bfafec79cc 100644 --- a/koha-tmpl/intranet-tmpl/prog/en/modules/circ/overdue.tt +++ b/koha-tmpl/intranet-tmpl/prog/en/modules/circ/overdue.tt @@ -208,10 +208,10 @@ [% ELSE %][% END %] - [% FOREACH patron_attr_filter_loo IN patron_attr_filter_loop %] - -
  • - + [% FOREACH patron_attr_filter_loo IN patron_attr_filter_loop %] + +
  • + [% IF ( patron_attr_filter_loo.authorised_value_category ) %] [% SET authvals = AuthorisedValues.GetAuthValueDropbox( patron_attr_filter_loo.authorised_value_category ) %] - [% ELSE %] + [% ELSIF ( patron_attr_filter_loo.is_date ) %] + + [% ELSE %] - [% END %] - [% IF ( patron_attr_filter_loo.repeatable ) %] + [% END %] + [% IF ( patron_attr_filter_loo.repeatable ) %] Add [% IF ( patron_attr_filter_loo.isclone ) %] Delete @@ -236,9 +238,9 @@ [% ELSE %] [% END %] - [% END %] -
  • - [% END %] + [% END %] + + [% END %]