Bug 35916

Summary: Purchase suggestions bibliographic filter should be a "contains" search
Product: Koha Reporter: Caroline Cyr La Rose <caroline.cyr-la-rose>
Component: AcquisitionsAssignee: Shi Yao Wang <shi-yao.wang>
Status: Pushed to stable --- QA Contact: Testopia <testopia>
Severity: normal    
Priority: P5 - low CC: fridolin.somers, jonathan.druart, kebliss, philippe.blouin, shi-yao.wang
Version: unspecified   
Hardware: All   
OS: All   
Change sponsored?: --- Patch complexity: ---
Documentation contact: Documentation submission:
Text to go in the release notes:
Version(s) released in:
24.05.00,23.11.04
Bug Depends on: 23991    
Bug Blocks:    
Attachments: Bug 35916: Purchase suggestions bibliographic filter should be a "contains" search
Bug 35916: Purchase suggestions bibliographic filter should be a "contains" search
Bug 35916: Purchase suggestions bibliographic filter should be a "contains" search

Description Caroline Cyr La Rose 2024-01-25 22:06:43 UTC
Previously, when searching for purchase suggestions, you could search for any word in the title and it would find it. Now, it only finds the title if it's an exact match.

To recreate:
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

I only tested with the title and the author, but I think it's valid for all bibliographic elements.
Comment 1 Blou 2024-01-26 16:23:14 UTC
Regression caused by Bug 23991
Comment 2 Shi Yao Wang 2024-02-23 19:23:55 UTC
Created attachment 162401 [details] [review]
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
Comment 3 David Nind 2024-02-26 07:30:29 UTC
Created attachment 162420 [details] [review]
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

Signed-off-by: David Nind <david@davidnind.com>
Comment 4 Jonathan Druart 2024-02-29 09:18:26 UTC
Created attachment 162578 [details] [review]
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

Signed-off-by: David Nind <david@davidnind.com>

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Comment 5 Jonathan Druart 2024-02-29 09:18:50 UTC
Good catch, sorry about that!
Comment 6 Katrin Fischer 2024-03-08 17:59:32 UTC
Pushed for 24.05!

Well done everyone, thank you!
Comment 7 Fridolin Somers 2024-03-11 14:33:32 UTC
Pushed to 23.11.x for 23.11.04