[Bug 17420] New: record export fails when itemtype on biblio
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=17420 Bug ID: 17420 Summary: record export fails when itemtype on biblio Change sponsored?: --- Product: Koha Version: master Hardware: All OS: All Status: NEW Severity: minor Priority: P5 - low Component: Tools Assignee: gmcharlt@gmail.com Reporter: fridolin.somers@biblibre.com QA Contact: testopia@bugs.koha-community.org In Tools, Export data, you can export with a filter on item type. When item type is on biblio record, you get the error : export.pl: DBIx::Class::ResultSet::next(): Unknown column 'biblioitems.itemtype' in 'where clause' at /home/koha/src/Koha/Objects.pm line 150 Looks like its because this code use to be a SQL Select and is now a DBIx call : export.pl: DBIx::Class::ResultSet::next(): Unknown column 'biblioitems.itemtype' in 'where clause' at /home/koha/src/Koha/Objects.pm line 150 -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=17420 Fridolin SOMERS <fridolin.somers@biblibre.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|NEW |Needs Signoff Patch complexity|--- |Trivial patch -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=17420 --- Comment #1 from Fridolin SOMERS <fridolin.somers@biblibre.com> --- Created attachment 56117 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=56117&action=edit Bug 17420 - record export fails when itemtype on biblio In Tools, Export data, you can export with a filter on item type. When item type is on biblio record, you get the error : export.pl: DBIx::Class::ResultSet::next(): Unknown column 'biblioitems.itemtype' in 'where clause' at /home/koha/src/Koha/Objects.pm line 150 Looks like its because this code use to be a SQL Select and is now a DBIx call : C4::Context->preference('item-level_itypes') ? ( 'items.itype' => $itemtype ) : ( 'me.itemtype' => $itemtype ) This patch corrects by using "me.itemtype" Test plan : - Use syspref item-level_itypes = biblio record - Go to Tools > Export data : /cgi-bin/koha/tools/export.pl - Select an item type - Click on "Export biblio records" => Without patch you get an empty file and error 500 in logs => With patch you get a correct export file -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=17420 Fridolin SOMERS <fridolin.somers@biblibre.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #56117|0 |1 is obsolete| | --- Comment #2 from Fridolin SOMERS <fridolin.somers@biblibre.com> --- Created attachment 56118 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=56118&action=edit Bug 17420 - record export fails when itemtype on biblio In Tools, Export data, you can export with a filter on item type. When item type is on biblio record, you get the error : export.pl: DBIx::Class::ResultSet::next(): Unknown column 'biblioitems.itemtype' in 'where clause' at /home/koha/src/Koha/Objects.pm line 150 Looks like its because this code use to be a SQL Select and is now a DBIx call : C4::Context->preference('item-level_itypes') ? ( 'items.itype' => $itemtype ) : ( 'me.itemtype' => $itemtype ) This patch corrects by using "me.itemtype" Test plan : - Use syspref item-level_itypes = biblio record - Go to Tools > Export data : /cgi-bin/koha/tools/export.pl - Select an item type - Click on "Export biblio records" => Without patch you get an error 500 => With patch you get a correct export file -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=17420 Fridolin SOMERS <fridolin.somers@biblibre.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Assignee|gmcharlt@gmail.com |fridolin.somers@biblibre.co | |m -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=17420 --- Comment #3 from Fridolin SOMERS <fridolin.somers@biblibre.com> --- Confirmed by Kyle, Now with Koha::Object, writing a condition on the object itself must be called with "me.xxxx". -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=17420 Séverine Queune <severine.queune@bulac.fr> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |severine.queune@bulac.fr Status|Needs Signoff |Signed Off -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=17420 --- Comment #4 from Séverine Queune <severine.queune@bulac.fr> --- Patch tested with a sandbox, by Séverine <severine.queune@bulac.fr> -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=17420 Jonathan Druart <jonathan.druart@bugs.koha-community.org> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |jonathan.druart@bugs.koha-c | |ommunity.org Status|Signed Off |Failed QA --- Comment #5 from Jonathan Druart <jonathan.druart@bugs.koha-community.org> --- You should also propose the same change for the misc/export_records.pl script. -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=17420 Fridolin SOMERS <fridolin.somers@biblibre.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|Failed QA |Needs Signoff -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=17420 --- Comment #6 from Fridolin SOMERS <fridolin.somers@biblibre.com> --- Created attachment 57269 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=57269&action=edit Bug 17420 - record export fails when itemtype on biblio - followup Same as previous patch for misc/export_records.pl. Test plan : - Use syspref item-level_itypes = biblio record - Run misc/export_records.pl => Without patch you get an error : DBD::mysql::st execute failed: Unknown column 'biblioitems.itemtype' in 'where clause' ... => With patch you get a correct export file -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=17420 Fridolin SOMERS <fridolin.somers@biblibre.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Severity|minor |major -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=17420 --- Comment #7 from Fridolin SOMERS <fridolin.somers@biblibre.com> --- (In reply to Jonathan Druart from comment #5)
You should also propose the same change for the misc/export_records.pl script.
Indeed, I had not seen it -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=17420 Bernardo Gonzalez Kriegel <bgkriegel@gmail.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #56118|0 |1 is obsolete| | --- Comment #8 from Bernardo Gonzalez Kriegel <bgkriegel@gmail.com> --- Created attachment 57405 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=57405&action=edit [SIGNED-OFF] Bug 17420 - record export fails when itemtype on biblio In Tools, Export data, you can export with a filter on item type. When item type is on biblio record, you get the error : export.pl: DBIx::Class::ResultSet::next(): Unknown column 'biblioitems.itemtype' in 'where clause' at /home/koha/src/Koha/Objects.pm line 150 Looks like its because this code use to be a SQL Select and is now a DBIx call : C4::Context->preference('item-level_itypes') ? ( 'items.itype' => $itemtype ) : ( 'me.itemtype' => $itemtype ) This patch corrects by using "me.itemtype" Test plan : - Use syspref item-level_itypes = biblio record - Go to Tools > Export data : /cgi-bin/koha/tools/export.pl - Select an item type - Click on "Export biblio records" => Without patch you get an error 500 => With patch you get a correct export file Signed-off-by: Bernardo Gonzalez Kriegel <bgkriegel@gmail.com> Fix the issue, no errors. -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=17420 Bernardo Gonzalez Kriegel <bgkriegel@gmail.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #57269|0 |1 is obsolete| | --- Comment #9 from Bernardo Gonzalez Kriegel <bgkriegel@gmail.com> --- Created attachment 57406 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=57406&action=edit [SIGNED-OFF] Bug 17420 - record export fails when itemtype on biblio - followup Same as previous patch for misc/export_records.pl. Test plan : - Use syspref item-level_itypes = biblio record - Run misc/export_records.pl => Without patch you get an error : DBD::mysql::st execute failed: Unknown column 'biblioitems.itemtype' in 'where clause' ... => With patch you get a correct export file Signed-off-by: Bernardo Gonzalez Kriegel <bgkriegel@gmail.com> Export Ok, no errors. -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=17420 Bernardo Gonzalez Kriegel <bgkriegel@gmail.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|Needs Signoff |Signed Off CC| |bgkriegel@gmail.com -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=17420 --- Comment #10 from Marcel de Rooy <m.de.rooy@rijksmuseum.nl> --- Created attachment 57442 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=57442&action=edit Bug 17420 - record export fails when itemtype on biblio In Tools, Export data, you can export with a filter on item type. When item type is on biblio record, you get the error : export.pl: DBIx::Class::ResultSet::next(): Unknown column 'biblioitems.itemtype' in 'where clause' at /home/koha/src/Koha/Objects.pm line 150 Looks like its because this code use to be a SQL Select and is now a DBIx call : C4::Context->preference('item-level_itypes') ? ( 'items.itype' => $itemtype ) : ( 'me.itemtype' => $itemtype ) This patch corrects by using "me.itemtype" Test plan : - Use syspref item-level_itypes = biblio record - Go to Tools > Export data : /cgi-bin/koha/tools/export.pl - Select an item type - Click on "Export biblio records" => Without patch you get an error 500 => With patch you get a correct export file Signed-off-by: Bernardo Gonzalez Kriegel <bgkriegel@gmail.com> Fix the issue, no errors. Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl> -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=17420 --- Comment #11 from Marcel de Rooy <m.de.rooy@rijksmuseum.nl> --- Created attachment 57443 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=57443&action=edit Bug 17420 - record export fails when itemtype on biblio - followup Same as previous patch for misc/export_records.pl. Test plan : - Use syspref item-level_itypes = biblio record - Run misc/export_records.pl => Without patch you get an error : DBD::mysql::st execute failed: Unknown column 'biblioitems.itemtype' in 'where clause' ... => With patch you get a correct export file Signed-off-by: Bernardo Gonzalez Kriegel <bgkriegel@gmail.com> Export Ok, no errors. Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl> -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=17420 Marcel de Rooy <m.de.rooy@rijksmuseum.nl> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|Signed Off |Passed QA CC| |m.de.rooy@rijksmuseum.nl -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=17420 Marcel de Rooy <m.de.rooy@rijksmuseum.nl> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #57405|0 |1 is obsolete| | -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=17420 Marcel de Rooy <m.de.rooy@rijksmuseum.nl> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #57406|0 |1 is obsolete| | -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=17420 Marcel de Rooy <m.de.rooy@rijksmuseum.nl> changed: What |Removed |Added ---------------------------------------------------------------------------- QA Contact|testopia@bugs.koha-communit |m.de.rooy@rijksmuseum.nl |y.org | -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=17420 Kyle M Hall <kyle@bywatersolutions.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|Passed QA |Pushed to Master CC| |kyle@bywatersolutions.com --- Comment #12 from Kyle M Hall <kyle@bywatersolutions.com> --- Pushed to master for 16.11, thanks Frido! -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=17420 Julian Maurice <julian.maurice@biblibre.com> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |julian.maurice@biblibre.com --- Comment #13 from Julian Maurice <julian.maurice@biblibre.com> --- Pushed to 3.22.x, will be in 3.22.13 -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=17420 Mason James <mtj@kohaaloha.com> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |mtj@kohaaloha.com --- Comment #14 from Mason James <mtj@kohaaloha.com> --- Pushed to 16.05.x, for 16.05.06 release -- You are receiving this mail because: You are watching all bug changes.
participants (1)
-
bugzilla-daemon@bugs.koha-community.org