I would like to add the same system of keeping persistent track of what item selections have been made to the item search results page, just like the patron search results page has. I would also like to add an option for performing batch item modification and batch item deletion using saved selections.
Created attachment 153184 [details] [review] Bug 34227: Add persistent selections and batch operations to item search This patch modifies the item search results page so that user selections are stored in local storage. This allows the user to make selections on one page of search results, move to another, and continue to make selections. The patch also adds the option to send selected items to batch item modification or batch item deletion. Changes to the patron search results template have been made to make some CSS classes more generic so they can be used by both pages. To test, apply the patch and rebuild the staff interface CSS. - Log in to the staff interface as a user with permission to perform batch item modification and batch item deletion. - Go to item search and perform a search which will return at least two pages of results. - On the search results page you should see a new search header toolbar with some controls: "Select visible rows," "Clear selection," "Export all results to" and "Batch operations" (disabled). - Without making any selections, confirm that the "Export all results to" menu items work correctly to export all results to a CSV or a barcode file. - Confirm that the "Select visible rows" control works as expected, selecting all checkboxes on the current page (and on no other pages) - After selecting all checkboxes the search header controls should be updated: - The "Export all..." button should now show the number of selections: "Export selected results (X) to..." - The batch operations button should be enabled. - There should be a new element labeled "Items selected: X" with a "Clear" link. - If you uncheck any checkboxes the controls should be updated, showing the new count of selected records. - Move to the next page of results and confirm that making selections on this page works to increment all counters - Confirm that the "Export selected.." options work and that your CSV and barcode files now contain only the items you selected. - Test the batch operations menu: - Test that the controls correctly reflect the logged-in user's permissions: - With permission to batch modify items - With permission to batch delete items - With both; with neither - Both menu options should take you to the correct page and the list of submitted items should match your selections. - Test that clicking the "Clear" button next to "Items selected" hides the items selected box and reverts the "Export all" and "Batch operations" buttons to their original state. - Page through the search results to confirm that no checkboxes are checked. - Test that your search selections are really persistent: - Navigate away from the page, return to item search, and perform another search. - The "Item selected" box should still show your previous selections. - Any items you previously selected which are also in this result set should have a checked checkbox. - Click the "Edit search" button from the item search results page and new search with different parameters. - The "Items selected" should still show your previous selections. - Log out of Koha and back in. When you perform an item search now, there should be no "Item selected" - Go to Patrons and test patron searching. As you make selections the "Patrons selected" box should be updated correctly and look correct, matching the one on the item search page.
(In reply to Owen Leonard from comment #1) > - Confirm that the "Export selected.." options work and that your CSV > and barcode files now contain only the items you selected. Failing QA at this step. When nothing is selected, I can export to CSV and Barcode with no problem, but when I have anything selected, clicking the export buttons do nothing for me.
Created attachment 153208 [details] [review] Bug 34227: Add persistent selections and batch operations to item search This patch modifies the item search results page so that user selections are stored in local storage. This allows the user to make selections on one page of search results, move to another, and continue to make selections. The patch also adds the option to send selected items to batch item modification or batch item deletion. Changes to the patron search results template have been made to make some CSS classes more generic so they can be used by both pages. To test, apply the patch and rebuild the staff interface CSS. - Log in to the staff interface as a user with permission to perform batch item modification and batch item deletion. - Go to item search and perform a search which will return at least two pages of results. - On the search results page you should see a new search header toolbar with some controls: "Select visible rows," "Clear selection," "Export all results to" and "Batch operations" (disabled). - Without making any selections, confirm that the "Export all results to" menu items work correctly to export all results to a CSV or a barcode file. - Confirm that the "Select visible rows" control works as expected, selecting all checkboxes on the current page (and on no other pages) - After selecting all checkboxes the search header controls should be updated: - The "Export all..." button should now show the number of selections: "Export selected results (X) to..." - The batch operations button should be enabled. - There should be a new element labeled "Items selected: X" with a "Clear" link. - If you uncheck any checkboxes the controls should be updated, showing the new count of selected records. - Move to the next page of results and confirm that making selections on this page works to increment all counters - Confirm that the "Export selected.." options work and that your CSV and barcode files now contain only the items you selected. - Test the batch operations menu: - Test that the controls correctly reflect the logged-in user's permissions: - With permission to batch modify items - With permission to batch delete items - With both; with neither - Both menu options should take you to the correct page and the list of submitted items should match your selections. - Test that clicking the "Clear" button next to "Items selected" hides the items selected box and reverts the "Export all" and "Batch operations" buttons to their original state. - Page through the search results to confirm that no checkboxes are checked. - Test that your search selections are really persistent: - Navigate away from the page, return to item search, and perform another search. - The "Item selected" box should still show your previous selections. - Any items you previously selected which are also in this result set should have a checked checkbox. - Click the "Edit search" button from the item search results page and new search with different parameters. - The "Items selected" should still show your previous selections. - Log out of Koha and back in. When you perform an item search now, there should be no "Item selected" - Go to Patrons and test patron searching. As you make selections the "Patrons selected" box should be updated correctly and look correct, matching the one on the item search page.
Created attachment 153285 [details] [review] Bug 34227: Add persistent selections and batch operations to item search This patch modifies the item search results page so that user selections are stored in local storage. This allows the user to make selections on one page of search results, move to another, and continue to make selections. The patch also adds the option to send selected items to batch item modification or batch item deletion. Changes to the patron search results template have been made to make some CSS classes more generic so they can be used by both pages. To test, apply the patch and rebuild the staff interface CSS. - Log in to the staff interface as a user with permission to perform batch item modification and batch item deletion. - Go to item search and perform a search which will return at least two pages of results. - On the search results page you should see a new search header toolbar with some controls: "Select visible rows," "Clear selection," "Export all results to" and "Batch operations" (disabled). - Without making any selections, confirm that the "Export all results to" menu items work correctly to export all results to a CSV or a barcode file. - Confirm that the "Select visible rows" control works as expected, selecting all checkboxes on the current page (and on no other pages) - After selecting all checkboxes the search header controls should be updated: - The "Export all..." button should now show the number of selections: "Export selected results (X) to..." - The batch operations button should be enabled. - There should be a new element labeled "Items selected: X" with a "Clear" link. - If you uncheck any checkboxes the controls should be updated, showing the new count of selected records. - Move to the next page of results and confirm that making selections on this page works to increment all counters - Confirm that the "Export selected.." options work and that your CSV and barcode files now contain only the items you selected. - Test the batch operations menu: - Test that the controls correctly reflect the logged-in user's permissions: - With permission to batch modify items - With permission to batch delete items - With both; with neither - Both menu options should take you to the correct page and the list of submitted items should match your selections. - Test that clicking the "Clear" button next to "Items selected" hides the items selected box and reverts the "Export all" and "Batch operations" buttons to their original state. - Page through the search results to confirm that no checkboxes are checked. - Test that your search selections are really persistent: - Navigate away from the page, return to item search, and perform another search. - The "Item selected" box should still show your previous selections. - Any items you previously selected which are also in this result set should have a checked checkbox. - Click the "Edit search" button from the item search results page and new search with different parameters. - The "Items selected" should still show your previous selections. - Log out of Koha and back in. When you perform an item search now, there should be no "Item selected" - Go to Patrons and test patron searching. As you make selections the "Patrons selected" box should be updated correctly and look correct, matching the one on the item search page. Signed-off-by: Sam Lau <samalau@gmail.com>
Created attachment 156007 [details] [review] Bug 34227: Add persistent selections and batch operations to item search This patch modifies the item search results page so that user selections are stored in local storage. This allows the user to make selections on one page of search results, move to another, and continue to make selections. The patch also adds the option to send selected items to batch item modification or batch item deletion. Changes to the patron search results template have been made to make some CSS classes more generic so they can be used by both pages. To test, apply the patch and rebuild the staff interface CSS. - Log in to the staff interface as a user with permission to perform batch item modification and batch item deletion. - Go to item search and perform a search which will return at least two pages of results. - On the search results page you should see a new search header toolbar with some controls: "Select visible rows," "Clear selection," "Export all results to" and "Batch operations" (disabled). - Without making any selections, confirm that the "Export all results to" menu items work correctly to export all results to a CSV or a barcode file. - Confirm that the "Select visible rows" control works as expected, selecting all checkboxes on the current page (and on no other pages) - After selecting all checkboxes the search header controls should be updated: - The "Export all..." button should now show the number of selections: "Export selected results (X) to..." - The batch operations button should be enabled. - There should be a new element labeled "Items selected: X" with a "Clear" link. - If you uncheck any checkboxes the controls should be updated, showing the new count of selected records. - Move to the next page of results and confirm that making selections on this page works to increment all counters - Confirm that the "Export selected.." options work and that your CSV and barcode files now contain only the items you selected. - Test the batch operations menu: - Test that the controls correctly reflect the logged-in user's permissions: - With permission to batch modify items - With permission to batch delete items - With both; with neither - Both menu options should take you to the correct page and the list of submitted items should match your selections. - Test that clicking the "Clear" button next to "Items selected" hides the items selected box and reverts the "Export all" and "Batch operations" buttons to their original state. - Page through the search results to confirm that no checkboxes are checked. - Test that your search selections are really persistent: - Navigate away from the page, return to item search, and perform another search. - The "Item selected" box should still show your previous selections. - Any items you previously selected which are also in this result set should have a checked checkbox. - Click the "Edit search" button from the item search results page and new search with different parameters. - The "Items selected" should still show your previous selections. - Log out of Koha and back in. When you perform an item search now, there should be no "Item selected" - Go to Patrons and test patron searching. As you make selections the "Patrons selected" box should be updated correctly and look correct, matching the one on the item search page. Signed-off-by: Sam Lau <samalau@gmail.com> Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Created attachment 156008 [details] [review] Bug 34227: (QA follow-up) Fix translation issue and add a space Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
I really like this feature, but I think it would be nice if there was a way to see the selected items when you are coming back for a second different search. Also I am not sure if the "clear selected" and "clear" links are clear enough in their meaning. But: both are not blocker for me.
(In reply to Katrin Fischer from comment #7) > > But: both are not blocker for me. Thanks for clarifying. Reading your comments it felt like you PQA on something you wanted to FQA.
Pushed to master for 23.11. Nice work everyone, thanks!
Enhancement not pushed to 23.05.x
Created attachment 158061 [details] [review] Bug 34227: (follow-up) Adjust selenium tests This patch adjusts the selenium tests to address the renamed ID for the elements. Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
I was trying to document, but ran into bug 37778
*** Bug 17330 has been marked as a duplicate of this bug. ***