C4::Biblios::GetBiblioData and GetBiblioItemData are doing : SELECT [...] itemtypes.notforloan [...] [...] LEFT JOIN itemtypes ON biblioitems.itemtype = itemtypes.itemtype This is wrong becaause itemtypes table could be linked with items.itype (as in my library) and not with biblioitems.itemtype. M. Saby
(In reply to mathieu saby from comment #0) > C4::Biblios::GetBiblioData and GetBiblioItemData are doing : > SELECT [...] itemtypes.notforloan [...] > [...] > LEFT JOIN itemtypes ON biblioitems.itemtype = itemtypes.itemtype > > This is wrong becaause itemtypes table could be linked with items.itype (as > in my library) and not with biblioitems.itemtype. Actually, I think this is correct, since this is for biblio-level item types, rather than item-level, which are treated elsewhere. You toggle between the two with the item-level_itypes syspref.
(In reply to Jared Camins-Esakov from comment #1) > (In reply to mathieu saby from comment #0) > > C4::Biblios::GetBiblioData and GetBiblioItemData are doing : > > SELECT [...] itemtypes.notforloan [...] > > [...] > > LEFT JOIN itemtypes ON biblioitems.itemtype = itemtypes.itemtype > > > > This is wrong becaause itemtypes table could be linked with items.itype (as > > in my library) and not with biblioitems.itemtype. > > Actually, I think this is correct, since this is for biblio-level item > types, rather than item-level, which are treated elsewhere. You toggle > between the two with the item-level_itypes syspref. In my library, I have 'LIVRE' (book), 'REVUE' etc. in biblioitems.itemtypes. I have "DPN", "DPL" (normal/long check out length) etc in items.itype We have "DPN","DPL" etc itemtypes table We use item level type for issuing rules. So when these subs are making a JOIN between biblioitems.itemtype and itemtypes.itemtype, it means trying to join "LIVRE,REVUE" and "DPN,DPL" etc. So it will never get anything. What I was wondering is : is Koha's code calling this sub supposing that some value should always be retreived from the join, and using these values for some purpose ? If it is not the case, that's not an issue. But I was not sure... Mathieu
I think the situation you describe, that the biblioitems.itypes don't match the itemtypes.itemtype list is a non-standard configuration that is potentially problematic in a lot of places. I think dividing them would need a lot more work and thought.
OK Katrin Do you know if it is written somewhere in the documentation that the biblioitems.itypes should match the itemtypes.itemtype list? Mathieu
May I add that this non standard configuration of ours was suggested by our vendor, so at that time, it was not so obvious for them (and of course not for the library) that biblioitems.itypes should match the itemtypes.itemtype list ? Mathieu
Hi Mathieu, I think it's not explicitly documented and it would be good to get more opinions and look at the code some more.
You understood my mind ;-) Maybe it is a wontfix, but in that case, libraries should be warned somewhere not to use the same configuration pattern as we did (and that's a pity, because it was well fitted for our rules). Mathieu
Linking the biblioitems.itemtype to an AV instead of itemtypes will mean a lot of features won't work as intended. I still believe we should not support this, now less than before. biblioitems.itemtype is used for: * pre-selecting itemtype when cataloguing items * max holds limits for record level holds * circulation rules for article requests * search: itype and itemtype will both be found when using the itemtype search * there is code to display the itemtype icons in results list etc. For this I believe this is indeed a WONTFIX.