Bug 24549 - Cookies for last patron link are always set - even if showLastPatron is turned off
Summary: Cookies for last patron link are always set - even if showLastPatron is turne...
Status: Pushed to stable
Alias: None
Product: Koha
Classification: Unclassified
Component: Staff Client (show other bugs)
Version: master
Hardware: All All
: P5 - low minor (vote)
Assignee: Jonathan Druart
QA Contact: Testopia
URL:
Keywords:
Depends on: 20312
Blocks:
  Show dependency treegraph
 
Reported: 2020-01-30 20:50 UTC by Katrin Fischer
Modified: 2020-03-13 00:03 UTC (History)
3 users (show)

See Also:
Change sponsored?: ---
Patch complexity: Small patch
Who signed the patch off:
Text to go in the release notes:
Version(s) released in:
20.05.00, 19.11.04


Attachments
Bug 24549: Do not set "last patron" cookie if showLastPatron is disabled (2.13 KB, patch)
2020-02-12 14:53 UTC, Jonathan Druart
Details | Diff | Splinter Review
Bug 24549: Do not set "last patron" cookie if showLastPatron is disabled (2.18 KB, patch)
2020-02-14 17:43 UTC, Owen Leonard
Details | Diff | Splinter Review
Bug 24549: Do not set "last patron" cookie if showLastPatron is disabled (2.23 KB, patch)
2020-02-17 20:08 UTC, Katrin Fischer
Details | Diff | Splinter Review

Note You need to log in before you can comment on or make changes to this bug.
Description Katrin Fischer 2020-01-30 20:50:02 UTC
Noticed this while updating the cookie documentation - the cookies relating to the showLastPatron feature are always set, even if the feature itself is turned off.
Comment 1 Jonathan Druart 2020-02-12 14:53:19 UTC Comment hidden (obsolete)
Comment 2 Owen Leonard 2020-02-14 17:43:50 UTC Comment hidden (obsolete)
Comment 3 Katrin Fischer 2020-02-17 20:08:39 UTC
Created attachment 99129 [details] [review]
Bug 24549: Do not set "last patron" cookie if showLastPatron is disabled

If the showLastPatron syspref is disabled, we should not store the 3
cookies we use for this feature.

Test plan:
0/ Do not apply this patch
1/ Turn off showLastPatron
2/ Search for a patron, click on a result
3/ Open the cookie list of your browser
=> You see 3 cookies named lastborrowercard, lastborrowername,
lastborrowernumber
4/ Remove them
5/ Apply the patch
6/ Reload the patron detail page
=> The 3 cookies are not created
7/ Turn the pref on
8/ Reload the patron detail page
=> The 3 cookies are created
9/ Eat one of them.

QA note: it's a bit dirty, we should do that JS side, but
staff-global.js is too widely used to make the change easy. Any other
suggestions welcomed.

Signed-off-by: Owen Leonard <oleonard@myacpl.org>

Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Comment 4 Martin Renvoize 2020-02-19 11:34:56 UTC
Nice work everyone!

Pushed to master for 20.05
Comment 5 Joy Nelson 2020-03-13 00:03:31 UTC
Pushed to 19.11.x for 19.11.04