Koha-clms/Koha/Import
Nick Clemens f473c7d451
Bug 41029: Add option for marc overlay rules to apply when adding to a basket
This patch adds a new option to allow defining overlay rules for 'Add to basket' - such that they
will be used when adding orders in acquisition. Existing 'Staged MARC Import' rules will be copied to
the new fitler in order to preserve behavior

To test:
 1 - Paste the following into MarcFieldsToOrder and save
  price: 975$p
  quantity: 975$q
  budget_code: 975$h
 2 - Paste the following into MarcItemFieldsToOrder and save
  homebranch: 949$a
  holdingbranch: 949$b
  itype: 949$y
  nonpublic_note: 949$x
  public_note: 949$z
  loc: 949$c
  ccode: 949$8
  notforloan: 949$7
  uri: 949$u
  copyno: 949$t
  price: 949$g
  replacementprice: 949$v
  itemcallnumber: 949$o
  quantity: 949$k
  budget_code: 949$l
 3 - Go to Admin -> Record overlay rules
 4 - Define 2 rules:
  Source - Staged Marc Import - 949 - Add and append (the rest of the options are set when add and append is selected
  Source - Staged Marc Import - * - Protect (the rest of the options are set when add and append is selected
 5 - Grab test file from bug 39518
 6 - Import the records, ignoring items
 7 - Edit the test file and change some values for the 949 rows
 8 - Go to Acquisitions, find a basket for a vendor, add to basket from a new file
 9 - Stage the file to find matches (already imported above) and to replace
10 - Complete the orders
11 - View the record and confirm the new 949 are added
12 - Edit the 949 in the file again
13 - Apply patch, update database, restart all
14 - Edit overlay rules and remove the 'Staged Marc Import' rules, leaving only the 'Add to basket rules'
15 - Add to basket again using the updated file and confirm new 949 are added
16 - Success!

Signed-off-by: Benjamin Daeuber <BDaeuber@fargolibrary.org>
Signed-off-by: Martin Renvoize <martin.renvoize@openfifth.co.uk>
Signed-off-by: Pedro Amorim <pedro.amorim@openfifth.co.uk>
2026-08-19 16:07:57 +00:00
..
OAI Bug 40163: (follow-up) Fix wrong GNU links and update test 2025-09-24 09:25:04 -06:00
Record Bug 40163: Fix several http addresses in the code docs 2025-09-23 16:21:29 -06:00
Record.pm Bug 41029: Add option for marc overlay rules to apply when adding to a basket 2026-08-19 16:07:57 +00:00
Records.pm Bug 40163: Fix several http addresses in the code docs 2025-09-23 16:21:29 -06:00