Description
Nick Clemens (kidclamp)
2017-02-10 14:32:14 UTC
Created attachment 60212 [details] [review] Bug 18094: Add tests to highlight the problem Created attachment 60213 [details] [review] Bug 18094: Only search in searchable patron attributes if searching in standard fields Test plan: - Add a new patron attrbute and mark it searchable - Populate a new patron with 'potato' in that field - Add/edit another patron to have email potato@invalidemail.com' - Perform a patron search with query 'potato' (in standard fields) => Both patrons are returned - Perform a patron search with filters 'Email' and query 'potato' => Only 1 patron is returned and you are redirected to the patron detail page. Created attachment 61111 [details] [review] Bug 18094: Add tests to highlight the problem Signed-off-by: Marc Véron <veron@veron.ch> Created attachment 61112 [details] [review] Bug 18094: Only search in searchable patron attributes if searching in standard fields Test plan: - Add a new patron attrbute and mark it searchable - Populate a new patron with 'potato' in that field - Add/edit another patron to have email potato@invalidemail.com' - Perform a patron search with query 'potato' (in standard fields) => Both patrons are returned - Perform a patron search with filters 'Email' and query 'potato' => Only 1 patron is returned and you are redirected to the patron detail page. Followed test plan, works as expected. Signed-off-by: Marc Véron <veron@veron.ch> Created attachment 61291 [details] [review] Bug 18094: Add tests to highlight the problem Signed-off-by: Marc Véron <veron@veron.ch> Signed-off-by: Nick Clemens <nick@bywatersolutions.com> Created attachment 61292 [details] [review] Bug 18094: Only search in searchable patron attributes if searching in standard fields Test plan: - Add a new patron attrbute and mark it searchable - Populate a new patron with 'potato' in that field - Add/edit another patron to have email potato@invalidemail.com' - Perform a patron search with query 'potato' (in standard fields) => Both patrons are returned - Perform a patron search with filters 'Email' and query 'potato' => Only 1 patron is returned and you are redirected to the patron detail page. Followed test plan, works as expected. Signed-off-by: Marc Véron <veron@veron.ch> Signed-off-by: Nick Clemens <nick@bywatersolutions.com> Pushed to Master - Should be in the 17.05 Release. Thanks These patches have been pushed to 16.11.x and will be in 16.11.06 . Pushed to 3.22.x, will be in 3.22.19 Pushed to 16.05.x, for 16.05.12 release Created attachment 63015 [details] [review] [16.05.x] Bug 18094: Add tests to highlight the problem Signed-off-by: Marc Véron <veron@veron.ch> Signed-off-by: Nick Clemens <nick@bywatersolutions.com> Created attachment 63016 [details] [review] [16.05.x] Bug 18094: Only search in searchable patron attributes if searching in standard fields Test plan: - Add a new patron attrbute and mark it searchable - Populate a new patron with 'potato' in that field - Add/edit another patron to have email potato@invalidemail.com' - Perform a patron search with query 'potato' (in standard fields) => Both patrons are returned - Perform a patron search with filters 'Email' and query 'potato' => Only 1 patron is returned and you are redirected to the patron detail page. Followed test plan, works as expected. Signed-off-by: Marc Véron <veron@veron.ch> Signed-off-by: Nick Clemens <nick@bywatersolutions.com> this patchset currently fails for me on 16.05.x $ prove t/db_dependent/Utils/Datatables_Members.t t/db_dependent/Utils/Datatables_Members.t .. 1/30 # Failed test ''Dupont' is contained in 2 surnames and a patron attribute. Patron attribute one should not be displayed if searching in specific fields (Bug 18094)' # at t/db_dependent/Utils/Datatables_Members.t line 407. # got: '2' # expected: '1' # Looks like you failed 1 test of 2. # Failed test 'ExtendedPatronAttributes' # at t/db_dependent/Utils/Datatables_Members.t line 409. # Looks like you failed 1 test of 30. t/db_dependent/Utils/Datatables_Members.t .. Dubious, test returned 1 (wstat 256, 0x100) Failed 1/30 subtests Test Summary Report ------------------- t/db_dependent/Utils/Datatables_Members.t (Wstat: 256 Tests: 30 Failed: 1) Failed test: 30 Non-zero exit status: 1 Files=1, Tests=30, 2 wallclock secs ( 0.03 usr 0.01 sys + 1.74 cusr 0.22 csys = 2.00 CPU) Result: FAIL You need the 2 patches, not just the tests. I've tried to use this in 3.22.20 but I can't manage to search on a attribute that I've marked as searchable. I'm wondering if I miss something.. After checking "searchable" for an attribute, could I launch a search directly or should I do another action (restart plack, modify my patron using this attribute ?) Attributes are searchable in the "standard search fields" ? (In reply to Koha Team Lyon 3 from comment #15) > I've tried to use this in 3.22.20 but I can't manage to search on a > attribute that I've marked as searchable. > I'm wondering if I miss something.. > After checking "searchable" for an attribute, could I launch a search > directly or should I do another action (restart plack, modify my patron > using this attribute ?) > Attributes are searchable in the "standard search fields" ? Nope you do not have to do anything like that. Attributes are only searchable in standard search fields. Tested ok on 3.22.21. Thanks Jonathan ! Ok, I got it. I have tried with attributes which have Authorized value category. I tryed to search with the description (which I can read in patron detail) but in fact the search only works with Authorized value Code ! I will open a new bug for this. Sonia Ha yes indeed, good catch. At first glance I'd say it will not that easy to fix and may be a performance killer change. |