Bug 16356

Summary: [3.22] Error 500 when returning an item which itemtype is not defined in ItemTypes
Product: Koha Reporter: Sophie MEYNIEUX <sophie.meynieux>
Component: CirculationAssignee: Sophie MEYNIEUX <sophie.meynieux>
Status: CLOSED FIXED QA Contact: Testopia <testopia>
Severity: major    
Priority: P4 CC: gmcharlt, julian.maurice, kyle.m.hall
Version: 3.22   
Hardware: All   
OS: All   
GIT URL: Change sponsored?: ---
Patch complexity: Small patch Documentation contact:
Documentation submission: Text to go in the release notes:
Version(s) released in:
Circulation function:
Attachments: Bug 16356: Fix Error 500 when returning an item which itemtype is not in itemtypes table
[SIGNED-OFF] Bug 16356: Fix Error 500 when returning an item which itemtype is not in itemtypes table
Bug 16356: Fix Error 500 when returning an item which itemtype is not in itemtypes table

Description Sophie MEYNIEUX 2016-04-26 16:01:47 UTC
When returning an item, Koha searches if it should show a specific message for this itemtype, using C4/ItemType->get()

In 3.22, if item itemptype is not defined in itemtypes table, this will result in 500 Error
Comment 1 Sophie MEYNIEUX 2016-04-26 16:12:38 UTC Comment hidden (obsolete)
Comment 2 Owen Leonard 2016-04-26 16:38:26 UTC Comment hidden (obsolete)
Comment 3 Kyle M Hall (khall) 2016-04-28 10:22:49 UTC
Created attachment 50892 [details] [review]
Bug 16356: Fix Error 500 when returning an item which itemtype is not in itemtypes table

Test plan :
    * Find an item with itemtype (itype or bilbioitems.itemtype
      depending on syspref) does not exist in itemtypes table
    * If necessary, change itemtype of one of your item
    * Check out this item
    * Try to check it in, you've got a 500 Error and item is not
      returned

    With the patch
    * Try to check your item in. Item is correctly returned

Signed-off-by: Owen Leonard <oleonard@myacpl.org>

Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Comment 4 Julian Maurice 2016-04-28 10:51:40 UTC
Patch pushed to 3.22.x, will be in 3.22.7