Koha-clms/t/Koha
Marcel de Rooy 32fc3f9ed1 Bug 14769: (QA follow-up) Remove global var $cached_indicators
As requested by RM, this patch replaces using the global $cached_indicators
by saving state temporarily during the (limited) lifetime of the object.

Essentially this affects two places in code:
[1] blinddetail-biblio-search.pl (loading auth record in editor)
[2] AuthoritiesMarc::merge (merging authority into biblios)

Concurrent runs of [1] and/or [2] together with a simultaneous pref change
just in between could cause slight (hypothetical) side-effects.
The current approach of keeping state in the object makes that a series of
controlled_indicators calls during an immediate merge of one specific
authority is not affected by a simultaneous pref change. So the same rules
are applied to the set of attached biblio record for that authority.
Note also that the cron job ignores a simultaneous pref change, since
it reads from the unchanged L1 cache (yes, also hypothetical).

Test plan:
[1] Run t/Koha/Authority/ControlledIndicators.t
[2] Run t/db_dependent/Authority/Merge.t
[3] Run t/db_dependent/Koha/Authorities.t

Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
2018-04-12 10:50:36 -03:00
..
Authority Bug 14769: (QA follow-up) Remove global var $cached_indicators 2018-04-12 10:50:36 -03:00
Plugin Bug 20181: Unit tests 2018-04-06 14:51:37 -03:00
REST/Plugin Bug 19410: Move build_query_params_from_api into a helper 2017-12-11 17:46:59 -03:00
SearchEngine Bug 19542: Add a check for ES configuration health 2017-12-11 14:30:42 -03:00
Util Bug 18292: Remove return 1 statements in tests 2017-08-15 12:17:42 -03:00
Config.t Bug 19760: Fix Config.t test 2017-12-22 14:04:52 -03:00
ItemType.t Bug 12748: (QA followup) make new tests pass 2016-04-26 20:20:14 +00:00