Summary: | Remember selections across patron search pages | ||
---|---|---|---|
Product: | Koha | Reporter: | Owen Leonard <oleonard> |
Component: | Patrons | Assignee: | Owen Leonard <oleonard> |
Status: | CLOSED FIXED | QA Contact: | Testopia <testopia> |
Severity: | enhancement | ||
Priority: | P5 - low | CC: | cslone, david, gmcharlt, jonathan.druart, kyle.m.hall, lucas, sally.healey, tomascohen |
Version: | Main | ||
Hardware: | All | ||
OS: | All | ||
Change sponsored?: | --- | Patch complexity: | Small patch |
Documentation contact: | Documentation submission: | ||
Text to go in the release notes: |
This enhancement to patron search remembers selections across multiple pages of search results and multiple different searches. The selected patrons can be added to a patron list or submitted for merging. Selections can be cleared manually and are automatically removed upon logout. Previously, selections were only remembered for the current page of search results.
|
Version(s) released in: |
22.11.00
|
Circulation function: | |||
Bug Depends on: | |||
Bug Blocks: | 34479, 34733, 34734, 28366, 31566, 33263 | ||
Attachments: |
Bug 29971: Remember selections across patron search pages
Bug 29971: Remember selections across patron search pages Bug 29971: Remember selections across patron search pages Bug 29971: Remember selections across patron search pages Bug 29971: Remember selections across patron search pages Bug 29971: Remember selections across patron search pages Bug 29971: Remember selections across patron search pages Bug 29971: Add selenium tests |
Description
Owen Leonard
2022-01-28 18:59:37 UTC
Created attachment 129952 [details] [review] Bug 29971: Remember selections across patron search pages This patch modifies the patron search results page to enable checkbox selections to be remembered in the browser's localStorage. This allows checkbox selections to persist while navigating through multiple pages of search results or even across multiple different searches. Once selected, these values can be added to a patron list or submitted for merging. Selections can be cleared manually and will be automatically be removed upon logout. To test, apply the patch and rebuild the staff interface CSS (https://wiki.koha-community.org/wiki/Working_with_SCSS_in_the_OPAC_and_staff_client). - In the staff interface perform a patron search in the Patrons module which will return multiple pages of results.. - Check checkboxes next to several patrons. - After one checkbox is checked the "Add to patron list" button should be enabled. - After more than one checkbox is checked the "Merge selected patrons" button should be enabled. - A box should appear in the toolbar above the search results, "Patrons selected: X" - Navigate to another page of results. Check more checkboxes. The "Patrons selected" information should be updated. - Return to the first page of results. Your original selections should still be checked. - Test that the correct set of patrons is used when clicking "Merge selected patrons" or when using "Add to patron list." - Click the "Clear" button in the selections information box. Checkboxes should be cleared on every page of results you previously checked. - The "Add to patron list" and "Merge selected patrons" buttons should become disabled. - After making several selections, log out of the staff interface and log back in, returning to the same patron search. Your selections should have been forgotten. Created attachment 130003 [details] [review] Bug 29971: Remember selections across patron search pages This patch modifies the patron search results page to enable checkbox selections to be remembered in the browser's localStorage. This allows checkbox selections to persist while navigating through multiple pages of search results or even across multiple different searches. Once selected, these values can be added to a patron list or submitted for merging. Selections can be cleared manually and will be automatically be removed upon logout. To test, apply the patch and rebuild the staff interface CSS (https://wiki.koha-community.org/wiki/Working_with_SCSS_in_the_OPAC_and_staff_client). - In the staff interface perform a patron search in the Patrons module which will return multiple pages of results.. - Check checkboxes next to several patrons. - After one checkbox is checked the "Add to patron list" button should be enabled. - After more than one checkbox is checked the "Merge selected patrons" button should be enabled. - A box should appear in the toolbar above the search results, "Patrons selected: X" - Navigate to another page of results. Check more checkboxes. The "Patrons selected" information should be updated. - Return to the first page of results. Your original selections should still be checked. - Test that the correct set of patrons is used when clicking "Merge selected patrons" or when using "Add to patron list." - Click the "Clear" button in the selections information box. Checkboxes should be cleared on every page of results you previously checked. - The "Add to patron list" and "Merge selected patrons" buttons should become disabled. - After making several selections, log out of the staff interface and log back in, returning to the same patron search. Your selections should have been forgotten. I think this is ready for testing, but I do have concerns about whether I have the workflow correct. As it is now you have to manually clear the "remembered" selections, which could cause confusion if someone is coming back to a new patron search some time later. I'm interested in how others think that works. Sorry Owen - the patch isn't applying. Auto-merging koha-tmpl/intranet-tmpl/prog/js/staff-global.js CONFLICT (content): Merge conflict in koha-tmpl/intranet-tmpl/prog/js/staff-global.js Auto-merging koha-tmpl/intranet-tmpl/prog/en/modules/members/member.tt Auto-merging koha-tmpl/intranet-tmpl/prog/css/src/staff-global.scss error: Failed to merge in the changes. Patch failed at 0001 Bug 29971: Remember selections across patron search pages Created attachment 131787 [details] [review] Bug 29971: Remember selections across patron search pages This patch modifies the patron search results page to enable checkbox selections to be remembered in the browser's localStorage. This allows checkbox selections to persist while navigating through multiple pages of search results or even across multiple different searches. Once selected, these values can be added to a patron list or submitted for merging. Selections can be cleared manually and will be automatically be removed upon logout. To test, apply the patch and rebuild the staff interface CSS (https://wiki.koha-community.org/wiki/Working_with_SCSS_in_the_OPAC_and_staff_client). - In the staff interface perform a patron search in the Patrons module which will return multiple pages of results.. - Check checkboxes next to several patrons. - After one checkbox is checked the "Add to patron list" button should be enabled. - After more than one checkbox is checked the "Merge selected patrons" button should be enabled. - A box should appear in the toolbar above the search results, "Patrons selected: X" - Navigate to another page of results. Check more checkboxes. The "Patrons selected" information should be updated. - Return to the first page of results. Your original selections should still be checked. - Test that the correct set of patrons is used when clicking "Merge selected patrons" or when using "Add to patron list." - Click the "Clear" button in the selections information box. Checkboxes should be cleared on every page of results you previously checked. - The "Add to patron list" and "Merge selected patrons" buttons should become disabled. - After making several selections, log out of the staff interface and log back in, returning to the same patron search. Your selections should have been forgotten. Created attachment 131806 [details] [review] Bug 29971: Remember selections across patron search pages This patch modifies the patron search results page to enable checkbox selections to be remembered in the browser's localStorage. This allows checkbox selections to persist while navigating through multiple pages of search results or even across multiple different searches. Once selected, these values can be added to a patron list or submitted for merging. Selections can be cleared manually and will be automatically be removed upon logout. To test, apply the patch and rebuild the staff interface CSS (https://wiki.koha-community.org/wiki/Working_with_SCSS_in_the_OPAC_and_staff_client). - In the staff interface perform a patron search in the Patrons module which will return multiple pages of results.. - Check checkboxes next to several patrons. - After one checkbox is checked the "Add to patron list" button should be enabled. - After more than one checkbox is checked the "Merge selected patrons" button should be enabled. - A box should appear in the toolbar above the search results, "Patrons selected: X" - Navigate to another page of results. Check more checkboxes. The "Patrons selected" information should be updated. - Return to the first page of results. Your original selections should still be checked. - Test that the correct set of patrons is used when clicking "Merge selected patrons" or when using "Add to patron list." - Click the "Clear" button in the selections information box. Checkboxes should be cleared on every page of results you previously checked. - The "Add to patron list" and "Merge selected patrons" buttons should become disabled. - After making several selections, log out of the staff interface and log back in, returning to the same patron search. Your selections should have been forgotten. Signed-off-by: Sally <sally.healey@cheshiresharedservices.gov.uk> Works great, thanks Owen. To answer your comment, I think it works well like this. The display is clear, shows that patrons are still selected, and there's a clear link to remove the selections. Feels logical and natural to me. Created attachment 136097 [details] [review] Bug 29971: Remember selections across patron search pages This patch modifies the patron search results page to enable checkbox selections to be remembered in the browser's localStorage. This allows checkbox selections to persist while navigating through multiple pages of search results or even across multiple different searches. Once selected, these values can be added to a patron list or submitted for merging. Selections can be cleared manually and will be automatically be removed upon logout. To test, apply the patch and rebuild the staff interface CSS (https://wiki.koha-community.org/wiki/Working_with_SCSS_in_the_OPAC_and_staff_client). - In the staff interface perform a patron search in the Patrons module which will return multiple pages of results.. - Check checkboxes next to several patrons. - After one checkbox is checked the "Add to patron list" button should be enabled. - After more than one checkbox is checked the "Merge selected patrons" button should be enabled. - A box should appear in the toolbar above the search results, "Patrons selected: X" - Navigate to another page of results. Check more checkboxes. The "Patrons selected" information should be updated. - Return to the first page of results. Your original selections should still be checked. - Test that the correct set of patrons is used when clicking "Merge selected patrons" or when using "Add to patron list." - Click the "Clear" button in the selections information box. Checkboxes should be cleared on every page of results you previously checked. - The "Add to patron list" and "Merge selected patrons" buttons should become disabled. - After making several selections, log out of the staff interface and log back in, returning to the same patron search. Your selections should have been forgotten. The patron search stuff has changed enough that I think it's prudent to ask for a new signoff on this. Created attachment 136534 [details] [review] Bug 29971: Remember selections across patron search pages This patch modifies the patron search results page to enable checkbox selections to be remembered in the browser's localStorage. This allows checkbox selections to persist while navigating through multiple pages of search results or even across multiple different searches. Once selected, these values can be added to a patron list or submitted for merging. Selections can be cleared manually and will be automatically be removed upon logout. To test, apply the patch and rebuild the staff interface CSS (https://wiki.koha-community.org/wiki/Working_with_SCSS_in_the_OPAC_and_staff_client). - In the staff interface perform a patron search in the Patrons module which will return multiple pages of results.. - Check checkboxes next to several patrons. - After one checkbox is checked the "Add to patron list" button should be enabled. - After more than one checkbox is checked the "Merge selected patrons" button should be enabled. - A box should appear in the toolbar above the search results, "Patrons selected: X" - Navigate to another page of results. Check more checkboxes. The "Patrons selected" information should be updated. - Return to the first page of results. Your original selections should still be checked. - Test that the correct set of patrons is used when clicking "Merge selected patrons" or when using "Add to patron list." - Click the "Clear" button in the selections information box. Checkboxes should be cleared on every page of results you previously checked. - The "Add to patron list" and "Merge selected patrons" buttons should become disabled. - After making several selections, log out of the staff interface and log back in, returning to the same patron search. Your selections should have been forgotten. Signed-off-by: David Nind <david@davidnind.com> Created attachment 138455 [details] [review] Bug 29971: Remember selections across patron search pages This patch modifies the patron search results page to enable checkbox selections to be remembered in the browser's localStorage. This allows checkbox selections to persist while navigating through multiple pages of search results or even across multiple different searches. Once selected, these values can be added to a patron list or submitted for merging. Selections can be cleared manually and will be automatically be removed upon logout. To test, apply the patch and rebuild the staff interface CSS (https://wiki.koha-community.org/wiki/Working_with_SCSS_in_the_OPAC_and_staff_client). - In the staff interface perform a patron search in the Patrons module which will return multiple pages of results.. - Check checkboxes next to several patrons. - After one checkbox is checked the "Add to patron list" button should be enabled. - After more than one checkbox is checked the "Merge selected patrons" button should be enabled. - A box should appear in the toolbar above the search results, "Patrons selected: X" - Navigate to another page of results. Check more checkboxes. The "Patrons selected" information should be updated. - Return to the first page of results. Your original selections should still be checked. - Test that the correct set of patrons is used when clicking "Merge selected patrons" or when using "Add to patron list." - Click the "Clear" button in the selections information box. Checkboxes should be cleared on every page of results you previously checked. - The "Add to patron list" and "Merge selected patrons" buttons should become disabled. - After making several selections, log out of the staff interface and log back in, returning to the same patron search. Your selections should have been forgotten. Signed-off-by: David Nind <david@davidnind.com> Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org> Created attachment 138456 [details] [review] Bug 29971: Add selenium tests Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org> Hi! The added tests are failing for me. Can you review it ASAP? (In reply to Tomás Cohen Arazi from comment #13) > Hi! The added tests are failing for me. Can you review it ASAP? Which one? The one that is failing on master? Yes that's expected, you are supposed to revert it. Pushed to master for 22.11. Nice work everyone, thanks! Enhancement will not be backported to 22.05.x series I think this is a problematic implementation, as it seems to be retaining the selected patrons even after you perform a function (merge patrons, create a list, do a batch edit) and do a completely new search. This means that the previously selected patrons remain selected even when it doesn't really make logical sense. It's great to be able to select multiple patrons across different searches, but doing something like merging accounts should absolutely clear out that selection. It seems to already be causing some issues, see this ticket: https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=34262 We've also had some errors at our library from this (before we realized what was happening). (In reply to Chris Slone from comment #17) > I think this is a problematic implementation I created bug 34479 to discuss possible solutions. |