Bug 39620 - Price not populating from 020$c when creating a basket
Summary: Price not populating from 020$c when creating a basket
Status: Pushed to stable
Alias: None
Product: Koha
Classification: Unclassified
Component: Acquisitions (show other bugs)
Version: Main
Hardware: All All
: P5 - low normal
Assignee: Lucas Gass (lukeg)
QA Contact: Martin Renvoize (ashimema)
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2025-04-12 14:57 UTC by Lucas Gass (lukeg)
Modified: 2025-05-26 07:30 UTC (History)
4 users (show)

See Also:
GIT URL:
Change sponsored?: ---
Patch complexity: Trivial patch
Documentation contact:
Documentation submission:
Text to go in the release notes:
This patch fixes an error in Koha/MarcOrder.pm where price was not correctly defaulting to the 020$c if it exists.
Version(s) released in:
25.05.00,24.11.05
Circulation function:


Attachments
Bug 39620: Fallback to GetMarcPrice if nessesary (1.59 KB, patch)
2025-05-12 15:02 UTC, Lucas Gass (lukeg)
Details | Diff | Splinter Review
Bug 39620: Fallback to GetMarcPrice if nessesary (1.64 KB, patch)
2025-05-12 21:14 UTC, David Nind
Details | Diff | Splinter Review
Bug 39620: Fallback to GetMarcPrice if nessesary (1.70 KB, patch)
2025-05-13 06:41 UTC, Martin Renvoize (ashimema)
Details | Diff | Splinter Review

Note You need to log in before you can comment on or make changes to this bug.
Description Lucas Gass (lukeg) 2025-04-12 14:57:09 UTC
To recreate:

1. Have a MRC file with price populated in the 020$c
2. Have nothing the MarcFieldsToOrder or  MarcItemFieldsToOrder sys prefs
3. Create a new basket and import from a new file 
4. The price is not imported. 


My understanding is that if the price is set in the 020$c it should be copied over.
Comment 1 Lucas Gass (lukeg) 2025-05-12 15:02:26 UTC
Created attachment 182298 [details] [review]
Bug 39620: Fallback to GetMarcPrice if nessesary

To test:
1. Have a MRC file with price populated in the 020$c
2. Have nothing the MarcFieldsToOrder or  MarcItemFieldsToOrder sys prefs
3. Create a new basket and import from a new file
4. The price is not imported.
5. APPLY PATCH and restart_all
6. Try again, this time the price should be populated correctly.
Comment 2 David Nind 2025-05-12 21:14:00 UTC
Created attachment 182313 [details] [review]
Bug 39620: Fallback to GetMarcPrice if nessesary

To test:
1. Have a MRC file with price populated in the 020$c
2. Have nothing the MarcFieldsToOrder or  MarcItemFieldsToOrder sys prefs
3. Create a new basket and import from a new file
4. The price is not imported.
5. APPLY PATCH and restart_all
6. Try again, this time the price should be populated correctly.

Signed-off-by: David Nind <david@davidnind.com>
Comment 3 David Nind 2025-05-12 21:20:57 UTC
Testing notes (using KTD):
1. Edit the BKS framework so that 020$c is visible in the editor.
2. Edit any record and add a value to 020$c, for example $5.00
3. Export the record as MARCXML.
4. Delete the items and record.
5. Continue with the test plan - note: I'm not that familiar with adding an order to a basket from a new file, I:
   - Selected "From a new file"
   - Accepted the default settings
   - You are on the "Job engueued page"
   - Click the "Add staged files to basket" action button
     (once the job is finished)
   - Continue with adding orders....
   - If you check the job page, you'll need to add to the basket again, but use "From a staged file"
Comment 4 Martin Renvoize (ashimema) 2025-05-13 06:41:23 UTC
Created attachment 182333 [details] [review]
Bug 39620: Fallback to GetMarcPrice if nessesary

To test:
1. Have a MRC file with price populated in the 020$c
2. Have nothing the MarcFieldsToOrder or  MarcItemFieldsToOrder sys prefs
3. Create a new basket and import from a new file
4. The price is not imported.
5. APPLY PATCH and restart_all
6. Try again, this time the price should be populated correctly.

Signed-off-by: David Nind <david@davidnind.com>
Signed-off-by: Martin Renvoize <martin.renvoize@openfifth.co.uk>
Comment 5 Katrin Fischer 2025-05-15 06:36:09 UTC
Pushed for 25.05!

Well done everyone, thank you!
Comment 6 Paul Derscheid 2025-05-26 07:25:34 UTC
Nice work everyone!

Pushed to 24.11.x for 24.11.05