[Koha-bugs] [Bug 34227] Add persistent selections and batch operations to item search

bugzilla-daemon at bugs.koha-community.org bugzilla-daemon at bugs.koha-community.org
Fri Jul 7 16:11:12 CEST 2023


https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=34227

--- Comment #1 from Owen Leonard <oleonard at myacpl.org> ---
Created attachment 153184
  -->
https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=153184&action=edit
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.

-- 
You are receiving this mail because:
You are watching all bug changes.


More information about the Koha-bugs mailing list