Bug 35017 - If creating items when ordering, an alert should appear if the item type is not filled out
Summary: If creating items when ordering, an alert should appear if the item type is n...
Status: NEW
Alias: None
Product: Koha
Classification: Unclassified
Component: Acquisitions (show other bugs)
Version: unspecified
Hardware: All All
: P5 - low enhancement (vote)
Assignee: Bugs List
QA Contact: Testopia
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2023-10-10 13:40 UTC by Kelly McElligott
Modified: 2024-01-23 17:27 UTC (History)
2 users (show)

See Also:
Change sponsored?: ---
Patch complexity: ---
Documentation contact:
Documentation submission:
Text to go in the release notes:
Version(s) released in:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Kelly McElligott 2023-10-10 13:40:31 UTC
Step to reproduce
1. Create a basket
2. Choose to create items upon ordering
3. Use either a new file or a staged file
4. When adding records to the basket, the required fields seem to only be fund and price. Fill out the required fields.
5. Close the basket
6. Go to receive from that vendor, - add invoice number, then see a 500 error instead of being able to receive anything from that vendor.


When a basket is created in Acquisitions with the "create items on ordering", but the item type is not filled in, a 500 error will appear when attempting to receive. Although the item type is not required, thus allowing a user to go through the whole process only to receive a 500 error when receiving.  This error will appear regardless of what the user is receiving if an order within that vendor has an order without an item type.
Comment 1 Katrin Fischer 2023-10-10 13:48:49 UTC
HI Kelly, the itemtype should always be made mandatory in the ACQ framework and then trigger when it's not filled in. But this was broken a little while ago, maybe you are on a broken version still?

Bug 34109 - When adding items on receive, mandatory fields are not checked 

Or it#s maybe not set to be mandatory? It should be, otherwise those items break the OPAC detail view.
Comment 2 Katrin Fischer 2023-10-10 13:53:17 UTC
itemtype is set to mandatory for all new installations now (but was not in the past)
Comment 3 Caroline Cyr La Rose 2024-01-23 17:27:55 UTC
I just had this in a client installation. They had made the item type not mandatory in ACQ framework. 

I don't think it caused an error before since they never complained until we upgraded them to 23.05.

I told them to make it mandatory again and batch modify the items that have itype is null.

Maybe we could disable the mandatory checkbox for the field mapped to item type? 

Or make it not explode if the item type is null.

Cait also suggested adding the check in the framework test, which could be an in between, but won't prevent errors.