https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=41087
--- Comment #11 from Martin Renvoize (ashimema) <[email protected]> --- Created attachment 208015 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=208015&action=edit Bug 41087: Add before_edifact_action plugin hook for rollbacks Customer plugins can add data to an EDI invoice (for example invoice adjustments) or record it as exported. Add a before_edifact_action plugin hook so they can take part in a rollback. The hook is called with action 'rollback_check' during the read-only pre-flight: a plugin returns blockers, which refuse the rollback, and owned_adjustments, the invoice adjustments it will remove. Core never deletes an adjustment it does not own. It is then called with action 'rollback' inside the rollback transaction so the plugin can delete what it claimed. Koha::Plugins->call swallows plugin exceptions, so core fails closed: a plugin that does not answer the check refuses the rollback, and after the rollback call no adjustment may remain on the invoice or the rollback is aborted. after_edifact_action (Bug 43804) is fired with action 'rollback' once a message has been rolled back. Test plan: 1. Apply the patch 2. prove t/db_dependent/Koha/Plugins/Edifact_rollback_hooks.t Co-Authored-By: Claude Sonnet 5.5 <[email protected]> -- You are receiving this mail because: You are watching all bug changes. _______________________________________________ Koha-bugs mailing list -- [email protected] To unsubscribe send an email to [email protected] website : http://www.koha-community.org/ git : http://git.koha-community.org/ bugs : http://bugs.koha-community.org/
