Koha/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
..
Account Bug 12001: Move GetMemberAccountRecords to the Koha namespace 2018-02-23 10:57:30 -03:00
Acquisition Bug 20199: Send a DateTime to DBIC instead of an iso formatted date 2018-02-26 13:24:44 -03:00
ArticleRequest Bug 14610 - Add and update modules 2016-10-26 12:15:13 +00:00
Authority Bug 14769: (QA follow-up) Remove global var $cached_indicators 2018-04-12 10:50:36 -03:00
Biblio Bug 17196: Move marcxml out of the biblioitems table 2017-01-13 13:49:26 +00:00
BiblioUtils Bug 17196: [QA Follow-up] Adjust some text on marcxml 2017-01-13 13:49:30 +00:00
Cache Bug 16088: Introduce Koha::Cache::Memory::Lite to cache the language 2016-06-04 07:43:22 +00:00
Club Bug 19214: prevent crash if club_template_field is called in list context 2017-09-07 14:15:59 -03:00
Config Bug 11998: Use Koha::Cache to cache sysprefs 2016-03-15 07:08:28 +00:00
Edifact Bug 15685: (follow-up) K:A:O->find and ->fetch are no longer used 2017-10-11 13:08:46 -03:00
Exceptions Bug 16330: Remove validation code from Koha::Patron 2018-03-29 11:42:07 -03:00
Exporter Bug 18201: Export data -Fix "Remove non-local items" option and add "Removes non-local records" option for existing functionality 2017-12-21 13:10:03 -03:00
ExternalContent bug_16034 Koha::ExternalContent::OverDrive - a wrapper around WebService::ILS::Overdrive::Patron 2017-02-21 19:58:20 +00:00
Filter/MARC Bug 18579: Fix call to append_fields, fix tests 2017-05-12 08:43:18 -04:00
Illrequest Bug 7317: Remove traces of UnmediatedILL 2017-11-09 11:42:16 -03:00
Indexer Revert Bug 11081 - Port Koha::Contrib::Tamil indexer into Koha code base 2016-03-01 16:56:35 +00:00
Item Bug 16686: Add Koha::Object based class for Koha::Item::Transfer[s] 2016-09-02 13:56:03 +00:00
Library Bug 20157: Use group 'features' to decide which groups to use for group searching functionality 2018-02-12 15:41:58 -03:00
List Bug 19528: Fix a few typos like corrosponding 2017-10-27 14:09:04 -03:00
MetadataRecord Bug 17380: Do not use GuessAuthTypeCode in MetadataRecord::Authority 2017-09-12 12:07:47 -03:00
Middleware Bug 18674: Allow TZ SetEnv for plack 2018-04-11 16:44:14 -03:00
Misc Bug 16011: $VERSION - Remove use vars qw(); 2016-03-24 17:20:39 +00:00
Notice Bug 17959 - Add the Koha::Notice::Message[s] packages (message_queue table) 2017-02-17 11:48:44 +00:00
Number Bug 4078: Add the ability to display and configure the symbol for prices 2018-03-23 11:45:38 -03:00
OAI/Server Bug 19725: OAI-PMH - Use biblio_metadata.timestamp 2017-12-21 13:21:11 -03:00
Object/Limit Bug 17755: (QA followup) Return $self when appropriate 2017-03-24 18:32:46 +00:00
Old Bug 17796: Move Koha::OldIssue[s] to Koha::Checkout[s] 2016-12-20 15:13:29 +00:00
Patron Bug 19935: Use ->checkouts when ->pending_checkouts->count was used 2018-04-03 11:43:39 -03:00
Patrons Bug 19936: Replace Check_userid - Update the occurrences 2018-04-12 09:36:41 -03:00
Plugins Bug 19223: Add methods to correctly handle plugin-generated output 2018-04-04 15:40:07 -03:00
QueryParser/Driver Bug 17664: Silence non-zebra warnings in t/db_dependent/Search.t 2017-10-06 12:09:57 -03:00
RecordProcessor Bug 16011: $VERSION - Remove the $VERSION init 2016-03-24 17:20:28 +00:00
REST Bug 19784: Adapt /v1/patrons to new naming guidelines 2018-03-29 11:42:08 -03:00
Schema/Result Bug 9701: (QA follow-up) DBIx schema changes 2018-04-12 10:50:34 -03:00
SearchEngine Bug 19581: (follow-up) Fix handling of new and old arrays for auth compat 2018-04-09 16:15:18 -03:00
Serial Bug 7677: QA followup 2016-09-12 09:13:57 +00:00
Sitemapper Bug 11190: (QA followup) for tests on jenkins 2015-08-31 10:32:34 -03:00
SMS Bug 15548 [QA Followup] - More new uses of Koha::Borrower 2016-03-03 14:39:00 -07:00
Subscription Bug 15446: (follow-up) Rename Koha::Object[s]->type with _type 2016-02-12 12:35:57 -07:00
SuggestionEngine Bug 9857 - Follow-up - Fix for searches with su= or su: 2017-09-01 13:02:24 -03:00
Template/Plugin Bug 20181: (QA follow-up) Remove double check 2018-04-06 14:51:38 -03:00
Util Bug 17302: [Follow-up] Make Normalize.pm undef-resistent 2016-09-25 14:04:54 +00:00
Account.pm Bug 12001: (QA follow-up) Explicit return 2018-02-23 10:57:30 -03:00
AdditionalField.pm Bug 10855: Remove additional field values when subscription is removed 2015-10-02 15:10:31 -03:00
ArticleRequest.pm Bug 18477: Populate article_requests table values for AR_PENDING notices 2018-01-23 16:03:13 -03:00
ArticleRequests.pm Bug 18403: Deal with the DB user 2018-02-12 15:41:42 -03:00
AudioAlert.pm Bug 15446: Rename Koha::Object[s]->type with _type 2016-02-12 12:35:57 -07:00
AudioAlerts.pm Bug 15446: Rename Koha::Object[s]->type with _type 2016-02-12 12:35:57 -07:00
AuthorisedValue.pm Bug 17935: Adjust some POD lines, fix a few typos 2017-02-14 14:12:50 +00:00
AuthorisedValueCategories.pm Bug 17216: Add Koha::AuthorisedValueCategory|ies classes 2016-10-11 07:30:30 +00:00
AuthorisedValueCategory.pm Bug 17216: Add Koha::AuthorisedValueCategory|ies classes 2016-10-11 07:30:30 +00:00
AuthorisedValues.pm Bug 17642: Do not explode if no authorised value exist 2016-11-18 15:52:01 +00:00
Authorities.pm Bug 9988: Add get_usage_count and linked_biblionumbers to Koha::Authority 2017-04-13 08:53:46 -04:00
Authority.pm Bug 14769: (Follow-up) Reduce number of preference parses 2018-04-12 10:50:35 -03:00
AuthUtils.pm Bug 18298: Add server-side checks and refactor stuffs 2017-10-16 09:44:32 -03:00
Biblio.pm Bug 20176: [sql_modes] Set biblio.datecreated to NOW if not defined 2018-02-16 13:03:58 -03:00
BiblioFramework.pm Bug 15446: (follow-up) Rename Koha::Object[s]->type with _type 2016-02-12 12:35:57 -07:00
BiblioFrameworks.pm Bug 14889: Fix typo in Koha/BiblioFrameworks.pm 2016-03-03 20:32:47 +00:00
Biblioitem.pm Bug 15446: Rename Koha::Object[s]->type with _type 2016-02-12 12:35:57 -07:00
Biblioitems.pm Bug 15446: Rename Koha::Object[s]->type with _type 2016-02-12 12:35:57 -07:00
Biblios.pm Bug 14610 - Add and update modules 2016-10-26 12:15:13 +00:00
BiblioUtils.pm Bug 19040: Refactor GetMarcBiblio parameters 2017-08-25 10:23:42 -03:00
Cache.pm Bug 17833: Make sure this warning will not be ignored 2018-01-09 17:23:49 -03:00
Caches.pm Bug 17935: Adjust some POD lines, fix a few typos 2017-02-14 14:12:50 +00:00
Calendar.pm Bug 9031: (QA follow-up) Final changes to Calendar::days_between 2017-10-27 14:09:04 -03:00
Checkout.pm Bug 18401: Add new method Koha::Checkout->patron 2017-04-28 08:58:46 -04:00
Checkouts.pm Bug 14757 - Allow the use of Template Toolkit syntax for slips and notices 2016-07-08 13:47:42 +00:00
Cities.pm Bug 15446: Rename Koha::Object[s]->type with _type 2016-02-12 12:35:57 -07:00
City.pm Bug 15446: Rename Koha::Object[s]->type with _type 2016-02-12 12:35:57 -07:00
ClassSortRule.pm Bug 19929: Add Koha objects for class sources and sorters 2018-03-23 11:45:38 -03:00
ClassSortRules.pm Bug 19929: (QA follow-up) Fix POD 2018-03-23 11:45:38 -03:00
ClassSource.pm Bug 19929: (QA follow-up) Fix POD 2018-03-23 11:45:38 -03:00
ClassSources.pm Bug 19929: (QA follow-up) Fix POD 2018-03-23 11:45:38 -03:00
Club.pm Bug 18870: Force scalar context for Koha::Club methods 2017-07-06 14:29:01 -03:00
Clubs.pm Bug 18557 [QA Followup] - Use dt_from_string 2017-05-12 08:53:21 -04:00
Config.pm Bug 19760: Die if koha-conf is not accessible 2017-12-22 13:15:35 -03:00
CsvProfile.pm Bug 15451: Add the 2 new modules Koha::CsvProfile[s] 2016-07-22 17:18:34 +00:00
CsvProfiles.pm Bug 15451: Add the 2 new modules Koha::CsvProfile[s] 2016-07-22 17:18:34 +00:00
Database.pm Bug 20123: (QA follow-up) If tz is 'local', no need to tell database to set the timezone 2018-04-11 15:05:01 -03:00
DateUtils.pm Bug 18330: Add RFC3339 to Koha::DateUtils 2017-12-14 16:58:22 -03:00
EDI.pm Bug 20446: Fix Edifact quotes processing 2018-04-06 13:31:45 -03:00
Edifact.pm Bug 7736: Support Ordering via Edifact EDI messages 2016-04-01 20:03:17 +00:00
Email.pm
Exceptions.pm Bug 16330: Add routes to add, update and delete patrons 2018-03-29 11:42:06 -03:00
ExternalContent.pm bug_16034 Koha::ExternalContent::OverDrive - a wrapper around WebService::ILS::Overdrive::Patron 2017-02-21 19:58:20 +00:00
FieldMapping.pm Bug 18269: Add Koha::FieldMapping[s] packages 2017-03-31 10:19:59 +00:00
FieldMappings.pm Bug 18269: Add Koha::FieldMapping[s] packages 2017-03-31 10:19:59 +00:00
FrameworkPlugin.pm Bug 9006: Remove AUTOLOAD in C4::Context 2015-07-20 10:11:41 -03:00
Hold.pm Bug 18382: (QA follow-up) Make new unit test pass 2018-04-02 18:07:57 -03:00
Holds.pm Bug 16187: Add a script to cancel unfilled holds after a specified number of days 2017-10-20 16:51:20 -03:00
I18N.pm
Illrequest.pm Bug 20001: Fix confusion between array and arrayref 2018-01-19 15:12:53 -03:00
Illrequestattribute.pm Bug 7317: Handle backend absense more gracefuly 2017-11-09 11:42:14 -03:00
Illrequestattributes.pm Bug 7317: QA followup 2017-11-09 11:42:14 -03:00
Illrequests.pm Bug 7317: QA followup 2017-11-09 11:42:14 -03:00
IssuingRule.pm Bug 15446: (follow-up) Rename Koha::Object[s]->type with _type 2016-02-12 12:35:57 -07:00
IssuingRules.pm Bug 19301: (QA follow-up) Add POD, use statements and correct typo 2018-02-13 13:36:00 -03:00
Item.pm Bug 18402: Add the Koha::Item->checkout method 2017-04-28 09:01:35 -04:00
Items.pm Bug 15446: Rename Koha::Object[s]->type with _type 2016-02-12 12:35:57 -07:00
ItemType.pm Bug 17944: QA follow-up 2017-06-05 11:59:11 -03:00
ItemTypes.pm Bug 17835: Add an additional LEFT JOIN condition using DBIx::Class 2017-04-14 10:43:52 -04:00
Libraries.pm Bug 18403: Deal with the DB user 2018-02-12 15:41:42 -03:00
Library.pm Bug 18403: Add new method Koha::Library->library_group 2018-02-12 15:41:36 -03:00
Linktracker.pm
Localization.pm Bug 15446: Rename Koha::Object[s]->type with _type 2016-02-12 12:35:57 -07:00
Localizations.pm Bug 15446: Rename Koha::Object[s]->type with _type 2016-02-12 12:35:57 -07:00
Logger.pm Bug 17088: [Follow-up] Adjust POD in Logger.pm 2016-10-10 12:24:00 +00:00
MarcSubfieldStructure.pm Bug 17249: Remove GetKohaAuthorisedValuesFromField - Add classes MarcSubfieldStructure[s] 2016-10-21 15:13:55 +00:00
MarcSubfieldStructures.pm Bug 17249: Remove GetKohaAuthorisedValuesFromField - Add classes MarcSubfieldStructure[s] 2016-10-21 15:13:55 +00:00
MetadataIterator.pm Bug 12478 - authorities can now be stored in ES 2016-04-26 20:20:03 +00:00
MetadataRecord.pm Bug 19096: Make Default authoritative in core modules 2017-12-07 14:44:15 -03:00
MetaSearcher.pm Bug 16769: Uniformise calls to Koha::Cache->set_in_cache 2016-10-10 17:03:54 +00:00
MoreUtils.pm Bug 19069: (follow-up) Remove perlcritic error 2017-10-27 14:58:16 -03:00
News.pm Bug 14757 - Allow the use of Template Toolkit syntax for slips and notices 2016-07-08 13:47:42 +00:00
NewsItem.pm Bug 14757 - Allow the use of Template Toolkit syntax for slips and notices 2016-07-08 13:47:42 +00:00
NorwegianPatronDB.pm Bug 16011: $VERSION - Remove comments 2016-03-24 17:20:29 +00:00
Object.pm Bug 19926: Add the Koha::Object->unblessed_all_relateds method 2018-04-03 11:43:06 -03:00
Objects.pm Bug 19410: (follow-up) Move build_query_params_from_api into a helper 2017-12-11 17:46:59 -03:00
Patron.pm Bug 19936: Reuse existing userid if none provided 2018-04-12 09:36:41 -03:00
Patrons.pm Bug 20182: [sql_modes] Remove group by clause in search_patrons_to_anonymise 2018-02-16 13:03:58 -03:00
Plugins.pm Bug 19081: Do not list plugins that have been uninstalled 2017-09-01 13:02:27 -03:00
Rating.pm Bug 17089: Mark out the boundaries of ratings 2016-09-09 09:31:30 +00:00
Ratings.pm Bug 17089: Koha::Ratings - Remove GetRating 2016-09-09 09:31:29 +00:00
RecordProcessor.pm Bug 15870: potential follow up to comment #8 2016-03-24 20:15:40 +00:00
RefundLostItemFeeRule.pm Bug 14048: (QA followup) Default to 1 if no default rule 2016-07-07 10:37:01 -06:00
RefundLostItemFeeRules.pm Bug 18182: Fix Koha::RefundLostItemFeeRules 2017-04-21 00:10:51 +00:00
Report.pm Bug 20052: (follow-up) Fix QA tool complaints and bad copy 2018-04-02 18:08:06 -03:00
Reports.pm Bug 20052: (follow-up) Fix QA tool complaints and bad copy 2018-04-02 18:08:06 -03:00
Review.pm Bug 15839: Koha::Reviews - Remove approvereview & unapprovereview 2016-09-09 10:29:57 +00:00
Reviews.pm Bug 18403: Deal with the DB user 2018-02-12 15:41:42 -03:00
Schema.pm
SearchEngine.pm Bug 12478: make things using SimpleSearch use the new version 2016-04-26 20:20:07 +00:00
SearchField.pm Bug 12748: (QA followup) fix several tiny QA tools warnings 2016-04-26 20:20:13 +00:00
SearchFields.pm Bug 12748: (QA followup) fix several tiny QA tools warnings 2016-04-26 20:20:13 +00:00
SearchMarcMap.pm Bug 12748: (QA followup) fix several tiny QA tools warnings 2016-04-26 20:20:13 +00:00
SearchMarcMaps.pm Bug 12748: (QA followup) fix several tiny QA tools warnings 2016-04-26 20:20:13 +00:00
Serial.pm Bug 15446: Rename Koha::Object[s]->type with _type 2016-02-12 12:35:57 -07:00
Serials.pm Bug 15446: Rename Koha::Object[s]->type with _type 2016-02-12 12:35:57 -07:00
SimpleMARC.pm Bug 16011: $VERSION - Remove the $VERSION init 2016-03-24 17:20:28 +00:00
Sitemapper.pm Bug 11190: (QA followup) for tests on jenkins 2015-08-31 10:32:34 -03:00
Subscription.pm Bug 18785: Force scalar context in Koha::Subscription::biblio 2017-10-09 16:15:50 -03:00
Subscriptions.pm Bug 15446: (follow-up) Rename Koha::Object[s]->type with _type 2016-02-12 12:35:57 -07:00
Suggestion.pm Bug 13012 - suggestion.suggesteddate should be set to NOW if not defined 2017-08-10 16:25:34 -03:00
SuggestionEngine.pm Bug 9978: Replace license header with the correct license (GPLv3+) 2015-04-20 09:59:38 -03:00
Suggestions.pm Bug 14757 - Allow the use of Template Toolkit syntax for slips and notices 2016-07-08 13:47:42 +00:00
Token.pm Bug 18124: [Follow-up] Handle default parameters in a sub 2017-03-30 09:07:08 +00:00
UploadedFile.pm Bug 20081: Set inline headers for uploaded pdfs 2018-03-26 17:31:17 -03:00
UploadedFiles.pm Bug 18300: [QA Follow-up] Fix return value inconsistency 2017-04-21 00:11:40 +00:00
Uploader.pm Bug 19420: (QA Follow-up) Fix test, correct POD 2017-11-08 13:31:37 -03:00
Virtualshelf.pm Bug 18672: Fix overwriting creation date with modification date when editing list 2017-07-17 13:19:24 -03:00
Virtualshelfcontent.pm Bug 15446: Rename Koha::Object[s]->type with _type 2016-02-12 12:35:57 -07:00
Virtualshelfcontents.pm Bug 15446: Rename Koha::Object[s]->type with _type 2016-02-12 12:35:57 -07:00
Virtualshelfshare.pm Bug 15446: Rename Koha::Object[s]->type with _type 2016-02-12 12:35:57 -07:00
Virtualshelfshares.pm Bug 15446: Rename Koha::Object[s]->type with _type 2016-02-12 12:35:57 -07:00
Virtualshelves.pm Bug 20179: [sql_modes] Remove GROUP BY in get_shelves_containing_record 2018-04-09 16:15:17 -03:00
XSLT_Handler.pm Bug 17807: Add format parameter to XSLT_Handler->transform 2017-08-30 15:06:40 -03:00