Bug 36793

Summary: Local preferences should not stay in the cache when they are deleted
Product: Koha Reporter: Marcel de Rooy <m.de.rooy>
Component: Architecture, internals, and plumbingAssignee: Marcel de Rooy <m.de.rooy>
Status: Pushed to oldstable --- QA Contact: Martin Renvoize (ashimema) <martin.renvoize>
Severity: minor    
Priority: P5 - low CC: dcook, fridolin.somers, lucas
Version: Main   
Hardware: All   
OS: All   
Change sponsored?: --- Patch complexity: Trivial patch
Documentation contact: Documentation submission:
Text to go in the release notes:
Version(s) released in:
24.05.00,23.11.06,23.05.12
Circulation function:
Attachments: Bug 36793: Unit test
Bug 36793: Fix case of $var in Context->delete_preference
Bug 36793: Unit test
Bug 36793: Fix case of $var in Context->delete_preference

Description Marcel de Rooy 2024-05-06 12:33:36 UTC
Sub delete_preference does not change to lowercase like the other subs do.

Fix coming.
Comment 1 Marcel de Rooy 2024-05-06 12:56:46 UTC
Created attachment 166222 [details] [review]
Bug 36793: Unit test

This only applies to 'local' preferences.

Test plan:
Run sysprefs.t with/without second patch.

Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Comment 2 Marcel de Rooy 2024-05-06 12:56:48 UTC
Created attachment 166223 [details] [review]
Bug 36793: Fix case of $var in Context->delete_preference

This only applies to 'local' preferences.

Test plan (first without this patch):
Add a local pref. Delete it. Ask value on commandline with:
* perl -MC4::Context -e"print C4::Context->preference('YOUR_PREF')"
* Did you replace YOUR_PREF :)

Now repeat with this patch. And verify fix (no value now).

Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Comment 3 Marcel de Rooy 2024-05-06 12:57:18 UTC
Trivial: self SO
Comment 4 Martin Renvoize (ashimema) 2024-05-15 08:33:27 UTC
Created attachment 166753 [details] [review]
Bug 36793: Unit test

This only applies to 'local' preferences.

Test plan:
Run sysprefs.t with/without second patch.

Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Comment 5 Martin Renvoize (ashimema) 2024-05-15 08:33:29 UTC
Created attachment 166754 [details] [review]
Bug 36793: Fix case of $var in Context->delete_preference

This only applies to 'local' preferences.

Test plan (first without this patch):
Add a local pref. Delete it. Ask value on commandline with:
* perl -MC4::Context -e"print C4::Context->preference('YOUR_PREF')"
* Did you replace YOUR_PREF :)

Now repeat with this patch. And verify fix (no value now).

Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Comment 6 Katrin Fischer 2024-05-17 08:37:47 UTC
Pushed for 24.05!

Well done everyone, thank you!
Comment 7 Fridolin Somers 2024-05-29 13:11:49 UTC
Pushed to 23.11.x for 23.11.06
Comment 8 Lucas Gass (lukeg) 2024-05-30 19:48:40 UTC
Backported to 23.05.x for upcoming 23.05.12