[Bug 15252] New: Patron search on start with does not work with several terms
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=15252 Bug ID: 15252 Summary: Patron search on start with does not work with several terms Change sponsored?: --- Product: Koha Version: master Hardware: All OS: All Status: NEW Severity: normal Priority: P5 - low Component: Patrons Assignee: koha-bugs@lists.koha-community.org Reporter: fridolin.somers@biblibre.com QA Contact: testopia@bugs.koha-community.org CC: gmcharlt@gmail.com, kyle.m.hall@gmail.com When searching a patron, search type can be 'start with' and 'contain'. If the search text contains a space (or a coma), this text is splitted into several terms. Actually, the search on 'start with' with several terms never returns a result. It is because the search composes an "AND" SQL query on terms. For example (I display only the surname part) : search type = contain : 'jean paul' => surname like '%jean% AND %paul%' search type = start with : 'jean paul' => surname like 'jean% AND paul%' The query for 'start with' is impossible. I propose, for search with start with, to not split terms : jean paul => surname like 'jean paul%' One can always use '*' to add more truncation : jea* pau* => surname like 'jea% pau%' This bug affects a lot surnames with several terms like 'LE GUELEC' or 'MAC BETH'. -- You are receiving this mail because: You are the assignee for the bug. You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=15252 Fridolin SOMERS <fridolin.somers@biblibre.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Assignee|koha-bugs@lists.koha-commun |fridolin.somers@biblibre.co |ity.org |m -- You are receiving this mail because: You are watching all bug changes. You are the assignee for the bug.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=15252 Fridolin SOMERS <fridolin.somers@biblibre.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Patch complexity|--- |Small patch Status|NEW |Needs Signoff -- You are receiving this mail because: You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=15252 --- Comment #1 from Fridolin SOMERS <fridolin.somers@biblibre.com> --- Created attachment 45131 --> http://bugs.koha-community.org/bugzilla3/attachment.cgi?id=45131&action=edit Bug 15252 - Patron search on start with does not work with several terms When searching a patron, search type can be 'start with' and 'contain'. If the search text contains a space (or a coma), this text is splitted into several terms. Actually, the search on 'start with' with several terms never returns a result. It is because the search composes an "AND" SQL query on terms. For example (I display only the surname part) : search type = contain : 'jean paul' => surname like '%jean% AND %paul%' search type = start with : 'jean paul' => surname like 'jean% AND paul%' The query for 'start with' is impossible. I propose, for search with start with, to not split terms : jean paul => surname like 'jean paul%' One can always use '*' to add more truncation : jea* pau* => surname like 'jea% pau%' This bug affects a lot surnames with several terms like 'LE GUELEC' or 'MAC BETH'. Note that the patch moves : $searchmember =~ s/,/ /g; It removes the test "if $searchmember" because $searchmember is tested and set to empty string previously : unless ( $searchmember ) { $searchmember = $dt_params->{sSearch} // ''; } Test plan : ========== - Create two patrons with firstname "Jean Paul" - Go to Patrons module - Choose "Starts with" in "Search type" filter - Perform a search on "Jean Paul" => without patch : you get no result => with this patch : you get the two results - Check you get the two results for search on "Jean Pau" - Check you get the two results for search on "Jea* Pau*" - Check you do not get results for search on "Jea Paul" - Choose "Contains" in "Search type" filter - Check you get the two results for search on "Jean Paul" - Check you get the two results for search on "Jean Pau" - Check you get the two results for search on "Jea* Pau*" - Check you get the two results for search on "Jea Paul" - Check you get the two results for search on "Paul Jean" -- You are receiving this mail because: You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=15252 --- Comment #2 from Fridolin SOMERS <fridolin.somers@biblibre.com> --- Created attachment 45132 --> http://bugs.koha-community.org/bugzilla3/attachment.cgi?id=45132&action=edit Bug 15252 - Patron search on start with does not work with several terms - followup 1 'start_with' is the default value of $searchtype, it can be explicit. -- You are receiving this mail because: You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=15252 --- Comment #3 from Fridolin SOMERS <fridolin.somers@biblibre.com> --- Created attachment 45133 --> http://bugs.koha-community.org/bugzilla3/attachment.cgi?id=45133&action=edit Bug 15252 - correct UT searchtype value is contain and not contains -- You are receiving this mail because: You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=15252 --- Comment #4 from Fridolin SOMERS <fridolin.somers@biblibre.com> --- Created attachment 45134 --> http://bugs.koha-community.org/bugzilla3/attachment.cgi?id=45134&action=edit Bug 15252 - UT -- You are receiving this mail because: You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=15252 Jonathan Druart <jonathan.druart@bugs.koha-community.org> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |jonathan.druart@bugs.koha-c | |ommunity.org Status|Needs Signoff |Failed QA --- Comment #5 from Jonathan Druart <jonathan.druart@bugs.koha-community.org> --- - $searchmember =~ s/\*/%/g; # * is replaced with % for sql + + $term =~ s/\*/%/g; # * is replaced with % for sql This changes has 2 consequences: 1/ Add a new feature: * is now a wildcard for the patron search 2/ Introduce a regression: * is not a wildcard anymore for the patron attribute search -- You are receiving this mail because: You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=15252 Fridolin SOMERS <fridolin.somers@biblibre.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #45131|0 |1 is obsolete| | --- Comment #6 from Fridolin SOMERS <fridolin.somers@biblibre.com> --- Created attachment 45300 --> http://bugs.koha-community.org/bugzilla3/attachment.cgi?id=45300&action=edit Bug 15252 - Patron search on start with does not work with several terms When searching a patron, search type can be 'start with' and 'contain'. If the search text contains a space (or a coma), this text is splitted into several terms. Actually, the search on 'start with' with several terms never returns a result. It is because the search composes an "AND" SQL query on terms. For example (I display only the surname part) : search type = contain : 'jean paul' => surname like '%jean% AND %paul%' search type = start with : 'jean paul' => surname like 'jean% AND paul%' The query for 'start with' is impossible. I propose, for search with start with, to not split terms : jean paul => surname like 'jean paul%' One can always use '*' to add more truncation : jea* pau* => surname like 'jea% pau%' This bug affects a lot surnames with several terms like 'LE GUELEC' or 'MAC BETH'. Note that the patch moves : $searchmember =~ s/,/ /g; It removes the test "if $searchmember" because $searchmember is tested and set to empty string previously : unless ( $searchmember ) { $searchmember = $dt_params->{sSearch} // ''; } Test plan : ========== - Create two patrons with firstname "Jean Paul" - Go to Patrons module - Choose "Starts with" in "Search type" filter - Perform a search on "Jean Paul" => without patch : you get no result => with this patch : you get the two results - Check you get the two results for search on "Jean Pau" - Check you get the two results for search on "Jea* Pau*" - Check you do not get results for search on "Jea Paul" - Choose "Contains" in "Search type" filter - Check you get the two results for search on "Jean Paul" - Check you get the two results for search on "Jean Pau" - Check you get the two results for search on "Jea* Pau*" - Check you get the two results for search on "Jea Paul" - Check you get the two results for search on "Paul Jean" -- You are receiving this mail because: You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=15252 Fridolin SOMERS <fridolin.somers@biblibre.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #45132|0 |1 is obsolete| | --- Comment #7 from Fridolin SOMERS <fridolin.somers@biblibre.com> --- Created attachment 45301 --> http://bugs.koha-community.org/bugzilla3/attachment.cgi?id=45301&action=edit Bug 15252 - Patron search on start with does not work with several terms - followup 1 'start_with' is the default value of $searchtype, it can be explicit. -- You are receiving this mail because: You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=15252 Fridolin SOMERS <fridolin.somers@biblibre.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #45133|0 |1 is obsolete| | --- Comment #8 from Fridolin SOMERS <fridolin.somers@biblibre.com> --- Created attachment 45302 --> http://bugs.koha-community.org/bugzilla3/attachment.cgi?id=45302&action=edit Bug 15252 - correct UT searchtype value is contain and not contains -- You are receiving this mail because: You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=15252 Fridolin SOMERS <fridolin.somers@biblibre.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #45134|0 |1 is obsolete| | --- Comment #9 from Fridolin SOMERS <fridolin.somers@biblibre.com> --- Created attachment 45303 --> http://bugs.koha-community.org/bugzilla3/attachment.cgi?id=45303&action=edit Bug 15252 - UT -- You are receiving this mail because: You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=15252 Fridolin SOMERS <fridolin.somers@biblibre.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|Failed QA |Needs Signoff --- Comment #10 from Fridolin SOMERS <fridolin.somers@biblibre.com> --- (In reply to Jonathan Druart from comment #5)
- $searchmember =~ s/\*/%/g; # * is replaced with % for sql + + $term =~ s/\*/%/g; # * is replaced with % for sql
This changes has 2 consequences: 1/ Add a new feature: * is now a wildcard for the patron search 2/ Introduce a regression: * is not a wildcard anymore for the patron attribute search
I corrected by keeping the original line but moved before creating terms. -- You are receiving this mail because: You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=15252 Alex <alexklbuckley@gmail.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|Needs Signoff |Signed Off CC| |alexklbuckley@gmail.com -- You are receiving this mail because: You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=15252 Alex <alexklbuckley@gmail.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #45300|0 |1 is obsolete| | --- Comment #11 from Alex <alexklbuckley@gmail.com> --- Created attachment 45390 --> http://bugs.koha-community.org/bugzilla3/attachment.cgi?id=45390&action=edit DBRev 3.23.00.000: 2016 Year of the Monkey Signed-off-by: Alex <alexklbuckley@gmail.com> (use "git reset HEAD^1 <file>..." to unstage) (use "git add <file>..." to include in what will be committed) http://bugs.koha-community.org/show_bug.cgi?id=15252 Signed-off-by: Alex <alexklbuckley@gmail.com> http://bugs.koha-community.org/show_bug.cgi?id=6473 Signed-off-by: Alex <alexklbuckley@gmail.com> (use "git reset HEAD^1 <file>..." to unstage) (use "git add <file>..." to include in what will be committed) -- You are receiving this mail because: You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=15252 Alex <alexklbuckley@gmail.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #45301|0 |1 is obsolete| | Attachment #45390|0 |1 is obsolete| | --- Comment #12 from Alex <alexklbuckley@gmail.com> --- Created attachment 45391 --> http://bugs.koha-community.org/bugzilla3/attachment.cgi?id=45391&action=edit DBRev 3.23.00.000: 2016 Year of the Monkey Signed-off-by: Alex <alexklbuckley@gmail.com> (use "git reset HEAD^1 <file>..." to unstage) (use "git add <file>..." to include in what will be committed) http://bugs.koha-community.org/show_bug.cgi?id=15252 Signed-off-by: Alex <alexklbuckley@gmail.com> http://bugs.koha-community.org/show_bug.cgi?id=6473 Signed-off-by: Alex <alexklbuckley@gmail.com> (use "git reset HEAD^1 <file>..." to unstage) (use "git add <file>..." to include in what will be committed) Signed-off-by: Alex <alexklbuckley@gmail.com> 0002-Bug-15252-Patron-search-on-start-with-does-not-work-.patch -- You are receiving this mail because: You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=15252 Alex <alexklbuckley@gmail.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #45302|0 |1 is obsolete| | Attachment #45391|0 |1 is obsolete| | --- Comment #13 from Alex <alexklbuckley@gmail.com> --- Created attachment 45392 --> http://bugs.koha-community.org/bugzilla3/attachment.cgi?id=45392&action=edit DBRev 3.23.00.000: 2016 Year of the Monkey Signed-off-by: Alex <alexklbuckley@gmail.com> (use "git reset HEAD^1 <file>..." to unstage) (use "git add <file>..." to include in what will be committed) http://bugs.koha-community.org/show_bug.cgi?id=15252 Signed-off-by: Alex <alexklbuckley@gmail.com> http://bugs.koha-community.org/show_bug.cgi?id=6473 Signed-off-by: Alex <alexklbuckley@gmail.com> (use "git reset HEAD^1 <file>..." to unstage) (use "git add <file>..." to include in what will be committed) Signed-off-by: Alex <alexklbuckley@gmail.com> 0002-Bug-15252-Patron-search-on-start-with-does-not-work-.patch Signed-off-by: Alex <alexklbuckley@gmail.com> 0003-Bug-15252-correct-UT-searchtype-value-is-contain-and.patch -- You are receiving this mail because: You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=15252 Alex <alexklbuckley@gmail.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #45303|0 |1 is obsolete| | Attachment #45392|0 |1 is obsolete| | --- Comment #14 from Alex <alexklbuckley@gmail.com> --- Created attachment 45393 --> http://bugs.koha-community.org/bugzilla3/attachment.cgi?id=45393&action=edit DBRev 3.23.00.000: 2016 Year of the Monkey Signed-off-by: Alex <alexklbuckley@gmail.com> (use "git reset HEAD^1 <file>..." to unstage) (use "git add <file>..." to include in what will be committed) http://bugs.koha-community.org/show_bug.cgi?id=15252 Signed-off-by: Alex <alexklbuckley@gmail.com> http://bugs.koha-community.org/show_bug.cgi?id=6473 Signed-off-by: Alex <alexklbuckley@gmail.com> (use "git reset HEAD^1 <file>..." to unstage) (use "git add <file>..." to include in what will be committed) Signed-off-by: Alex <alexklbuckley@gmail.com> 0002-Bug-15252-Patron-search-on-start-with-does-not-work-.patch Signed-off-by: Alex <alexklbuckley@gmail.com> 0003-Bug-15252-correct-UT-searchtype-value-is-contain-and.patch Signed-off-by: Alex <alexklbuckley@gmail.com> 0001-Bug-15252-Patron-search-on-start-with-does-not-work-.patch -- You are receiving this mail because: You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=15252 Alex <alexklbuckley@gmail.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #45393|0 |1 is obsolete| | --- Comment #15 from Alex <alexklbuckley@gmail.com> --- Created attachment 45395 --> http://bugs.koha-community.org/bugzilla3/attachment.cgi?id=45395&action=edit DBRev 3.23.00.000: 2016 Year of the Monkey Signed-off-by: Alex <alexklbuckley@gmail.com> (use "git reset HEAD^1 <file>..." to unstage) (use "git add <file>..." to include in what will be committed) http://bugs.koha-community.org/show_bug.cgi?id=15252 Signed-off-by: Alex <alexklbuckley@gmail.com> http://bugs.koha-community.org/show_bug.cgi?id=6473 Signed-off-by: Alex <alexklbuckley@gmail.com> (use "git reset HEAD^1 <file>..." to unstage) (use "git add <file>..." to include in what will be committed) Signed-off-by: Alex <alexklbuckley@gmail.com> 0002-Bug-15252-Patron-search-on-start-with-does-not-work-.patch Signed-off-by: Alex <alexklbuckley@gmail.com> 0003-Bug-15252-correct-UT-searchtype-value-is-contain-and.patch Signed-off-by: Alex <alexklbuckley@gmail.com> 0001-Bug-15252-Patron-search-on-start-with-does-not-work-.patch -- You are receiving this mail because: You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=15252 Katrin Fischer <katrin.fischer@bsz-bw.de> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |katrin.fischer@bsz-bw.de --- Comment #16 from Katrin Fischer <katrin.fischer@bsz-bw.de> --- Hi Alex, something is not quite right here - your squashed patch included one commit too many - the year of the monkey one. Please check, best would be to reattach the 4 original patches with your signed off line. -- You are receiving this mail because: You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=15252 Alex <alexklbuckley@gmail.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|Signed Off |Needs Signoff -- You are receiving this mail because: You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=15252 Chris Cormack <chris@bigballofwax.co.nz> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |chris@bigballofwax.co.nz Attachment #45300|1 |0 is obsolete| | -- You are receiving this mail because: You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=15252 Chris Cormack <chris@bigballofwax.co.nz> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #45301|1 |0 is obsolete| | -- You are receiving this mail because: You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=15252 Chris Cormack <chris@bigballofwax.co.nz> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #45302|1 |0 is obsolete| | -- You are receiving this mail because: You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=15252 Chris Cormack <chris@bigballofwax.co.nz> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #45303|1 |0 is obsolete| | -- You are receiving this mail because: You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=15252 Chris Cormack <chris@bigballofwax.co.nz> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #45395|0 |1 is obsolete| | -- You are receiving this mail because: You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=15252 Alex <alexklbuckley@gmail.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #45300|0 |1 is obsolete| | --- Comment #17 from Alex <alexklbuckley@gmail.com> --- Created attachment 45401 --> http://bugs.koha-community.org/bugzilla3/attachment.cgi?id=45401&action=edit DBRev 3.23.00.000: 2016 Year of the Monkey Signed-off-by: Alex <alexklbuckley@gmail.com> 0001-Bug-15252-Patron-search-on-start-with-does-not-work-.patch Signed-off-by: Alex <alexklbuckley@gmail.com> 0001-Bug-15252-Patron-search-on-start-with-does-not-work-.patch -- You are receiving this mail because: You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=15252 Chris Cormack <chris@bigballofwax.co.nz> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #45300|1 |0 is obsolete| | -- You are receiving this mail because: You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=15252 Chris Cormack <chris@bigballofwax.co.nz> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #45401|0 |1 is obsolete| | -- You are receiving this mail because: You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=15252 Alex <alexklbuckley@gmail.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #45300|0 |1 is obsolete| | --- Comment #18 from Alex <alexklbuckley@gmail.com> --- Created attachment 45403 --> http://bugs.koha-community.org/bugzilla3/attachment.cgi?id=45403&action=edit Bug 15252 - Patron search on start with does not work with several terms When searching a patron, search type can be 'start with' and 'contain'. If the search text contains a space (or a coma), this text is splitted into several terms. Actually, the search on 'start with' with several terms never returns a result. It is because the search composes an "AND" SQL query on terms. For example (I display only the surname part) : search type = contain : 'jean paul' => surname like '%jean% AND %paul%' search type = start with : 'jean paul' => surname like 'jean% AND paul%' The query for 'start with' is impossible. I propose, for search with start with, to not split terms : jean paul => surname like 'jean paul%' One can always use '*' to add more truncation : jea* pau* => surname like 'jea% pau%' This bug affects a lot surnames with several terms like 'LE GUELEC' or 'MAC BETH'. Note that the patch moves : $searchmember =~ s/,/ /g; It removes the test "if $searchmember" because $searchmember is tested and set to empty string previously : unless ( $searchmember ) { $searchmember = $dt_params->{sSearch} // ''; } Test plan : ========== - Create two patrons with firstname "Jean Paul" - Go to Patrons module - Choose "Starts with" in "Search type" filter - Perform a search on "Jean Paul" => without patch : you get no result => with this patch : you get the two results - Check you get the two results for search on "Jean Pau" - Check you get the two results for search on "Jea* Pau*" - Check you do not get results for search on "Jea Paul" - Choose "Contains" in "Search type" filter - Check you get the two results for search on "Jean Paul" - Check you get the two results for search on "Jean Pau" - Check you get the two results for search on "Jea* Pau*" - Check you get the two results for search on "Jea Paul" - Check you get the two results for search on "Paul Jean" Signed-off-by: Alex <alexklbuckley@gmail.com> -- You are receiving this mail because: You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=15252 Alex <alexklbuckley@gmail.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #45302|0 |1 is obsolete| | --- Comment #19 from Alex <alexklbuckley@gmail.com> --- Created attachment 45405 --> http://bugs.koha-community.org/bugzilla3/attachment.cgi?id=45405&action=edit Bug 15252 - correct UT searchtype value is contain and not contains -- You are receiving this mail because: You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=15252 Alex <alexklbuckley@gmail.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #45303|0 |1 is obsolete| | --- Comment #20 from Alex <alexklbuckley@gmail.com> --- Created attachment 45406 --> http://bugs.koha-community.org/bugzilla3/attachment.cgi?id=45406&action=edit DBRev 3.23.00.000: 2016 Year of the Monkey Signed-off-by: Alex <alexklbuckley@gmail.com> 0004-Bug-15252-UT.patch -- You are receiving this mail because: You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=15252 Chris Cormack <chris@bigballofwax.co.nz> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #45303|1 |0 is obsolete| | -- You are receiving this mail because: You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=15252 Chris Cormack <chris@bigballofwax.co.nz> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #45406|0 |1 is obsolete| | -- You are receiving this mail because: You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=15252 Alex <alexklbuckley@gmail.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #45303|0 |1 is obsolete| | --- Comment #21 from Alex <alexklbuckley@gmail.com> --- Created attachment 45407 --> http://bugs.koha-community.org/bugzilla3/attachment.cgi?id=45407&action=edit Bug 15252 - UT Signed-off-by: Alex <alexklbuckley@gmail.com> 0004-Bug-15252-UT.patch Signed-off-by: Alex <alexklbuckley@gmail.com> 0004-Bug-15252-UT.patch Signed-off-by: Alex <alexklbuckley@gmail.com> 0004-Bug-15252-UT.patch -- You are receiving this mail because: You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=15252 --- Comment #22 from Owen Leonard <oleonard@myacpl.org> --- What is the status of this bug? Some patches appear to be signed off, but the patch series doesn't apply when using git bz. Are they out of order? Need rebase? -- You are receiving this mail because: You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=15252 Marc Véron <veron@veron.ch> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |veron@veron.ch --- Comment #23 from Marc Véron <veron@veron.ch> --- (In reply to Owen Leonard from comment #22)
What is the status of this bug? Some patches appear to be signed off, but the patch series doesn't apply when using git bz. Are they out of order? Need rebase?
Hi Owen, I could apply by doing it interactive and changing the order as follows: 45403 - Bug 15252 - Patron search on start with does not work with several terms 45301 - Bug 15252 - Patron search on start with does not work with several terms - followup 1 45405 - Bug 15252 - correct UT searchtype value is contain and not contains 45407 - Bug 15252 - UT -- You are receiving this mail because: You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=15252 Marc Véron <veron@veron.ch> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #45403|0 |1 is obsolete| | --- Comment #24 from Marc Véron <veron@veron.ch> --- Created attachment 45735 --> http://bugs.koha-community.org/bugzilla3/attachment.cgi?id=45735&action=edit Bug 15252 - Patron search on start with does not work with several terms When searching a patron, search type can be 'start with' and 'contain'. If the search text contains a space (or a coma), this text is splitted into several terms. Actually, the search on 'start with' with several terms never returns a result. It is because the search composes an "AND" SQL query on terms. For example (I display only the surname part) : search type = contain : 'jean paul' => surname like '%jean% AND %paul%' search type = start with : 'jean paul' => surname like 'jean% AND paul%' The query for 'start with' is impossible. I propose, for search with start with, to not split terms : jean paul => surname like 'jean paul%' One can always use '*' to add more truncation : jea* pau* => surname like 'jea% pau%' This bug affects a lot surnames with several terms like 'LE GUELEC' or 'MAC BETH'. Note that the patch moves : $searchmember =~ s/,/ /g; It removes the test "if $searchmember" because $searchmember is tested and set to empty string previously : unless ( $searchmember ) { $searchmember = $dt_params->{sSearch} // ''; } Test plan : ========== - Create two patrons with firstname "Jean Paul" - Go to Patrons module - Choose "Starts with" in "Search type" filter - Perform a search on "Jean Paul" => without patch : you get no result => with this patch : you get the two results - Check you get the two results for search on "Jean Pau" - Check you get the two results for search on "Jea* Pau*" - Check you do not get results for search on "Jea Paul" - Choose "Contains" in "Search type" filter - Check you get the two results for search on "Jean Paul" - Check you get the two results for search on "Jean Pau" - Check you get the two results for search on "Jea* Pau*" - Check you get the two results for search on "Jea Paul" - Check you get the two results for search on "Paul Jean" Signed-off-by: Alex <alexklbuckley@gmail.com> Tested 4 patches together, works as expected Signed-off-by: Marc Véron <veron@veron.ch> -- You are receiving this mail because: You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=15252 Marc Véron <veron@veron.ch> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #45301|0 |1 is obsolete| | --- Comment #25 from Marc Véron <veron@veron.ch> --- Created attachment 45736 --> http://bugs.koha-community.org/bugzilla3/attachment.cgi?id=45736&action=edit Bug 15252 - Patron search on start with does not work with several terms - followup 1 'start_with' is the default value of $searchtype, it can be explicit. Tested 4 patches together, works as expected Signed-off-by: Marc Véron <veron@veron.ch> -- You are receiving this mail because: You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=15252 Marc Véron <veron@veron.ch> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #45405|0 |1 is obsolete| | --- Comment #26 from Marc Véron <veron@veron.ch> --- Created attachment 45737 --> http://bugs.koha-community.org/bugzilla3/attachment.cgi?id=45737&action=edit Bug 15252 - correct UT searchtype value is contain and not contains Tested 4 patches together, works as expected Signed-off-by: Marc Véron <veron@veron.ch> -- You are receiving this mail because: You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=15252 Marc Véron <veron@veron.ch> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #45407|0 |1 is obsolete| | --- Comment #27 from Marc Véron <veron@veron.ch> --- Created attachment 45738 --> http://bugs.koha-community.org/bugzilla3/attachment.cgi?id=45738&action=edit Bug 15252 - UT Signed-off-by: Alex <alexklbuckley@gmail.com> 0004-Bug-15252-UT.patch Signed-off-by: Alex <alexklbuckley@gmail.com> 0004-Bug-15252-UT.patch Signed-off-by: Alex <alexklbuckley@gmail.com> 0004-Bug-15252-UT.patch Tested 4 patches together, works as expected. Signed-off-by: Marc Véron <veron@veron.ch> -- You are receiving this mail because: You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=15252 Marc Véron <veron@veron.ch> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|Needs Signoff |Signed Off -- You are receiving this mail because: You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=15252 --- Comment #28 from Alex <alexklbuckley@gmail.com> --- So what went wrong with my attaching the bug if it did not apply properly?(In reply to Marc Véron from comment #27)
Created attachment 45738 [details] [review] Bug 15252 - UT
Signed-off-by: Alex <alexklbuckley@gmail.com>
0004-Bug-15252-UT.patch
Signed-off-by: Alex <alexklbuckley@gmail.com>
0004-Bug-15252-UT.patch
Signed-off-by: Alex <alexklbuckley@gmail.com>
0004-Bug-15252-UT.patch
Tested 4 patches together, works as expected. Signed-off-by: Marc Véron <veron@veron.ch>
-- You are receiving this mail because: You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=15252 --- Comment #29 from Marc Véron <veron@veron.ch> --- Hi Alex, the patches were in a wrong order, first was the follow up, then the other patches. That's why they could not apply. What I did: - Apply patches interactively one by one in the order of comment #23. - Test to prepare signing off - Reset and then one by one interactively apply patch, sing-off, attach. I just tested again, all patches apply. -- You are receiving this mail because: You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=15252 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 watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=15252 Jonathan Druart <jonathan.druart@bugs.koha-community.org> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #45735|0 |1 is obsolete| | Attachment #45736|0 |1 is obsolete| | Attachment #45737|0 |1 is obsolete| | Attachment #45738|0 |1 is obsolete| | --- Comment #30 from Jonathan Druart <jonathan.druart@bugs.koha-community.org> --- Created attachment 45830 --> http://bugs.koha-community.org/bugzilla3/attachment.cgi?id=45830&action=edit Bug 15252 - Patron search on start with does not work with several terms When searching a patron, search type can be 'start with' and 'contain'. If the search text contains a space (or a coma), this text is splitted into several terms. Actually, the search on 'start with' with several terms never returns a result. It is because the search composes an "AND" SQL query on terms. For example (I display only the surname part) : search type = contain : 'jean paul' => surname like '%jean% AND %paul%' search type = start with : 'jean paul' => surname like 'jean% AND paul%' The query for 'start with' is impossible. I propose, for search with start with, to not split terms : jean paul => surname like 'jean paul%' One can always use '*' to add more truncation : jea* pau* => surname like 'jea% pau%' This bug affects a lot surnames with several terms like 'LE GUELEC' or 'MAC BETH'. Note that the patch moves : $searchmember =~ s/,/ /g; It removes the test "if $searchmember" because $searchmember is tested and set to empty string previously : unless ( $searchmember ) { $searchmember = $dt_params->{sSearch} // ''; } Test plan : ========== - Create two patrons with firstname "Jean Paul" - Go to Patrons module - Choose "Starts with" in "Search type" filter - Perform a search on "Jean Paul" => without patch : you get no result => with this patch : you get the two results - Check you get the two results for search on "Jean Pau" - Check you get the two results for search on "Jea* Pau*" - Check you do not get results for search on "Jea Paul" - Choose "Contains" in "Search type" filter - Check you get the two results for search on "Jean Paul" - Check you get the two results for search on "Jean Pau" - Check you get the two results for search on "Jea* Pau*" - Check you get the two results for search on "Jea Paul" - Check you get the two results for search on "Paul Jean" Signed-off-by: Alex <alexklbuckley@gmail.com> Tested 4 patches together, works as expected Signed-off-by: Marc Véron <veron@veron.ch> Bug 15252 - Patron search on start with does not work with several terms - followup 1 'start_with' is the default value of $searchtype, it can be explicit. Tested 4 patches together, works as expected Signed-off-by: Marc Véron <veron@veron.ch> Bug 15252 - correct UT searchtype value is contain and not contains Tested 4 patches together, works as expected Signed-off-by: Marc Véron <veron@veron.ch> Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org> -- You are receiving this mail because: You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=15252 --- Comment #31 from Jonathan Druart <jonathan.druart@bugs.koha-community.org> --- Created attachment 45831 --> http://bugs.koha-community.org/bugzilla3/attachment.cgi?id=45831&action=edit Bug 15252 - Add tests Tested 4 patches together, works as expected. Signed-off-by: Marc Véron <veron@veron.ch> Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org> -- You are receiving this mail because: You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=15252 --- Comment #32 from Jonathan Druart <jonathan.druart@bugs.koha-community.org> --- I have squashed the 3 first patches for the readability of the git log -- You are receiving this mail because: You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=15252 --- Comment #33 from Alex <alexklbuckley@gmail.com> --- (In reply to Marc Véron from comment #29)
Hi Alex, the patches were in a wrong order, first was the follow up, then the other patches. That's why they could not apply.
What I did: - Apply patches interactively one by one in the order of comment #23. - Test to prepare signing off - Reset and then one by one interactively apply patch, sing-off, attach.
I just tested again, all patches apply.
Ok I see thanks Marc -- You are receiving this mail because: You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=15252 Kyle M Hall <kyle@bywatersolutions.com> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |kyle@bywatersolutions.com Status|Passed QA |Pushed to Master --- Comment #34 from Kyle M Hall <kyle@bywatersolutions.com> --- Pushed to master, thanks Frido! -- You are receiving this mail because: You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=15252 Julian Maurice <julian.maurice@biblibre.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|Pushed to Master |Pushed to Stable CC| |julian.maurice@biblibre.com --- Comment #35 from Julian Maurice <julian.maurice@biblibre.com> --- Patches pushed to 3.22.x, will be in 3.22.2 -- You are receiving this mail because: You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=15252 Frédéric Demians <frederic@tamil.fr> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |frederic@tamil.fr --- Comment #36 from Frédéric Demians <frederic@tamil.fr> --- This patch has been pushed to 3.20.x, will be in 3.20.8. -- You are receiving this mail because: You are watching all bug changes.
participants (1)
-
bugzilla-daemon@bugs.koha-community.org