Summary: | Checkout page does not like itemtype NULL | ||
---|---|---|---|
Product: | Koha | Reporter: | Marcel de Rooy <m.de.rooy> |
Component: | Circulation | Assignee: | Marcel de Rooy <m.de.rooy> |
Status: | CLOSED FIXED | QA Contact: | Kyle M Hall (khall) <kyle> |
Severity: | normal | ||
Priority: | P5 - low | CC: | gmcharlt, jonathan.druart, kyle.m.hall, kyle |
Version: | Main | ||
Hardware: | All | ||
OS: | All | ||
GIT URL: | Change sponsored?: | --- | |
Patch complexity: | Trivial patch | Documentation contact: | |
Documentation submission: | Text to go in the release notes: | ||
Version(s) released in: | Circulation function: | ||
Attachments: |
Bug 19484: Add test before using object itemtype
Bug 19484: Add test before using object itemtype Bug 19484: Add test before using object itemtype |
Description
Marcel de Rooy
2017-10-18 13:59:55 UTC
Created attachment 68250 [details] [review] Bug 19484: Add test before using object itemtype Resolves this crash: item-level_itypes set but no itemtype set for item (451) at /usr/share/koha/masterclone/Koha/Schema/Result/Item.pm line 698. Can't call method "translated_description" on an undefined value at /usr/share/koha/masterclone/svc/checkouts line 168. Test plan: [1] Create/update an item so that it has itemtype NULL. [2] Check it out on Circulation page. Before this patch the loading would never stop. Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl> Since itype is not a foreign key, it would also work to put say BKS into itype when you only have BK in your item types. (Update via mysql.) Since importing unknown itemtypes is possible, I am wondering what the severity of this bug should be btw.. Created attachment 68285 [details] [review] Bug 19484: Add test before using object itemtype Patch applies and functions as described. I agree with you that importing NULL itemtypes is possible Marcel. A higher importance level makes sense. Signed-off-by: Dilan Johnpullé <dilan@calyx.net.au> (In reply to Dilan Johnpullé from comment #4) > Created attachment 68285 [details] [review] [review] > Bug 19484: Add test before using object itemtype > > Patch applies and functions as described. I agree with you that importing > NULL itemtypes is possible Marcel. A higher importance level makes sense. > > Signed-off-by: Dilan Johnpullé <dilan@calyx.net.au> Thanks Created attachment 68703 [details] [review] Bug 19484: Add test before using object itemtype Patch applies and functions as described. I agree with you that importing NULL itemtypes is possible Marcel. A higher importance level makes sense. Signed-off-by: Dilan Johnpullé <dilan@calyx.net.au> Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com> There was a thread on the ML: http://lists.koha-community.org/pipermail/koha-devel/2017-July/043841.html "Expected behaviour if itemtype does not exist" The correct solution would be to provide a script to make sure the data are correct and/or display a warning message on the about page. Pushed to master for 17.11, thanks to everybody involved! |