[Bug 31895] New: New Account hook when adding credit
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=31895 Bug ID: 31895 Summary: New Account hook when adding credit 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_account_action" with the action "add_credit". This is triggered when a credit is added via for example PAYMENT or WRITEOFF. 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=31895 --- Comment #1 from Stefan Berndtsson <stefan.berndtsson@ub.gu.se> --- Created attachment 142266 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=142266&action=edit Bug 31895: New after_account_action hook Hooks added: after_account_action with new action add_credit How to test: Run tests in t/db_dependent/Koha/Plugins/Account_hooks.t Sponsored by: Gothenburg University Library -- 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=31895 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 the assignee for the bug. You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=31895 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=31895 David Nind <david@davidnind.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #142266|0 |1 is obsolete| | --- Comment #2 from David Nind <david@davidnind.com> --- Created attachment 142277 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=142277&action=edit Bug 31895: New after_account_action hook Hooks added: after_account_action with new action add_credit How to test: Run tests in t/db_dependent/Koha/Plugins/Account_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=31895 Marcel de Rooy <m.de.rooy@rijksmuseum.nl> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |m.de.rooy@rijksmuseum.nl Status|Signed Off |Failed QA --- Comment #3 from Marcel de Rooy <m.de.rooy@rijksmuseum.nl> --- + $schema->storage->txn_rollback; + Koha::Plugins::Methods->delete; That does not look good. -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=31895 --- Comment #4 from Stefan Berndtsson <stefan.berndtsson@ub.gu.se> --- I'm unclear about this one. I agree it looks strange. It comes from all other files. Holds_hooks.t, Circulation_hooks.t, Patron.t Barcode_transform_hooks.t and so on all have it in this order. I don't know why. I can change it easily of course, so it's not a big deal. There is also some unfixed traling whitespace in this one still remaining that I haven't updated yet. If I should swap the order of those two lines, I'll do that and fix whitespace at the same time. -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=31895 --- Comment #5 from Marcel de Rooy <m.de.rooy@rijksmuseum.nl> --- We'll come back here after 31894, I propose. -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=31895 Marcel de Rooy <m.de.rooy@rijksmuseum.nl> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|Failed QA |BLOCKED --- Comment #6 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=31895 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 | -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=31895 Marcel de Rooy <m.de.rooy@rijksmuseum.nl> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|BLOCKED |Passed QA Patch complexity|--- |Small patch -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=31895 Marcel de Rooy <m.de.rooy@rijksmuseum.nl> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #142277|0 |1 is obsolete| | --- Comment #7 from Marcel de Rooy <m.de.rooy@rijksmuseum.nl> --- Created attachment 142748 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=142748&action=edit Bug 31895: New after_account_action hook Hooks added: after_account_action with new action add_credit How to test: Run tests in t/db_dependent/Koha/Plugins/Account_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=31895 --- Comment #8 from Marcel de Rooy <m.de.rooy@rijksmuseum.nl> --- Created attachment 142749 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=142749&action=edit Bug 31895: (QA follow-up) Rollback change, add comment Rollback should really be the last statement. I am leaving get_from_storage here, but add a comment that it seems unneeded at this moment. The Koha::Account::Offset->new and C4::Stats::UpdateStats wont change the line.. But since the distance in code is becoming a bit larger, I wont complain. 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=31895 Marcel de Rooy <m.de.rooy@rijksmuseum.nl> changed: What |Removed |Added ---------------------------------------------------------------------------- Blocks| |31896 Referenced Bugs: https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=31896 [Bug 31896] New Recall hook when adding recall -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=31895 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=31895 Marcel de Rooy <m.de.rooy@rijksmuseum.nl> changed: What |Removed |Added ---------------------------------------------------------------------------- Keywords| |rel_22_11_candidate --- Comment #9 from Marcel de Rooy <m.de.rooy@rijksmuseum.nl> --- Here I left the get_from_storage. The comment gets attention on bug 32107. -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=31895 Tomás Cohen Arazi <tomascohen@gmail.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Version(s)| |22.11.00 released in| | Status|Passed QA |Pushed to master -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=31895 --- Comment #10 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=31895 --- Comment #11 from Katrin Fischer <katrin.fischer@bsz-bw.de> --- Please 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=31895 Katrin Fischer <katrin.fischer@bsz-bw.de> changed: What |Removed |Added ---------------------------------------------------------------------------- Text to go in the| |This patch adds a new hook release notes| |"after_account_action" with | |the action "add_credit". | |This is triggered when a | |credit is added via for | |example PAYMENT or | |WRITEOFF. 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=31895 Katrin Fischer <katrin.fischer@bsz-bw.de> changed: What |Removed |Added ---------------------------------------------------------------------------- Summary|New Account hook when |New account hook when |adding credit |adding credit -- You are receiving this mail because: You are watching all bug changes.
participants (1)
-
bugzilla-daemon@bugs.koha-community.org