EPrints Technical Mailing List Archive
See the EPrints wiki for instructions on how to join this mailing list and related information.
Message: #03550
< Previous (by date) | Next (by date) > | < Previous (in thread) | Next (in thread) > | Messages - Most Recent First | Threads - Most Recent First
[EP-tech] Modifying compound fields with eprint_fields_automatic
- To: "eprints-tech@ecs.soton.ac.uk" <eprints-tech@ecs.soton.ac.uk>
- Subject: [EP-tech] Modifying compound fields with eprint_fields_automatic
- From: Lizz Jennings <e.jennings@bath.ac.uk>
- Date: Fri, 17 Oct 2014 16:33:56 +0100
Hi all, I'm getting in a bit of a tangle.I'd like to be able to add a function to eprint_fields_automatic for the creators field to generate affiliation information based on email addresses (where it's obvious e.g. academic institutions). I've hit a stumbling block immediately - I can't seem to get this to work without overwriting the whole thing with a single row (I've managed several variations on this particular theme).
This currently works to overwrite the whole list with the first creator and does add in or change the affiliation.
if ( $type eq "data_collection" ) { my $creators = $eprint->get_value( "creators" ); my @newcreators; foreach my $creator (@$creators) {push @newcreators, [{ name => $creator->{name}, id => $creator->{id}, orcid => $creator->{orcid}, affiliation => "bibble", contact => $creator->{contact} }];
} $eprint->set_value( "creators", @newcreators ); } Any ideas on how to do this properly would be much appreciated. Lizz -- Lizz Jennings BA MSc ACLIP MCLIP (Revalidated 2014) Technical Data Officer The Library 4.10, University of Bath, Bath, BA2 7AY UK Ext. 3570 (External 01225 383570) E.Jennings@bath.ac.uk
- Follow-Ups:
- [EP-tech] Re: Modifying compound fields with eprint_fields_automatic
- From: sf2 <sf2@ecs.soton.ac.uk>
- [EP-tech] Re: Modifying compound fields with eprint_fields_automatic
- Prev by Date: [EP-tech] shelves plugin
- Next by Date: [EP-tech] Re: Modifying compound fields with eprint_fields_automatic
- Previous by thread: [EP-tech] shelves plugin
- Next by thread: [EP-tech] Re: Modifying compound fields with eprint_fields_automatic
- Index(es):