Bug 35912

Summary: Item prices not populating order form when adding to a basket from a staged file
Product: Koha Reporter: Nick Clemens (kidclamp) <nick>
Component: AcquisitionsAssignee: Nick Clemens (kidclamp) <nick>
Status: RESOLVED FIXED QA Contact: Marcel de Rooy <m.de.rooy>
Severity: major    
Priority: P5 - low CC: andrewfh, fridolin.somers, lucas, m.de.rooy, mspinney, wizzyrea
Version: Main   
Hardware: All   
OS: All   
See Also: https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=36053
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.03
Bug Depends on: 33170    
Bug Blocks:    
Attachments: Bug 35912: Corretc field name form itemprice to price in addorderiso2709 template
Test Order file
Bug 35912: Corretc field name form itemprice to price in addorderiso2709 template
Bug 35912: Corretc field name form itemprice to price in addorderiso2709 template
Bug 35912: Corretc field name form itemprice to price in addorderiso2709 template

Description Nick Clemens (kidclamp) 2024-01-25 19:36:50 UTC
Bug 33170 refactored addorderiso2709 to make MarcItemFieldsToOrder easier to adjust, however, it missed that when listing we renamed 'price' as 'itemprice' so prices for items are not being populated
Comment 1 Nick Clemens (kidclamp) 2024-01-25 19:39:33 UTC
Created attachment 161462 [details] [review]
Bug 35912: Corretc field name form itemprice to price in addorderiso2709 template

To test:
Setup -- Set systempreferences below

MarcFieldsToOrder:
price: 949$g
quantity: 949$k
budget_code: 949$l
discount: 949$m
sort1: 949$n
sort2: 949$q

MarcItemFieldsToOrder:
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

Stage the attached bib-303.marcxml file
Add to basket from the staged file
Select the biblio
Note items do no have prices
Cancel
Apply patch
Add to basket from file again
Note prices, and other fields, come through as expected
Comment 2 Nick Clemens (kidclamp) 2024-01-25 19:40:18 UTC
Created attachment 161463 [details]
Test Order file
Comment 3 ByWater Sandboxes 2024-01-25 22:01:09 UTC
Created attachment 161470 [details] [review]
Bug 35912: Corretc field name form itemprice to price in addorderiso2709 template

To test:
Setup -- Set systempreferences below

MarcFieldsToOrder:
price: 949$g
quantity: 949$k
budget_code: 949$l
discount: 949$m
sort1: 949$n
sort2: 949$q

MarcItemFieldsToOrder:
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

Stage the attached bib-303.marcxml file
Add to basket from the staged file
Select the biblio
Note items do no have prices
Cancel
Apply patch
Add to basket from file again
Note prices, and other fields, come through as expected

Signed-off-by: Michelle Spinney <mspinney@clamsnet.org>
Comment 4 Marcel de Rooy 2024-01-26 08:00:15 UTC
(In reply to ByWater Sandboxes from comment #3)
> Bug 35912: Corretc field name form itemprice to price in addorderiso2709

Yeah, corretc :)
Comment 5 Marcel de Rooy 2024-01-26 08:02:42 UTC
Created attachment 161483 [details] [review]
Bug 35912: Corretc field name form itemprice to price in addorderiso2709 template

To test:
Setup -- Set systempreferences below

MarcFieldsToOrder:
price: 949$g
quantity: 949$k
budget_code: 949$l
discount: 949$m
sort1: 949$n
sort2: 949$q

MarcItemFieldsToOrder:
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

Stage the attached bib-303.marcxml file
Add to basket from the staged file
Select the biblio
Note items do no have prices
Cancel
Apply patch
Add to basket from file again
Note prices, and other fields, come through as expected

Signed-off-by: Michelle Spinney <mspinney@clamsnet.org>

Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Comment 6 Katrin Fischer 2024-01-26 14:18:38 UTC
Pushed for 24.05!

Well done everyone, thank you!
Comment 7 Fridolin Somers 2024-01-31 12:53:12 UTC
Pushed to 23.11.x for 23.11.03
Comment 8 ByWater Sandboxes 2024-02-01 17:44:27 UTC
Created attachment 161716 [details] [review]
Bug 35912: Corretc field name form itemprice to price in addorderiso2709 template

To test:
Setup -- Set systempreferences below

MarcFieldsToOrder:
price: 949$g
quantity: 949$k
budget_code: 949$l
discount: 949$m
sort1: 949$n
sort2: 949$q

MarcItemFieldsToOrder:
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

Stage the attached bib-303.marcxml file
Add to basket from the staged file
Select the biblio
Note items do no have prices
Cancel
Apply patch
Add to basket from file again
Note prices, and other fields, come through as expected

Signed-off-by: Michelle Spinney <mspinney@clamsnet.org>

Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Signed-off-by: Andrew Fuerste-Henry <andrewfh@dubcolib.org>
Comment 9 Andrew Fuerste-Henry 2024-02-01 17:53:09 UTC
Apologies for the stray sign-off, it was a sandbox error.
Comment 10 Liz Rea 2024-02-08 16:28:44 UTC
May we have a backport for this to 23.05?
Comment 11 Nick Clemens (kidclamp) 2024-02-08 18:37:06 UTC
This should not be needed for 23.05 - caused by 33170 - so only in 23.11 and after
Comment 12 Lucas Gass 2024-02-08 18:52:36 UTC
Missing dependency for 23.05.x, no backport.