[Koha-bugs] [Bug 28173] Add plugin hooks object_store_pre and object_store_post

bugzilla-daemon at bugs.koha-community.org bugzilla-daemon at bugs.koha-community.org
Tue Apr 20 10:26:52 CEST 2021


https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=28173

--- Comment #1 from Julian Maurice <julian.maurice at biblibre.com> ---
Created attachment 119872
  -->
https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=119872&action=edit
Bug 28173: Add plugin hooks object_store_pre and object_store_post

These two hooks are called in Koha::Object::store, which means any
object stored in the database will trigger these hooks.

object_store_pre is called just before `update_or_insert`, allowing to
modify the object before sending the INSERT/UPDATE query

object_store_post is called just after `update_or_insert`, so it can be
used for any actions that require to have the final object, like
indexing, logging, ...

Test plan:
1. prove t/db_dependent/Koha/Plugins/Object_hooks.t

-- 
You are receiving this mail because:
You are watching all bug changes.


More information about the Koha-bugs mailing list