Bugzilla – Attachment 53001 Details for
Bug 14874
Add ability to search for patrons by date of birth from checkout and patron quick searches
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Bug 14874 (QA Followup) Add dateofbirth column to checkout search results Reintroduce $termsearchfieldstype for resetting search type for non-date terms
Bug-14874-QA-Followup-Add-dateofbirth-column-to-ch.patch (text/plain), 2.84 KB, created by
Nick Clemens (kidclamp)
on 2016-06-30 15:19:46 UTC
(
hide
)
Description:
Bug 14874 (QA Followup) Add dateofbirth column to checkout search results Reintroduce $termsearchfieldstype for resetting search type for non-date terms
Filename:
MIME Type:
Creator:
Nick Clemens (kidclamp)
Created:
2016-06-30 15:19:46 UTC
Size:
2.84 KB
patch
obsolete
>From b1896cc04bde580ca849d54c2e6ba53abe5def2e Mon Sep 17 00:00:00 2001 >From: Nick Clemens <nick@bywatersolutions.com> >Date: Thu, 30 Jun 2016 11:17:28 -0400 >Subject: [PATCH] Bug 14874 (QA Followup) Add dateofbirth column to > checkout search results Reintroduce $termsearchfieldstype for resetting > search type for non-date terms > >--- > C4/Utils/DataTables/Members.pm | 7 +++++-- > .../intranet-tmpl/prog/en/includes/circ-patron-search-results.inc | 2 ++ > 2 files changed, 7 insertions(+), 2 deletions(-) > >diff --git a/C4/Utils/DataTables/Members.pm b/C4/Utils/DataTables/Members.pm >index b91a1e4..44bed1d 100644 >--- a/C4/Utils/DataTables/Members.pm >+++ b/C4/Utils/DataTables/Members.pm >@@ -88,12 +88,15 @@ sub search { > foreach my $term (@terms) { > next unless $term; > >+ my $termsearchfieldstype; >+ > my $term_dt = eval { local $SIG{__WARN__} = {}; output_pref( { str => $term, dateonly => 1, dateformat => 'sql' } ); }; > > if ($term_dt) { >- $searchfieldstype = 'dateofbirth'; >+ $termsearchfieldstype = 'dateofbirth'; > $term = $term_dt; > } else { >+ $termsearchfieldstype = $searchfieldstype; > $term .= '%' # end with anything > if $term !~ /%$/; > $term = "%$term" # begin with anythin unless start_with >@@ -101,7 +104,7 @@ sub search { > } > > my @where_strs_or; >- for my $searchfield ( split /,/, $searchfields->{$searchfieldstype} ) { >+ for my $searchfield ( split /,/, $searchfields->{$termsearchfieldstype} ) { > push @where_strs_or, "borrowers." . $dbh->quote_identifier($searchfield) . " LIKE ?"; > push @where_args, $term; > } >diff --git a/koha-tmpl/intranet-tmpl/prog/en/includes/circ-patron-search-results.inc b/koha-tmpl/intranet-tmpl/prog/en/includes/circ-patron-search-results.inc >index eadeefb..8ff24be 100644 >--- a/koha-tmpl/intranet-tmpl/prog/en/includes/circ-patron-search-results.inc >+++ b/koha-tmpl/intranet-tmpl/prog/en/includes/circ-patron-search-results.inc >@@ -16,6 +16,7 @@ > <tr> > <th>Name</th> > <th>Card number</th> >+ <th>Date of birth</th> > <th>Category</th> > <th>Library</th> > <th>Address</th> >@@ -31,6 +32,7 @@ > <td><a href="/cgi-bin/koha/reserve/request.pl?borrowernumber=[% borrower.borrowernumber %]&biblionumber=[% biblionumber %]">[% borrower.surname %], [% borrower.firstname %]</a></td> > [% END %] > <td>[% borrower.cardnumber %]</td> >+ <td>[% borrower.dateofbirth %]</td> > <td>[% Categories.GetName( borrower.categorycode ) %]</td> > <td>[% Branches.GetName( borrower.branchcode ) %]</td> > <td>[% borrower.address %]</td> >-- >2.1.4
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 14874
:
51503
|
51504
|
51505
|
51652
|
51653
|
51654
|
51971
|
51972
|
52079
|
52998
|
52999
|
53000
|
53001
|
55589
|
55899
|
55912
|
55913
|
55919
|
55920
|
56027
|
56028
|
57009