[Bug 43534] New: Allow MarcFieldsToOrder to map a MARC field to supplier's reference number/qualifier
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=43534 Bug ID: 43534 Summary: Allow MarcFieldsToOrder to map a MARC field to supplier's reference number/qualifier Initiative type: --- Sponsorship --- 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 Target Milestone: --- This enhancement extends the MARC Orders workflow (Koha::MarcOrder, driven by the MarcFieldsToOrder / MarcItemFieldsToOrder system preferences) to allow mapping a field on the incoming MARC order record to the existing aqorders.suppliers_reference_number and aqorders.suppliers_reference_qualifier columns. Currently those two columns are only ever populated by the EDIFACT quote-to-order flow (Koha::EDI, when an order is created from a supplier's QUOTES message), using the reference value the supplier returned in RFF+QLI or RFF+SLI. Koha::MarcOrder.pm has no equivalent mapping target, so an order created by staging a MARC file from a vendor can never record that vendor's own unique identifier for the order line. Use case: Vendors such as GOBI/YBP can supply MARC order records for import via MarcFieldsToOrder, and separately send EDIFACT INVOIC (invoice) messages for those same orders, quoting their own unique order/line reference (e.g. a GOBI order ID) in RFF+SLI. If Koha could capture that same vendor reference at MARC-order time into suppliers_reference_number / suppliers_reference_qualifier, it would become possible to match invoice lines back to the correct aqorders row using the vendor's own ID, rather than relying solely on Koha's internal ordernumber (RFF+LI) being echoed back correctly by the vendor. This bug is a prerequisite for a related enhancement to add RFF+SLI matching support to EDI invoice processing (Koha::EDI). Suggested implementation: - Add a mapping option in the MarcFieldsToOrder (and/or MarcItemFieldsToOrder) YAML syntax for suppliers_reference_number and suppliers_reference_qualifier. - Have Koha::MarcOrder read this mapping when building the order hash passed to Koha::Acquisition::Order->new / ->insert, alongside the other mapped fields. -- 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=43534 Martin Renvoize (ashimema) <martin.renvoize@openfifth.co.uk> changed: What |Removed |Added ---------------------------------------------------------------------------- Blocks| |43535 Assignee|koha-bugs@lists.koha-commun |martin.renvoize@openfifth.c |ity.org |o.uk Referenced Bugs: https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=43535 [Bug 43535] Support matching EDIFACT invoice lines to orders via RFF+SLI -- 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=43534 --- Comment #1 from Martin Renvoize (ashimema) <martin.renvoize@openfifth.co.uk> --- Filed bug 43537 to track the idea of making MarcFieldsToOrder/MarcItemFieldsToOrder configurable per MARC order account/vendor, rather than global. Not a dependency of this bug - this bug is being implemented against the existing global-syspref model. -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=43534 --- Comment #2 from Martin Renvoize (ashimema) <martin.renvoize@openfifth.co.uk> --- Created attachment 205793 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=205793&action=edit Bug 43534: Allow MarcFieldsToOrder to map a MARC field to supplier's reference number/qualifier This adds two new fields to the MarcFieldsToOrder mapping mechanism: suppliers_reference_number (mapped from a MARC field, like the other MarcFieldsToOrder fields) and suppliers_reference_qualifier (a literal EDIFACT reference qualifier code, e.g. SLI, rather than a MARC mapping, since it does not vary per record). Both are stored on the resulting aqorders row (suppliers_reference_number / suppliers_reference_qualifier), the same columns already populated by the EDIFACT quote-to-order flow. On the "review staged records" screen (addorderiso2709.pl), the supplier reference is shown read-only, taken only from the MARC record's own mapping - it is the vendor's identifier, not something a librarian edits or bulk-applies. Once an order line is saved, the supplier reference is shown read-only on the order line detail view (neworderempty.tt) too, appearing only when set - which only happens for order lines created via EDI or a MARC order file, so manually-created order lines are unaffected. Also adds a discoverability panel to the MARC order accounts admin page, showing the currently configured MarcFieldsToOrder / MarcItemFieldsToOrder mappings and linking to the relevant system preferences, since that mapping is global and not editable from the account itself. Test plan: 1. Apply patch, restart_all. 2. Set the MarcFieldsToOrder system preference to include: suppliers_reference_number: 037$a suppliers_reference_qualifier: SLI 3. Stage a MARC file for MARC ordering that has a 037$a value, using either the UI (Acquisitions > MARC order accounts > new account > order from file) or the marc_ordering_process.pl cronjob. 4. On the "review staged records" screen (addorderiso2709.pl), confirm the "Supplier reference" field shows the mapped value but cannot be edited, and that there is no "apply to all" override for it. 5. Save the order and confirm the resulting order line has suppliers_reference_number and suppliers_reference_qualifier set correctly (visible via the order line detail page, or by checking the aqorders table). 6. Open that order line for editing (acqui/neworderempty.pl?ordernumber=X) and confirm a read-only "Supplier reference" entry is shown in the accounting details, with the qualifier in parentheses. Open a manually-created order line and confirm no such entry is shown there. 7. Go to Acquisitions > MARC order accounts > New account. Confirm the new "MARC field mappings" section shows the current MarcFieldsToOrder / MarcItemFieldsToOrder mappings and links to the relevant preferences. 8. prove t/db_dependent/Koha/MarcOrder.t -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=43534 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=43534 Martin Renvoize (ashimema) <martin.renvoize@openfifth.co.uk> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |matt.blenkinsop@openfifth.c | |o.uk -- You are receiving this mail because: You are watching all bug changes.
participants (1)
-
bugzilla-daemon@bugs.koha-community.org