https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=44351 --- Comment #1 from Andrii Nugged <nugged@gmail.com> --- Created attachment 212867 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=212867&action=edit Bug 44351: Keep optional servicing instructions in scalar context The optional servicing-instruction builder returns an empty list when JSON is absent or invalid. In the order-info hash this consumes the next key as its value and shifts the remaining fields. Modifying an existing non-EDI order then fails with HTTP 500. Request one scalar value, consistently with the other optional fields. Add a browser regression through the actual CGI and database for absent, valid empty-array and invalid servicing JSON. Follow-up to Bug 30144: the optional servicing helper must be called in scalar context inside the order-info hash. Test plan: Before applying the patch: 1. In Acquisitions, find a vendor without an EDIFACT account. 2. Open a basket containing an existing order. 3. On an existing order line, click Modify. 4. Change the internal note. 5. Click Save. The request fails with HTTP 500 instead of returning to the basket. Apply the patch. After applying the patch: 1. Open the same basket and click Modify on the same order. 2. Change the internal note. 3. Click Save. Koha returns to the basket. 4. Click Modify again and confirm the changed note is retained. 5. Save without further changes and confirm it still succeeds. Automated tests: Run the Acquisitions/OrderEditing_spec.ts Cypress spec against the staff interface and test database, using the normal Koha Cypress setup. Co-Authored-By: Loontik <loontik@nugged.team> -- You are receiving this mail because: You are watching all bug changes.