Bug 31360

Summary: Add biblio_id to after_item_action hook
Product: Koha Reporter: Marcel de Rooy <m.de.rooy>
Component: Architecture, internals, and plumbingAssignee: Marcel de Rooy <m.de.rooy>
Status: CLOSED WONTFIX QA Contact: Testopia <testopia>
Severity: enhancement    
Priority: P5 - low CC: jonathan.druart
Version: unspecified   
Hardware: All   
OS: All   
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

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.