Bug 32209

Summary: Item subfields required even when supplied for each order
Product: Koha Reporter: Nick Clemens (kidclamp) <nick>
Component: AcquisitionsAssignee: Bugs List <koha-bugs>
Status: NEW --- QA Contact: Testopia <testopia>
Severity: normal    
Priority: P5 - low CC: andrew, jaskins
Version: Main   
Hardware: All   
OS: All   
GIT URL: Change sponsored?: ---
Patch complexity: --- Documentation contact:
Documentation submission: Text to go in the release notes:
Version(s) released in:
Circulation function:
Attachments: A sample marc file

Description Nick Clemens (kidclamp) 2022-11-15 14:22:08 UTC
When using MarcItemFieldsToOrder to populate order information while staging records you can set things up to supply an itemtype, however, if the itemtype field is required, you still must select one on the items tab

To recreate:
See bug 32166 - use file and settings to add to basket form a staged file
Note you must still populate the itemtype on the second tab
Comment 1 Andrew Fuerste-Henry 2022-11-15 20:16:25 UTC
Adding a bit more detail and a file to use.
To recreate:
1: put the following into the MARCItemFieldsToOrder syspref:

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

2: stage the attached marc record for import, selecting MARC format. It doesn't matter if you check for duplicates or not.
3: go to acquisitions, find or create a basket with items created on ordering
4: add to your basket from your staged file
5: on the Add Orders page, select the title and confirm that the item record details on the "Select to import" tab include an itype selection
6: click to the "Item information" tab and confirm that here the itype is blank. Don't select anything here yet.
7: Click Save. Nothing happens. If you inspect the element and look in the console, you'll see some an error "Uncaught Error: cannot call methods on tabs prior to initialization; attempted to call method 'option'"
8: Select an itype in the "Item information" tab
9: Click Save again. It works!
Comment 2 Andrew Fuerste-Henry 2022-11-15 20:16:50 UTC
Created attachment 143929 [details]
A sample marc file
Comment 3 Joe Askins 2024-03-26 22:28:27 UTC
New Koha library experiencing this same issue when staging carts from Baker & Taylor. We'd love to see a fix!