Bug 16356 - [3.22] Error 500 when returning an item which itemtype is not defined in ItemTypes
Summary: [3.22] Error 500 when returning an item which itemtype is not defined in Item...
Status: CLOSED FIXED
Alias: None
Product: Koha
Classification: Unclassified
Component: Circulation (show other bugs)
Version: 3.22
Hardware: All All
: P4 major (vote)
Assignee: Sophie MEYNIEUX
QA Contact: Testopia
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2016-04-26 16:01 UTC by Sophie MEYNIEUX
Modified: 2019-06-27 09:24 UTC (History)
4 users (show)

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


Attachments
Bug 16356: Fix Error 500 when returning an item which itemtype is not in itemtypes table (1.02 KB, patch)
2016-04-26 16:12 UTC, Sophie MEYNIEUX
Details | Diff | Splinter Review
[SIGNED-OFF] Bug 16356: Fix Error 500 when returning an item which itemtype is not in itemtypes table (1.14 KB, patch)
2016-04-26 16:38 UTC, Owen Leonard
Details | Diff | Splinter Review
Bug 16356: Fix Error 500 when returning an item which itemtype is not in itemtypes table (1.14 KB, patch)
2016-04-28 10:22 UTC, Kyle M Hall
Details | Diff | Splinter Review

Note You need to log in before you can comment on or make changes to this bug.
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 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