[librecat-dev] adding project funders to publication.project

Nicolas Franck Nicolas.Franck at UGent.be
Thu Jan 16 08:47:06 CET 2020


You can also use a before-hook, in order to update your publication record:

   Create a LibreCat::Hook (e.g. LibreCat::Hook::my_hook) and add the name ( "my_hook" ) to
   hooks.publication-new.before_fixe and hooks.publication-update.before_fixes in catmandu.local.yml

See config/hooks.yml for structure. See also https://github.com/LibreCat/LibreCat/wiki/Hooks

Beware: hooks are only executed in web context, not when you add a record from the command line,
or using the publication model directly. The question is: does it have to be changed every time
you save it?

On 16 Jan 2020, at 08:32, Peil, Vitali <vitali.peil at uni-bielefeld.de<mailto:vitali.peil at uni-bielefeld.de>> wrote:

Hi Jonathan,

that is done in fixes/index_publication.fix on the dev branch! (see https://github.com/LibreCat/LibreCat/blob/dev/fixes/index_publication.fix). This should be available soon on the master branch.

Fields added in this file will be in the elasticsearch index only. In your case it is basically a lookup function.

Best,
Vitali


________________________________________
Von: librecat-dev-bounces at lists.uni-bielefeld.de<mailto:librecat-dev-bounces at lists.uni-bielefeld.de> <librecat-dev-bounces at lists.uni-bielefeld.de<mailto:librecat-dev-bounces at lists.uni-bielefeld.de>> im Auftrag von Jonathan NORRIS <jnorris at ist.ac.at<mailto:jnorris at ist.ac.at>>
Gesendet: Mittwoch, 15. Januar 2020 10:07:32
An: librecat-dev at lists.uni-bielefeld.de<mailto:librecat-dev at lists.uni-bielefeld.de>
Betreff: [librecat-dev] adding project funders to publication.project

Hello,

I need to add the project's funders field to the publication's project
field when a publication is saved. I can see that the grant number is
added but I cannot see where this is added. I would greatly appreciate
if someone could point me to where this is done.

Thanks!
Jonathan
IST Austria
_______________________________________________
librecat-dev mailing list
- send list mails to librecat-dev at lists.uni-bielefeld.de<mailto:librecat-dev at lists.uni-bielefeld.de>
- to unsubscribe or change options, visit https://lists.uni-bielefeld.de/mailman2/cgi/unibi/listinfo/librecat-dev
- project website: http://librecat.org/

_______________________________________________
librecat-dev mailing list
- send list mails to librecat-dev at lists.uni-bielefeld.de<mailto:librecat-dev at lists.uni-bielefeld.de>
- to unsubscribe or change options, visit https://lists.uni-bielefeld.de/mailman2/cgi/unibi/listinfo/librecat-dev
- project website: http://librecat.org/

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.uni-bielefeld.de/mailman2/unibi/public/librecat-dev/attachments/20200116/0313867e/attachment.html>


More information about the librecat-dev mailing list