https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=43789
Bug ID: 43789
Summary: EDI quote processing dies with undefined to_json when
AcquisitionLog is enabled
Initiative type: ---
Sponsorship ---
status:
Product: Koha
Version: Main
Hardware: All
OS: All
Status: NEW
Severity: normal
Priority: P5 - low
Component: Acquisitions
Assignee: [email protected]
Reporter: [email protected]
QA Contact: [email protected]
Target Milestone: ---
Koha::EDI::process_quote logs the automatic basket approval with
to_json( $approved->unblessed ), but Koha::EDI only imports encode_json from
JSON:
use JSON qw( encode_json );
so when a vendor has auto_orders enabled and the AcquisitionLog system
preference is on, edi_cron.pl fails after the order has been generated and the
basket closed:
Undefined subroutine &Koha::EDI::to_json called at Koha/EDI.pm line NNN.
The APPROVE_BASKET entry is never written to the action log and processing of
any remaining auto-ordered baskets in the same run is aborted.
Test plan:
1. Enable the EDIFACT and AcquisitionLog system preferences.
2. Configure a vendor EDI account with quotes_enabled and auto_orders enabled.
3. Process a quote for that vendor (misc/cronjobs/edi_cron.pl, or process_quote
in a test).
4. Without the patch: Undefined subroutine &Koha::EDI::to_json is raised.
5. Apply the patch and repeat: no error, the basket is closed, the EDI order is
created and an ACQUISITIONS / APPROVE_BASKET entry exists in the action
logs.
6. prove t/db_dependent/Koha/EDI.t
--
You are receiving this mail because:
You are the assignee for the bug.
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/