EPrints Technical Mailing List Archive
Message: #06469
< Previous (by date) | Next (by date) > | < Previous (in thread) | Next (in thread) > | Messages - Most Recent First | Threads - Most Recent First
[EP-tech] Does 'can_clone' work correctly?
- To: "eprints-tech@ecs.soton.ac.uk" <eprints-tech@ecs.soton.ac.uk>
- Subject: [EP-tech] Does 'can_clone' work correctly?
- From: Matthew Brady <Matthew.Brady@usq.edu.au>
- Date: Fri, 28 Apr 2017 07:00:04 +0000
Hi, Just wondering if anyone else can verify a problem I am having, (or doing wrong) on a 3.3.10 instance… According to the documentation (https://wiki.eprints.org/w/Metadata), can_clone is a property that can be set in the field
definitions, and is used quite liberally in the EPrints.pm : get_system_field_info sub e.g. {
name=>"datestamp",
type=>"time",
required=>0,
import=>0,
render_res=>"minute",
render_style=>"short",
can_clone=>0
}, {
name=>"lastmod",
type=>"timestamp",
required=>0,
import=>0,
render_res=>"minute",
render_style=>"short",
can_clone=>0,
volatile=>1
}, {
name=>"status_changed",
type=>"time",
required=>0,
import=>0,
render_res=>"minute",
render_style=>"short",
can_clone=>0
}, to filter out data you don’t want to copy across when cloning… foreach my
$field
(
$self->{dataset}->get_fields
) {
next if(
$field->get_property(
"can_clone"
) );
delete
$data->{$field->get_name}; } Taking this a step further, I have altered the local repository eprint_fields.pl field definitions, to include the can_clone => 0 into a few test fields, but the data still
gets cloned into the new record. e.g. {name
=>
'test_field_1',
type
=>
'set',
options
=> ['yes','no','pending'],
can_clone
=>
0,
}, Can anyone confirm if it’s not working correctly, or point me to what I’m doing wrong ?
Cheers Matt _____________________________________________________________ This email (including any attached files) is confidential and is for the intended recipient(s) only. If you received this email by mistake, please, as a courtesy, tell the sender, then delete this email. The views and opinions are the originator's and do not necessarily reflect those of the University of Southern Queensland. Although all reasonable precautions were taken to ensure that this email contained no viruses at the time it was sent we accept no liability for any losses arising from its receipt. The University of Southern Queensland is a registered provider of education with the Australian Government. (CRICOS Institution Code QLD 00244B / NSW 02225M, TEQSA PRV12081 ) |
- Prev by Date: [EP-tech] Force a confirmations-popup bevor moving an Object to status-"archive"
- Next by Date: [EP-tech] UTF
- Previous by thread: [EP-tech] Force a confirmations-popup bevor moving an Object to status-"archive"
- Next by thread: [EP-tech] Does 'can_clone' work correctly?
- Index(es):