[Bug 44028] New: Changing an authorised value's code does not clear the AV_descriptions cache
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=44028 Bug ID: 44028 Summary: Changing an authorised value's code does not clear the AV_descriptions cache Initiative type: --- Sponsorship --- status: Product: Koha Version: Main Hardware: All OS: All Status: NEW Severity: normal Priority: P5 - low Component: System Administration Assignee: koha-bugs@lists.koha-community.org Reporter: babarjunaid1122@gmail.com QA Contact: testopia@bugs.koha-community.org CC: gmcharlt@gmail.com Target Milestone: --- Koha::AuthorisedValue->store clears the AV_descriptions:<category> cache only when lib or lib_opac changes. C4::Biblio::GetAuthorisedValueDesc fills that cache with no expiry. So when a librarian edits an authorised value and changes its code (Administration > Authorised values > Edit, e.g. LOC value GEN renamed to GEN2): - items still carrying the old code keep showing the old description, until memcached is flushed or Plack restarts, and then lose it with no edit to explain why; - items given the new code show no description in the meantime. Moving a value to another category has the same problem, for both categories. To reproduce (memcached on): 1. Open an item whose shelving location is shown with its description. 2. Edit that LOC authorised value and change only its code. 3. Reload the item: the old description is still shown. 4. flush_memcached and reload: it is gone. Reproduced on Koha 26.05.02; the same code is on main. See also bug 40554 (wider AV caching work), which does not change this. -- You are receiving this mail because: You are watching all bug changes. You are the assignee for the bug.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=44028 --- Comment #1 from babar junaid <babarjunaid1122@gmail.com> --- Created attachment 210875 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=210875&action=edit Bug 44028: Clear the AV_descriptions cache when an authorised value's code or category changes Bug 44028: Clear the AV_descriptions cache when an authorised value's code or category changes Koha::AuthorisedValue->store cleared the AV_descriptions:<category> cache only when lib or lib_opac changed. Changing the code (or the category) left C4::Biblio::GetAuthorisedValueDesc serving the old mapping until the cache was flushed: items with the old code kept the old description, items with the new code showed none. This patch also clears it when authorised_value or category changes, and clears the old category too when a value moves to another one. Test plan: 1. Run prove t/db_dependent/AuthorisedValues.t without the patch to the module: the new subtest fails. 2. Apply the patch: prove t/db_dependent/AuthorisedValues.t passes. 3. In the staff interface (memcached on), view an item whose shelving location shows its description. 4. Administration > Authorised values > LOC, edit that value and change only its code. 5. Reload the item: without the patch the old description is still shown; with the patch it is not (the item's code no longer exists). 6. Edit a description only: still updated straight away, as before. Sponsored-by: Koha Solutions -- You are receiving this mail because: You are the assignee for the bug. You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=44028 babar junaid <babarjunaid1122@gmail.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Assignee|koha-bugs@lists.koha-commun |babarjunaid1122@gmail.com |ity.org | Status|NEW |Needs Signoff -- You are receiving this mail because: You are the assignee for the bug. You are watching all bug changes.
participants (1)
-
bugzilla-daemon@bugs.koha-community.org