Description
Nick Clemens (kidclamp)
2023-08-11 13:06:27 UTC
Created attachment 154389 [details] [review] Bug 34517: DB updates Created attachment 154390 [details] [review] Bug 34517: DO NOT PUSH - Schema Updates Created attachment 154391 [details] [review] Bug 34517: Add boolean to search columns for schema Created attachment 154392 [details] [review] Bug 34517: Add option search patron attributes by default This patch moves form any staff_searchable attribute being automatically included in the the Standard patron serch, to allowing the librarian to choose. Current searchable attributes will be marked as 'searched_by_default' To test: 1 - Add a searchable patron attribute type 2 - Add some values 3 - Confirm they are searched in a 'Standard' patron search 4 - Apply patch 5 - Go to admin - >patron attribute types 6 - Note new 'Searching' column 7 - Confirm attribute is 'Searched by default' 8 - Confirm searches work as before 9 - Edit the attribute type 10 - Uncheck 'searched_by_default' 11 - Save 12 - Confirm attribute not searched in 'Standard' search 13 - Select the attribute in patron search dropdowns 14 - Confirm it is correctly searched At the test phase step 13 the new patron attribute does not appear in any dropdown menus, so I cannot test if it's searchable or not. Other steps until that work as planned. I tested this but I couldn't get it working. REVISED test plan- removing step 13 from previous test plan. This option view is another bug! Created attachment 154392 [details] [review] [review] Bug 34517: Add option search patron attributes by default This patch moves form any staff_searchable attribute being automatically included in the the Standard patron serch, to allowing the librarian to choose. Current searchable attributes will be marked as 'searched_by_default' To test: 1 - Add a searchable patron attribute type 2 - Add some values 3 - Confirm they are searched in a 'Standard' patron search 4 - Apply patch 5 - Go to admin - >patron attribute types 6 - Note new 'Searching' column 7 - Confirm attribute is 'Searched by default' 8 - Confirm searches work as before 9 - Edit the attribute type 10 - Uncheck 'searched_by_default' 11 - Save 12 - Confirm attribute not searched in 'Standard' search 13 - Confirm it is correctly searched Something broke when I applied the patch on the sandbox and went back to Patron Attributes in admin Created attachment 154575 [details] [review] Bug 34517: DB updates Created attachment 154576 [details] [review] Bug 34517: DO NOT PUSH - Schema Updates Created attachment 154577 [details] [review] Bug 34517: Add boolean to search columns for schema Created attachment 154578 [details] [review] Bug 34517: Add option search patron attributes by default This patch moves form any staff_searchable attribute being automatically included in the the Standard patron serch, to allowing the librarian to choose. Current searchable attributes will be marked as 'searched_by_default' To test: 1 - Add a searchable patron attribute type 2 - Add some values 3 - Confirm they are searched in a 'Standard' patron search 4 - Apply patch 5 - Go to admin - >patron attribute types 6 - Note new 'Searching' column 7 - Confirm attribute is 'Searched by default' 8 - Confirm searches work as before 9 - Edit the attribute type 10 - Uncheck 'searched_by_default' 11 - Save 12 - Confirm attribute not searched in 'Standard' search 13 - Select the attribute in patron search dropdowns 14 - Confirm it is correctly searched (In reply to Andrew Auld from comment #8) > Something broke when I applied the patch on the sandbox and went back to > Patron Attributes in admin Dependencies reordered and rebased, should work now Created attachment 154608 [details] [review] Bug 34517: DB updates Signed-off-by: Andrew <andrew.auld@ptfs-europe.com> Created attachment 154610 [details] [review] Bug 34517: DO NOT PUSH - Schema Updates Signed-off-by: Andrew <andrew.auld@ptfs-europe.com> Created attachment 154611 [details] [review] Bug 34517: Add boolean to search columns for schema Signed-off-by: Andrew <andrew.auld@ptfs-europe.com> Created attachment 154612 [details] [review] Bug 34517: Add option search patron attributes by default This patch moves form any staff_searchable attribute being automatically included in the the Standard patron serch, to allowing the librarian to choose. Current searchable attributes will be marked as 'searched_by_default' To test: 1 - Add a searchable patron attribute type 2 - Add some values 3 - Confirm they are searched in a 'Standard' patron search 4 - Apply patch 5 - Go to admin - >patron attribute types 6 - Note new 'Searching' column 7 - Confirm attribute is 'Searched by default' 8 - Confirm searches work as before 9 - Edit the attribute type 10 - Uncheck 'searched_by_default' 11 - Save 12 - Confirm attribute not searched in 'Standard' search 13 - Select the attribute in patron search dropdowns 14 - Confirm it is correctly searched Signed-off-by: Andrew <andrew.auld@ptfs-europe.com> Created attachment 154613 [details] [review] Bug 34517: DB updates Signed-off-by: Andrew <andrew.auld@ptfs-europe.com> Created attachment 154614 [details] [review] Bug 34517: DO NOT PUSH - Schema Updates Signed-off-by: Andrew <andrew.auld@ptfs-europe.com> Created attachment 154615 [details] [review] Bug 34517: Add boolean to search columns for schema Signed-off-by: Andrew <andrew.auld@ptfs-europe.com> Created attachment 154616 [details] [review] Bug 34517: Add option search patron attributes by default This patch moves form any staff_searchable attribute being automatically included in the the Standard patron serch, to allowing the librarian to choose. Current searchable attributes will be marked as 'searched_by_default' To test: 1 - Add a searchable patron attribute type 2 - Add some values 3 - Confirm they are searched in a 'Standard' patron search 4 - Apply patch 5 - Go to admin - >patron attribute types 6 - Note new 'Searching' column 7 - Confirm attribute is 'Searched by default' 8 - Confirm searches work as before 9 - Edit the attribute type 10 - Uncheck 'searched_by_default' 11 - Save 12 - Confirm attribute not searched in 'Standard' search 13 - Select the attribute in patron search dropdowns 14 - Confirm it is correctly searched Signed-off-by: Andrew <andrew.auld@ptfs-europe.com> Created attachment 154617 [details] [review] Bug 34517: DB updates Signed-off-by: Andrew <andrew.auld@ptfs-europe.com> Created attachment 154618 [details] [review] Bug 34517: DO NOT PUSH - Schema Updates Signed-off-by: Andrew <andrew.auld@ptfs-europe.com> Created attachment 154619 [details] [review] Bug 34517: Add boolean to search columns for schema Signed-off-by: Andrew <andrew.auld@ptfs-europe.com> Created attachment 154620 [details] [review] Bug 34517: Add option search patron attributes by default This patch moves form any staff_searchable attribute being automatically included in the the Standard patron serch, to allowing the librarian to choose. Current searchable attributes will be marked as 'searched_by_default' To test: 1 - Add a searchable patron attribute type 2 - Add some values 3 - Confirm they are searched in a 'Standard' patron search 4 - Apply patch 5 - Go to admin - >patron attribute types 6 - Note new 'Searching' column 7 - Confirm attribute is 'Searched by default' 8 - Confirm searches work as before 9 - Edit the attribute type 10 - Uncheck 'searched_by_default' 11 - Save 12 - Confirm attribute not searched in 'Standard' search 13 - Select the attribute in patron search dropdowns 14 - Confirm it is correctly searched Signed-off-by: Andrew <andrew.auld@ptfs-europe.com> Sorry for multiple Sandbox sign-offs...something was glitchy in the connection and it kept failing, but obviously it wasn't! Great patches, thanks Nick! Created attachment 154622 [details] [review] Bug 34517: DB updates Signed-off-by: Kelly McElligott <kelly@bywatersolutions.com> Created attachment 154623 [details] [review] Bug 34517: DO NOT PUSH - Schema Updates Signed-off-by: Kelly McElligott <kelly@bywatersolutions.com> Created attachment 154624 [details] [review] Bug 34517: Add boolean to search columns for schema Signed-off-by: Kelly McElligott <kelly@bywatersolutions.com> Created attachment 154625 [details] [review] Bug 34517: Add option search patron attributes by default This patch moves form any staff_searchable attribute being automatically included in the the Standard patron serch, to allowing the librarian to choose. Current searchable attributes will be marked as 'searched_by_default' To test: 1 - Add a searchable patron attribute type 2 - Add some values 3 - Confirm they are searched in a 'Standard' patron search 4 - Apply patch 5 - Go to admin - >patron attribute types 6 - Note new 'Searching' column 7 - Confirm attribute is 'Searched by default' 8 - Confirm searches work as before 9 - Edit the attribute type 10 - Uncheck 'searched_by_default' 11 - Save 12 - Confirm attribute not searched in 'Standard' search 13 - Select the attribute in patron search dropdowns 14 - Confirm it is correctly searched Signed-off-by: Kelly McElligott <kelly@bywatersolutions.com> What's the use case? What are you trying to solve here? (In reply to Jonathan Druart from comment #31) > What's the use case? What are you trying to solve here? Not every attribute that a library wants to search needs to be searched every time. Libraries may have alternate IDs or other fields that they wish to search on their own, and not as part of the standard search. The dependency adds those to the search options, so this then allows removing from standard search Currently blocked by depending patch not applying. Created attachment 158429 [details] [review] Bug 34517: DB updates Signed-off-by: Kelly McElligott <kelly@bywatersolutions.com> Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de> Created attachment 158430 [details] [review] Bug 34517: DO NOT PUSH - Schema Updates Signed-off-by: Kelly McElligott <kelly@bywatersolutions.com> Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de> Created attachment 158431 [details] [review] Bug 34517: Add boolean to search columns for schema Signed-off-by: Kelly McElligott <kelly@bywatersolutions.com> Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de> Created attachment 158432 [details] [review] Bug 34517: Add option search patron attributes by default This patch moves form any staff_searchable attribute being automatically included in the the Standard patron serch, to allowing the librarian to choose. Current searchable attributes will be marked as 'searched_by_default' To test: 1 - Add a searchable patron attribute type 2 - Add some values 3 - Confirm they are searched in a 'Standard' patron search 4 - Apply patch 5 - Go to admin - >patron attribute types 6 - Note new 'Searching' column 7 - Confirm attribute is 'Searched by default' 8 - Confirm searches work as before 9 - Edit the attribute type 10 - Uncheck 'searched_by_default' 11 - Save 12 - Confirm attribute not searched in 'Standard' search 13 - Select the attribute in patron search dropdowns 14 - Confirm it is correctly searched Signed-off-by: Kelly McElligott <kelly@bywatersolutions.com> Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de> Created attachment 158433 [details] [review] Bug 34517: (QA follow-up) Perltidy and fix column check Without the fix a second run of the database update would fail. Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de> IMO selenium tests are required for any changes to patron search. Pushed to master for 23.11. Nice work everyone, thanks! (In reply to Jonathan Druart from comment #39) > IMO selenium tests are required for any changes to patron search. It looks like a recent change (possibly this one) has broken ./t/db_dependent/selenium/patrons_search.t Taking a look now... (In reply to David Cook from comment #41) > (In reply to Jonathan Druart from comment #39) > > IMO selenium tests are required for any changes to patron search. > > It looks like a recent change (possibly this one) has broken > ./t/db_dependent/selenium/patrons_search.t > > Taking a look now... Yep, this is the change that broke subtests 22, 23, and 24 in ./t/db_dependent/selenium/patrons_search.t not ok 22 - Searching on a searchable attribute returns correct results # Failed test 'Searching on a searchable attribute returns correct results' # at ./t/db_dependent/selenium/patrons_search.t line 277. # got: 'No entries to show (filtered from 80 total entries)' # expected: 'Showing 1 to 2 of 2 entries (filtered from 80 total entries)' not ok 23 - Refining with DataTables search works to further filter the original query # Failed test 'Refining with DataTables search works to further filter the original query' # at ./t/db_dependent/selenium/patrons_search.t line 283. # got: 'No entries to show (filtered from 80 total entries)' # expected: 'Showing 1 to 2 of 2 entries (filtered from 80 total entries)' not ok 24 - Refining with header filters works to further filter the original query # Failed test 'Refining with header filters works to further filter the original query' # at ./t/db_dependent/selenium/patrons_search.t line 289. # got: 'No entries to show (filtered from 80 total entries)' # expected: 'Showing 1 to 1 of 1 entries (filtered from 80 total entries)' Depends on Bug 26916 not in 23.05.x Created attachment 158876 [details] [review] Bug 34517: (follow-up) Mark test attribute as searched_by_default Created attachment 158878 [details] [review] Bug 34517: (follow-up) Add test for attribute search field and make cleanup more robust This patch adds a test to cover the new functionality of searching an attribute not searched by default. It also moves the addition of objects to the cleanup array right after they are created. Patrons are added to the front of the array to ensure no constraints are violated when deleting. This change ensures that if the tests die before reachign the end, the data generated is still cleaned up. (In reply to Jonathan Druart from comment #39) > IMO selenium tests are required for any changes to patron search. Tests added, with a slight adjustment to improve cleanup Last two patches pushed to master. Thanks! |