[EP-tech] Re: Display of items under review
Sebastien Francois
sf2 at ecs.soton.ac.uk
Wed May 22 12:49:49 BST 2013
Add to your local configuration (archives/<id>/cfg/cfg.d/..., perhaps in
a new .pl file) something on those lines:
$c->add_dataset_trigger( 'eprint', EPrints::Const::EP_TRIGGER_CREATED, sub {
my( %args ) = @_;
my $eprint = $args{dataobj};
my $userid = $eprint->value( 'userid' );
if( defined $userid && "$userid" eq "1234" )
{
// automatically move to the Review if deposit is made by
the SWORD user
$eprint->move_to_buffer();
}
} );
Note that the code above hasn't been tested... You should replace "1234"
with the userid of your SWORD user & restart apache for the changes to
be loaded.
Seb.
On 22/05/13 12:39, Andras Holl wrote:
> Hi,
>
> Could you help me how to use EP_TRIGGER_CREATED ? What exactly should I do?
>
>> If there's something spending apart in your SWORD deposit (for example
>> perhaps you're using a generic 'sword' user or something...), then you
>> can use the EP_TRIGGER_CREATED to over write the eprint_status and set
>> it to 'buffer' (aka Review). Otherwise SWORD will default to the
>> 'inbox', I think because items need to be validated before they can be
>> deposited to the buffer/review.
> Thanks, Andras
>
> --------------------------------------------------------------------------------
> Andras Holl / Holl Andras e-mail: holl at konkoly.hu
> Konkoly Observatory / MTA CsFK CsI Tel.: +36 1 3919368 Fax: +36 1 2754668
> IT manager / Szamitastechn. rendszervez. Mail: H1525 POBox 67, Budapest, Hungary
> --------------------------------------------------------------------------------
>
More information about the Eprints-tech
mailing list