EPrints Technical Mailing List Archive
See the EPrints wiki for instructions on how to join this mailing list and related information.
Message: #04941
< Previous (by date) | Next (by date) > | < Previous (in thread) | Next (in thread) > | Messages - Most Recent First | Threads - Most Recent First
[EP-tech] Re: Use as Template
- To: "'eprints-tech@ecs.soton.ac.uk'" <eprints-tech@ecs.soton.ac.uk>
- Subject: [EP-tech] Re: Use as Template
- From: John Salter <J.Salter@leeds.ac.uk>
- Date: Thu, 15 Oct 2015 13:58:49 +0000
Hi, In addition to Adams email, you need to look at this: https://github.com/eprints/eprints/blob/3.3/perl_lib/EPrints/DataObj/EPrint.pm#L174 - the 'contact_email' is set not to clone. This means you have to do a bit more work - copying the core field definition, and changing that flag. I *think* this might work - but there may be a better way to adjust that one value of the field definition... $c->add_dataset_field( "eprint", { name=>"contact_email", type=>"email", required=>0, can_clone=>1, #now allows copying of field in 'clone' replace_core=>1 #this flag must be used with EXTREME caution, it makes is very easy to break things }, reuse => 1 #if field exists, reuse it ); Cheers, John -----Original Message----- From: eprints-tech-bounces@ecs.soton.ac.uk [mailto:eprints-tech-bounces@ecs.soton.ac.uk] On Behalf Of Field A.N. Sent: 15 October 2015 14:43 To: eprints-tech@ecs.soton.ac.uk Subject: [EP-tech] Re: Use as Template The code that runs is here: https://github.com/eprints/eprints/blob/3.3/perl_lib/EPrints/Plugin/Screen/EPrint/UseAsTemplate.pm#L44 ..which calls the clone function here: https://github.com/eprints/eprints/blob/3.3/perl_lib/EPrints/DataObj/EPrint.pm#L640 I see no reason why contact email wouldn't come across... Or have I misread the code? -- Adam Field Business Relationship Manager and Community Lead EPrints Services +44 (0)23 8059 8814 On 15 Oct 2015, at 13:50, Andrew Beeken wrote: > Hello all, > > Regarding the Use As Template option on records, we’ve noticed that this doesn’t populate the Contact Email Address field on a copy. I don’t know if this is a field that we’ve added to our particular EPrints repository; either way, is it possible/easy to have the Use As Template include this content when it copies the record? > > Andrew > > The University of Lincoln, located in the heart of the city of Lincoln, has established an international reputation based on high student satisfaction, excellent graduate employment and world-class research. > > The information in this e-mail and any attachments may be confidential. If you have received this email in error please notify the sender immediately and remove it from your system. Do not disclose the contents to another person or take copies. > > Email is not secure and may contain viruses. The University of Lincoln makes every effort to ensure email is sent without viruses, but cannot guarantee this and recommends recipients take appropriate precautions. > > The University may monitor email traffic data and content in accordance with its policies and English law. Further information can be found at: http://lincoln.ac.uk/legal. > > *** Options: http://mailman.ecs.soton.ac.uk/mailman/listinfo/eprints-tech > *** Archive: http://www.eprints.org/tech.php/ > *** EPrints community wiki: http://wiki.eprints.org/ > *** EPrints developers Forum: http://forum.eprints.org/ *** Options: http://mailman.ecs.soton.ac.uk/mailman/listinfo/eprints-tech *** Archive: http://www.eprints.org/tech.php/ *** EPrints community wiki: http://wiki.eprints.org/ *** EPrints developers Forum: http://forum.eprints.org/
- Follow-Ups:
- [EP-tech] Re: Use as Template
- From: Adam Field <af05v@ecs.soton.ac.uk>
- [EP-tech] Re: Use as Template
- References:
- [EP-tech] Use as Template
- From: Andrew Beeken <anbeeken@lincoln.ac.uk>
- [EP-tech] Re: Use as Template
- From: "Field A.N." <af05v@ecs.soton.ac.uk>
- [EP-tech] Use as Template
- Prev by Date: [EP-tech] Re: Email system using msmtp
- Next by Date: [EP-tech] Re: Use as Template
- Previous by thread: [EP-tech] Re: Use as Template
- Next by thread: [EP-tech] Re: Use as Template
- Index(es):