Bug 34786 - after_biblio_action hooks: find after delete makes no sense
Summary: after_biblio_action hooks: find after delete makes no sense
Status: Pushed to oldstable
Alias: None
Product: Koha
Classification: Unclassified
Component: Architecture, internals, and plumbing (show other bugs)
Version: Main
Hardware: All All
: P5 - low minor (vote)
Assignee: Marcel de Rooy
QA Contact: Martin Renvoize
URL:
Keywords:
Depends on: 22709
Blocks: 35965
  Show dependency treegraph
 
Reported: 2023-09-14 09:02 UTC by Marcel de Rooy
Modified: 2024-01-31 16:25 UTC (History)
2 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:
23.11.00,23.05.04,22.11.11


Attachments
Bug 34786: after_biblio_action hooks - No find when action is delete (1.01 KB, patch)
2023-09-14 09:14 UTC, Marcel de Rooy
Details | Diff | Splinter Review
Bug 34786: after_biblio_action hooks - No find when action is delete (1.03 KB, patch)
2023-09-18 11:04 UTC, Martin Renvoize
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 2023-09-14 09:02:57 UTC
$error = _koha_delete_biblio( $dbh, $biblionumber );
    _after_biblio_action_hooks({ action => 'delete', biblio_id => $biblionumber });

AND 

    my $biblio_id = $args->{biblio_id};
    my $action    = $args->{action};
    my $biblio = Koha::Biblios->find( $biblio_id );

Makes no sense.
Comment 1 Marcel de Rooy 2023-09-14 09:14:38 UTC
Created attachment 155605 [details] [review]
Bug 34786: after_biblio_action hooks - No find when action is delete

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 2 Marcel de Rooy 2023-09-14 09:14:57 UTC
Super trivial: self SO
Comment 3 Martin Renvoize 2023-09-18 11:04:53 UTC
Created attachment 155799 [details] [review]
Bug 34786: after_biblio_action hooks - No find when action is delete

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: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Comment 4 Martin Renvoize 2023-09-18 11:05:15 UTC
Trivial improvement.. Passing QA
Comment 5 Tomás Cohen Arazi 2023-09-18 18:55:13 UTC
Pushed to master for 23.11.

Nice work everyone, thanks!
Comment 6 Fridolin Somers 2023-09-18 21:34:02 UTC
Pushed to 23.05.x for 23.05.04
Comment 7 Matt Blenkinsop 2023-10-12 16:01:16 UTC
Nice work everyone!

Pushed to oldstable for 22.11.x