[Bug 40587] New: Prevent selection of different EAN's on EDI ORDER when the Basket is generated from a QUOTE message
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=40587 Bug ID: 40587 Summary: Prevent selection of different EAN's on EDI ORDER when the Basket is generated from a QUOTE message Change sponsored?: --- Product: Koha Version: 24.11 Hardware: All OS: All Status: NEW Severity: enhancement Priority: P5 - low Component: Acquisitions Assignee: koha-bugs@lists.koha-community.org Reporter: martin.renvoize@openfifth.co.uk QA Contact: testopia@bugs.koha-community.org Depends on: 39572, 21417 This is a follow-up to bug 39572 and bug 21417. When an EDI basket is generated from then EDI QUOTE message, I believe the correct EAN is included in the original QUOTE. As such, we should be able to bind the 'Create EDI Order' button to only allow use of that EAN when automatic ordering is disabled. Referenced Bugs: https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=21417 [Bug 21417] EDI ordering fails when basket and EAN libraries do not match https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=39572 [Bug 39572] Create EDIFACT order button no longer forces librarians to review EAN to select -- You are receiving this mail because: You are the assignee for the bug. You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=40587 Martin Renvoize (ashimema) <martin.renvoize@openfifth.co.uk> changed: What |Removed |Added ---------------------------------------------------------------------------- Assignee|koha-bugs@lists.koha-commun |martin.renvoize@openfifth.c |ity.org |o.uk -- You are receiving this mail because: You are the assignee for the bug. You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=40587 Martin Renvoize (ashimema) <martin.renvoize@openfifth.co.uk> changed: What |Removed |Added ---------------------------------------------------------------------------- Version|24.11 |Main -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=40587 --- Comment #1 from Martin Renvoize (ashimema) <martin.renvoize@openfifth.co.uk> --- Created attachment 185099 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=185099&action=edit Bug 40587: Add tests for multiple message EAN handling in EDI quotes This patch adds unit tests to verify that when processing EDI QUOTE transports containing multiple messages with different buyer EANs, each basket gets the correct EAN for its corresponding message. Test plan: 1. Run: prove t/db_dependent/Koha/EDI.t 2. Verify the new 'multiple_message_ean_handling' subtest passes 3. Verify that all existing EDI tests continue to pass -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=40587 --- Comment #2 from Martin Renvoize (ashimema) <martin.renvoize@openfifth.co.uk> --- Created attachment 185100 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=185100&action=edit Bug 40587: Auto-select EAN from QUOTE message when creating EDIFACT orders When a basket is generated via an EDI QUOTE message, the QUOTE message includes a library's EAN code (buyer_ean). This patch makes the 'Create EDIFACT order' button automatically use the EAN from the original QUOTE message instead of requiring manual EAN selection. This patch also fixes a bug in process_quote where all baskets in multi-message QUOTE transports incorrectly used the first message's buyer_ean, even when subsequent messages had different EANs. Changes made: 1. Fixed Koha/EDI.pm process_quote auto-order creation to use the correct buyer_ean for each message/basket pair in multi-message transports 2. Enhanced acqui/basket.pl to extract and provide the quote_ean from QUOTE messages, handling both single and multi-message scenarios 3. Updated basket.tt template to automatically select the EAN from the original QUOTE message when available and matching Test plan: 1. Create a vendor with EDI account and multiple EANs configured 2. Process a QUOTE message that creates a basket 3. Go to the basket page and click "Create EDIFACT order" 4. Verify it automatically uses the EAN from the QUOTE message (shows tooltip "Using EAN from original QUOTE message") 5. Test with multi-message QUOTE files to ensure each basket uses the correct EAN from its corresponding message 6. Verify fallback behavior when no QUOTE EAN matches available EANs -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=40587 Martin Renvoize (ashimema) <martin.renvoize@openfifth.co.uk> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|NEW |Needs Signoff -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=40587 Martin Renvoize (ashimema) <martin.renvoize@openfifth.co.uk> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |kyle@bywatersolutions.com -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=40587 Martin Renvoize (ashimema) <martin.renvoize@openfifth.co.uk> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |jeremy.evans@ukhsa.gov.uk -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=40587 Martin Renvoize (ashimema) <martin.renvoize@openfifth.co.uk> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |jonathan.field@openfifth.co | |.uk -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=40587 Martin Renvoize (ashimema) <martin.renvoize@openfifth.co.uk> changed: What |Removed |Added ---------------------------------------------------------------------------- Blocks| |38195 Referenced Bugs: https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=38195 [Bug 38195] EDI/Edifact classes should use Koha::Objects instead of plain DBIC -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=40587 Martin Renvoize (ashimema) <martin.renvoize@openfifth.co.uk> changed: What |Removed |Added ---------------------------------------------------------------------------- Severity|enhancement |normal -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=40587 Martin Renvoize (ashimema) <martin.renvoize@openfifth.co.uk> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |andrew@bywatersolutions.com -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=40587 Martin Renvoize (ashimema) <martin.renvoize@openfifth.co.uk> changed: What |Removed |Added ---------------------------------------------------------------------------- QA Contact|testopia@bugs.koha-communit |kyle@bywatersolutions.com |y.org | -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=40587 Martin Renvoize (ashimema) <martin.renvoize@openfifth.co.uk> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #185099|0 |1 is obsolete| | --- Comment #3 from Martin Renvoize (ashimema) <martin.renvoize@openfifth.co.uk> --- Created attachment 187176 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=187176&action=edit Bug 40587: Add tests for multiple message EAN handling in EDI quotes This patch adds unit tests to verify that when processing EDI QUOTE transports containing multiple messages with different buyer EANs, each basket gets the correct EAN for its corresponding message. Test plan: 1. Run: prove t/db_dependent/Koha/EDI.t 2. Verify the new 'multiple_message_ean_handling' subtest passes 3. Verify that all existing EDI tests continue to pass Sponsored-by: OpenFifth <https://openfifth.co.uk/> Signed-off-by: Hannah Dunne-Howrie <hdunne-howrie@westminster.gov.uk> -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=40587 Martin Renvoize (ashimema) <martin.renvoize@openfifth.co.uk> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #185100|0 |1 is obsolete| | --- Comment #4 from Martin Renvoize (ashimema) <martin.renvoize@openfifth.co.uk> --- Created attachment 187177 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=187177&action=edit Bug 40587: Auto-select EAN from QUOTE message when creating EDIFACT orders When a basket is generated via an EDI QUOTE message, the QUOTE message includes a library's EAN code (buyer_ean). This patch makes the 'Create EDIFACT order' button automatically use the EAN from the original QUOTE message instead of requiring manual EAN selection. This patch also fixes a bug in process_quote where all baskets in multi-message QUOTE transports incorrectly used the first message's buyer_ean, even when subsequent messages had different EANs. Changes made: 1. Fixed Koha/EDI.pm process_quote auto-order creation to use the correct buyer_ean for each message/basket pair in multi-message transports 2. Enhanced acqui/basket.pl to extract and provide the quote_ean from QUOTE messages, handling both single and multi-message scenarios 3. Updated basket.tt template to automatically select the EAN from the original QUOTE message when available and matching Test plan: 1. Create a vendor with EDI account and multiple EANs configured 2. Process a QUOTE message that creates a basket 3. Go to the basket page and click "Create EDIFACT order" 4. Verify it automatically uses the EAN from the QUOTE message (shows tooltip "Using EAN from original QUOTE message") 5. Test with multi-message QUOTE files to ensure each basket uses the correct EAN from its corresponding message 6. Verify fallback behavior when no QUOTE EAN matches available EANs Sponsored-by: OpenFifth <https://openfifth.co.uk/> Signed-off-by: Hannah Dunne-Howrie <hdunne-howrie@westminster.gov.uk> -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=40587 Martin Renvoize (ashimema) <martin.renvoize@openfifth.co.uk> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|Needs Signoff |Signed Off -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=40587 Martin Renvoize (ashimema) <martin.renvoize@openfifth.co.uk> changed: What |Removed |Added ---------------------------------------------------------------------------- Severity|normal |major -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=40587 Kyle M Hall (khall) <kyle@bywatersolutions.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #187176|0 |1 is obsolete| | --- Comment #5 from Kyle M Hall (khall) <kyle@bywatersolutions.com> --- Created attachment 187663 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=187663&action=edit Bug 40587: Add tests for multiple message EAN handling in EDI quotes This patch adds unit tests to verify that when processing EDI QUOTE transports containing multiple messages with different buyer EANs, each basket gets the correct EAN for its corresponding message. Test plan: 1. Run: prove t/db_dependent/Koha/EDI.t 2. Verify the new 'multiple_message_ean_handling' subtest passes 3. Verify that all existing EDI tests continue to pass Sponsored-by: OpenFifth <https://openfifth.co.uk/> Signed-off-by: Hannah Dunne-Howrie <hdunne-howrie@westminster.gov.uk> Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com> -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=40587 Kyle M Hall (khall) <kyle@bywatersolutions.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #187177|0 |1 is obsolete| | --- Comment #6 from Kyle M Hall (khall) <kyle@bywatersolutions.com> --- Created attachment 187664 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=187664&action=edit Bug 40587: Auto-select EAN from QUOTE message when creating EDIFACT orders When a basket is generated via an EDI QUOTE message, the QUOTE message includes a library's EAN code (buyer_ean). This patch makes the 'Create EDIFACT order' button automatically use the EAN from the original QUOTE message instead of requiring manual EAN selection. This patch also fixes a bug in process_quote where all baskets in multi-message QUOTE transports incorrectly used the first message's buyer_ean, even when subsequent messages had different EANs. Changes made: 1. Fixed Koha/EDI.pm process_quote auto-order creation to use the correct buyer_ean for each message/basket pair in multi-message transports 2. Enhanced acqui/basket.pl to extract and provide the quote_ean from QUOTE messages, handling both single and multi-message scenarios 3. Updated basket.tt template to automatically select the EAN from the original QUOTE message when available and matching Test plan: 1. Create a vendor with EDI account and multiple EANs configured 2. Process a QUOTE message that creates a basket 3. Go to the basket page and click "Create EDIFACT order" 4. Verify it automatically uses the EAN from the QUOTE message (shows tooltip "Using EAN from original QUOTE message") 5. Test with multi-message QUOTE files to ensure each basket uses the correct EAN from its corresponding message 6. Verify fallback behavior when no QUOTE EAN matches available EANs Sponsored-by: OpenFifth <https://openfifth.co.uk/> Signed-off-by: Hannah Dunne-Howrie <hdunne-howrie@westminster.gov.uk> Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com> -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=40587 Kyle M Hall (khall) <kyle@bywatersolutions.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|Signed Off |Passed QA --- Comment #7 from Kyle M Hall (khall) <kyle@bywatersolutions.com> --- Would be nice if that large block of logic in basket.pl were moved to a class, but at this time Koha doesn't have Koha::Object based classes for edi messages. -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=40587 Lucas Gass (lukeg) <lucas@bywatersolutions.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Version(s)| |25.11.00 released in| | Status|Passed QA |Pushed to main -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=40587 --- Comment #8 from Lucas Gass (lukeg) <lucas@bywatersolutions.com> --- Nice work everyone! Pushed to main for 25.11 -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=40587 Martin Renvoize (ashimema) <martin.renvoize@openfifth.co.uk> changed: What |Removed |Added ---------------------------------------------------------------------------- Blocks| |38489 Referenced Bugs: https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=38489 [Bug 38489] EDI should be updated to use the new FTP/SFTP Servers management page -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=40587 Martin Renvoize (ashimema) <martin.renvoize@openfifth.co.uk> changed: What |Removed |Added ---------------------------------------------------------------------------- Blocks|38195 | Referenced Bugs: https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=38195 [Bug 38195] EDI/Edifact classes should use Koha::Objects instead of plain DBIC -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=40587 Paul Derscheid <paul.derscheid@lmscloud.de> changed: What |Removed |Added ---------------------------------------------------------------------------- Version(s)|25.11.00 |25.11.00,25.05.05 released in| | Status|Pushed to main |Pushed to stable -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=40587 --- Comment #9 from Paul Derscheid <paul.derscheid@lmscloud.de> --- Nice work everyone! Pushed to 25.05.x -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=40587 Fridolin Somers <fridolin.somers@biblibre.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|Pushed to stable |Needs documenting CC| |fridolin.somers@biblibre.co | |m --- Comment #10 from Fridolin Somers <fridolin.somers@biblibre.com> --- Looks like this depends on Bug 38689 not in 24.11.x -- You are receiving this mail because: You are watching all bug changes.
participants (1)
-
bugzilla-daemon@bugs.koha-community.org