Bug 21468 - Plugins need hooks for checkin and checkout actions
Summary: Plugins need hooks for checkin and checkout actions
Status: Pushed to master
Alias: None
Product: Koha
Classification: Unclassified
Component: Plugin architecture (show other bugs)
Version: master
Hardware: All All
: P5 - low enhancement with 2 votes (vote)
Assignee: Martin Renvoize
QA Contact: Testopia
URL:
Keywords:
Depends on: 25855 7317
Blocks: 26063
  Show dependency treegraph
 
Reported: 2018-10-02 09:09 UTC by Magnus Enger
Modified: 2020-07-31 21:35 UTC (History)
10 users (show)

See Also:
Change sponsored?: ---
Patch complexity: ---
Who signed the patch off:
Text to go in the release notes:
Version(s) released in:
20.11.00


Attachments
Bug 21468: Unit tests for AddIssue (2.83 KB, patch)
2020-07-06 10:44 UTC, Martin Renvoize
Details | Diff | Splinter Review
Bug 21468: Add 'issue' action for _after_circ_actions (1.64 KB, patch)
2020-07-06 10:44 UTC, Martin Renvoize
Details | Diff | Splinter Review
Bug 21468: Unit tests for AddIssue (2.83 KB, patch)
2020-07-06 10:49 UTC, Martin Renvoize
Details | Diff | Splinter Review
Bug 21468: Add 'issue' action for _after_circ_actions (1.64 KB, patch)
2020-07-06 10:49 UTC, Martin Renvoize
Details | Diff | Splinter Review
Bug 21468: Unit tests for AddIssue (2.83 KB, patch)
2020-07-06 12:48 UTC, Martin Renvoize
Details | Diff | Splinter Review
Bug 21468: Add 'checkout' action for _after_circ_actions (1.64 KB, patch)
2020-07-06 12:48 UTC, Martin Renvoize
Details | Diff | Splinter Review
Bug 21468: Unit tests for AddReturn (1.33 KB, patch)
2020-07-06 12:48 UTC, Martin Renvoize
Details | Diff | Splinter Review
Bug 21468: Add 'checkin' action for _after_circ_actions (1.30 KB, patch)
2020-07-06 12:48 UTC, Martin Renvoize
Details | Diff | Splinter Review
Bug 21468: Unit tests for AddIssue (2.89 KB, patch)
2020-07-15 05:29 UTC, Tomás Cohen Arazi
Details | Diff | Splinter Review
Bug 21468: Add 'checkout' action for _after_circ_actions (1.70 KB, patch)
2020-07-15 05:29 UTC, Tomás Cohen Arazi
Details | Diff | Splinter Review
Bug 21468: Unit tests for AddReturn (1.39 KB, patch)
2020-07-15 05:29 UTC, Tomás Cohen Arazi
Details | Diff | Splinter Review
Bug 21468: Add 'checkin' action for _after_circ_actions (1.35 KB, patch)
2020-07-15 05:29 UTC, Tomás Cohen Arazi
Details | Diff | Splinter Review
Bug 21468: (QA follow-up) Enhance tests (2.22 KB, patch)
2020-07-15 05:30 UTC, Tomás Cohen Arazi
Details | Diff | Splinter Review
Bug 21468: Unit tests for AddIssue (2.78 KB, patch)
2020-07-23 14:57 UTC, Tomás Cohen Arazi
Details | Diff | Splinter Review
Bug 21468: Add 'checkout' action for _after_circ_actions (1.70 KB, patch)
2020-07-23 14:57 UTC, Tomás Cohen Arazi
Details | Diff | Splinter Review
Bug 21468: Unit tests for AddReturn (1.39 KB, patch)
2020-07-23 14:57 UTC, Tomás Cohen Arazi
Details | Diff | Splinter Review
Bug 21468: Add 'checkin' action for _after_circ_actions (1.35 KB, patch)
2020-07-23 14:57 UTC, Tomás Cohen Arazi
Details | Diff | Splinter Review
Bug 21468: (QA follow-up) Enhance tests (2.76 KB, patch)
2020-07-23 14:57 UTC, Tomás Cohen Arazi
Details | Diff | Splinter Review
Bug 21468: (QA follow-up) SImplify payload (7.70 KB, patch)
2020-07-23 14:57 UTC, Tomás Cohen Arazi
Details | Diff | Splinter Review

Note You need to log in before you can comment on or make changes to this bug.
Description Magnus Enger 2018-10-02 09:09:05 UTC
Some ILL backends/plugins will need hooks into the checkin/checkout process, so statuses can be changed or API calls made in respons to these circulation events.
Comment 1 Katrin Fischer 2020-06-25 13:39:48 UTC
+1
Comment 2 Martin Renvoize 2020-06-29 13:57:45 UTC
Looks like Tomas has already started on this one :).. See bug 25885 for a post_renewal hook
Comment 3 Katrin Fischer 2020-06-29 13:59:05 UTC
(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.
Comment 4 Martin Renvoize 2020-07-06 10:44:48 UTC Comment hidden (obsolete)
Comment 5 Martin Renvoize 2020-07-06 10:44:51 UTC Comment hidden (obsolete)
Comment 6 Martin Renvoize 2020-07-06 10:49:56 UTC Comment hidden (obsolete)
Comment 7 Martin Renvoize 2020-07-06 10:49:59 UTC Comment hidden (obsolete)
Comment 8 Martin Renvoize 2020-07-06 12:48:38 UTC
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.
Comment 9 Martin Renvoize 2020-07-06 12:48:41 UTC
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.
Comment 10 Martin Renvoize 2020-07-06 12:48:44 UTC
Created attachment 106582 [details] [review]
Bug 21468: Unit tests for AddReturn
Comment 11 Martin Renvoize 2020-07-06 12:48:47 UTC
Created attachment 106583 [details] [review]
Bug 21468: Add 'checkin' action for _after_circ_actions
Comment 12 Tomás Cohen Arazi 2020-07-15 05:29:38 UTC
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>
Comment 13 Tomás Cohen Arazi 2020-07-15 05:29:43 UTC
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>
Comment 14 Tomás Cohen Arazi 2020-07-15 05:29:49 UTC
Created attachment 106885 [details] [review]
Bug 21468: Unit tests for AddReturn

Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
Comment 15 Tomás Cohen Arazi 2020-07-15 05:29:55 UTC
Created attachment 106886 [details] [review]
Bug 21468: Add 'checkin' action for _after_circ_actions

Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
Comment 16 Tomás Cohen Arazi 2020-07-15 05:30:00 UTC
Created attachment 106887 [details] [review]
Bug 21468: (QA follow-up) Enhance tests

Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
Comment 17 Katrin Fischer 2020-07-18 16:15:05 UTC
Could we have a test plan for this? There is not much description in the patches themselves.
Comment 18 Tomás Cohen Arazi 2020-07-18 18:35:34 UTC
Running the tests is the plan. They prove that check-in and check-out actions call the plugin hook on installed plugins.
Comment 19 Martin Renvoize 2020-07-19 06:34:51 UTC
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.
Comment 20 Tomás Cohen Arazi 2020-07-23 14:57:05 UTC
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>
Comment 21 Tomás Cohen Arazi 2020-07-23 14:57:12 UTC
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>
Comment 22 Tomás Cohen Arazi 2020-07-23 14:57:18 UTC
Created attachment 107263 [details] [review]
Bug 21468: Unit tests for AddReturn

Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
Comment 23 Tomás Cohen Arazi 2020-07-23 14:57:26 UTC
Created attachment 107264 [details] [review]
Bug 21468: Add 'checkin' action for _after_circ_actions

Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
Comment 24 Tomás Cohen Arazi 2020-07-23 14:57:33 UTC
Created attachment 107265 [details] [review]
Bug 21468: (QA follow-up) Enhance tests

Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
Comment 25 Tomás Cohen Arazi 2020-07-23 14:57:42 UTC
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>
Comment 26 Jonathan Druart 2020-07-30 15:48:48 UTC
Pushed to master for 20.11, thanks to everybody involved!
Comment 27 Lucas Gass 2020-07-31 21:35:40 UTC
enhancement will not be backported to 20.05.x series