Description
Magnus Enger
2018-10-02 09:09:05 UTC
+1 Looks like Tomas has already started on this one :).. See bug 25885 for a post_renewal hook (In reply to Martin Renvoize from comment #2) > Looks like Tomas has already started on this one :).. See bug 25885 for a > post_renewal hook A bit different, but maybe something that could be copied for this bug in part. Created attachment 106571 [details] [review] Bug 21468: Unit tests for AddIssue This patch adds a unit test for the addition of a call to the _after_circ_action hook in AddIssue. Created attachment 106572 [details] [review] Bug 21468: Add 'issue' action for _after_circ_actions This patch adds a call to _after_circ_actions into AddIssue and passes an appropriate payload for plugins to utilise after issuing items. Created attachment 106573 [details] [review] Bug 21468: Unit tests for AddIssue This patch adds a unit test for the addition of a call to the _after_circ_action hook in AddIssue. Created attachment 106574 [details] [review] Bug 21468: Add 'issue' action for _after_circ_actions This patch adds a call to _after_circ_actions into AddIssue and passes an appropriate payload for plugins to utilise after issuing items. Created attachment 106580 [details] [review] Bug 21468: Unit tests for AddIssue This patch adds a unit test for the addition of a call to the _after_circ_action hook in AddIssue. Created attachment 106581 [details] [review] Bug 21468: Add 'checkout' action for _after_circ_actions This patch adds a call to _after_circ_actions into AddIssue and passes an appropriate payload for plugins to utilise after issuing items. Created attachment 106582 [details] [review] Bug 21468: Unit tests for AddReturn Created attachment 106583 [details] [review] Bug 21468: Add 'checkin' action for _after_circ_actions Created attachment 106883 [details] [review] Bug 21468: Unit tests for AddIssue This patch adds a unit test for the addition of a call to the _after_circ_action hook in AddIssue. Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io> Created attachment 106884 [details] [review] Bug 21468: Add 'checkout' action for _after_circ_actions This patch adds a call to _after_circ_actions into AddIssue and passes an appropriate payload for plugins to utilise after issuing items. Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io> Created attachment 106885 [details] [review] Bug 21468: Unit tests for AddReturn Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io> Created attachment 106886 [details] [review] Bug 21468: Add 'checkin' action for _after_circ_actions Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io> Created attachment 106887 [details] [review] Bug 21468: (QA follow-up) Enhance tests Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io> Could we have a test plan for this? There is not much description in the patches themselves. Running the tests is the plan. They prove that check-in and check-out actions call the plugin hook on installed plugins. Yup, what Tomas said. The unit tests prove the new feature works as expected so test plan would be to cast your eye over them to ensure they make sense and then run them to ensure they pass. In terms of regression testing, test check-ins and checkouts in the UI to ensure they still happen and run Circuaction.t to ensure it still passed too. Created attachment 107261 [details] [review] Bug 21468: Unit tests for AddIssue This patch adds a unit test for the addition of a call to the _after_circ_action hook in AddIssue. Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io> Created attachment 107262 [details] [review] Bug 21468: Add 'checkout' action for _after_circ_actions This patch adds a call to _after_circ_actions into AddIssue and passes an appropriate payload for plugins to utilise after issuing items. Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io> Created attachment 107263 [details] [review] Bug 21468: Unit tests for AddReturn Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io> Created attachment 107264 [details] [review] Bug 21468: Add 'checkin' action for _after_circ_actions Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io> Created attachment 107265 [details] [review] Bug 21468: (QA follow-up) Enhance tests Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io> Created attachment 107266 [details] [review] Bug 21468: (QA follow-up) SImplify payload This patch simplifies the payload as suggested on bug 25855. It also keeps some specific params that cannot be deduced from the passed checkout object, (e.g. if it is an onsite checkout). Tests are cleared and added for this special exceptions. Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io> Pushed to master for 20.11, thanks to everybody involved! enhancement will not be backported to 20.05.x series I see it is in wiki https://wiki.koha-community.org/wiki/Koha_Plugin_Hooks Super :D |