Bugzilla – Attachment 123874 Details for
Bug 27287
Make note fields from orders searchable
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Bug 27287: Make note fields from orders history searchable
Bug-27287-Make-note-fields-from-orders-history-sea.patch (text/plain), 5.14 KB, created by
David Nind
on 2021-08-17 13:09:43 UTC
(
hide
)
Description:
Bug 27287: Make note fields from orders history searchable
Filename:
MIME Type:
Creator:
David Nind
Created:
2021-08-17 13:09:43 UTC
Size:
5.14 KB
patch
obsolete
>From 391990760fa3e37f7c6c3991cf61803c2c334665 Mon Sep 17 00:00:00 2001 >From: Hayley Pelham <hayleypelham@catalyst.net.nz> >Date: Tue, 10 Aug 2021 10:54:09 +1200 >Subject: [PATCH] Bug 27287: Make note fields from orders history searchable > >This patch adds aqorders.order_internalnote and >aqorders.order_vendornote to the Acquisitions history search. > >To test: >1) Apply patch and restart services >2) Create an order in Acquisitions and set an internal note and a vendor note >3) Go to /cgi-bin/acqui/histsearch.pl and search by internal or vendor >note using the terms you set in step 2 >4) Note your order is returned and internal note and vendor note are >included in the search results at the end of the table > >Sponsored-by: Bibliotheksservice-Zentrum Baden-Wuerttemberg > >https://bugs.koha-community.org/show_bug.cgi?id=27827 > >Signed-off-by: David Nind <david@davidnind.com> >--- > C4/Acquisition.pm | 14 ++++++++++++++ > acqui/histsearch.pl | 2 ++ > .../prog/en/includes/filter-orders.inc | 2 ++ > .../prog/en/modules/acqui/histsearch.tt | 4 ++++ > 4 files changed, 22 insertions(+) > >diff --git a/C4/Acquisition.pm b/C4/Acquisition.pm >index 3d74f847a6..b70813b8f8 100644 >--- a/C4/Acquisition.pm >+++ b/C4/Acquisition.pm >@@ -2084,6 +2084,8 @@ sub GetHistory { > my $isbn = $params{isbn}; > my $ean = $params{ean}; > my $name = $params{name}; >+ my $internalnote = $params{internalnote}; >+ my $vendornote = $params{vendornote}; > my $from_placed_on = $params{from_placed_on}; > my $to_placed_on = $params{to_placed_on}; > my $basket = $params{basket}; >@@ -2149,6 +2151,8 @@ sub GetHistory { > aqorders.biblionumber, > aqorders.orderstatus, > aqorders.parent_ordernumber, >+ aqorders.order_internalnote, >+ aqorders.order_vendornote, > aqbudgets.budget_name > "; > $query .= ", aqbudgets.budget_id AS budget" if defined $budget; >@@ -2241,6 +2245,16 @@ sub GetHistory { > } > } > >+ if ( $internalnote ) { >+ $query .= " AND aqorders.order_internalnote LIKE ? "; >+ push @query_params, "%$internalnote%"; >+ } >+ >+ if ( $vendornote ) { >+ $query .= " AND aqorders.order_vendornote LIKE ?"; >+ push @query_params, "%$vendornote%"; >+ } >+ > if ($booksellerinvoicenumber) { > $query .= " AND aqinvoices.invoicenumber LIKE ? "; > push @query_params, "%$booksellerinvoicenumber%"; >diff --git a/acqui/histsearch.pl b/acqui/histsearch.pl >index cbb371d4df..6423bd1881 100755 >--- a/acqui/histsearch.pl >+++ b/acqui/histsearch.pl >@@ -76,6 +76,8 @@ my $filters = { > author => scalar $input->param('author'), > isbn => scalar $input->param('isbn'), > name => scalar $input->param('name'), >+ internalnote => scalar $input->param('internalnote'), >+ vendornote => scalar $input->param('vendornote'), > ean => scalar $input->param('ean'), > basketgroupname => scalar $input->param('basketgroupname'), > budget => scalar $input->param('budget'), >diff --git a/koha-tmpl/intranet-tmpl/prog/en/includes/filter-orders.inc b/koha-tmpl/intranet-tmpl/prog/en/includes/filter-orders.inc >index a2a7fc090e..93d008b463 100644 >--- a/koha-tmpl/intranet-tmpl/prog/en/includes/filter-orders.inc >+++ b/koha-tmpl/intranet-tmpl/prog/en/includes/filter-orders.inc >@@ -11,6 +11,8 @@ > [% END %] > <li><label for="name">Vendor: </label> <input type="text" name="name" id="name" value="[% filters.name | html %]" /></li> > <li><label for="basket">Basket: </label> <input type="text" name="basket" id="basket" value="[% filters.basket | html %]" /></li> >+ <li><label for="internalnote">Internal note: </label> <input type="text" name="internalnote" id="internalnote" value="[% filters.internalnote | html %]" /></li> >+ <li><label for="vendornote">Vendor note: </label> <input type="text" name="vendornote" id="vendornote" value="[% filters.vendornote | html %]" /></li> > <li><label for="basket_creators">Basket created by: </label> > <input autocomplete="off" id="find_patron" type="text" class="noEnterSubmit" /> > <div> >diff --git a/koha-tmpl/intranet-tmpl/prog/en/modules/acqui/histsearch.tt b/koha-tmpl/intranet-tmpl/prog/en/modules/acqui/histsearch.tt >index 3cde09995a..4bb0e1bb7c 100644 >--- a/koha-tmpl/intranet-tmpl/prog/en/modules/acqui/histsearch.tt >+++ b/koha-tmpl/intranet-tmpl/prog/en/modules/acqui/histsearch.tt >@@ -76,6 +76,8 @@ > <th>Quantity ordered</th> > <th>Unit cost</th> > <th>Fund</th> >+ <th>Internal note</th> >+ <th>Vendor note</th> > </tr> > </thead> > <tbody> >@@ -124,6 +126,8 @@ > <td>[% order.quantity | html %]</td> > <td>[% order.ecost | html %]</td> > <td>[% order.budget_name | html %]</td> >+ <td>[% order.order_internalnote | html %]</td> >+ <td>[% order.order_vendornote | html %]</td> > </tr> > [% END %] > </tbody> >-- >2.20.1
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 27287
:
123864
|
123874
|
126428
|
126429
|
126654