[Koha-bugs] [Bug 10385] New: item-level_itype checks need to be refactored

bugzilla-daemon at bugs.koha-community.org bugzilla-daemon at bugs.koha-community.org
Fri May 31 19:19:05 CEST 2013


http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=10385

            Bug ID: 10385
           Summary: item-level_itype checks need to be refactored
    Classification: Unclassified
 Change sponsored?: ---
           Product: Koha
           Version: master
          Hardware: All
                OS: All
            Status: NEW
          Severity: enhancement
          Priority: P5 - low
         Component: Architecture, internals, and plumbing
          Assignee: gmcharlt at gmail.com
          Reporter: gmcharlt at gmail.com

Checks on the item-level_itypes system preference are scattered throughout the
code, and there have been a large number of bugs concerning cases where such a
check is missing.

I propose checks of this system preference be moved as far down the stack as
possible.  Specifically, all routines that fetch items from the database should
check the syspref to determine the correct item type column and return it via
(say) an "item_type" key in the response, to distinguish it from 'itemtype' and
'itype'.  The only code that would see 'itype' or 'itemtype' would be code
directly related to modifying items.  Further, the syspref would be checked in
as few places as possible.

I further propose pinning down the semantics of the item-level_itypes as
follows:

- when ON, the item type is *always* taken from items.itype for all display and
circulation purposes
- when OFF, the item type is *always* taken from biblioitems.itemtype

In particular, the current behavior of GetItem (fetch the itype from the item
if it's not blank, otherwise fall back to the biblioitem itemtype), would be
modified.

Related bugs include:

- Bug 7491
- Bug 7492

-- 
You are receiving this mail because:
You are watching all bug changes.


More information about the Koha-bugs mailing list