Bugzilla – Attachment 148830 Details for
Bug 32610
Add ability to specify patron attribute as a date
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Bug 32610: Add date extended patron attribute handling to overdues report
Bug-32610-Add-date-extended-patron-attribute-handl.patch (text/plain), 4.76 KB, created by
Philip Orr
on 2023-03-28 14:00:59 UTC
(
hide
)
Description:
Bug 32610: Add date extended patron attribute handling to overdues report
Filename:
MIME Type:
Creator:
Philip Orr
Created:
2023-03-28 14:00:59 UTC
Size:
4.76 KB
patch
obsolete
>From e435e2c103848d73d00b4ba0417392ac181c5147 Mon Sep 17 00:00:00 2001 >From: Katrin Fischer <katrin.fischer.83@web.de> >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 <philip.orr@lmscloud.de> >--- > 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 27d7dfb269..b225afa0da 100644 >--- a/koha-tmpl/intranet-tmpl/prog/en/modules/circ/overdue.tt >+++ b/koha-tmpl/intranet-tmpl/prog/en/modules/circ/overdue.tt >@@ -207,10 +207,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"> >@@ -223,10 +223,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-remove"></i> Delete</a> >@@ -235,9 +237,9 @@ > [% ELSE %] > <a href="#" class="btn btn-link delete_clone" style="display:none"><i class="fa fa-remove"></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 ) %] >-- >2.30.2
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 32610
:
148400
|
148401
|
148402
|
148403
|
148404
|
148405
|
148825
|
148826
|
148827
|
148828
|
148829
|
148830
|
157862
|
157863
|
157864
|
157865
|
157866
|
157867
|
157868
|
158994
|
158995
|
158996
|
158997
|
158998
|
158999
|
159000
|
165747
|
165750
|
165854
|
165855
|
165856
|
165857
|
165858
|
165859
|
165860
|
165861
|
165862
|
165863
|
165864
|
165865
|
165925
|
165926