EPrints Technical Mailing List Archive

See the EPrints wiki for instructions on how to join this mailing list and related information.

Message: #03691


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