[Bug 44351] New: Modifying an existing order without servicing JSON returns 500
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=44351 Bug ID: 44351 Summary: Modifying an existing order without servicing JSON returns 500 Initiative type: --- Sponsorship --- status: Product: Koha Version: Main Hardware: All OS: All Status: NEW Severity: normal Priority: P5 - low Component: Acquisitions Assignee: nugged@gmail.com Reporter: nugged@gmail.com QA Contact: testopia@bugs.koha-community.org Depends on: 30144 Target Milestone: --- 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. 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. This is a follow-up to Bug 30144: its servicing-instruction caller uses list context inside the order-info hash. Referenced Bugs: https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=30144 [Bug 30144] Add support for EDI GIR:LVT and/or GIR:LVC, Servicing instructions, segment -- You are receiving this mail because: You are watching all bug changes.
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.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=44351 Andrii Nugged <nugged@gmail.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|NEW |Needs Signoff -- You are receiving this mail because: You are watching all bug changes.
participants (1)
-
bugzilla-daemon@bugs.koha-community.org