<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=us-ascii">
</head>
<body style="word-wrap: break-word; -webkit-nbsp-mode: space; line-break: after-white-space;" class="">
You can also use a before-hook, in order to update your publication record:
<div class=""><br class="">
</div>
<div class="">   Create a LibreCat::Hook (e.g. LibreCat::Hook::my_hook) and add the name ( "my_hook" ) to </div>
<div class="">   hooks.publication-new.before_fixe and hooks.publication-update.before_fixes in catmandu.local.yml</div>
<div class=""><br class="">
</div>
<div class="">See config/hooks.yml for structure. See also <a href="https://github.com/LibreCat/LibreCat/wiki/Hooks" class="">https://github.com/LibreCat/LibreCat/wiki/Hooks</a></div>
<div class=""><br class="">
</div>
<div class="">Beware: hooks are only executed in web context, not when you add a record from the command line,</div>
<div class="">or using the publication model directly. The question is: does it have to be changed every time</div>
<div class="">you save it?</div>
<div class="">
<div><br class="">
<blockquote type="cite" class="">
<div class="">On 16 Jan 2020, at 08:32, Peil, Vitali <<a href="mailto:vitali.peil@uni-bielefeld.de" class="">vitali.peil@uni-bielefeld.de</a>> wrote:</div>
<br class="Apple-interchange-newline">
<div class="">
<div class="">Hi Jonathan,<br class="">
<br class="">
that is done in fixes/index_publication.fix on the dev branch! (see <a href="https://github.com/LibreCat/LibreCat/blob/dev/fixes/index_publication.fix" class="">
https://github.com/LibreCat/LibreCat/blob/dev/fixes/index_publication.fix</a>). This should be available soon on the master branch.<br class="">
<br class="">
Fields added in this file will be in the elasticsearch index only. In your case it is basically a lookup function.<br class="">
<br class="">
Best,<br class="">
Vitali<br class="">
<br class="">
<br class="">
________________________________________<br class="">
Von: <a href="mailto:librecat-dev-bounces@lists.uni-bielefeld.de" class="">librecat-dev-bounces@lists.uni-bielefeld.de</a> <<a href="mailto:librecat-dev-bounces@lists.uni-bielefeld.de" class="">librecat-dev-bounces@lists.uni-bielefeld.de</a>> im Auftrag von
 Jonathan NORRIS <<a href="mailto:jnorris@ist.ac.at" class="">jnorris@ist.ac.at</a>><br class="">
Gesendet: Mittwoch, 15. Januar 2020 10:07:32<br class="">
An: <a href="mailto:librecat-dev@lists.uni-bielefeld.de" class="">librecat-dev@lists.uni-bielefeld.de</a><br class="">
Betreff: [librecat-dev] adding project funders to publication.project<br class="">
<br class="">
Hello,<br class="">
<br class="">
I need to add the project's funders field to the publication's project<br class="">
field when a publication is saved. I can see that the grant number is<br class="">
added but I cannot see where this is added. I would greatly appreciate<br class="">
if someone could point me to where this is done.<br class="">
<br class="">
Thanks!<br class="">
Jonathan<br class="">
IST Austria<br class="">
_______________________________________________<br class="">
librecat-dev mailing list<br class="">
- send list mails to <a href="mailto:librecat-dev@lists.uni-bielefeld.de" class="">
librecat-dev@lists.uni-bielefeld.de</a><br class="">
- to unsubscribe or change options, visit <a href="https://lists.uni-bielefeld.de/mailman2/cgi/unibi/listinfo/librecat-dev" class="">
https://lists.uni-bielefeld.de/mailman2/cgi/unibi/listinfo/librecat-dev</a><br class="">
- project website: <a href="http://librecat.org/" class="">http://librecat.org/</a><br class="">
<br class="">
_______________________________________________<br class="">
librecat-dev mailing list<br class="">
- send list mails to <a href="mailto:librecat-dev@lists.uni-bielefeld.de" class="">
librecat-dev@lists.uni-bielefeld.de</a><br class="">
- to unsubscribe or change options, visit <a href="https://lists.uni-bielefeld.de/mailman2/cgi/unibi/listinfo/librecat-dev" class="">
https://lists.uni-bielefeld.de/mailman2/cgi/unibi/listinfo/librecat-dev</a><br class="">
- project website: <a href="http://librecat.org/" class="">http://librecat.org/</a><br class="">
</div>
</div>
</blockquote>
</div>
<br class="">
</div>
</body>
</html>