Bugzilla – Attachment 162401 Details for
Bug 35916
Purchase suggestions bibliographic filter should be a "contains" search
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Bug 35916: Purchase suggestions bibliographic filter should be a "contains" search
Bug-35916-Purchase-suggestions-bibliographic-filte.patch (text/plain), 1.63 KB, created by
Shi Yao Wang
on 2024-02-23 19:23:55 UTC
(
hide
)
Description:
Bug 35916: Purchase suggestions bibliographic filter should be a "contains" search
Filename:
MIME Type:
Creator:
Shi Yao Wang
Created:
2024-02-23 19:23:55 UTC
Size:
1.63 KB
patch
obsolete
>From 82a0adb47719194c1bcc4bd4233018aeed6ed851 Mon Sep 17 00:00:00 2001 >From: Shi Yao Wang <shi-yao.wang@inlibro.com> >Date: Fri, 23 Feb 2024 14:16:27 -0500 >Subject: [PATCH] Bug 35916: Purchase suggestions bibliographic filter should > be a "contains" search > >Make all bibliographic information fields filter do a contain match >rather than an exact match > >Test plan: >1. Create a purchase suggestion with a multi-word title (e.g. one day in december) > 1.1. Go to Acquisitions > Suggestions > New purchase suggestion > 1.2. Enter a title (e.g. one day in december) > 1.3. Click on Submit your suggestion > >2. Search for one of the words in the title > 2.1. In the "Filter by" section, click on Bibliographic information > 2.2. In the title field, enter one of the words of the title (e.g. december) > 2.3. Click Go > --> No results > >3. Apply the patch >4. Redo step 2 and notice there is now a valid result >--- > suggestion/suggestion.pl | 3 +++ > 1 file changed, 3 insertions(+) > >diff --git a/suggestion/suggestion.pl b/suggestion/suggestion.pl >index cb6da835f3..4b00fa0056 100755 >--- a/suggestion/suggestion.pl >+++ b/suggestion/suggestion.pl >@@ -424,6 +424,9 @@ if ($op=~/else/) { > if $search_params->{$f} eq '__ANY__' > || $search_params->{$f} eq ''; > } >+ for my $bi (qw (title author isbn publishercode copyrightdate collectiontitle)) { >+ $search_params->{$bi} = { 'LIKE' => "%" . $search_params->{$bi} . "%" } if $search_params->{$bi}; >+ } > > $search_params->{archived} = 0 if !$filter_archived; > my @suggestions = Koha::Suggestions->search_limited($search_params)->as_list; >-- >2.34.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 35916
:
162401
|
162420
|
162578