Bugzilla – Attachment 126428 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.20 KB, created by
Nick Clemens (kidclamp)
on 2021-10-18 11:44:01 UTC
(
hide
)
Description:
Bug 27287: Make note fields from orders history searchable
Filename:
MIME Type:
Creator:
Nick Clemens (kidclamp)
Created:
2021-10-18 11:44:01 UTC
Size:
5.20 KB
patch
obsolete
>From 6cac7f657f2f92770276d70247632f633403b7a2 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> > >Signed-off-by: Nick Clemens <nick@bywatersolutions.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 dc733b221a..1874289bb3 100644 >--- a/C4/Acquisition.pm >+++ b/C4/Acquisition.pm >@@ -2085,6 +2085,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}; >@@ -2150,6 +2152,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; >@@ -2242,6 +2246,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 ef8e38496d..6e9af8528d 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