https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=30645
Martin Renvoize <martin.renvo...@ptfs-europe.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #159676|0 |1 is obsolete| | --- Comment #29 from Martin Renvoize <martin.renvo...@ptfs-europe.com> --- Created attachment 165009 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=165009&action=edit Bug 30645: Consider multiple instances of extended_attributes in query params This will rewrite a query like: { "-and":[ [ { "extended_attributes.value":{ "like":"abc%" }, "extended_attributes.code":[ [ "arbitrary_attr_code", "another_attr_code" ] ] } ], [ { "extended_attributes.value":{ "like":"123%" }, "extended_attributes.code":[ [ "arbitrary_attr_code", "another_attr_code" ] ] } ] ] } To: { "-and":[ [ { "extended_attributes.value":{ "like":"abc%" }, "extended_attributes.code":[ [ "arbitrary_attr_code", "another_attr_code" ] ] } ], [ { "extended_attributes_2.value":{ "like":"123%" }, "extended_attributes_2.code":[ [ "arbitrary_attr_code", "another_attr_code" ] ] } ] ] } And it'll also add the number of required 'join' attributes to the query attributes to match it. Test plan (with Joubu's test patch applied), run: prove t/db_dependent/selenium/patrons_search.t Or Test plan, k-t-d: 1) Create 2 patron attributes, visit: /cgi-bin/koha/admin/patron-attr-types.pl 2) Name the first attribute 'test1' and the second attribute 'test2' 3) On both, tick the 'Searchable' and 'Search by default' checkboxes 4) Edit a koha borrower, example visit: /cgi-bin/koha/members/memberentry.pl?op=modify&destination=circ&borrowernumber=51 5) Put '123' on the test1 attribute, and 'abc' on the test2 attribute 6) Visit the main patrons page: /cgi-bin/koha/members/members-home.pl 7) On the first left side filter input called 'Search', type '123' and search. Notice you get the patron result 8) Repeat step 7, but type 'abc' instead of '123'. Notice you get the patron result 9) Now do the same search but type '123 abc'. Notice you do not get the patron result. 10) Apply patch. Repeat test plan. Notice you get the patron result in step 9). Signed-off-by: David Nind <da...@davidnind.com> Signed-off-by: Martin Renvoize <martin.renvo...@ptfs-europe.com> -- You are receiving this mail because: You are watching all bug changes. _______________________________________________ Koha-bugs mailing list Koha-bugs@lists.koha-community.org https://lists.koha-community.org/cgi-bin/mailman/listinfo/koha-bugs website : http://www.koha-community.org/ git : http://git.koha-community.org/ bugs : http://bugs.koha-community.org/