EPrints Technical Mailing List Archive

Message: #03694


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

[EP-tech] Re: Restricting export of field based on value of another field


Hi Alan / Adam,
That was my fallback way of doing things (also with a way of moving the abstract back to the real field if/when an embargo expires).

I hoped there might be a way of doing:
$eprint->suppress( "abstract" );
or even 
$eprint->value( "abstract", undef ); #use the $eprint, but DO NOT COMMIT

I think the 'shadow abstract' is the way forward. The mechanics of promoting it to the 'live' abstract I can deal with!

Cheers,
John


-----Original Message-----
From: eprints-tech-bounces@ecs.soton.ac.uk [mailto:eprints-tech-bounces@ecs.soton.ac.uk] On Behalf Of Alan.Stiles
Sent: 17 December 2014 11:12
To: eprints-tech@ecs.soton.ac.uk
Subject: [EP-tech] Re: Restricting export of field based on value of another field

Hi John,
Not aware of a specific option as per your request - the thought occurs that it might be simplest to do something in eprints_automatic to move the abstract out to a new, different field that isn't on the exports when your flag is set, pulling it back to the abstract field when editing the item...  Perhaps an extra 'multi-value' field (although it only ever actualy has a 1:1 ratio with an eprint) so it exists in its own table, minimising any extra database storage requirement?



-----Original Message-----
From: John Salter [mailto:J.Salter@leeds.ac.uk]
Sent: 17 December 2014 10:35
To: eprints-tech@ecs.soton.ac.uk
Subject: [EP-tech] Restricting export of field based on value of another field

Hi,
We have a requirement to (sometimes) embargo the abstract for some etheses.

We have a boolean field that allows a student to:
 - always show the abstract
 - embargo the abstract when files are embargoed

Changing the display of this information on the summary page is easy enough (change eprint_render.pl), but quite a few of the Export plugins reference the abstract field directly.

I could create copies of all the Export plugins that reference the abstract field, but this seems inefficient.

Is there a simple way of unsetting a field of a dataobject each time the dataobject is used, but without actually writing that change to the database?

Cheers,
John



*** 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/
-- 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.

*** 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/