EPrints Technical Mailing List Archive

Message: #06987


< Previous (by date) | Next (by date) > | < Previous (in thread) | Next (in thread) > | Messages - Most Recent First | Threads - Most Recent First

Re: [EP-tech] REF Compliance Checker Plugin


It does exactly that – it sets it the first time and then doesn’t change it.

 

The easiest (dirty) way I’ve found to check it’s processing my override code is to put a

 

print STDERR “My Local Override_Function_Name: Doing this bit now\n”;

 

in the function, which should then appear in the apache error log.

 

 

 

From: eprints-tech-bounces@ecs.soton.ac.uk [mailto:eprints-tech-bounces@ecs.soton.ac.uk] On Behalf Of Andrew Beeken
Sent: 30 November 2017 10:34
To: eprints-tech@ecs.soton.ac.uk
Subject: Re: [EP-tech] REF Compliance Checker Plugin

 

Actually, looking at the code in more detail, for example this trigger (my modified version):

 

# date of first compliant deposit - this uses our value of "stage"

$c->add_dataset_trigger( 'eprint', EPrints::Const::EP_TRIGGER_BEFORE_COMMIT, sub

{

                my( %args ) = @_;

                my( $repo, $eprint, $changed ) = @args{qw( repository dataobj changed )};

 

                # trigger only applies to repos with hefce_oa plugin enabled

                return unless $eprint->dataset->has_field( "hoa_compliant" );

 

                return if $eprint->is_set( "hoa_date_fcd" );

                return if $eprint->value( "eprint_status" ) eq "inbox";

 

                for( $eprint->get_all_documents )

                {

                                next unless $_->is_set( "stage" );

                                next unless $_->value( "stage" ) eq "accepted" || $_->value( "stage" ) eq "published";

                                $eprint->set_value( "hoa_date_fcd", $_->value( "datestamp" ) );

                                $eprint->set_value( "hoa_version_fcd", $_->value( "stage" ) eq "accepted" ? "AM" : "VoR" );

                }

}, priority => 100 );

 

Does the line return if $eprint->is_set( "hoa_date_fcd" ); mean that if the date is already set, it won’t be recalculated?

 

 

From: eprints-tech-bounces@ecs.soton.ac.uk [mailto:eprints-tech-bounces@ecs.soton.ac.uk] On Behalf Of Andrew Beeken
Sent: 29 November 2017 15:44
To: eprints-tech@ecs.soton.ac.uk
Subject: Re: [EP-tech] REF Compliance Checker Plugin

 

Thanks John!

 

Okay, I’ve made some progress on this but I’m coming a little unstuck on the Date of First Compliant Deposit and Date of First Compliant Open Access.

 

So, for both of these I’ve needed to make a alight adjustment as we store our “accepted”, “published” etc in a variable called “stage”. No problem, I’ve switched “content” up for “stage” and I’m getting a date through now based, looking at the code, on EPrints::Time::get_iso_date(). The issue I have is that in all instances this is showing as todays date.

 

Speaking to Bev about how she wants this to work, she’s expecting to see:

 

First Compliant Deposit – the date the record was created, so I assume the datestamp value of the record?

 

First Compliant Open Access – the date the record was created OR the embargo date if one is set.

 

Once I’ve got these setting as expected I think I can get this deployed.

 

Any thoughts?

 

From: eprints-tech-bounces@ecs.soton.ac.uk [mailto:eprints-tech-bounces@ecs.soton.ac.uk] On Behalf Of John Salter
Sent: 29 November 2017 12:38
To: eprints-tech@ecs.soton.ac.uk
Subject: Re: [EP-tech] REF Compliance Checker Plugin

 

Hi Andrew,
Some parts of the REF_CC plugin can be overridden in the configuration.
Have a look at the stuff in ~/lib/cfg.d/ - anything that starts $c->{'something'} can be overridden in an archive specific config file.

If there are specific things you're trying to do that don't seem to be covered by this, you know where to ask!

Cheers,
John


From: eprints-tech-bounces@ecs.soton.ac.uk <eprints-tech-bounces@ecs.soton.ac.uk> on behalf of Andrew Beeken <anbeeken@lincoln.ac.uk>
Sent: 29 November 2017 12:12:41
To: eprints-tech@ecs.soton.ac.uk
Subject: [EP-tech] REF Compliance Checker Plugin

 

Hi all!

 

Putting some final bits into place before I retire from the repository work in 2018, I’m now looking at the REF Compliance Checker Plugin (http://eprintsug.github.io/hefce_oa/). One of the things I’ve noticed is that the plugin doesn’t seem to be picking up some of our specific workflow modifications which is to be expected. With the RIOXX plugin I was able to change the fields that were being looked at however I can’t seem to see an obvious way to do this in the documentation. Any thoughts?

 

Cheers!

Andrew


Image removed by sender. TEF Gold

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://www.lincoln.ac.uk/legal.

-- The Open University is incorporated by Royal Charter (RC 000391), an exempt charity in England & Wales and a charity registered in Scotland (SC 038302). The Open University is authorised and regulated by the Financial Conduct Authority in relation to its secondary activity of credit broking.