Currently, adding to a basket from a staged file uses the same overlay rules as 'Staged marc import' - per bug 20817 some libraries would like to preserve certain fields during import into a basket. It would be nice to make the rules more granular and allow for rules to apply only when adding to a basket
Created attachment 187944 [details] [review] 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!