There is an incorrect method usage in the script where GetBudgetByCode is used instead of GetBudget.
Created attachment 155217 [details] [review] Bug 34717: Fix budget selection This patch replaces GetBudgetByCode with GetBudget to allow budget population to happen correctly Test plan: Needs to be tested using the file attached as it includes the field mappings Needs to be tested in KTD as the mappings match a budget created in the KTD sample data (sandboxes run on KTD so are suitable for this) 1) In system preferences, search for MarcFieldsToOrder 2) Paste the following into the syspref: price: 975$p quantity: 975$q budget_code: 975$h 3) Save the syspref 4) In Acquistions, choose a vendor and go into a basket 5) Click Add to basket 6) Select From a new file 7) Use the file attached to this bug 8) Click Upload file 9) At the bottom, click Stage for import 10) When the import is complete, click Add staged files to basket 11) Tick the box next to the record name 12) Observe that under fund, you are being asked to select a fund 13) Apply patch 14) restart_all 15) Refresh the page 16) Observe that the budget has now defaulted to Fund 1_2 as per the mappings in the marc file
Created attachment 155219 [details] Test file with mapped fields
Created attachment 155220 [details] [review] Bug 34717: Fix budget selection This patch replaces GetBudgetByCode with GetBudget to allow budget population to happen correctly Test plan: Needs to be tested using the file attached as it includes the field mappings Needs to be tested in KTD as the mappings match a budget created in the KTD sample data (sandboxes run on KTD so are suitable for this) 1) In system preferences, search for MarcFieldsToOrder 2) Paste the following into the syspref: price: 975$p quantity: 975$q budget_code: 975$h 3) Save the syspref 4) In Acquistions, choose a vendor and go into a basket 5) Click Add to basket 6) Select From a new file 7) Use the file attached to this bug 8) Click Upload file 9) At the bottom, click Stage for import 10) When the import is complete, click Add staged files to basket 11) Tick the box next to the record name 12) Observe that under fund, you are being asked to select a fund and the budget being mapped in the file has not been populated as it should be 13) Apply patch 14) restart_all 15) Refresh the page 16) Observe that the budget has now correctly defaulted to Fund 1_2 as per the mappings in the marc file