The biblio and item hooks now look up a record which is deleted already. We could pass the deletedbiblio or deleteditem? Especially on item deletion I am interested in receiving the biblionumber. The code for items differs between 19.11 and master.
I am expecting the "deleted item" to be available with 'item'. Did you try to access $self->{item}->biblionumber?
(In reply to Jonathan Druart from comment #1) > I am expecting the "deleted item" to be available with 'item'. Did you try > to access $self->{item}->biblionumber? Probably a code change between 19.11 and master, as mentioned. In 19.11 the biblionumber was not available. Which at first glance still should be the case for biblio records..
In the meantime the hooks moved to Koha::Item when refactoring. And the biblionumber is now available. So, thats probably fine. Might adjust the test a bit still?
Changing title and even component ;)
Created attachment 125395 [details] [review] Bug 27155: Include identifier test in Biblio_and_Items_plugin_hooks.t The biblio and item action hooks pass a biblionumber or itemnumber now to the plugin at time of deletion. This patch adds a tiny refinement to Biblio_and_Items_plugin_hooks.t and the associated test plugin to be sure of that. Test plan: Run t/db_dependent/Koha/Plugins/Biblio_and_Items_plugin_hooks.t Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Created attachment 125396 [details] [review] Bug 27155: Include identifier test in Biblio_and_Items_plugin_hooks.t The biblio and item action hooks pass a biblionumber or itemnumber now to the plugin at time of deletion. This patch adds a tiny refinement to Biblio_and_Items_plugin_hooks.t and the associated test plugin to be sure of that. Test plan: Run t/db_dependent/Koha/Plugins/Biblio_and_Items_plugin_hooks.t Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl> Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
Straight QA. Trivial upgrade to tests I wrote.
Pushed to master for 21.11, thanks to everybody involved!
Pushed to 21.05.x for 21.05.05
Pushed to 20.11.x for 20.11.11
Not backported to oldoldstable (20.05.x). Feel free to ask if it's needed.