Hi All, I'm wondering if anyone ever wanted events in Koha? Events may be like onpatronremove, onbibliosave, onbiblionew etc... For example if one wants to check spelling and marc-correctness of the record before it is saved to the database one could put either 'default' or home-made perl script to a special place like $KOHA/events/scripts/ and make links to these scripts from $KOHA/events/onbibliosave/ folder. Every time koha saves a biblio it calls scripts from $KOHA/events/onbibliosave/ in default order provided by fs passing there all the information on biblio available at the moment. Events may be used for statistics, checks, adding some automatically and dynamically calculated defaults... Probably some WUI would be nice but I can't see it's implementation right now. Everyone is welcome to the discussion!
Hi, On Mon, May 25, 2009 at 4:32 AM, Andrei V. Toutoukine <tut@isuct.ru> wrote:
I'm wondering if anyone ever wanted events in Koha? Events may be like onpatronremove, onbibliosave, onbiblionew etc... For example if one wants to check spelling and marc-correctness of the record before it is saved to the database one could put either 'default' or home-made perl script to a special place like $KOHA/events/scripts/ and make links to these scripts from $KOHA/events/onbibliosave/ folder. Every time koha saves a biblio it calls scripts from $KOHA/events/onbibliosave/ in default order provided by fs passing there all the information on biblio available at the moment.
I think a system for defining events and hooking into them is a good idea. Some things to consider: * should an event handler be able to abort an event? E.g., if there's a spell checker for onbibliosave, would it just give warnings to the cataloger or be able to stop the save action? * each event should have a well-defined API specifying the data coming in and out * it should be possible to chain together event handlers * could some event handlers be a matter of user preference as opposed to administrator preference? One thing that I don't think event handlers should be used for is maintaining data integrity - that should be the responsibility of C4 code or database triggers. Regards, Galen -- Galen Charlton VP, Research & Development, LibLime galen.charlton@liblime.com p: 1-888-564-2457 x709 skype: gmcharlt
participants (2)
-
Andrei V. Toutoukine -
Galen Charlton