https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=43537

            Bug ID: 43537
           Summary: Allow MarcFieldsToOrder/MarcItemFieldsToOrder mappings
                    to be configured per MARC order account (vendor)
   Initiative type: ---
        Sponsorship ---
            status:
           Product: Koha
           Version: Main
          Hardware: All
                OS: All
            Status: NEW
          Severity: enhancement
          Priority: P5 - low
         Component: Acquisitions
          Assignee: [email protected]
          Reporter: [email protected]
        QA Contact: [email protected]
  Target Milestone: ---

MarcFieldsToOrder and MarcItemFieldsToOrder are plain system preferences
(read via C4::Context->yaml_preference) - a single global mapping shared by
every MARC order account. Koha::MarcOrderAccount (admin/marc_order_accounts.pl)
stores per-vendor settings such as vendor, budget, matcher and item-handling
options, but has no way to override the field mapping per account.

This is fine while every vendor's MARC order files share the same layout,
but breaks down as soon as two vendors put the same order information (price,
quantity, budget code, discount, sort codes, or any future mapped field) in
different MARC fields - there is currently no way to serve both from one
Koha instance, since only one global mapping can be active at a time.

This enhancement proposes making the field mapping configurable per MARC
order account, falling back to the global MarcFieldsToOrder /
MarcItemFieldsToOrder sysprefs when an account has no override. This would
need to cover every currently-mapped field (price, replacementprice,
quantity, budget_code, discount, sort1, sort2, and any new ones such as
suppliers_reference_number / suppliers_reference_qualifier from bug 43534),
not just a single field in isolation.

This came up while working on bug 43534 (which adds suppliers_reference_number
/ suppliers_reference_qualifier to the existing global mapping) - see that
bug and bug 43535 for context. This bug is intentionally not a dependency of
either: 43534/43535 are being implemented against the existing global-syspref
model, and this bug tracks the idea of moving to per-account configuration as
a separate, larger piece of work.

Suggested implementation (not yet scoped in detail):
- Add mapping storage to Koha::MarcOrderAccount (or a linked table), edited
  from admin/marc_order_accounts.pl.
- Update Koha::MarcOrder's mapping lookups to check the account's own mapping
  first, falling back to the global sysprefs.
- Update the admin UI to let a librarian override individual fields per
  account rather than editing the global YAML.

-- 
You are receiving this mail because:
You are the assignee for the bug.
You are watching all bug changes.
_______________________________________________
Koha-bugs mailing list -- [email protected]
To unsubscribe send an email to [email protected]
website : http://www.koha-community.org/
git : http://git.koha-community.org/
bugs : http://bugs.koha-community.org/

Reply via email to