Koha/Koha
Tomas Cohen Arazi 6189f25dfa
Bug 23793: Add an EmbedItems RecordProcessor filter for MARC::Record objects
This patch introduces a RecordProcessor filter for MARC::Record objects
that embeds MARC::Field's for each item that is passed to the processor.

Target usage:

my $biblio = Koha::Biblios->find(
    $biblio_id,
    { prefetch => [ items, metadata ] }
);

my $opachiddenitems_rules;
eval {
    my $yaml = C4::Context->preference('OpacHiddenItems') . "\n\n";
    $opachiddenitems_rules = YAML::Load($yaml);
};

my @items  = grep { !$_->hidden_in_opac({ rules => $opachiddenitems_rules }) @{$biblio->items->as_list};
my $record = $biblio->metadata->record;

my $processor = Koha::RecordProcessor->new(
    {
        filters => ('EmbedItems'),
        options => {
            items        => \@items
        }
    }
);

$processor->process( $record );

Signed-off-by: Ere Maijala <ere.maijala@helsinki.fi>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
2019-10-23 17:33:07 +01:00
..
Account Bug 22837: (follow-up) Fix POD 2019-09-23 10:51:40 +01:00
Acquisition Bug 22541: Invoice adjustments should show invoice number and include link on ordered.pl and spent.pl 2019-04-11 11:45:24 +00: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 23425: (QA follow-up) Keep it generic 2019-09-23 10:41:58 +01:00
BiblioUtils Bug 14385: Squash of a lot of patches rebased 2018-11-02 10:33:12 +00:00
Cache Bug 16088: Introduce Koha::Cache::Memory::Lite to cache the language 2016-06-04 07:43:22 +00:00
Cash Bug 23321: Allow setting of branch default 2019-09-23 11:39:22 +01:00
Charges Bug 20912: (QA follow-up) POD fix 2019-03-07 17:29:58 +00:00
Club Bug 19618: (RM follow-up) Add missing use statements 2019-10-01 11:46:11 +01:00
Config Bug 15494: (follow-up) Move yaml syspref code to its own sub in SySpref object 2018-11-07 21:39:39 +00:00
Edifact Bug 20254: Set correct member in working_directory 2019-08-20 15:03:59 +01:00
Exceptions Bug 19618: Add api endpoint for club holds 2019-10-01 08:05:58 +01:00
Exporter Bug 22721: Remove frameworkcode parameter in GetMarcFromKohaField calls 2019-07-15 11:28:08 +01:00
ExternalContent Bug 21082: Update OverDrive authentication method 2018-10-09 11:04:23 +00:00
Filter/MARC Bug 23793: Add an EmbedItems RecordProcessor filter for MARC::Record objects 2019-10-23 17:33:07 +01:00
Illrequest Bug 23712: Silence warns from Koha/Illrequest/Logger.pm 2019-10-21 09:43:17 +01:00
Indexer Revert Bug 11081 - Port Koha::Contrib::Tamil indexer into Koha code base 2016-03-01 16:56:35 +00:00
Item Bug 18072: Add Koha objects for Branch Transfer Limit 2018-07-18 17:29:03 +00:00
Library Bug 21910: Does not deal with call context, ->search does already 2018-12-11 19:11:34 +00:00
List Bug 19524: Share patron lists between staff 2018-07-18 16:49:29 +00:00
MetadataRecord Bug 21872: Remove duplicate modulo condition in authorities iterator 2019-05-10 12:31:49 +00: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 18736: (follow-up) Fix missing rounding and bad formatting 2019-03-21 16:29:06 +00:00
OAI/Server Bug 20665: Reset MySQL connection time zone in the OAI-PMH Provider 2018-05-03 12:46:55 -03:00
Object Bug 15774: Remove unecessary returned value for ->delete 2019-03-07 20:37:06 +00:00
Objects Bug 23599: Avoid exploding in search_with_library_limits when no library is passed 2019-09-12 16:00:41 +01:00
Old Bug 21432: (bug 20899 follow-up) Fix patron's name display for deleted patrons 2018-10-03 17:18:44 +00:00
Patron Bug 23589: Discharge notice does not show non-latin characters 2019-10-07 12:22:08 +01:00
Patrons Bug 14570: Make it possible to add multiple guarantors to a record 2019-08-20 16:04:48 +01:00
pdfformat Bug 18736: Use rounding syspref to determine correct prices in calculations 2019-03-21 16:27:09 +00:00
Plugins Bug 23237: Fix POD and typos 2019-08-05 15:50:57 +01:00
QueryParser/Driver Bug 20078: (QA follow-up) Correct attribute in PQF.pm 2018-11-06 12:22:54 +00:00
RecordProcessor Bug 16011: $VERSION - Remove the $VERSION init 2016-03-24 17:20:28 +00:00
REST Bug 23770: (follow-up) Use ->to_api in /cities 2019-10-21 10:04:17 +01:00
Schema/Result Bug 17005: Add checked_in checkouts to REST API response 2019-10-08 14:33:39 +01:00
SearchEngine Bug 22997: Searching gives no results in auth_finder.pl 2019-10-09 14:29:06 +01: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 17047: add a dedicated page for Mana setup 2019-01-23 14:39:26 +00:00
SuggestionEngine Bug 14457: (QA follow-up) Fix POD 2019-04-16 13:17:34 +00:00
Tags Bug 21846: Add Koha::Tags::Approval(s) and Koha::Tags::Index(es) 2019-03-15 12:27:44 +00:00
Template/Plugin Bug 22847: Correctly displayed circ rule values for max_holds and maxissue* 2019-05-09 14:32:27 +00:00
Util Bug 23324: (QA follow-up) Typo and remove unneeded use statement 2019-08-16 12:27:01 +01:00
Z3950Responder Bug 13937: (follow-up) Fix searching with UTF-8 characters. 2019-10-23 15:01:44 +01:00
Account.pm Bug 23321: (follow-up) Correction to exception logic 2019-09-23 11:39:22 +01:00
ActionLog.pm Bug 22363: (follow-up) Fix pod 2019-03-11 11:22:01 +00:00
ActionLogs.pm Bug 22363: (follow-up) Fix pod 2019-03-11 11:22:01 +00:00
AdditionalField.pm Bug 15774: Add POD and license notices 2019-03-07 20:37:05 +00:00
AdditionalFields.pm Bug 15774: Add POD and license notices 2019-03-07 20:37:05 +00:00
AdditionalFieldValue.pm Bug 22934: Add missing use statement 2019-05-23 14:43:16 +00:00
AdditionalFieldValues.pm Bug 15774: (follow-up) Address QA issues 2019-03-07 20:37:05 +00:00
ApiKey.pm Bug 20568: (QA follow-up) Remove unused vars 2018-05-09 12:56:00 -03:00
ApiKeys.pm Bug 20568: Add mandatory description field for api keys 2018-05-09 12:55:58 -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 23272: Make Koha::AuthorisedValue use Koha::Object::Limit::Library 2019-09-13 08:04:05 +01: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 21719: Fix typos 2018-11-08 02:18:46 +00:00
Biblio.pm Bug 22445: Replace %% with {} 2019-10-22 15:02:51 +01: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 21872: Remove duplicate modulo condition in authorities iterator 2019-05-10 12:31:49 +00:00
Cache.pm Bug 13193: (RM revert) Make Memcached usage fork safe 2019-10-01 15:34:57 +01:00
Caches.pm Bug 17935: Adjust some POD lines, fix a few typos 2017-02-14 14:12:50 +00:00
Calendar.pm Bug 19204: Make the debarment date calculation depends on finesCalendar 2018-04-25 10:52:20 -03:00
Checkout.pm Bug 18401: Add new method Koha::Checkout->patron 2017-04-28 08:58:46 -04:00
Checkouts.pm Bug 14591: book drop / drop box mode incorrectly decrements accrued overdue fines 2019-03-15 12:14:03 +00:00
CirculationRule.pm Bug 18887: Fix POD c/p issues 2018-10-03 17:58:16 +00:00
CirculationRules.pm Bug 22679: Delete related CirculationRules when Removing IssuingRule 2019-04-24 10:35:38 +00:00
Cities.pm Bug 15446: Rename Koha::Object[s]->type with _type 2016-02-12 12:35:57 -07:00
City.pm Bug 23770: Add to_api_mapping method to Koha::City 2019-10-21 10:03:53 +01: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
ClassSplitRule.pm Bug 15836: Handle non-existent regexs 2018-11-13 15:18:22 +00:00
ClassSplitRules.pm Bug 15836: Add the ability to defined custom methods to split call number in labels 2018-11-13 15:18:22 +00: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 23022: Remove the SQl mode NO_AUTO_CREATE_USER 2019-06-15 07:52:09 +01:00
DateUtils.pm Bug 19816: Implement dateonly for rfc3339 format 2019-02-04 14:09:43 +00:00
EDI.pm Bug 20780: (follow-up) Use Koha::Object 2019-10-10 08:24:31 +01:00
Edifact.pm Bug 7736: Support Ordering via Edifact EDI messages 2016-04-01 20:03:17 +00:00
Email.pm Bug 8000: (QA follow-up) Centralise Bcc too 2019-04-29 15:08:46 +00:00
Exceptions.pm Bug 20590: Improve Koha::Exceptions in string context 2018-04-19 12:46:04 -03:00
ExternalContent.pm Bug 17602: Koha::ExternalContent->koha_patron() will retutn undef rather than die if user not logged in 2018-10-01 13:56:38 +00:00
FrameworkPlugin.pm Bug 22721: Remove frameworkcode parameter in GetMarcFromKohaField calls 2019-07-15 11:28:08 +01:00
Hold.pm Bug 23219: Cancel patrons holds when patron delete 2019-07-15 12:48:36 +01: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 Bug 15395: Use POSIX::setlocale 2018-11-08 16:40:05 +00:00
Illcomment.pm Bug 18591: (follow-up) Add more POD 2018-10-27 13:15:59 +00:00
Illcomments.pm Bug 18591: Fix pluralization of type 2018-10-27 15:53:34 +00:00
Illrequest.pm Bug 23712: (QA follow-up) Silence two other warns too 2019-10-21 09:43:24 +01: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 18928: (bug 22679 follow-up) Do not remove all rules along with the issuing rule 2019-07-01 14:58:13 +01:00
IssuingRules.pm Bug 17530: (QA follow-up) Fix caching error 2018-09-07 13:16:10 +00:00
Item.pm Bug 23807: Add Koha::Item->as_marc_field 2019-10-17 15:06:14 +01:00
Items.pm Bug 15446: Rename Koha::Object[s]->type with _type 2016-02-12 12:35:57 -07:00
ItemType.pm Bug 15497: Limit itemtypes by branch in additem.pl 2019-09-12 16:31:06 +01:00
ItemTypes.pm Bug 15497: (QA follow-up) Fix call in search_with_localization 2019-09-12 16:31:06 +01:00
KeyboardShortcut.pm Bug 21411: Advanced cataloging editor - rancor - Allow configuration of Keyboard 2019-05-10 18:59:39 +00:00
KeyboardShortcuts.pm Bug 21411: Address QA concerns 2019-05-10 18:59:39 +00:00
Libraries.pm Bug 7614: (QA follow-up) Remove unused variable 2019-01-25 16:07:07 +00:00
Library.pm Bug 23321: Koha::Library additions 2019-09-23 11:39:21 +01:00
Linktracker.pm Bug 8917 : [ Sign followup ] Track clicks to links external to Koha 2013-03-07 11:14:25 -05:00
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 13937: Add a Z39.50 daemon that can inject item status MARC subfields 2019-10-08 14:39:30 +01:00
Manual.pm Bug 11529: Remove field mapping table and admin page 2019-08-05 15:03:18 +01: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
OAuth.pm Bug 20612: (QA follow-up) Fix typo in method POD 2018-05-09 12:56:01 -03:00
OAuthAccessToken.pm Bug 20402: Add missing POD 2018-05-08 15:55:43 -03:00
OAuthAccessTokens.pm Bug 20402: Add missing POD 2018-05-08 15:55:43 -03:00
Object.pm Bug 23770: Add Koha::Object(s)->to_api method 2019-10-21 10:03:44 +01:00
Objects.pm Bug 23770: Add Koha::Object(s)->to_api method 2019-10-21 10:03:44 +01:00
Patron.pm Bug 23688: System preference uppercasesurnames broken by typo 2019-10-01 07:41:46 +01:00
Patrons.pm Bug 14570: (follow-up) fix qa FAIL tests 2019-08-20 16:05:14 +01:00
Plugins.pm Bug 21073: (QA follow-up) Simplify logic 2019-06-18 17:30:31 +01: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
RDF.pm Bug 18586: Create module to mint RDF subject URIs 2018-08-09 12:11:16 +00:00
RecordProcessor.pm Bug 15870: potential follow up to comment #8 2016-03-24 20:15:40 +00:00
RefundLostItemFeeRules.pm Bug 18930: (RM follow-up) Restore primary key find 2019-07-16 13:53:54 +01:00
Report.pm Bug 17047: SQL reports management with Mana-KB 2019-01-23 14:39:26 +00:00
Reports.pm Bug 17047: SQL reports management with Mana-KB 2019-01-23 14:39:26 +00: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 Bug 11891: (follow-up) remove custom storage class 2014-06-19 11:55:03 -03:00
Script.pm Bug 22600: Set 'commandline' interface appropriately 2019-04-10 19:43:11 +00:00
SearchEngine.pm Bug 12478: make things using SimpleSearch use the new version 2016-04-26 20:20:07 +00:00
SearchField.pm Bug 20589: Add field boosting and use query_string fields parameter 2019-10-02 13:28:57 +01:00
SearchFields.pm Bug 20589: Add field boosting and use query_string fields parameter 2019-10-02 13:28:57 +01: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
SharedContent.pm Bug 22249: Mana - Move comment process in a dedicated sub 2019-07-26 16:08:08 +01:00
SimpleMARC.pm Bug 22571: Handle control fields in MMT for conditionals 2019-06-21 13:12:46 +01:00
Sitemapper.pm Bug 11190: (QA followup) for tests on jenkins 2015-08-31 10:32:34 -03:00
StockRotationItem.pm Bug 11897: Stockrotation 2018-10-09 15:46:05 +00:00
StockRotationItems.pm Bug 11897: Stockrotation 2018-10-09 15:46:05 +00:00
StockRotationRota.pm Bug 11897: Stockrotation 2018-10-09 15:46:05 +00:00
StockRotationRotas.pm Bug 22566: Fix some more issues 2019-06-25 17:01:11 +01:00
StockRotationStage.pm Bug 11897: Stockrotation 2018-10-09 15:46:05 +00:00
StockRotationStages.pm Bug 11897: Stockrotation 2018-10-09 15:46:05 +00:00
Subscription.pm Bug 15774: Use Koha::Object(s) for additional fields 2019-03-07 20:37:05 +00:00
Subscriptions.pm Bug 15774: Use Koha::Object(s) for additional fields 2019-03-07 20:37:05 +00: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
Tag.pm Bug 21846: Add Koha::Tags::Approval(s) and Koha::Tags::Index(es) 2019-03-15 12:27:44 +00:00
Tags.pm Bug 21846: Add Koha::Tags::Approval(s) and Koha::Tags::Index(es) 2019-03-15 12:27:44 +00:00
Token.pm Bug 21998: Throw exception on bad pattern 2019-03-22 20:21:44 +00:00
UploadedFile.pm Bug 20727: (QA follow-up) Fix Upload.t and Plugins.t 2018-06-22 16:10:10 +00:00
UploadedFiles.pm Bug 18300: [QA Follow-up] Fix return value inconsistency 2017-04-21 00:11:40 +00:00
Uploader.pm Bug 19633: Use alphanumeric error codes in upload 2018-08-10 10:10:46 +00: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 11943: Prevent double accepts in Koha::Virtualshelfshare 2018-05-11 10:52:43 -03:00
Virtualshelfshares.pm Bug 15446: Rename Koha::Object[s]->type with _type 2016-02-12 12:35:57 -07:00
Virtualshelves.pm Bug 21612: Remove incorrect GROUP BY's from Koha::VirtualShelves 2018-10-26 16:31:25 +00:00
XSLT_Handler.pm Bug 20272: Replace error numbers by codes in XSLT_Handler 2018-07-02 12:12:48 +00:00
Z3950Responder.pm Bug 13937: (RM follow-up) Set working directory for daemon mode. 2019-10-15 13:48:28 +01:00
Z3950Server.pm Bug 20047: Add Koha::Z3950Server Oject and use it to get server count 2018-04-20 13:34:41 -03:00
Z3950Servers.pm Bug 20047: Add Koha::Z3950Server Oject and use it to get server count 2018-04-20 13:34:41 -03:00