Bug 11594

Summary: Store both item level and record level itemtype in statistics
Product: Koha Reporter: Mathieu Saby <mathsabypro>
Component: CirculationAssignee: Bugs List <koha-bugs>
Status: NEW --- QA Contact: Testopia <testopia>
Severity: enhancement    
Priority: P5 - low CC: gmcharlt, koha, kyle.m.hall, marjorie.barry-vila, patrick.robitaille
Version: Main   
Hardware: All   
OS: All   
GIT URL: Change sponsored?: ---
Patch complexity: --- Documentation contact:
Documentation submission: Text to go in the release notes:
Version(s) released in:
Circulation function:

Description Mathieu Saby 2014-01-22 08:51:01 UTC
I copy here a comment originaly made on bug 9351

For some libraries, what is needed in statistical table is BOTH items.itype and biblioitems.itemtype, and maybe a clear indication (a 3rd column "circulation_type" ?) of which type is was used for circulation rights.

Ex:
In Rennes 2 we use item level for defining circulation rules.
items.itype are codes for "Short Loan", "Normal Loan", "Long loan".
biblioitems.itemtype are "Book", "Serial", "DVD" etc.

For our annual report, we need to know the number of Books, Serials, DVD checked out, even if the type used for defining circulation rules are "Short loan", and not "Book".

But other libraries may have different settings, and may have need to make stats on item level, or maybe cross stats on both level.
Comment 1 Koha collecto 2024-05-24 13:27:42 UTC
+1
Comment 2 Mathieu Saby 2025-01-21 15:20:06 UTC
Note that this enhancement would be usefull even if you use the same list of possible values in items.itype and biblioitems.itemtype

2 tables to be edited : statistics and pseudonymized_transactions. They have both a "itemtype" column. I don't know if it is based on the item-level or record-level itemtype, or (probably) if it depends on  item-level_itypes syspref
Comment 3 Mathieu Saby 2025-01-21 16:04:43 UTC
The current "itemtype" depends on  item-level_itypes syspref. I fear it would cause a total mess to change this behavior... 

So the cleanest way to to store both item-level and record-level itemtype is probably to add 2 new columns : item_itemtype and record_itemtype