Bug 30643

Summary: Useless query part generated by DT REST API wrapper
Product: Koha Reporter: Jonathan Druart <jonathan.druart>
Component: Architecture, internals, and plumbingAssignee: Jonathan Druart <jonathan.druart>
Status: RESOLVED DUPLICATE QA Contact: Testopia <testopia>
Severity: normal    
Priority: P5 - low    
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:
Attachments: Bug 30643: Remove useless OR part from query generated by DT REST API wrapper

Description Jonathan Druart 2022-04-28 12:35:08 UTC
There is a OR part with "attr1 like %%", etc.
Comment 1 Jonathan Druart 2022-04-28 12:38:19 UTC
Created attachment 134250 [details] [review]
Bug 30643: Remove useless OR part from query generated by DT REST API wrapper

To test:
Don't apply this patch
Search for patrons on the main patron search
Notice the {"me.firstname":{"like":"%%"}}, etc.
Apply this patch and confirm that the query is now correctly formed
Comment 2 Katrin Fischer 2022-04-28 12:41:48 UTC
Is this really useless?

Patron attributes should be searched by default in the standard search to have no regression.
Comment 3 Jonathan Druart 2022-04-28 13:02:23 UTC
This has actually been introduced by bug 30626 that is not pushed yet.
Fixed on a follow-up there: 
  Bug 30626: Don't generate the query if no term passed

*** This bug has been marked as a duplicate of bug 30626 ***