[librecat-dev] adding project funders to publication.project
Jonathan NORRIS
jnorris at ist.ac.at
Thu Jan 16 10:23:10 CET 2020
Hello,
Thanks for the help. I believe I was actually going in the wrong
direction with trying to add the funders to the publication. After
seeing the code in the 'index_publication.fix' file (I'm a couple of
versions behind so its actually in the 'update_publication.fix' file for
me) I realize that what I need to do is add the 'call_identifier' field
to my projects. This is regarding getting OpenAire access working for
the 'grantAgreement' with FP7 and H2020 projects. It looks like the
'to_dc.fix' file will handle this as long as the
'update_publication.fix' file creates the 'call_identifier' field in the
publication.
Thanks again,
Jonathan
IST Austria
On 1/16/20 08:47, Nicolas Franck wrote:
> 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/
>
>
> _______________________________________________
> librecat-dev mailing list
> - send list mails to 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/69f2d04f/attachment.html>
More information about the librecat-dev
mailing list