When ordering from a staged file that contains item data, we have the option to edit or confirm the individual items on the "Select to import" tab, or import all items with identical information from the "Item information" tab. When importing individualized item data from the "Select to import" tab, clicking Save triggers an error: "Some required subfields are unset". Setting the Koha item type in the "Item information" tab fixes this error - but it shouldn't be necessary to set the item type in that tab if all items in the "Select to import" tab already have an item type specified. To replicate: 1. Go to Acquisitions and find or open a basket 2. Click Add to basket 3. Click Add from new file 4. Upload a MARC file containing item data 5. When the upload completes, click "Add to basket" 6. In the "Select to import" tab that comes up by default, check the checkbox next to one or more titles in the file --> This will expand the item data for those titles 7. Look over the item data, and confirm that all items have a homebranch, holdingbranch, and item type defined 8. Click "Save" --> An error pops up: "Some required subfields are unset" 9. Navigate to the "Item information" tab 10. Select a value for y - Koha item type 11. Click "Save" again --> The orders are imported successfully
I noticed that after that, the item type is still NULL and causes a whole slew of problems with the API later on. To recreate: 1. Go to Acquisitions 2. Click 'Search' under 'Search vendors' 3. Click 'Add to basket' next to 'My basket' 4. Click 'From a new file' 5. Choose a MARC file 6. Click 'Upload file' 7. Click 'Stage for import' 8. Click 'Add staged files to basket' 9. Click 'Default accounting details' 10. Select a fund 11. Click 'Item information' 12. Choose an item type in 'y - Koha item type' 13. Click 'Select to import' 14. Select the record 15. Enter a price 16. Click 'Save' 17. Click the title to access the bibliographic record --> API error If you look in the db, the itemtype is NULL MariaDB [koha_kohadev]> select itype from items where biblionumber = 439; +-------+ | itype | +-------+ | NULL | +-------+ 1 row in set (0.000 sec) 18. Go back to the basket 19. Click 'Close basket' 20. Click 'Yes, close (Y)' 21. Click 'Receive shipments' 22. Enter a vendor invoice number 23. Click 'Next' --> API error
Created attachment 177703 [details] MARC record The MARC record I used to test. It has no item information in it.
Upping the severity to blocker since we can't do anything with items created this way, even if the user themself does everything right.
I think Caroline's comments are bug 39282 - Emily is describing the need to set an item type when the items already have one, Caroline is encountering that when you do define item information in the second tab it isn't being used
Given Nicks comment, I'm bringing this back down