Bug 36053

Summary: Replacement prices not populating when supplied from MarcItemFieldsToOrder
Product: Koha Reporter: Nick Clemens (kidclamp) <nick>
Component: AcquisitionsAssignee: Nick Clemens (kidclamp) <nick>
Status: Pushed to oldstable --- QA Contact: Marcel de Rooy <m.de.rooy>
Severity: major    
Priority: P5 - low CC: aholt, barbara.johnson, chughesman, erin.arnold, fridolin.somers, jonathan.druart, jzairo, kebliss, kkrueger, koha, lucas, m.de.rooy, mspinney, sbcornell, sbrown
Version: Main   
Hardware: All   
OS: All   
See Also: https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=35892
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=35913
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=35912
Change sponsored?: --- Patch complexity: Trivial patch
Documentation contact: Documentation submission:
Text to go in the release notes:
Version(s) released in:
24.05.00,23.11.05,23.05.12
Bug Depends on: 32166    
Bug Blocks:    
Attachments: Bug 36053: Correct input name for item replacement fields
Bug 36053: Correct input name for item replacement fields
Bug 36053: Correct input name for item replacement fields

Description Nick Clemens (kidclamp) 2024-02-08 20:27:07 UTC
Bug 32166 added the import_record_id to the name for the replacementprice field, however, this made it clash with the record level replacement price - that field doesn't populate when we are using MarcItemFieldsToOrder and so is $0

When fetching the item prices, we get an array which inlcudes that $0 and so the order replacement prices appear correctly in the form, but are not saved to the database

We need to rename the input field
Comment 1 Nick Clemens (kidclamp) 2024-02-08 20:31:40 UTC
Created attachment 161955 [details] [review]
Bug 36053: Correct input name for item replacement fields

To test:
1 - Follow test plan and use sample record from bug 35912 ( or similar)
2 - Confirm that when the order is saved the replacement price is $0.00
3 - Apply patch, restart_all
4 - Delete previous orders, and stage and add to basket again
5 - Confirm that upon adding orders to basket the replacement price is saved correctly
Comment 2 Brendan Lawlor 2024-02-12 16:40:57 UTC
Created attachment 162063 [details] [review]
Bug 36053: Correct input name for item replacement fields

To test:
1 - Follow test plan and use sample record from bug 35912 ( or similar)
2 - Confirm that when the order is saved the replacement price is $0.00
3 - Apply patch, restart_all
4 - Delete previous orders, and stage and add to basket again
5 - Confirm that upon adding orders to basket the replacement price is saved correctly

Signed-off-by: Brendan Lawlor <blawlor@clamsnet.org>
Comment 3 Erin A. 2024-03-19 16:17:49 UTC
We noticed this bug and are adding a comment to let you know we are interested in a fix! Thanks.
Comment 4 Katrin Fischer 2024-03-19 16:43:45 UTC
(In reply to Erin A. from comment #3)
> We noticed this bug and are adding a comment to let you know we are
> interested in a fix! Thanks.

Hi Erin :) This bug already has a patch and is in "Signed off", which means it will be reviewed by the QA team next and if it passes (everything works etc.) it will be included in Koha. As a bug it's likely to be backported into stable versions as well. Please keep commenting!
Comment 5 Nick Clemens (kidclamp) 2024-04-04 17:03:24 UTC
This causes loss of data during order/record import - raising to major
Comment 6 Barbara Johnson 2024-04-04 17:12:58 UTC
+1 I very much agree that this is a major problem for us.
Comment 7 Marcel de Rooy 2024-04-05 06:52:23 UTC
Created attachment 164448 [details] [review]
Bug 36053: Correct input name for item replacement fields

To test:
1 - Follow test plan and use sample record from bug 35912 ( or similar)
2 - Confirm that when the order is saved the replacement price is $0.00
3 - Apply patch, restart_all
4 - Delete previous orders, and stage and add to basket again
5 - Confirm that upon adding orders to basket the replacement price is saved correctly

Signed-off-by: Brendan Lawlor <blawlor@clamsnet.org>

Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Comment 8 Katrin Fischer 2024-04-05 09:52:40 UTC
Pushed for 24.05!

Well done everyone, thank you!
Comment 9 Fridolin Somers 2024-04-18 07:23:57 UTC
Pushed to 23.11.x for 23.11.05
Comment 10 Barbara Johnson 2024-04-18 21:33:31 UTC
Just curious if this bug could be backported to 23.05?
Comment 11 Lucas Gass 2024-05-13 19:47:22 UTC
Backported to 23.05.x for upcoming 23.05.12