[Bug 19130] New: K::A::Booksellers->search broken for attribute 'name'
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=19130 Bug ID: 19130 Summary: K::A::Booksellers->search broken for attribute 'name' Change sponsored?: --- Product: Koha Version: master Hardware: All OS: All Status: NEW Severity: normal Priority: P5 - low Component: Architecture, internals, and plumbing Assignee: koha-bugs@lists.koha-community.org Reporter: tomascohen@gmail.com QA Contact: testopia@bugs.koha-community.org The current overloaded implementation doesn't allow to search for stuff that is suffix of a bigger word. For example, if you have - name: Name2 - name: Name21 the query expression { name => 'Name%2' } should only return 'Name2'. The current implementation returns both. This was implemented this way to ease the transition into the new code without changing too many things on the controller scripts. It is time to fix it. -- You are receiving this mail because: You are watching all bug changes. You are the assignee for the bug.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=19130 --- Comment #1 from Tomás Cohen Arazi <tomascohen@gmail.com> --- Created attachment 66348 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=66348&action=edit Bug 19130: Remove ->search() overloading and adjust tests This patch removes the custom ->search() function. Tests are adjusted so the results from ->search() calls are not expected to return in the previously hardcoded order. To test: - Apply this patch - Run: $ sudo koha-shell kohadev k$ cd kohaclone k$ prove t/db_dependent/Bookseller.t => SUCCESS: Tests pass - Sign off :-D -- You are receiving this mail because: You are watching all bug changes. You are the assignee for the bug.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=19130 --- Comment #2 from Tomás Cohen Arazi <tomascohen@gmail.com> --- Created attachment 66349 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=66349&action=edit Bug 19130: (followup) Add t/db_dependent/Koha/Acquisition/Booksellers.t This followup patch adds a proper file in which add tests for Koha::Acquisition::Bookseller(s) methods. All current methods are covered. To test: - Run: $ sudo koha-shell kohadev k$ cd kohaclone k$ prove t/db_dependent/Koha/Acquisition/Booksellers.t => SUCCESS: Test pass! - Sign off :-D -- You are receiving this mail because: You are watching all bug changes. You are the assignee for the bug.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=19130 --- Comment #3 from Tomás Cohen Arazi <tomascohen@gmail.com> --- Created attachment 66350 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=66350&action=edit Bug 19130: (followup) Add POD This patch adds POD to the following files: - Koha/Acquisition/Bookseller.pm - Koha/Acquisition/Booksellers.pm -- You are receiving this mail because: You are watching all bug changes. You are the assignee for the bug.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=19130 --- Comment #4 from Tomás Cohen Arazi <tomascohen@gmail.com> --- Created attachment 66352 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=66352&action=edit Bug 19130: (followup) Controller scripts should preserve behaviour This patch is a followup to making Koha::Acquisition::Booksellers->search work as any other Koha::Objects (DBIC) query instead of having a different behaviour hardcoded. To achieve it, this patch makes the controller scripts add wildcard/truncation chars as prefix and sufix for searches, and make the default sorting for results be by 'name', ascending. To test: - Just verify the behaviour remains unchanged by this patchset on the controller scripts (re. searching). -- You are receiving this mail because: You are watching all bug changes. You are the assignee for the bug.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=19130 Tomás Cohen Arazi <tomascohen@gmail.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|NEW |Needs Signoff CC| |tomascohen@gmail.com Patch complexity|--- |Small patch -- You are receiving this mail because: You are the assignee for the bug. You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=19130 Tomás Cohen Arazi <tomascohen@gmail.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Blocks| |18120 Referenced Bugs: https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=18120 [Bug 18120] REST API: CRUD endpoint for vendors -- You are receiving this mail because: You are watching all bug changes. You are the assignee for the bug.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=19130 Kyle M Hall <kyle@bywatersolutions.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|Needs Signoff |Signed Off -- You are receiving this mail because: You are watching all bug changes. You are the assignee for the bug.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=19130 Kyle M Hall <kyle@bywatersolutions.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #66348|0 |1 is obsolete| | Attachment #66349|0 |1 is obsolete| | Attachment #66350|0 |1 is obsolete| | Attachment #66352|0 |1 is obsolete| | --- Comment #5 from Kyle M Hall <kyle@bywatersolutions.com> --- Created attachment 66365 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=66365&action=edit Bug 19130: Remove ->search() overloading and adjust tests This patch removes the custom ->search() function. Tests are adjusted so the results from ->search() calls are not expected to return in the previously hardcoded order. To test: - Apply this patch - Run: $ sudo koha-shell kohadev k$ cd kohaclone k$ prove t/db_dependent/Bookseller.t => SUCCESS: Tests pass - Sign off :-D Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com> -- You are receiving this mail because: You are watching all bug changes. You are the assignee for the bug.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=19130 --- Comment #6 from Kyle M Hall <kyle@bywatersolutions.com> --- Created attachment 66366 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=66366&action=edit Bug 19130: (followup) Add t/db_dependent/Koha/Acquisition/Booksellers.t This followup patch adds a proper file in which add tests for Koha::Acquisition::Bookseller(s) methods. All current methods are covered. To test: - Run: $ sudo koha-shell kohadev k$ cd kohaclone k$ prove t/db_dependent/Koha/Acquisition/Booksellers.t => SUCCESS: Test pass! - Sign off :-D Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com> -- You are receiving this mail because: You are watching all bug changes. You are the assignee for the bug.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=19130 --- Comment #7 from Kyle M Hall <kyle@bywatersolutions.com> --- Created attachment 66367 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=66367&action=edit Bug 19130: (followup) Add POD This patch adds POD to the following files: - Koha/Acquisition/Bookseller.pm - Koha/Acquisition/Booksellers.pm Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com> -- You are receiving this mail because: You are watching all bug changes. You are the assignee for the bug.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=19130 --- Comment #8 from Kyle M Hall <kyle@bywatersolutions.com> --- Created attachment 66368 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=66368&action=edit Bug 19130: (followup) Controller scripts should preserve behaviour This patch is a followup to making Koha::Acquisition::Booksellers->search work as any other Koha::Objects (DBIC) query instead of having a different behaviour hardcoded. To achieve it, this patch makes the controller scripts add wildcard/truncation chars as prefix and sufix for searches, and make the default sorting for results be by 'name', ascending. To test: - Just verify the behaviour remains unchanged by this patchset on the controller scripts (re. searching). Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com> -- You are receiving this mail because: You are the assignee for the bug. You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=19130 Jonathan Druart <jonathan.druart@bugs.koha-community.org> changed: What |Removed |Added ---------------------------------------------------------------------------- Depends on| |13726 CC| |jonathan.druart@bugs.koha-c | |ommunity.org Referenced Bugs: https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=13726 [Bug 13726] Koha::Acquisition::Bookseller should use Koha::Object -- You are receiving this mail because: You are the assignee for the bug. You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=19130 Jonathan Druart <jonathan.druart@bugs.koha-community.org> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|Signed Off |Passed QA -- You are receiving this mail because: You are the assignee for the bug. You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=19130 Jonathan Druart <jonathan.druart@bugs.koha-community.org> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #66365|0 |1 is obsolete| | Attachment #66366|0 |1 is obsolete| | Attachment #66367|0 |1 is obsolete| | Attachment #66368|0 |1 is obsolete| | --- Comment #9 from Jonathan Druart <jonathan.druart@bugs.koha-community.org> --- Created attachment 66480 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=66480&action=edit Bug 19130: Remove ->search() overloading and adjust tests This patch removes the custom ->search() function. Tests are adjusted so the results from ->search() calls are not expected to return in the previously hardcoded order. To test: - Apply this patch - Run: $ sudo koha-shell kohadev k$ cd kohaclone k$ prove t/db_dependent/Bookseller.t => SUCCESS: Tests pass - Sign off :-D Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com> Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org> -- You are receiving this mail because: You are the assignee for the bug. You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=19130 --- Comment #10 from Jonathan Druart <jonathan.druart@bugs.koha-community.org> --- Created attachment 66481 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=66481&action=edit Bug 19130: (followup) Add t/db_dependent/Koha/Acquisition/Booksellers.t This followup patch adds a proper file in which add tests for Koha::Acquisition::Bookseller(s) methods. All current methods are covered. To test: - Run: $ sudo koha-shell kohadev k$ cd kohaclone k$ prove t/db_dependent/Koha/Acquisition/Booksellers.t => SUCCESS: Test pass! - Sign off :-D Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com> Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org> -- You are receiving this mail because: You are watching all bug changes. You are the assignee for the bug.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=19130 --- Comment #11 from Jonathan Druart <jonathan.druart@bugs.koha-community.org> --- Created attachment 66482 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=66482&action=edit Bug 19130: (followup) Add POD This patch adds POD to the following files: - Koha/Acquisition/Bookseller.pm - Koha/Acquisition/Booksellers.pm Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com> Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org> -- You are receiving this mail because: You are watching all bug changes. You are the assignee for the bug.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=19130 --- Comment #12 from Jonathan Druart <jonathan.druart@bugs.koha-community.org> --- Created attachment 66483 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=66483&action=edit Bug 19130: (followup) Controller scripts should preserve behaviour This patch is a followup to making Koha::Acquisition::Booksellers->search work as any other Koha::Objects (DBIC) query instead of having a different behaviour hardcoded. To achieve it, this patch makes the controller scripts add wildcard/truncation chars as prefix and sufix for searches, and make the default sorting for results be by 'name', ascending. To test: - Just verify the behaviour remains unchanged by this patchset on the controller scripts (re. searching). Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com> Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org> -- You are receiving this mail because: You are the assignee for the bug. You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=19130 Jonathan Druart <jonathan.druart@bugs.koha-community.org> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|Passed QA |Pushed to Master --- Comment #13 from Jonathan Druart <jonathan.druart@bugs.koha-community.org> --- Pushed to master for 17.11, thanks to everybody involved! -- You are receiving this mail because: You are watching all bug changes. You are the assignee for the bug.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=19130 Jonathan Druart <jonathan.druart@bugs.koha-community.org> changed: What |Removed |Added ---------------------------------------------------------------------------- Assignee|koha-bugs@lists.koha-commun |tomascohen@gmail.com |ity.org | -- You are receiving this mail because: You are watching all bug changes. You are the assignee for the bug.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=19130 Fridolin SOMERS <fridolin.somers@biblibre.com> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |fridolin.somers@biblibre.co | |m Status|Pushed to Master |Pushed to Stable --- Comment #14 from Fridolin SOMERS <fridolin.somers@biblibre.com> --- Pushed to 17.05.x, will be in 17.05.05. -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=19130 Katrin Fischer <katrin.fischer@bsz-bw.de> changed: What |Removed |Added ---------------------------------------------------------------------------- Resolution|--- |FIXED Status|Pushed to Stable |RESOLVED CC| |katrin.fischer@bsz-bw.de --- Comment #15 from Katrin Fischer <katrin.fischer@bsz-bw.de> --- Dependent bug 13726 is not in 16.11.x. -- You are receiving this mail because: You are watching all bug changes.
participants (1)
-
bugzilla-daemon@bugs.koha-community.org