[Koha-bugs] [Bug 17420] record export fails when itemtype on biblio

bugzilla-daemon at bugs.koha-community.org bugzilla-daemon at bugs.koha-community.org
Wed Nov 9 23:15:08 CET 2016


https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=17420

Bernardo Gonzalez Kriegel <bgkriegel at gmail.com> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
  Attachment #56118|0                           |1
        is obsolete|                            |

--- Comment #8 from Bernardo Gonzalez Kriegel <bgkriegel at 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 at gmail.com>
Fix the issue, no errors.

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


More information about the Koha-bugs mailing list