Bug 14522 introduced caching for single_holidays, however, when rebuilding the cache it is using self->branchcode to populate all of the holidays for the cache.
Created attachment 51585 [details] [review] Bug 16539 - Koha::Cache is incorrectly caching single holidays This makes the loop add holidays for each bracnh instead of the calling branch To test: I used memcached-tools to view the cache, clear the cache, and wait for holidays to regnerate Have a branches with different holidays Clear the cache Do a checkout View the cache - one libraries holidays are repeated for all branches Apply patch Clear the cache Do a checkout Library holidays are correctly cached
Created attachment 51587 [details] [review] Bug 16539 - Koha::Cache is incorrectly caching single holidays This makes the loop add holidays for each bracnh instead of the calling branch To test: I used memcached-tools to view the cache, clear the cache, and wait for holidays to regnerate Have a branches with different holidays Clear the cache Do a checkout View the cache - one libraries holidays are repeated for all branches Apply patch Clear the cache Do a checkout Library holidays are correctly cached Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Created attachment 51588 [details] [review] Bug 16539 - Koha::Cache is incorrectly caching single holidays This makes the loop add holidays for each bracnh instead of the calling branch To test: I used memcached-tools to view the cache, clear the cache, and wait for holidays to regnerate Have a branches with different holidays Clear the cache Do a checkout View the cache - one libraries holidays are repeated for all branches Apply patch Clear the cache Do a checkout Library holidays are correctly cached Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com> Signed-off-by: Chris Cormack <chrisc@catalyst.net.nz>
Created attachment 51593 [details] [review] Bug 16539: Try to provide tests
Nick, I have tried to provide tests for this change, but they pass even without your patch. Could you have a look?
Created attachment 51664 [details] [review] Bug 16539: Try to provide tests Fix minor typo (testing CPL not MPL)
For me tests fail without patch and pass with it, back to signed off (In reply to Jonathan Druart from comment #5) > Nick, I have tried to provide tests for this change, but they pass even > without your patch. > Could you have a look?
Created attachment 51665 [details] [review] Bug 16539 - Koha::Cache is incorrectly caching single holidays This makes the loop add holidays for each bracnh instead of the calling branch To test: I used memcached-tools to view the cache, clear the cache, and wait for holidays to regnerate Have a branches with different holidays Clear the cache Do a checkout View the cache - one libraries holidays are repeated for all branches Apply patch Clear the cache Do a checkout Library holidays are correctly cached Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com> Signed-off-by: Chris Cormack <chrisc@catalyst.net.nz> Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Created attachment 51666 [details] [review] Bug 16539: Add tests Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Pushed to master for 16.05. Thanks Nick, Jonathan!
Patches pushed to 3.22.x, will be in 3.22.7