Bug 34717 - Incorrect method call in addorderiso2709.pl
Summary: Incorrect method call in addorderiso2709.pl
Status: In Discussion
Alias: None
Product: Koha
Classification: Unclassified
Component: Acquisitions (show other bugs)
Version: Main
Hardware: All All
: P5 - low enhancement (vote)
Assignee: Matt Blenkinsop
QA Contact: Testopia
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2023-09-05 13:47 UTC by Matt Blenkinsop
Modified: 2023-09-06 15:05 UTC (History)
0 users

See Also:
Change sponsored?: ---
Patch complexity: ---
Documentation contact:
Documentation submission:
Text to go in the release notes:
Version(s) released in:


Attachments
Bug 34717: Fix budget selection (2.68 KB, patch)
2023-09-05 14:08 UTC, Matt Blenkinsop
Details | Diff | Splinter Review
Test file with mapped fields (4.42 KB, application/xml)
2023-09-05 14:26 UTC, Matt Blenkinsop
Details
Bug 34717: Fix budget selection (2.77 KB, patch)
2023-09-05 14:28 UTC, Matt Blenkinsop
Details | Diff | Splinter Review

Note You need to log in before you can comment on or make changes to this bug.
Description Matt Blenkinsop 2023-09-05 13:47:51 UTC
There is an incorrect method usage in the script where GetBudgetByCode is used instead of GetBudget.
Comment 1 Matt Blenkinsop 2023-09-05 14:08:10 UTC
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
Comment 2 Matt Blenkinsop 2023-09-05 14:26:18 UTC
Created attachment 155219 [details]
Test file with mapped fields
Comment 3 Matt Blenkinsop 2023-09-05 14:28:34 UTC
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