Ticket #3540 (closed defect: fixed)
Toolbox getEprintField doesn't work with subfields (but probably should?)
| Reported by: | tmb | Owned by: | |
|---|---|---|---|
| Priority: | Customer Report | Milestone: | EPrints 3.2.10 |
| Component: | - | Version: | |
| Severity: | normal | Keywords: | |
| Cc: |
Description
...because Metafield::to_xml doesn't return anything if the field is a subfield (defined $field->{parent_name}).
Workaround:
sub tool_getEprintField
{
my( %opts ) = @_;
my @problems = ensure( \%opts, 'session', 'eprint', 'field' );
return( 1, \@problems ) if( @problems );
my $field = $opts{eprint}->get_dataset->get_field( $opts{field} );
# don't ignore subfields
delete $field->{parent_name} if defined $field->{parent_name};
Change History
Note: See
TracTickets for help on using
tickets.
