Bug 28676: Cache and retrieve match_count when searching a cached heading
authorNick Clemens <nick@bywatersolutions.com>
Wed, 7 Jul 2021 15:39:43 +0000 (15:39 +0000)
committerWainui Witika-Park <wainuiwitikapark@catalyst.net.nz>
Mon, 18 Oct 2021 02:28:22 +0000 (02:28 +0000)
commit8d687b2ea89fdcedfb3688b98c819e2d086cb323
tree3dd0dac5f6f555fbc1af2c2e4c4a977b4fb602b8
parent5c04f569a97d9341540a492915ee1b14e56dd743
Bug 28676: Cache and retrieve match_count when searching a cached heading

We use match_count to determine if a new authority record should be created, however,
we were not adding this count to the cache, so if a record returned too many matches on first
lookup, we would create a new record on the second lookup

To test:
1 - Set Linker Module to 'Default'
2 - Enable  AutoCreateAuthorities  and  BiblioAddsAuthorities and  CatalogModuleRelink and LinkerRelink
3 - Add two copies of a single authority via Z39
4 - Add two headings for that authority to a bib record (e.g. a 610 and 710)
5 - Save the record and note a new authority is generated
6 - Repeat and see another is generated
7 - Apply patch
8 - Restart all the things
9 - Save the record again, no new authority created

Signed-off-by: Phil Ringnalda <phil@chetcolibrary.org>
Signed-off-by: Joonas Kylmälä <joonas.kylmala@iki.fi>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
(cherry picked from commit c46cefb7c505e31bf3c0683f1f5ce3e08a1cd6f4)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
(cherry picked from commit 9d5150e4cd82b05bf0e7a62a5964d678fc363086)
Signed-off-by: Victor Grousset/tuxayo <victor@tuxayo.net>
(cherry picked from commit 848ac85dcc5b35f3d71952f58efa33d3761047f8)
Signed-off-by: Wainui Witika-Park <wainuiwitikapark@catalyst.net.nz>
(cherry picked from commit 848ac85dcc5b35f3d71952f58efa33d3761047f8)
C4/Linker/Default.pm