[Bug 24625] New: Phase out jquery.cookie.js: showLastPatron
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=24625 Bug ID: 24625 Summary: Phase out jquery.cookie.js: showLastPatron Change sponsored?: --- Product: Koha Version: master Hardware: All OS: All Status: NEW Severity: enhancement Priority: P5 - low Component: Templates Assignee: oleonard@myacpl.org Reporter: oleonard@myacpl.org QA Contact: testopia@bugs.koha-community.org CC: testopia@bugs.koha-community.org Depends on: 23944 The showLastPatron feature uses cookies to store information about last searched patron in the staff client. This process should use the newer cookie library, js-cookie. Referenced Bugs: https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=23944 [Bug 23944] Phase out use of jquery.cookie.js in favor of js.cookie.js -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=24625 Owen Leonard <oleonard@myacpl.org> changed: What |Removed |Added ---------------------------------------------------------------------------- Depends on|23944 | Status|NEW |ASSIGNED --- Comment #1 from Owen Leonard <oleonard@myacpl.org> --- This one will be converted to use sessionStorage instead of cookies. Referenced Bugs: https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=23944 [Bug 23944] Phase out use of jquery.cookie.js in favor of js.cookie.js -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=24625 Owen Leonard <oleonard@myacpl.org> changed: What |Removed |Added ---------------------------------------------------------------------------- Patch complexity|--- |Small patch Status|ASSIGNED |Needs Signoff -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=24625 --- Comment #2 from Owen Leonard <oleonard@myacpl.org> --- Created attachment 102249 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=102249&action=edit Bug 24625: Store showLastPatron information using localStorage This patch removes the use of jquery.cookie to store "last patron" information, using localStorage instead. Because there is no "session only" option with localStorage, additional handling of the showLastPatron data is added to the login page. That takes care of "stale" last patron information if user didn't log out but the session expired for some reason. To test apply the patch and enable the showLastPatron system preference. 1. Load a patron's account for checkout 2. Load another patron's account for checkout - There should now be a "Last patron" link in the breadcrumbs bar which links to the patron in step 1. Hovering your mouse over the link should display a tooltip containing the patron's name and card number. - Click the "X" to clear the last patron information. The last patron link should go away. 3. Log out and log back in. The last patron information should be gone. -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=24625 --- Comment #3 from Owen Leonard <oleonard@myacpl.org> --- (In reply to Owen Leonard from comment #1)
This one will be converted to use sessionStorage instead of cookies.
Or maybe localStorage :) sessionStorage's definition of "session" being linked to the window or tab means that the information wouldn't persist in the same way that a session cookie would. -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=24625 David Nind <david@davidnind.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|Needs Signoff |Signed Off -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=24625 David Nind <david@davidnind.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #102249|0 |1 is obsolete| | --- Comment #4 from David Nind <david@davidnind.com> --- Created attachment 102256 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=102256&action=edit Bug 24625: Store showLastPatron information using localStorage This patch removes the use of jquery.cookie to store "last patron" information, using localStorage instead. Because there is no "session only" option with localStorage, additional handling of the showLastPatron data is added to the login page. That takes care of "stale" last patron information if user didn't log out but the session expired for some reason. To test apply the patch and enable the showLastPatron system preference. 1. Load a patron's account for checkout 2. Load another patron's account for checkout - There should now be a "Last patron" link in the breadcrumbs bar which links to the patron in step 1. Hovering your mouse over the link should display a tooltip containing the patron's name and card number. - Click the "X" to clear the last patron information. The last patron link should go away. 3. Log out and log back in. The last patron information should be gone. Signed-off-by: David Nind <david@davidnind.com> -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=24625 Jonathan Druart <jonathan.druart@bugs.koha-community.org> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |jonathan.druart@bugs.koha-c | |ommunity.org Status|Signed Off |Failed QA --- Comment #5 from Jonathan Druart <jonathan.druart@bugs.koha-community.org> --- It does not work: - Search for patrons - Select Edna - Header, search the catalog - Last patron is OK here - Click a record - Last patron is "undefined" KO -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=24625 Owen Leonard <oleonard@myacpl.org> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|Failed QA |Needs Signoff -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=24625 Owen Leonard <oleonard@myacpl.org> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #102256|0 |1 is obsolete| | --- Comment #6 from Owen Leonard <oleonard@myacpl.org> --- Created attachment 105911 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=105911&action=edit Bug 24625: Store showLastPatron information using localStorage This patch removes the use of jquery.cookie to store "last patron" information, using localStorage instead. Because there is no "session only" option with localStorage, additional handling of the showLastPatron data is added to the login page. That takes care of "stale" last patron information if user didn't log out but the session expired for some reason. To test apply the patch and enable the showLastPatron system preference. 1. Load a patron's account for checkout 2. Navigate away from patron-related pages: Perform a catalog search from the search header form and open the detail page from the search results. Confirm that the correct last patron information still shows. 3. Load another patron's account for checkout - There should now be a "Last patron" link in the breadcrumbs bar which links to the patron in step 1. Hovering your mouse over the link should display a tooltip containing the patron's name and card number. - Click the "X" to clear the last patron information. The last patron link should go away. 4. Log out and log back in. The last patron information should be gone. -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=24625 David Nind <david@davidnind.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|Needs Signoff |Signed Off -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=24625 David Nind <david@davidnind.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #105911|0 |1 is obsolete| | --- Comment #7 from David Nind <david@davidnind.com> --- Created attachment 105946 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=105946&action=edit Bug 24625: Store showLastPatron information using localStorage This patch removes the use of jquery.cookie to store "last patron" information, using localStorage instead. Because there is no "session only" option with localStorage, additional handling of the showLastPatron data is added to the login page. That takes care of "stale" last patron information if user didn't log out but the session expired for some reason. To test apply the patch and enable the showLastPatron system preference. 1. Load a patron's account for checkout 2. Navigate away from patron-related pages: Perform a catalog search from the search header form and open the detail page from the search results. Confirm that the correct last patron information still shows. 3. Load another patron's account for checkout - There should now be a "Last patron" link in the breadcrumbs bar which links to the patron in step 1. Hovering your mouse over the link should display a tooltip containing the patron's name and card number. - Click the "X" to clear the last patron information. The last patron link should go away. 4. Log out and log back in. The last patron information should be gone. Signed-off-by: David Nind <david@davidnind.com> -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=24625 Katrin Fischer <katrin.fischer@bsz-bw.de> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|Signed Off |Patch doesn't apply --- Comment #8 from Katrin Fischer <katrin.fischer@bsz-bw.de> --- Can you please rebase? Bug 24625 - Phase out jquery.cookie.js: showLastPatron 105946 - Bug 24625: Store showLastPatron information using localStorage Apply? [(y)es, (n)o, (i)nteractive] y Applying: Bug 24625: Store showLastPatron information using localStorage Using index info to reconstruct a base tree... M koha-tmpl/intranet-tmpl/prog/js/staff-global.js Falling back to patching base and 3-way merge... ^[[AAuto-merging koha-tmpl/intranet-tmpl/prog/js/staff-global.js CONFLICT (content): Merge conflict in koha-tmpl/intranet-tmpl/prog/js/staff-global.js -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=24625 Owen Leonard <oleonard@myacpl.org> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|Patch doesn't apply |Signed Off -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=24625 Owen Leonard <oleonard@myacpl.org> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #105946|0 |1 is obsolete| | --- Comment #9 from Owen Leonard <oleonard@myacpl.org> --- Created attachment 106164 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=106164&action=edit Bug 24625: Store showLastPatron information using localStorage This patch removes the use of jquery.cookie to store "last patron" information, using localStorage instead. Because there is no "session only" option with localStorage, additional handling of the showLastPatron data is added to the login page. That takes care of "stale" last patron information if user didn't log out but the session expired for some reason. To test apply the patch and enable the showLastPatron system preference. 1. Load a patron's account for checkout 2. Navigate away from patron-related pages: Perform a catalog search from the search header form and open the detail page from the search results. Confirm that the correct last patron information still shows. 3. Load another patron's account for checkout - There should now be a "Last patron" link in the breadcrumbs bar which links to the patron in step 1. Hovering your mouse over the link should display a tooltip containing the patron's name and card number. - Click the "X" to clear the last patron information. The last patron link should go away. 4. Log out and log back in. The last patron information should be gone. Signed-off-by: David Nind <david@davidnind.com> -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=24625 Julian Maurice <julian.maurice@biblibre.com> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |julian.maurice@biblibre.com --- Comment #10 from Julian Maurice <julian.maurice@biblibre.com> --- Hi Owen, Patch looks good and works as expected. But something is missing in my opinion : the motivation behind "phasing out" jquery.cookie.js. Is it deprecated ? Has it been decided in an IRC meeting ? Does localStorage has any benefit over using a cookie ? It would be great if you could add a short explanation in the commit message. -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=24625 Owen Leonard <oleonard@myacpl.org> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #106164|0 |1 is obsolete| | --- Comment #11 from Owen Leonard <oleonard@myacpl.org> --- Created attachment 106514 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=106514&action=edit Bug 24625: Store showLastPatron information using localStorage This patch removes the use of jquery.cookie to store "last patron" information, using localStorage instead. jquery.cookie.js is obsolete. See Bug 24624. localStorage has been chosen as an alternative in this situation because it does not require transmission between the client and the server. See Bug 12410. Because there is no "session only" option with localStorage, additional handling of the showLastPatron data is added to the login page. That takes care of "stale" last patron information if user didn't log out but the session expired for some reason. To test apply the patch and enable the showLastPatron system preference. 1. Load a patron's account for checkout 2. Navigate away from patron-related pages: Perform a catalog search from the search header form and open the detail page from the search results. Confirm that the correct last patron information still shows. 3. Load another patron's account for checkout - There should now be a "Last patron" link in the breadcrumbs bar which links to the patron in step 1. Hovering your mouse over the link should display a tooltip containing the patron's name and card number. - Click the "X" to clear the last patron information. The last patron link should go away. 4. Log out and log back in. The last patron information should be gone. Signed-off-by: David Nind <david@davidnind.com> -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=24625 Julian Maurice <julian.maurice@biblibre.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #106514|0 |1 is obsolete| | --- Comment #12 from Julian Maurice <julian.maurice@biblibre.com> --- Created attachment 106519 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=106519&action=edit Bug 24625: Store showLastPatron information using localStorage This patch removes the use of jquery.cookie to store "last patron" information, using localStorage instead. jquery.cookie.js is obsolete. See Bug 24624. localStorage has been chosen as an alternative in this situation because it does not require transmission between the client and the server. See Bug 12410. Because there is no "session only" option with localStorage, additional handling of the showLastPatron data is added to the login page. That takes care of "stale" last patron information if user didn't log out but the session expired for some reason. To test apply the patch and enable the showLastPatron system preference. 1. Load a patron's account for checkout 2. Navigate away from patron-related pages: Perform a catalog search from the search header form and open the detail page from the search results. Confirm that the correct last patron information still shows. 3. Load another patron's account for checkout - There should now be a "Last patron" link in the breadcrumbs bar which links to the patron in step 1. Hovering your mouse over the link should display a tooltip containing the patron's name and card number. - Click the "X" to clear the last patron information. The last patron link should go away. 4. Log out and log back in. The last patron information should be gone. Signed-off-by: David Nind <david@davidnind.com> Signed-off-by: Julian Maurice <julian.maurice@biblibre.com> -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=24625 Julian Maurice <julian.maurice@biblibre.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|Signed Off |Passed QA -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=24625 Jonathan Druart <jonathan.druart@bugs.koha-community.org> changed: What |Removed |Added ---------------------------------------------------------------------------- Blocks| |12410 Referenced Bugs: https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=12410 [Bug 12410] Remove useless use of cookies -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=24625 Jonathan Druart <jonathan.druart@bugs.koha-community.org> changed: What |Removed |Added ---------------------------------------------------------------------------- Version(s)| |20.11.00 released in| | Status|Passed QA |Pushed to master -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=24625 --- Comment #13 from Jonathan Druart <jonathan.druart@bugs.koha-community.org> --- Pushed to master for 20.11, thanks to everybody involved! -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=24625 Lucas Gass <lucas@bywatersolutions.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Version(s)|20.11.00 |20.11.00, 20.05.03 released in| | Status|Pushed to master |Pushed to stable CC| |lucas@bywatersolutions.com --- Comment #14 from Lucas Gass <lucas@bywatersolutions.com> --- backported to 20.05.x for 20.05.03 -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=24625 Aleisha Amohia <aleisha@catalyst.net.nz> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |aleisha@catalyst.net.nz --- Comment #15 from Aleisha Amohia <aleisha@catalyst.net.nz> --- enhancement, not backported to 19.11.x -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=24625 Owen Leonard <oleonard@myacpl.org> changed: What |Removed |Added ---------------------------------------------------------------------------- Blocks| |27750 Referenced Bugs: https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=27750 [Bug 27750] Remove jquery.cookie.js plugin -- You are receiving this mail because: You are watching all bug changes.
participants (1)
-
bugzilla-daemon@bugs.koha-community.org