[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
Wed Mar 20 09:25:15 CET 2024


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

Julian Maurice <julian.maurice at biblibre.com> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
 Attachment #119872|0                           |1
        is obsolete|                            |

--- Comment #11 from Julian Maurice <julian.maurice at biblibre.com> ---
Created attachment 163509
  -->
https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=163509&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