[Bug 11045] New: Wrong query in C4/Biblios.pm : join between biblioitems.itemtypes and itemtypes table
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=11045 Bug ID: 11045 Summary: Wrong query in C4/Biblios.pm : join between biblioitems.itemtypes and itemtypes table Change sponsored?: --- Product: Koha Version: master Hardware: All OS: All Status: NEW Severity: normal Priority: P5 - low Component: Cataloging Assignee: gmcharlt@gmail.com Reporter: mathieu.saby@univ-rennes2.fr QA Contact: testopia@bugs.koha-community.org CC: m.de.rooy@rijksmuseum.nl 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 -- You are receiving this mail because: You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=11045 mathieu saby <mathieu.saby@univ-rennes2.fr> changed: What |Removed |Added ---------------------------------------------------------------------------- Priority|P5 - low |P3 -- You are receiving this mail because: You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=11045 --- Comment #1 from Jared Camins-Esakov <jcamins@cpbibliography.com> --- (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. -- You are receiving this mail because: You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=11045 --- Comment #2 from mathieu saby <mathieu.saby@univ-rennes2.fr> --- (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 -- You are receiving this mail because: You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=11045 Katrin Fischer <katrin.fischer@bsz-bw.de> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|NEW |RESOLVED CC| |katrin.fischer@bsz-bw.de Resolution|--- |WONTFIX --- Comment #3 from Katrin Fischer <katrin.fischer@bsz-bw.de> --- 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. -- You are receiving this mail because: You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=11045 --- Comment #4 from mathieu saby <mathsabypro@gmail.com> --- OK Katrin Do you know if it is written somewhere in the documentation that the biblioitems.itypes should match the itemtypes.itemtype list? Mathieu -- You are receiving this mail because: You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=11045 --- Comment #5 from mathieu saby <mathsabypro@gmail.com> --- 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 -- You are receiving this mail because: You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=11045 Katrin Fischer <katrin.fischer@bsz-bw.de> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|RESOLVED |REOPENED Resolution|WONTFIX |--- --- Comment #6 from Katrin Fischer <katrin.fischer@bsz-bw.de> --- 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 are receiving this mail because: You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=11045 Katrin Fischer <katrin.fischer@bsz-bw.de> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|REOPENED |In Discussion -- You are receiving this mail because: You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=11045 --- Comment #7 from mathieu saby <mathsabypro@gmail.com> --- 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 -- You are receiving this mail because: You are watching all bug changes.
participants (1)
-
bugzilla-daemon@bugs.koha-community.org