[Koha-bugs] [Bug 25855] Add post_renewal_hook in circulation
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=25855 Martin Renvoize changed: What|Removed |Added Blocks||21468 Referenced Bugs: https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=21468 [Bug 21468] ILL backends/plugins need hooks into checkin and checkout -- You are receiving this mail because: You are watching all bug changes. ___ Koha-bugs mailing list Koha-bugs@lists.koha-community.org https://lists.koha-community.org/cgi-bin/mailman/listinfo/koha-bugs website : http://www.koha-community.org/ git : http://git.koha-community.org/ bugs : http://bugs.koha-community.org/
[Koha-bugs] [Bug 25855] Add post_renewal_hook in circulation
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=25855 --- Comment #8 from Martin Renvoize --- Comment on attachment 106249 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=106249 Bug 25855: Add a post_renewal_action plugin hook Review of attachment 106249: --> (https://bugs.koha-community.org/bugzilla3/page.cgi?id=splinter.html=25855=106249) - ::: C4/Circulation.pm @@ +4292,4 @@ > return 0; > } > > +=head3 _post_renewal_actions Hmm.. could we perhaps be a bit more forward-thinking here and adopt a more generic approach akin to that taken in C4/Biblio.pm where we have '_after_biblio_actions_hooks' which accepts and action param.. perhaps we could have `_after_circ_action_hooks` here and then in followup bugs we can extend it easily to support the other actions available within the module? -- You are receiving this mail because: You are watching all bug changes. ___ Koha-bugs mailing list Koha-bugs@lists.koha-community.org https://lists.koha-community.org/cgi-bin/mailman/listinfo/koha-bugs website : http://www.koha-community.org/ git : http://git.koha-community.org/ bugs : http://bugs.koha-community.org/
[Koha-bugs] [Bug 25855] Add post_renewal_hook in circulation
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=25855 Martin Renvoize changed: What|Removed |Added QA Contact|testo...@bugs.koha-communit |martin.renvoize@ptfs-europe |y.org |.com -- You are receiving this mail because: You are watching all bug changes. ___ Koha-bugs mailing list Koha-bugs@lists.koha-community.org https://lists.koha-community.org/cgi-bin/mailman/listinfo/koha-bugs website : http://www.koha-community.org/ git : http://git.koha-community.org/ bugs : http://bugs.koha-community.org/
[Koha-bugs] [Bug 25855] Add post_renewal_hook in circulation
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=25855 --- Comment #7 from Martin Renvoize --- Comment on attachment 106248 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=106248 Bug 25855: Unit tests Review of attachment 106248: --> (https://bugs.koha-community.org/bugzilla3/page.cgi?id=splinter.html=25855=106248) - ::: t/db_dependent/Koha/Plugins/Circulation_hooks.t @@ +68,5 @@ > +'AddBiblio calls the hook with action=create'; > + > +warning_like { $item = $builder->build_sample_item({ biblionumber => > $biblio->biblionumber }); } > +qr/after_item_action called with action: create, ref: > Koha::Item/, > +'AddItem calls the hook with action=create'; Hmm.. does it make sense to additionally test the AddBiblio and AddItem hooks here.. they're already well tested within Koha/Plugins/Biblio_and_Items_plugin_hooks.t aren't they? @@ +72,5 @@ > +'AddItem calls the hook with action=create'; > + > +warning_like { AddIssue( $patron->unblessed, $item->barcode ); } > +qr/after_item_action called with action: modify, ref: > Koha::Item/, > +'AddItem calls the hook with action=modify'; 'AddIssue' is being tested here.. not AddItem... must admit it feels a little strange that we trigger the item modification hook on an issue.. though I think I understand how that comes about. @@ +77,5 @@ > + > +warnings_like { AddRenewal( $patron->borrowernumber, $item->id, > $patron->branchcode ); } > +[ qr/after_item_action called with action: modify, ref: > Koha::Item/, > + qr/post_renewal_action .* DateTime/ ], > +'AddRenewal calls the post_renewal_action hook'; I have a vague feeling renewals can be triggered via AddIssue as well as AddRenewal might be worth also testing that case to make sure you're always triggering as expected. -- You are receiving this mail because: You are watching all bug changes. ___ Koha-bugs mailing list Koha-bugs@lists.koha-community.org https://lists.koha-community.org/cgi-bin/mailman/listinfo/koha-bugs website : http://www.koha-community.org/ git : http://git.koha-community.org/ bugs : http://bugs.koha-community.org/
[Koha-bugs] [Bug 25855] Add post_renewal_hook in circulation
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=25855 Martin Renvoize changed: What|Removed |Added See Also||https://bugs.koha-community ||.org/bugzilla3/show_bug.cgi ||?id=21468 CC||martin.renvoize@ptfs-europe ||.com -- You are receiving this mail because: You are watching all bug changes. ___ Koha-bugs mailing list Koha-bugs@lists.koha-community.org https://lists.koha-community.org/cgi-bin/mailman/listinfo/koha-bugs website : http://www.koha-community.org/ git : http://git.koha-community.org/ bugs : http://bugs.koha-community.org/
[Koha-bugs] [Bug 25855] Add post_renewal_hook in circulation
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=25855 --- Comment #6 from Tomás Cohen Arazi --- (In reply to Katrin Fischer from comment #5) > Please remember to document on the wiki: > https://wiki.koha-community.org/wiki/Koha_Plugin_Hooks Thx! Done! -- You are receiving this mail because: You are watching all bug changes. ___ Koha-bugs mailing list Koha-bugs@lists.koha-community.org https://lists.koha-community.org/cgi-bin/mailman/listinfo/koha-bugs website : http://www.koha-community.org/ git : http://git.koha-community.org/ bugs : http://bugs.koha-community.org/
[Koha-bugs] [Bug 25855] Add post_renewal_hook in circulation
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=25855 --- Comment #5 from Katrin Fischer --- Please remember to document on the wiki: https://wiki.koha-community.org/wiki/Koha_Plugin_Hooks Thx! -- You are receiving this mail because: You are watching all bug changes. ___ Koha-bugs mailing list Koha-bugs@lists.koha-community.org https://lists.koha-community.org/cgi-bin/mailman/listinfo/koha-bugs website : http://www.koha-community.org/ git : http://git.koha-community.org/ bugs : http://bugs.koha-community.org/
[Koha-bugs] [Bug 25855] Add post_renewal_hook in circulation
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=25855 --- Comment #4 from Kyle M Hall --- Created attachment 106249 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=106249=edit Bug 25855: Add a post_renewal_action plugin hook This patch adds a new hook to notify plugins about renewal actions. To test it: 1. Apply the unit tests 2. Run: $ kshell k$ prove t/db_dependent/Koha/Plugins/Circulation_hooks.t => FAIL: The tests expect some warnings to show, and they don't (i.e. the sample plugin hook is not being called). 3. Apply this patch 4. Repeat 2 => SUCCESS: Tests pass! The hook is being called on renewal! 5. Sign off :-D Sponsored-by: ByWater Solutions Signed-off-by: Kyle M Hall -- You are receiving this mail because: You are watching all bug changes. ___ Koha-bugs mailing list Koha-bugs@lists.koha-community.org https://lists.koha-community.org/cgi-bin/mailman/listinfo/koha-bugs website : http://www.koha-community.org/ git : http://git.koha-community.org/ bugs : http://bugs.koha-community.org/
[Koha-bugs] [Bug 25855] Add post_renewal_hook in circulation
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=25855 Kyle M Hall changed: What|Removed |Added Attachment #106215|0 |1 is obsolete|| Attachment #106216|0 |1 is obsolete|| --- Comment #3 from Kyle M Hall --- Created attachment 106248 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=106248=edit Bug 25855: Unit tests This patch adds tests fr a new circulation hook for plugins. In this case the post_renewal_action hook, The tests add the hook to the Test plugin, and verify that all the required parameters are passed for the plugin hook to use them. It relies on throwing an exception that is to be caught. Sponsored-by: ByWater Solutions Signed-off-by: Kyle M Hall -- You are receiving this mail because: You are watching all bug changes. ___ Koha-bugs mailing list Koha-bugs@lists.koha-community.org https://lists.koha-community.org/cgi-bin/mailman/listinfo/koha-bugs website : http://www.koha-community.org/ git : http://git.koha-community.org/ bugs : http://bugs.koha-community.org/
[Koha-bugs] [Bug 25855] Add post_renewal_hook in circulation
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=25855 Kyle M Hall changed: What|Removed |Added Status|Needs Signoff |Signed Off -- You are receiving this mail because: You are watching all bug changes. ___ Koha-bugs mailing list Koha-bugs@lists.koha-community.org https://lists.koha-community.org/cgi-bin/mailman/listinfo/koha-bugs website : http://www.koha-community.org/ git : http://git.koha-community.org/ bugs : http://bugs.koha-community.org/
[Koha-bugs] [Bug 25855] Add post_renewal_hook in circulation
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=25855 --- Comment #1 from Tomás Cohen Arazi --- Created attachment 106215 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=106215=edit Bug 25855: Unit tests This patch adds tests fr a new circulation hook for plugins. In this case the post_renewal_action hook, The tests add the hook to the Test plugin, and verify that all the required parameters are passed for the plugin hook to use them. It relies on throwing an exception that is to be caught. Sponsored-by: ByWater Solutions -- You are receiving this mail because: You are watching all bug changes. ___ Koha-bugs mailing list Koha-bugs@lists.koha-community.org https://lists.koha-community.org/cgi-bin/mailman/listinfo/koha-bugs website : http://www.koha-community.org/ git : http://git.koha-community.org/ bugs : http://bugs.koha-community.org/
[Koha-bugs] [Bug 25855] Add post_renewal_hook in circulation
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=25855 Tomás Cohen Arazi changed: What|Removed |Added Status|ASSIGNED|Needs Signoff CC||tomasco...@gmail.com -- You are receiving this mail because: You are watching all bug changes. ___ Koha-bugs mailing list Koha-bugs@lists.koha-community.org https://lists.koha-community.org/cgi-bin/mailman/listinfo/koha-bugs website : http://www.koha-community.org/ git : http://git.koha-community.org/ bugs : http://bugs.koha-community.org/
[Koha-bugs] [Bug 25855] Add post_renewal_hook in circulation
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=25855 --- Comment #2 from Tomás Cohen Arazi --- Created attachment 106216 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=106216=edit Bug 25855: Add a post_renewal_action plugin hook This patch adds a new hook to notify plugins about renewal actions. To test it: 1. Apply the unit tests 2. Run: $ kshell k$ prove t/db_dependent/Koha/Plugins/Circulation_hooks.t => FAIL: The tests expect some warnings to show, and they don't (i.e. the sample plugin hook is not being called). 3. Apply this patch 4. Repeat 2 => SUCCESS: Tests pass! The hook is being called on renewal! 5. Sign off :-D Sponsored-by: ByWater Solutions -- You are receiving this mail because: You are watching all bug changes. ___ Koha-bugs mailing list Koha-bugs@lists.koha-community.org https://lists.koha-community.org/cgi-bin/mailman/listinfo/koha-bugs website : http://www.koha-community.org/ git : http://git.koha-community.org/ bugs : http://bugs.koha-community.org/
[Koha-bugs] [Bug 25855] Add post_renewal_hook in circulation
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=25855 Tomás Cohen Arazi changed: What|Removed |Added Status|NEW |ASSIGNED Assignee|koha-b...@lists.koha-commun |tomasco...@gmail.com |ity.org | Change sponsored?|--- |Sponsored -- You are receiving this mail because: You are watching all bug changes. You are the assignee for the bug. ___ Koha-bugs mailing list Koha-bugs@lists.koha-community.org https://lists.koha-community.org/cgi-bin/mailman/listinfo/koha-bugs website : http://www.koha-community.org/ git : http://git.koha-community.org/ bugs : http://bugs.koha-community.org/