[Bug 31896] New: New Recall hook when adding recall
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=31896 Bug ID: 31896 Summary: New Recall hook when adding recall Change sponsored?: --- Product: Koha Version: master Hardware: All OS: All Status: NEW Severity: enhancement Priority: P5 - low Component: Plugin architecture Assignee: koha-bugs@lists.koha-community.org Reporter: stefan.berndtsson@ub.gu.se QA Contact: testopia@bugs.koha-community.org This patch adds a new hook "after_recall_action" with the action "add". This is consistent with when UpdateStats is called so that a plugin can be used to log the same kind of data as the normal statistics. -- You are receiving this mail because: You are watching all bug changes. You are the assignee for the bug.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=31896 --- Comment #1 from Stefan Berndtsson <stefan.berndtsson@ub.gu.se> --- Created attachment 142267 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=142267&action=edit Bug 31896: New after_recall_action hook Hooks added: after_recall_action with new action add How to test: Run tests in t/db_dependent/Koha/Plugins/Recall_hooks.t Sponsored by: Gothenburg University Library -- You are receiving this mail because: You are the assignee for the bug. You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=31896 Stefan Berndtsson <stefan.berndtsson@ub.gu.se> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|NEW |Needs Signoff Assignee|koha-bugs@lists.koha-commun |stefan.berndtsson@ub.gu.se |ity.org | -- You are receiving this mail because: You are watching all bug changes. You are the assignee for the bug.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=31896 David Nind <david@davidnind.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|Needs Signoff |Signed Off -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=31896 David Nind <david@davidnind.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #142267|0 |1 is obsolete| | --- Comment #2 from David Nind <david@davidnind.com> --- Created attachment 142279 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=142279&action=edit Bug 31896: New after_recall_action hook Hooks added: after_recall_action with new action add How to test: Run tests in t/db_dependent/Koha/Plugins/Recall_hooks.t Sponsored by: Gothenburg University Library Signed-off-by: David Nind <david@davidnind.com> -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=31896 David Nind <david@davidnind.com> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |david@davidnind.com --- Comment #3 from David Nind <david@davidnind.com> --- Note that I got a whitespace error warning - it may pay to fix this so that there is one less thing for the QA Team to deal with: Applying: Bug 31896: New after_recall_action hook .git/rebase-apply/patch:102: trailing whitespace. warning: 1 line adds whitespace errors. Using index info to reconstruct a base tree... M Koha/Recalls.pm .git/rebase-apply/patch:102: trailing whitespace. warning: 1 line applied after fixing whitespace errors. Falling back to patching base and 3-way merge... Auto-merging Koha/Recalls.pm -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=31896 Marcel de Rooy <m.de.rooy@rijksmuseum.nl> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|Signed Off |Failed QA CC| |m.de.rooy@rijksmuseum.nl --- Comment #4 from Marcel de Rooy <m.de.rooy@rijksmuseum.nl> --- FAIL t/db_dependent/Koha/Plugins/Recall_hooks.t OK critic FAIL file permissions File must have the exec flag Tip: Please run qa tools on your patches before submitting? -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=31896 Stefan Berndtsson <stefan.berndtsson@ub.gu.se> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #142279|0 |1 is obsolete| | --- Comment #5 from Stefan Berndtsson <stefan.berndtsson@ub.gu.se> --- Created attachment 142307 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=142307&action=edit Bug 31896: New after_recall_action hook Hooks added: after_recall_action with new action add How to test: Run tests in t/db_dependent/Koha/Plugins/Recall_hooks.t Sponsored by: Gothenburg University Library -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=31896 Stefan Berndtsson <stefan.berndtsson@ub.gu.se> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|Failed QA |Needs Signoff --- Comment #6 from Stefan Berndtsson <stefan.berndtsson@ub.gu.se> --- Now passes QA in my system. Fixed file permissions and trailing whitespace. -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=31896 David Nind <david@davidnind.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|Needs Signoff |Signed Off -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=31896 David Nind <david@davidnind.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #142307|0 |1 is obsolete| | --- Comment #7 from David Nind <david@davidnind.com> --- Created attachment 142331 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=142331&action=edit Bug 31896: New after_recall_action hook Hooks added: after_recall_action with new action add How to test: Run tests in t/db_dependent/Koha/Plugins/Recall_hooks.t Sponsored by: Gothenburg University Library Signed-off-by: David Nind <david@davidnind.com> -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=31896 --- Comment #8 from Marcel de Rooy <m.de.rooy@rijksmuseum.nl> --- + $schema->storage->txn_rollback; + Koha::Plugins::Methods->delete; -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=31896 --- Comment #9 from Marcel de Rooy <m.de.rooy@rijksmuseum.nl> --- +sub after_recall_action { + my ( $self, $params ) = @_; + + my $action = $params->{action}; + my $recall = $params->{payload}->{recall}; + + Koha::Exception->throw( + "after_recall_action called with action: $action, ref: " . ref($recall) ); +} Yeah, I understand you doing that. It does not really test more than the thing was called. No blocker, just noting. -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=31896 Marcel de Rooy <m.de.rooy@rijksmuseum.nl> changed: What |Removed |Added ---------------------------------------------------------------------------- QA Contact|testopia@bugs.koha-communit |m.de.rooy@rijksmuseum.nl |y.org | Status|Signed Off |Failed QA --- Comment #10 from Marcel de Rooy <m.de.rooy@rijksmuseum.nl> --- Please come back after 31894 -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=31896 Marcel de Rooy <m.de.rooy@rijksmuseum.nl> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|Failed QA |BLOCKED --- Comment #11 from Marcel de Rooy <m.de.rooy@rijksmuseum.nl> --- Working here now -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=31896 Marcel de Rooy <m.de.rooy@rijksmuseum.nl> changed: What |Removed |Added ---------------------------------------------------------------------------- Depends on| |31895 Referenced Bugs: https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=31895 [Bug 31895] New Account hook when adding credit -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=31896 Marcel de Rooy <m.de.rooy@rijksmuseum.nl> changed: What |Removed |Added ---------------------------------------------------------------------------- Patch complexity|--- |Small patch Status|BLOCKED |Passed QA -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=31896 Marcel de Rooy <m.de.rooy@rijksmuseum.nl> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #142331|0 |1 is obsolete| | --- Comment #12 from Marcel de Rooy <m.de.rooy@rijksmuseum.nl> --- Created attachment 142757 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=142757&action=edit Bug 31896: New after_recall_action hook Hooks added: after_recall_action with new action add How to test: Run tests in t/db_dependent/Koha/Plugins/Recall_hooks.t Sponsored by: Gothenburg University Library Signed-off-by: David Nind <david@davidnind.com> Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl> -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=31896 --- Comment #13 from Marcel de Rooy <m.de.rooy@rijksmuseum.nl> --- Created attachment 142758 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=142758&action=edit Bug 31896: (QA follow-up) Fix modules Triggered by seeing Koha::Account. Copy and paste ;) But a bunch of other modules should (at least formally) be there. Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl> -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=31896 --- Comment #14 from Marcel de Rooy <m.de.rooy@rijksmuseum.nl> --- Created attachment 142759 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=142759&action=edit Bug 31896: (QA follow-up) Fix rollback Yes, it should be the last statement. Actually the preceding delete is unneeded. Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl> -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=31896 Katrin Fischer <katrin.fischer@bsz-bw.de> changed: What |Removed |Added ---------------------------------------------------------------------------- Blocks| |31734 Referenced Bugs: https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=31734 [Bug 31734] Hooks for account, recall, indexing and more actions for holds. -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=31896 --- Comment #15 from Marcel de Rooy <m.de.rooy@rijksmuseum.nl> --- I will restore the get_from_storage here in the first patch to be consistent. With a FIXME -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=31896 Marcel de Rooy <m.de.rooy@rijksmuseum.nl> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #142757|0 |1 is obsolete| | --- Comment #16 from Marcel de Rooy <m.de.rooy@rijksmuseum.nl> --- Created attachment 143169 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=143169&action=edit Bug 31896: New after_recall_action hook Hooks added: after_recall_action with new action add How to test: Run tests in t/db_dependent/Koha/Plugins/Recall_hooks.t Sponsored by: Gothenburg University Library Signed-off-by: David Nind <david@davidnind.com> Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl> [EDIT} Adding get_from_storage ;) For current consistency. See further bug 32107. -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=31896 Marcel de Rooy <m.de.rooy@rijksmuseum.nl> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #142758|0 |1 is obsolete| | --- Comment #17 from Marcel de Rooy <m.de.rooy@rijksmuseum.nl> --- Created attachment 143170 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=143170&action=edit Bug 31896: (QA follow-up) Fix modules Triggered by seeing Koha::Account. Copy and paste ;) But a bunch of other modules should (at least formally) be there. Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl> -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=31896 Marcel de Rooy <m.de.rooy@rijksmuseum.nl> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #142759|0 |1 is obsolete| | --- Comment #18 from Marcel de Rooy <m.de.rooy@rijksmuseum.nl> --- Created attachment 143171 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=143171&action=edit Bug 31896: (QA follow-up) Fix rollback Yes, it should be the last statement. Actually the preceding delete is unneeded. Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl> -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=31896 Marcel de Rooy <m.de.rooy@rijksmuseum.nl> changed: What |Removed |Added ---------------------------------------------------------------------------- Keywords| |rel_22_11_candidate -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=31896 Tomás Cohen Arazi <tomascohen@gmail.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|Passed QA |Patch doesn't apply CC| |tomascohen@gmail.com -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=31896 Tomás Cohen Arazi <tomascohen@gmail.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|Patch doesn't apply |Passed QA -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=31896 Tomás Cohen Arazi <tomascohen@gmail.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|Passed QA |Pushed to master Version(s)| |22.11.00 released in| | -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=31896 --- Comment #19 from Tomás Cohen Arazi <tomascohen@gmail.com> --- Pushed to master for 22.11. Nice work everyone, thanks! -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=31896 --- Comment #20 from Katrin Fischer <katrin.fischer@bsz-bw.de> --- Please remember to update https://wiki.koha-community.org/wiki/Koha_Plugin_Hooks! :) -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=31896 Katrin Fischer <katrin.fischer@bsz-bw.de> changed: What |Removed |Added ---------------------------------------------------------------------------- Summary|New Recall hook when adding |New recall hook when adding |recall |recall Text to go in the| |This adds a new hook release notes| |"after_recall_action" with | |the action "add". -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=31896 Katrin Fischer <katrin.fischer@bsz-bw.de> changed: What |Removed |Added ---------------------------------------------------------------------------- Keywords|rel_22_11_candidate | -- You are receiving this mail because: You are watching all bug changes.
participants (1)
-
bugzilla-daemon@bugs.koha-community.org