EPrints Technical Mailing List Archive
Message: #08940
< Previous (by date) | Next (by date) > | < Previous (in thread) | Next (in thread) > | Messages - Most Recent First | Threads - Most Recent First
Re: [EP-tech] How to delete succeeds-field?
- To: <eprints-tech@ecs.soton.ac.uk>, Yuri Carrer <yuri.carrer@unipd.it>, <th.lauke@arcor.de>
- Subject: Re: [EP-tech] How to delete succeeds-field?
- From: David R Newman <drn@ecs.soton.ac.uk>
- Date: Thu, 19 May 2022 15:04:12 +0100
Hi Thomas and Yuri,
I think the following fix to line 1744 of /opt/eprints3/perl_lib/EPrints/DataObj/EPrint.pm for EPrints 3.4.2 will resolve your main problem:
if( defined $parent && $parent->get_value( "eprint_status" ) eq "archive" )
This is inside the code block for the in_thread function. It changes:
sub in_thread
{
my( $self, $field ) = @_;
if( $self->later_in_thread( $field )->count > 0
)
{
return 1;
}
if( $self->is_set( $field->name ) )
{
my $parentid = $self->get_value(
$field->name );
my $dataset = $self->{session}->dataset(
"eprint" );
my $parent = $dataset->dataobj( $parentid );
if( $parent->get_value( "eprint_status" ) eq
"archive" )
{
return 1;
}
}
}
To:
sub in_thread
{
my( $self, $field ) = @_;
if( $self->later_in_thread( $field )->count > 0
)
{
return 1;
}
if( $self->is_set( $field->name ) )
{
my $parentid = $self->get_value(
$field->name );
my $dataset = $self->{session}->dataset(
"eprint" );
my $parent = $dataset->dataobj( $parentid );
if( defined $parent &&
$parent->get_value( "eprint_status" ) eq "archive" )
{
return 1;
}
}
}
CAUTION: This e-mail originated outside the University of Southampton. Isn't the reverse? I mean the missing eprint has the succeeds field that points to an existing eprint. Thomas: I've found a solution. Go to: /cgi/users/home?screen=Listing&dataset=eprint (Manage records on the top bar -> Eprints) and search the id of the record deleted or with problems. Then destroy it (the dust bin) and then regenerate the abstracts, the link to the missing one is gone. If you don't even have it in records, you've to go with the db. Mine was an Eprints 3.1.X and I didn't had the manage records. I think that using the db in this situation is easier because the succeeds is just a field and there should be any problem changing it (it is not indexed or used elsewhere). Il 19/05/22 13:04, David R Newman ha scritto:the succeeding eprint still has its succeeds field set with a now missing eprint ID-- Yuri Carrer CAB - Centro di Ateneo per le Biblioteche, Università di Padova Tel: 049/827 9712 - Via Beato Pellegrino, 28 - Padova *** Options: http://mailman.ecs.soton.ac.uk/mailman/listinfo/eprints-tech *** Archive: https://eur03.safelinks.protection.outlook.com/?url=""> *** EPrints community wiki: https://eur03.safelinks.protection.outlook.com/?url="">
- References:
- [EP-tech] How to delete succeeds-field?
- From: th.lauke@arcor.de
- Re: [EP-tech] How to delete succeeds-field?
- From: Yuri <yurj@alfa.it>
- Re: [EP-tech] How to delete succeeds-field?
- From: Yuri Carrer <yuri.carrer@unipd.it>
- [EP-tech] How to delete succeeds-field?
- Prev by Date: Re: [EP-tech] How to delete succeeds-field?
- Next by Date: [EP-tech] Data Repository Upgrade - Staging area file problems
- Previous by thread: [EP-tech] Sort view with creators_name and corp_creators
- Index(es):