Bug 31360 - Add biblio_id to after_item_action hook
Summary: Add biblio_id to after_item_action hook
Status: CLOSED WONTFIX
Alias: None
Product: Koha
Classification: Unclassified
Component: Architecture, internals, and plumbing (show other bugs)
Version: unspecified
Hardware: All All
: P5 - low enhancement
Assignee: Marcel de Rooy
QA Contact: Testopia
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2022-08-15 10:57 UTC by Marcel de Rooy
Modified: 2023-06-08 22:26 UTC (History)
1 user (show)

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


Attachments
Bug 31360: Add biblio_id to after_item_action hook (829 bytes, patch)
2022-08-15 11:04 UTC, Marcel de Rooy
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 2022-08-15 10:57:38 UTC
Trivial one liner.
Add biblionumber too when calling the after_item_action plugin.
Comment 1 Marcel de Rooy 2022-08-15 11:04:04 UTC
Created attachment 139118 [details] [review]
Bug 31360: Add biblio_id to after_item_action hook

No test plan. Just adding an parameter that may or may not be
useful for the attached plugin.

Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Comment 2 Jonathan Druart 2022-08-17 09:53:54 UTC
Why? Cannot you access it with $item->biblionumber?
Comment 3 Jonathan Druart 2022-08-17 09:57:25 UTC
See commit 7d35052a14df66e9c5fe5d70378d36a6b1edb94d
    Bug 23463: Move plugin hook

We kept item_id for backward compatibility, but now you can access all item's attributes using 'item'.
Comment 4 Marcel de Rooy 2022-08-17 11:32:35 UTC
(In reply to Jonathan Druart from comment #2)
> Why? Cannot you access it with $item->biblionumber?

It would need plugin changes that already assume presence of biblio_id just as the biblio hooks offer.

(In reply to Jonathan Druart from comment #3)
> See commit 7d35052a14df66e9c5fe5d70378d36a6b1edb94d
>     Bug 23463: Move plugin hook
> 
> We kept item_id for backward compatibility, but now you can access all
> item's attributes using 'item'.

If we allow item_id for backward compatiblity, this could be done for biblio_id too. No big deal?
Comment 5 Jonathan Druart 2022-08-17 13:11:53 UTC
(In reply to Marcel de Rooy from comment #4)
> (In reply to Jonathan Druart from comment #2)
> > Why? Cannot you access it with $item->biblionumber?
> 
> It would need plugin changes that already assume presence of biblio_id just
> as the biblio hooks offer.

Are you expecting Koha core to fix plugin's code that has always been broken? :D

> (In reply to Jonathan Druart from comment #3)
> > See commit 7d35052a14df66e9c5fe5d70378d36a6b1edb94d
> >     Bug 23463: Move plugin hook
> > 
> > We kept item_id for backward compatibility, but now you can access all
> > item's attributes using 'item'.
> 
> If we allow item_id for backward compatiblity, this could be done for
> biblio_id too. No big deal?

but biblio_id never existed there...
Comment 6 Marcel de Rooy 2022-08-17 13:31:56 UTC
Okay the battle is lost :) I'll look at the plugin. See you next time.