[Bug 42001] New: Add duplicate purchase order number detection on EDI quote import
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=42001 Bug ID: 42001 Summary: Add duplicate purchase order number detection on EDI quote import Initiative type: --- Sponsorship Sponsored status: Product: Koha Version: Main 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 CC: hdunne-howrie@westminster.gov.uk, kyle@bywatersolutions.com, testopia@bugs.koha-community.org Depends on: 40383, 41297 Blocks: 38195 EDIFACT quote processing will detect duplicate purchase order numbers and block basket creation from those orders when using the po_is_basketname setting for EDIfact processing. We should add the ability to notify the supplier, and alert library staff. 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 https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=40383 [Bug 40383] Modernise the EDIFACT Message display modal https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=41297 [Bug 41297] Add duplicate invoice number detection on EDI invoice import -- You are receiving this mail because: You are watching all bug changes. You are the assignee for the bug.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=42001 Martin Renvoize (ashimema) <martin.renvoize@openfifth.co.uk> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|NEW |ASSIGNED -- You are receiving this mail because: You are watching all bug changes. You are the assignee for the bug.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=42001 Martin Renvoize (ashimema) <martin.renvoize@openfifth.co.uk> changed: What |Removed |Added ---------------------------------------------------------------------------- Depends on| |20253 Referenced Bugs: https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=20253 [Bug 20253] Optionally use buyer's purchase order number from EDIFACT quote in basket name -- You are receiving this mail because: You are watching all bug changes. You are the assignee for the bug.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=42001 Martin Renvoize (ashimema) <martin.renvoize@openfifth.co.uk> changed: What |Removed |Added ---------------------------------------------------------------------------- Depends on|40383 | Referenced Bugs: https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=40383 [Bug 40383] Modernise the EDIFACT Message display modal -- You are receiving this mail because: You are watching all bug changes. You are the assignee for the bug.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=42001 Martin Renvoize (ashimema) <martin.renvoize@openfifth.co.uk> changed: What |Removed |Added ---------------------------------------------------------------------------- Summary|Add duplicate purchase |Update duplicate purchase |order number detection on |order number detection on |EDI quote import |EDI quote import to | |optionally send | |notifications to staff and | |vendors -- 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=42001 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=42001 --- Comment #1 from Martin Renvoize (ashimema) <martin.renvoize@openfifth.co.uk> --- Created attachment 194517 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=194517&action=edit Bug 42001: Database updates Adds system preferences and notice templates for duplicate EDI purchase order email notifications. New preferences: - EdiDuplicateOrderEmailNotice (YesNo) - EdiDuplicateOrderEmailAddresses (Textarea) New notice templates: - EDI_DUP_ORD_LIBRARY - library staff notification - EDI_DUP_ORD_VENDOR - vendor contact notification Sponsored-by: Westminster City Council <https://www.westminster.gov.uk/> Sponsored-by: Royal Borough of Kensington and Chelsea <https://www.rbkc.gov.uk/> -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=42001 Martin Renvoize (ashimema) <martin.renvoize@openfifth.co.uk> changed: What |Removed |Added ---------------------------------------------------------------------------- Patch complexity|--- |Small patch Status|ASSIGNED |Needs Signoff Comma delimited| |Royal Borough of Kensington list of Sponsors| |and Chelsea | |<https://www.rbkc.gov.uk/>, | |Westminster City Council | |<https://www.westminster.go | |v.uk/> -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=42001 Martin Renvoize (ashimema) <martin.renvoize@openfifth.co.uk> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #194517|0 |1 is obsolete| | -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=42001 --- Comment #2 from Martin Renvoize (ashimema) <martin.renvoize@openfifth.co.uk> --- Created attachment 194523 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=194523&action=edit Bug 42001: Database updates Adds system preferences and notice templates for duplicate EDI purchase order email notifications. New preferences: - EdiDuplicateOrderEmailNotice (YesNo) - EdiDuplicateOrderEmailAddresses (Textarea) New notice templates: - EDI_DUP_ORD_LIBRARY - library staff notification - EDI_DUP_ORD_VENDOR - vendor contact notification Sponsored-by: Westminster City Council <https://www.westminster.gov.uk/> Sponsored-by: Royal Borough of Kensington and Chelsea <https://www.rbkc.gov.uk/> -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=42001 --- Comment #3 from Martin Renvoize (ashimema) <martin.renvoize@openfifth.co.uk> --- Created attachment 194524 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=194524&action=edit Bug 42001: Email notifications for duplicate EDI purchase orders When create_edi_order detects a duplicate purchase order number (basket name conflict with po_is_basketname enabled), send email notifications to library staff and vendor EDI contacts, mirroring the behaviour already in place for duplicate EDIFACT invoices (bug 41297). New preference EdiDuplicateOrderEmailNotice enables/disables the feature. EdiDuplicateOrderEmailAddresses specifies library recipients. Vendor contacts flagged with edi_error_notification also receive notification via EDI_DUP_ORD_VENDOR. Sponsored-by: Westminster City Council <https://www.westminster.gov.uk/> Sponsored-by: Royal Borough of Kensington and Chelsea <https://www.rbkc.gov.uk/> -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=42001 --- Comment #4 from Martin Renvoize (ashimema) <martin.renvoize@openfifth.co.uk> --- Created attachment 194525 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=194525&action=edit Bug 42001: Unit tests for duplicate order email notifications Adds a new top-level subtest 'duplicate_order_email_notifications' with three cases: 1. email_notification_disabled - verifies no mail is queued when EdiDuplicateOrderEmailNotice is off, while the duplicate PO block still fires correctly. 2. library_email_notification - verifies EDI_DUP_ORD_LIBRARY is enqueued to the configured library addresses, with subject and content checks. 3. vendor_email_notification - verifies EDI_DUP_ORD_VENDOR is enqueued for vendor contacts with edi_error_notification set. Sponsored-by: Westminster City Council <https://www.westminster.gov.uk/> Sponsored-by: Royal Borough of Kensington and Chelsea <https://www.rbkc.gov.uk/> -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=42001 --- Comment #5 from Martin Renvoize (ashimema) <martin.renvoize@openfifth.co.uk> --- Created attachment 194526 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=194526&action=edit Bug 42001: (follow-up) Send new EDI duplicate order preferences to HEA Add EdiBlockDuplicateInvoice, EdiBlockDuplicateInvoiceEmailAddresses, EdiBlockDuplicateInvoiceEmailNotice, EdiDuplicateOrderEmailAddresses, and EdiDuplicateOrderEmailNotice to the list of system preferences reported to the Koha usage statistics service (HEA). -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=42001 Martin Renvoize (ashimema) <martin.renvoize@openfifth.co.uk> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #194523|0 |1 is obsolete| | -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=42001 Martin Renvoize (ashimema) <martin.renvoize@openfifth.co.uk> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #194524|0 |1 is obsolete| | -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=42001 Martin Renvoize (ashimema) <martin.renvoize@openfifth.co.uk> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #194525|0 |1 is obsolete| | -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=42001 Martin Renvoize (ashimema) <martin.renvoize@openfifth.co.uk> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #194526|0 |1 is obsolete| | -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=42001 --- Comment #6 from Martin Renvoize (ashimema) <martin.renvoize@openfifth.co.uk> --- Created attachment 194725 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=194725&action=edit Bug 42001: Database updates Adds system preferences and notice templates for duplicate EDI purchase order email notifications. New preferences: - EdiDuplicateOrderEmailNotice (YesNo) - EdiDuplicateOrderEmailAddresses (Textarea) New notice templates: - EDI_DUP_ORD_LIBRARY - library staff notification - EDI_DUP_ORD_VENDOR - vendor contact notification Sponsored-by: Westminster City Council <https://www.westminster.gov.uk/> Sponsored-by: Royal Borough of Kensington and Chelsea <https://www.rbkc.gov.uk/> -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=42001 --- Comment #7 from Martin Renvoize (ashimema) <martin.renvoize@openfifth.co.uk> --- Created attachment 194726 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=194726&action=edit Bug 42001: Email notifications for duplicate EDI purchase orders When create_edi_order detects a duplicate purchase order number (basket name conflict with po_is_basketname enabled), send email notifications to library staff and vendor EDI contacts, mirroring the behaviour already in place for duplicate EDIFACT invoices (bug 41297). New preference EdiDuplicateOrderEmailNotice enables/disables the feature. EdiDuplicateOrderEmailAddresses specifies library recipients. Vendor contacts flagged with edi_error_notification also receive notification via EDI_DUP_ORD_VENDOR. Sponsored-by: Westminster City Council <https://www.westminster.gov.uk/> Sponsored-by: Royal Borough of Kensington and Chelsea <https://www.rbkc.gov.uk/> -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=42001 --- Comment #8 from Martin Renvoize (ashimema) <martin.renvoize@openfifth.co.uk> --- Created attachment 194727 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=194727&action=edit Bug 42001: Unit tests for duplicate order email notifications Adds a new top-level subtest 'duplicate_order_email_notifications' with three cases: 1. email_notification_disabled - verifies no mail is queued when EdiDuplicateOrderEmailNotice is off, while the duplicate PO block still fires correctly. 2. library_email_notification - verifies EDI_DUP_ORD_LIBRARY is enqueued to the configured library addresses, with subject and content checks. 3. vendor_email_notification - verifies EDI_DUP_ORD_VENDOR is enqueued for vendor contacts with edi_error_notification set. Sponsored-by: Westminster City Council <https://www.westminster.gov.uk/> Sponsored-by: Royal Borough of Kensington and Chelsea <https://www.rbkc.gov.uk/> -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=42001 --- Comment #9 from Martin Renvoize (ashimema) <martin.renvoize@openfifth.co.uk> --- Created attachment 194728 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=194728&action=edit Bug 42001: (follow-up) Send new EDI duplicate order preferences to HEA Add EdiBlockDuplicateInvoice, EdiBlockDuplicateInvoiceEmailAddresses, EdiBlockDuplicateInvoiceEmailNotice, EdiDuplicateOrderEmailAddresses, and EdiDuplicateOrderEmailNotice to the list of system preferences reported to the Koha usage statistics service (HEA). -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=42001 --- Comment #10 from Martin Renvoize (ashimema) <martin.renvoize@openfifth.co.uk> --- Created attachment 194729 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=194729&action=edit Bug 42001: Align duplicate order email notifications with acquisitions conventions - Rename preferences to the Edifact* namespace, placing them adjacent to related Edifact* prefs on the system preferences page: EdiDuplicateOrderEmailNotice -> EdifactOrderSendBlockDuplicatesEmailNotice EdiDuplicateOrderEmailAddresses -> EdifactOrderSendBlockDuplicatesEmailAddresses - Change EdifactOrderSendBlockDuplicatesEmailNotice from YesNo to Choice, matching the EmailPurchaseSuggestions pattern. Options: Do not send / AcquisitionsDefaultEmailAddress / specific email addresses / KohaAdminEmailAddress. - EdifactOrderSendBlockDuplicatesEmailAddresses is now only used when the choice is set to 'specific email addresses'. - Pass from_address (AcquisitionsDefaultEmailAddress with fallback) and reply_address (AcquisitionsDefaultReplyTo) to EnqueueLetter for both library and vendor notifications. - Add UPDATE in atomicupdate to migrate existing YesNo installs to Choice. - Fix test mock values for EmailNotice from old YesNo (1) to the correct Choice value ('EdifactOrderSendBlockDuplicatesEmailAddresses'). - Update C4/UsageStats.pm with new pref names. -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=42001 Martin Renvoize (ashimema) <martin.renvoize@openfifth.co.uk> changed: What |Removed |Added ---------------------------------------------------------------------------- QA Contact|testopia@bugs.koha-communit |superkyle500@live.com |y.org | 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=42001 Martin Renvoize (ashimema) <martin.renvoize@openfifth.co.uk> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #194725|0 |1 is obsolete| | Attachment #194726|0 |1 is obsolete| | Attachment #194727|0 |1 is obsolete| | Attachment #194728|0 |1 is obsolete| | Attachment #194729|0 |1 is obsolete| | -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=42001 --- Comment #11 from Martin Renvoize (ashimema) <martin.renvoize@openfifth.co.uk> --- Created attachment 198462 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=198462&action=edit Bug 42001: Database updates Adds system preferences and notice templates for duplicate EDI purchase order email notifications. New preferences: - EdiDuplicateOrderEmailNotice (YesNo) - EdiDuplicateOrderEmailAddresses (Textarea) New notice templates: - EDI_DUP_ORD_LIBRARY - library staff notification - EDI_DUP_ORD_VENDOR - vendor contact notification Sponsored-by: Westminster City Council <https://www.westminster.gov.uk/> Sponsored-by: Royal Borough of Kensington and Chelsea <https://www.rbkc.gov.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=42001 --- Comment #12 from Martin Renvoize (ashimema) <martin.renvoize@openfifth.co.uk> --- Created attachment 198463 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=198463&action=edit Bug 42001: Email notifications for duplicate EDI purchase orders When create_edi_order detects a duplicate purchase order number (basket name conflict with po_is_basketname enabled), send email notifications to library staff and vendor EDI contacts, mirroring the behaviour already in place for duplicate EDIFACT invoices (bug 41297). New preference EdiDuplicateOrderEmailNotice enables/disables the feature. EdiDuplicateOrderEmailAddresses specifies library recipients. Vendor contacts flagged with edi_error_notification also receive notification via EDI_DUP_ORD_VENDOR. Sponsored-by: Westminster City Council <https://www.westminster.gov.uk/> Sponsored-by: Royal Borough of Kensington and Chelsea <https://www.rbkc.gov.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=42001 --- Comment #13 from Martin Renvoize (ashimema) <martin.renvoize@openfifth.co.uk> --- Created attachment 198464 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=198464&action=edit Bug 42001: Unit tests for duplicate order email notifications Adds a new top-level subtest 'duplicate_order_email_notifications' with three cases: 1. email_notification_disabled - verifies no mail is queued when EdiDuplicateOrderEmailNotice is off, while the duplicate PO block still fires correctly. 2. library_email_notification - verifies EDI_DUP_ORD_LIBRARY is enqueued to the configured library addresses, with subject and content checks. 3. vendor_email_notification - verifies EDI_DUP_ORD_VENDOR is enqueued for vendor contacts with edi_error_notification set. Sponsored-by: Westminster City Council <https://www.westminster.gov.uk/> Sponsored-by: Royal Borough of Kensington and Chelsea <https://www.rbkc.gov.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=42001 --- Comment #14 from Martin Renvoize (ashimema) <martin.renvoize@openfifth.co.uk> --- Created attachment 198465 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=198465&action=edit Bug 42001: (follow-up) Send new EDI duplicate order preferences to HEA Add EdiBlockDuplicateInvoice, EdiBlockDuplicateInvoiceEmailAddresses, EdiBlockDuplicateInvoiceEmailNotice, EdiDuplicateOrderEmailAddresses, and EdiDuplicateOrderEmailNotice to the list of system preferences reported to the Koha usage statistics service (HEA). 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=42001 --- Comment #15 from Martin Renvoize (ashimema) <martin.renvoize@openfifth.co.uk> --- Created attachment 198466 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=198466&action=edit Bug 42001: Align duplicate order email notifications with acquisitions conventions - Rename preferences to the Edifact* namespace, placing them adjacent to related Edifact* prefs on the system preferences page: EdiDuplicateOrderEmailNotice -> EdifactOrderSendBlockDuplicatesEmailNotice EdiDuplicateOrderEmailAddresses -> EdifactOrderSendBlockDuplicatesEmailAddresses - Change EdifactOrderSendBlockDuplicatesEmailNotice from YesNo to Choice, matching the EmailPurchaseSuggestions pattern. Options: Do not send / AcquisitionsDefaultEmailAddress / specific email addresses / KohaAdminEmailAddress. - EdifactOrderSendBlockDuplicatesEmailAddresses is now only used when the choice is set to 'specific email addresses'. - Pass from_address (AcquisitionsDefaultEmailAddress with fallback) and reply_address (AcquisitionsDefaultReplyTo) to EnqueueLetter for both library and vendor notifications. - Add UPDATE in atomicupdate to migrate existing YesNo installs to Choice. - Fix test mock values for EmailNotice from old YesNo (1) to the correct Choice value ('EdifactOrderSendBlockDuplicatesEmailAddresses'). - Update C4/UsageStats.pm with new pref names. 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=42001 Martin Renvoize (ashimema) <martin.renvoize@openfifth.co.uk> changed: What |Removed |Added ---------------------------------------------------------------------------- QA Contact|superkyle500@live.com |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=42001 Kyle M Hall (khall) <kyle@bywatersolutions.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|Signed Off |Passed QA -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=42001 Kyle M Hall (khall) <kyle@bywatersolutions.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #198462|0 |1 is obsolete| | -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=42001 Kyle M Hall (khall) <kyle@bywatersolutions.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #198463|0 |1 is obsolete| | -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=42001 Kyle M Hall (khall) <kyle@bywatersolutions.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #198464|0 |1 is obsolete| | -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=42001 Kyle M Hall (khall) <kyle@bywatersolutions.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #198465|0 |1 is obsolete| | -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=42001 Kyle M Hall (khall) <kyle@bywatersolutions.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #198466|0 |1 is obsolete| | -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=42001 --- Comment #16 from Kyle M Hall (khall) <kyle@bywatersolutions.com> --- Created attachment 201366 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=201366&action=edit Bug 42001: Database updates Adds system preferences and notice templates for duplicate EDI purchase order email notifications. New preferences: - EdiDuplicateOrderEmailNotice (YesNo) - EdiDuplicateOrderEmailAddresses (Textarea) New notice templates: - EDI_DUP_ORD_LIBRARY - library staff notification - EDI_DUP_ORD_VENDOR - vendor contact notification Sponsored-by: Westminster City Council <https://www.westminster.gov.uk/> Sponsored-by: Royal Borough of Kensington and Chelsea <https://www.rbkc.gov.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=42001 --- Comment #17 from Kyle M Hall (khall) <kyle@bywatersolutions.com> --- Created attachment 201367 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=201367&action=edit Bug 42001: Email notifications for duplicate EDI purchase orders When create_edi_order detects a duplicate purchase order number (basket name conflict with po_is_basketname enabled), send email notifications to library staff and vendor EDI contacts, mirroring the behaviour already in place for duplicate EDIFACT invoices (bug 41297). New preference EdiDuplicateOrderEmailNotice enables/disables the feature. EdiDuplicateOrderEmailAddresses specifies library recipients. Vendor contacts flagged with edi_error_notification also receive notification via EDI_DUP_ORD_VENDOR. Sponsored-by: Westminster City Council <https://www.westminster.gov.uk/> Sponsored-by: Royal Borough of Kensington and Chelsea <https://www.rbkc.gov.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=42001 --- Comment #18 from Kyle M Hall (khall) <kyle@bywatersolutions.com> --- Created attachment 201368 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=201368&action=edit Bug 42001: Unit tests for duplicate order email notifications Adds a new top-level subtest 'duplicate_order_email_notifications' with three cases: 1. email_notification_disabled - verifies no mail is queued when EdiDuplicateOrderEmailNotice is off, while the duplicate PO block still fires correctly. 2. library_email_notification - verifies EDI_DUP_ORD_LIBRARY is enqueued to the configured library addresses, with subject and content checks. 3. vendor_email_notification - verifies EDI_DUP_ORD_VENDOR is enqueued for vendor contacts with edi_error_notification set. Sponsored-by: Westminster City Council <https://www.westminster.gov.uk/> Sponsored-by: Royal Borough of Kensington and Chelsea <https://www.rbkc.gov.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=42001 --- Comment #19 from Kyle M Hall (khall) <kyle@bywatersolutions.com> --- Created attachment 201369 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=201369&action=edit Bug 42001: (follow-up) Send new EDI duplicate order preferences to HEA Add EdiBlockDuplicateInvoice, EdiBlockDuplicateInvoiceEmailAddresses, EdiBlockDuplicateInvoiceEmailNotice, EdiDuplicateOrderEmailAddresses, and EdiDuplicateOrderEmailNotice to the list of system preferences reported to the Koha usage statistics service (HEA). 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=42001 --- Comment #20 from Kyle M Hall (khall) <kyle@bywatersolutions.com> --- Created attachment 201370 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=201370&action=edit Bug 42001: Align duplicate order email notifications with acquisitions conventions - Rename preferences to the Edifact* namespace, placing them adjacent to related Edifact* prefs on the system preferences page: EdiDuplicateOrderEmailNotice -> EdifactOrderSendBlockDuplicatesEmailNotice EdiDuplicateOrderEmailAddresses -> EdifactOrderSendBlockDuplicatesEmailAddresses - Change EdifactOrderSendBlockDuplicatesEmailNotice from YesNo to Choice, matching the EmailPurchaseSuggestions pattern. Options: Do not send / AcquisitionsDefaultEmailAddress / specific email addresses / KohaAdminEmailAddress. - EdifactOrderSendBlockDuplicatesEmailAddresses is now only used when the choice is set to 'specific email addresses'. - Pass from_address (AcquisitionsDefaultEmailAddress with fallback) and reply_address (AcquisitionsDefaultReplyTo) to EnqueueLetter for both library and vendor notifications. - Add UPDATE in atomicupdate to migrate existing YesNo installs to Choice. - Fix test mock values for EmailNotice from old YesNo (1) to the correct Choice value ('EdifactOrderSendBlockDuplicatesEmailAddresses'). - Update C4/UsageStats.pm with new pref names. 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=42001 --- Comment #21 from Kyle M Hall (khall) <kyle@bywatersolutions.com> --- Created attachment 201371 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=201371&action=edit Bug 42001: (QA follow-up) Sort new system preferences in sysprefs.sql The EdifactOrderSendBlockDuplicates preferences were added after the EdifactInvoiceImport block, leaving sysprefs.sql out of alphabetical order and failing check_sysprefs.t. Move them to their sorted position after EdifactLSQ. 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=42001 --- Comment #22 from Kyle M Hall (khall) <kyle@bywatersolutions.com> --- Created attachment 201372 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=201372&action=edit Bug 42001: (QA follow-up) Check database operations succeed in the atomicupdate The atomicupdate reported every operation as a success with a bare 'say' without checking that the database operation worked. This patch checks the return value of each $dbh->do, reporting say_success on success and say_failure with the error string on failure, matching the pattern used by the bug 41297 atomicupdate. 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=42001 --- Comment #23 from Kyle M Hall (khall) <kyle@bywatersolutions.com> --- Created attachment 201373 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=201373&action=edit Bug 42001: (QA follow-up) Fix the duplicate order notices The EDI_DUP_ORD_LIBRARY and EDI_DUP_ORD_VENDOR notices had the same rendering problems as the duplicate invoice notices on bug 41297: - The staff "View Basket" links were built from a bare [% OPACBaseURL %], which is not in the notice template stash (so it rendered empty) and points at the OPAC rather than the staff client. They now use [% Koha.Preference('staffClientBaseURL') %], with the content starting [%- USE Koha -%] so the Koha plugin is loaded, and the uri filter applied only to the basketno values. - The vendor name used [% aqbooksellers.name %], but C4::Letters exposes that table under the singular name 'bookseller', so it rendered empty. Changed to [% bookseller.name %]. 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=42001 --- Comment #24 from Kyle M Hall (khall) <kyle@bywatersolutions.com> --- Created attachment 201374 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=201374&action=edit Bug 42001: (QA follow-up) Test that the duplicate order notice renders The library_email_notification test deleted the EDI_DUP_ORD_LIBRARY notice and built a minimal fixture in its place, so it never exercised the notice that actually ships in sample_notices.yml. As a result it passed even though the shipped notice rendered an empty vendor name and empty basket links. This patch drops the fixture and asserts against the shipped notice that the staff client basket URL and the vendor name both render, so a regression in the template (a base url that doesn't resolve, or the wrong bookseller table variable) is caught here. Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com> -- You are receiving this mail because: You are watching all bug changes.
participants (1)
-
bugzilla-daemon@bugs.koha-community.org