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 256-261 else { Link Here
256
            csv_profile_id     => $csv_profile_id,
258
            csv_profile_id     => $csv_profile_id,
257
            export_items       => (not $dont_export_items),
259
            export_items       => (not $dont_export_items),
258
            clean              => $clean || 0,
260
            clean              => $clean || 0,
261
            embed_see_from_headings => $embed_see_from_headings || 0,
259
        }
262
        }
260
    );
263
    );
261
}
264
}
Lines 385-390 Print a brief help message. Link Here
385
                                "exists(<marc_target>)" will include marc records where
388
                                "exists(<marc_target>)" will include marc records where
386
                                no <marc_target> exists.
389
                                no <marc_target> exists.
387
390
391
=item B<--embed_see_from_headings>
392
393
 --embed_see_from_headings      Embed see from (non-preferred form) headings in bibliographic record.
394
388
=back
395
=back
389
396
390
=head1 AUTHOR
397
=head1 AUTHOR
391
- 

Return to bug 31286