View | Details | Raw Unified | Return to bug 31286
Collapse All | Expand All

(-)a/Koha/Exporter/Record.pm (+7 lines)
Lines 10-15 use C4::Record; Link Here
10
use Koha::Biblios;
10
use Koha::Biblios;
11
use Koha::CsvProfiles;
11
use Koha::CsvProfiles;
12
use Koha::Logger;
12
use Koha::Logger;
13
use Koha::RecordProcessor;
13
use List::Util qw( all any );
14
use List::Util qw( all any );
14
15
15
sub _get_record_for_export {
16
sub _get_record_for_export {
Lines 120-131 sub _get_biblio_for_export { Link Here
120
    my $itemnumbers  = $params->{itemnumbers};
121
    my $itemnumbers  = $params->{itemnumbers};
121
    my $export_items = $params->{export_items} // 1;
122
    my $export_items = $params->{export_items} // 1;
122
    my $only_export_items_for_branches = $params->{only_export_items_for_branches};
123
    my $only_export_items_for_branches = $params->{only_export_items_for_branches};
124
    my $embed_see_from_headings = $params->{embed_see_from_headings};
123
125
124
    my $biblio = Koha::Biblios->find($biblionumber);
126
    my $biblio = Koha::Biblios->find($biblionumber);
125
    my $record = eval { $biblio->metadata->record };
127
    my $record = eval { $biblio->metadata->record };
126
128
127
    return if $@ or not defined $record;
129
    return if $@ or not defined $record;
128
130
131
    if ($embed_see_from_headings) {
132
        my $record_processor = Koha::RecordProcessor->new( { filters => 'EmbedSeeFromHeadings' } );
133
        $record_processor->process($record);
134
    }
135
129
    if ($export_items) {
136
    if ($export_items) {
130
        Koha::Biblio::Metadata->record(
137
        Koha::Biblio::Metadata->record(
131
            {
138
            {
(-)a/misc/export_records.pl (-1 / +7 lines)
Lines 54-59 my ( Link Here
54
    $start_accession,
54
    $start_accession,
55
    $end_accession,
55
    $end_accession,
56
    $marc_conditions,
56
    $marc_conditions,
57
    $embed_see_from_headings,
57
    $help
58
    $help
58
);
59
);
59
60
Lines 78-83 GetOptions( Link Here
78
    'start_accession=s'       => \$start_accession,
79
    'start_accession=s'       => \$start_accession,
79
    'end_accession=s'         => \$end_accession,
80
    'end_accession=s'         => \$end_accession,
80
    'marc_conditions=s'       => \$marc_conditions,
81
    'marc_conditions=s'       => \$marc_conditions,
82
    'embed_see_from_headings' => \$embed_see_from_headings,
81
    'h|help|?'                => \$help
83
    'h|help|?'                => \$help
82
) || pod2usage(1);
84
) || pod2usage(1);
83
85
Lines 266-271 else { Link Here
266
            csv_profile_id     => $csv_profile_id,
268
            csv_profile_id     => $csv_profile_id,
267
            export_items       => (not $dont_export_items),
269
            export_items       => (not $dont_export_items),
268
            clean              => $clean || 0,
270
            clean              => $clean || 0,
271
            embed_see_from_headings => $embed_see_from_headings || 0,
269
        }
272
        }
270
    );
273
    );
271
}
274
}
Lines 395-400 Print a brief help message. Link Here
395
                                "exists(<marc_target>)" will include marc records where
398
                                "exists(<marc_target>)" will include marc records where
396
                                no <marc_target> exists.
399
                                no <marc_target> exists.
397
400
401
=item B<--embed_see_from_headings>
402
403
 --embed_see_from_headings      Embed see from (non-preferred form) headings in bibliographic record.
404
398
=back
405
=back
399
406
400
=head1 AUTHOR
407
=head1 AUTHOR
401
- 

Return to bug 31286