Summary: | The 'after_biblio_action' hooks have an inconsistent signature compared to before_biblio_action, and actions in reserves and items | ||
---|---|---|---|
Product: | Koha | Reporter: | Martin Renvoize (ashimema) <martin.renvoize> |
Component: | Plugin architecture | Assignee: | Martin Renvoize (ashimema) <martin.renvoize> |
Status: | Pushed to main --- | QA Contact: | Marcel de Rooy <m.de.rooy> |
Severity: | minor | ||
Priority: | P5 - low | CC: | fridolin.somers, kyle, m.de.rooy, pedro.amorim, tomascohen |
Version: | Main | Keywords: | Hackfest |
Hardware: | All | ||
OS: | All | ||
See Also: | https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=34943 | ||
Change sponsored?: | --- | Patch complexity: | Trivial patch |
Documentation contact: | Documentation submission: | ||
Text to go in the release notes: | Version(s) released in: |
24.05.00
|
|
Circulation function: | |||
Attachments: |
Bug 36343: Add support for 'payload' to _after_biblio_action
Bug 36343: Add support for 'payload' to _after_biblio_action Bug 36343: Add support for 'payload' to _after_biblio_action Bug 36343: (QA follow-up) Adjust two other occurrences Bug 36343: (QA follow-up) Add warning in DB update |
Description
Martin Renvoize (ashimema)
2024-03-18 13:29:59 UTC
Created attachment 163328 [details] [review] Bug 36343: Add support for 'payload' to _after_biblio_action This patch adds support for the payload key into the _after_bilio_action plugin hook wrapper routine. This brings it more inline with how these 'action hooks' appear in Holds and circulation. Created attachment 163768 [details] [review] Bug 36343: Add support for 'payload' to _after_biblio_action This patch adds support for the payload key into the _after_bilio_action plugin hook wrapper routine. This brings it more inline with how these 'action hooks' appear in Holds and circulation. Signed-off-by: Frédéric Demians <f.demians@tamil.fr> sub _after_item_action_hooks { my ( $self, $params ) = @_; my $action = $params->{action}; Koha::Plugins->call( 'after_item_action', { action => $action, item => $self, item_id => $self->itemnumber, } ); } sub generate_userid { my ( $self ) = @_; my @responses = Koha::Plugins->call( 'patron_generate_userid', { patron => $self }, Created attachment 164455 [details] [review] Bug 36343: Add support for 'payload' to _after_biblio_action This patch adds support for the payload key into the _after_bilio_action plugin hook wrapper routine. This brings it more inline with how these 'action hooks' appear in Holds and circulation. Signed-off-by: Frédéric Demians <f.demians@tamil.fr> Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl> Created attachment 164456 [details] [review] Bug 36343: (QA follow-up) Adjust two other occurrences Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl> Apart from release notes maybe even db rev to print warning? How do we arrange for the needed follow-up ? min or enh? What about backports? Agree with the change, but would like to see a reply to Marcel's comment before pushing. Another thing we should do is update the hooks wiki page with a note. Good questions.. we can certainly add a DB update to visibly warn people at upgrade time. In the longer term I'd like to see this sort of thing documented in the developers' side of the proposed plugin store from Hackfest24. We could use the https://docs.mojolicious.org/Mojo/Util#deprecated to visibly warn.. but I'm not entirely sure how we could get explicit about catching if the plugin author used the old syntax. As for ensuring we have a removal happen.. I'm not entirely sure. Created attachment 164910 [details] [review] Bug 36343: (QA follow-up) Add warning in DB update Pushed for 24.05! Well done everyone, thank you! I suggest we do not backport to 23.11.x |