Bug 27155 - Include identifier test in Biblio_and_Items_plugin_hooks.t
Summary: Include identifier test in Biblio_and_Items_plugin_hooks.t
Status: CLOSED FIXED
Alias: None
Product: Koha
Classification: Unclassified
Component: Test Suite (show other bugs)
Version: Main
Hardware: All All
: P5 - low normal (vote)
Assignee: Marcel de Rooy
QA Contact: Testopia
URL:
Keywords:
Depends on:
Blocks: 27173
  Show dependency treegraph
 
Reported: 2020-12-04 15:15 UTC by Marcel de Rooy
Modified: 2022-06-06 20:24 UTC (History)
5 users (show)

See Also:
Change sponsored?: ---
Patch complexity: Trivial patch
Documentation contact:
Documentation submission:
Text to go in the release notes:
Version(s) released in:
21.11.00,21.05.05,20.11.11


Attachments
Bug 27155: Include identifier test in Biblio_and_Items_plugin_hooks.t (2.97 KB, patch)
2021-09-28 11:57 UTC, Marcel de Rooy
Details | Diff | Splinter Review
Bug 27155: Include identifier test in Biblio_and_Items_plugin_hooks.t (2.98 KB, patch)
2021-09-28 12:14 UTC, Tomás Cohen Arazi
Details | Diff | Splinter Review

Note You need to log in before you can comment on or make changes to this bug.
Description Marcel de Rooy 2020-12-04 15:15:36 UTC
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.
Comment 1 Jonathan Druart 2020-12-09 12:52:21 UTC
I am expecting the "deleted item" to be available with 'item'. Did you try to access $self->{item}->biblionumber?
Comment 2 Marcel de Rooy 2020-12-09 13:48:52 UTC
(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..
Comment 3 Marcel de Rooy 2021-09-28 11:38:03 UTC
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?
Comment 4 Marcel de Rooy 2021-09-28 11:55:25 UTC
Changing title and even component ;)
Comment 5 Marcel de Rooy 2021-09-28 11:57:11 UTC
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>
Comment 6 Tomás Cohen Arazi 2021-09-28 12:14:31 UTC
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>
Comment 7 Tomás Cohen Arazi 2021-09-28 12:26:41 UTC
Straight QA. Trivial upgrade to tests I wrote.
Comment 8 Jonathan Druart 2021-09-29 10:44:08 UTC
Pushed to master for 21.11, thanks to everybody involved!
Comment 9 Kyle M Hall 2021-10-08 13:29:07 UTC
Pushed to 21.05.x for 21.05.05
Comment 10 Fridolin Somers 2021-10-21 03:52:06 UTC
Pushed to 20.11.x for 20.11.11
Comment 11 Victor Grousset/tuxayo 2021-10-26 00:39:03 UTC
Not backported to oldoldstable (20.05.x). Feel free to ask if it's needed.