Koha/tools
Fridolin Somers 37256b4d2d 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>

Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
2016-11-12 02:32:41 +00:00
..
csv-profiles
quotes Bug 17411: Remove 3 other occurrences of exit 1 2016-10-21 15:08:54 +00:00
ajax-inventory.pl
automatic_item_modification_by_age.pl
background-job-progress.pl
batch_delete_records.pl
batch_record_modification.pl
batch_records_ajax.pl
batchMod.pl
cleanborrowers.pl Bug 16907: Koha::Patrons - Move HandleDelBorrower to ->delete 2016-10-21 16:20:41 +00:00
copy-holidays.pl
csv-profiles.pl
exceptionHolidays.pl
export.pl Bug 17420 - record export fails when itemtype on biblio 2016-11-12 02:32:41 +00:00
holidays.pl
import_borrowers.pl
inventory.pl Bug 15801: Koha::BiblioFrameworks - Remove C4::Koha::getframeworks 2016-10-28 12:04:59 +00:00
koha-news.pl
letter.pl Bug 5260 - Add option to send an order by e-mail to the acquisition module 2016-10-28 11:52:25 +00:00
manage-marc-import.pl Bug 15801: Koha::BiblioFrameworks - Remove C4::Koha::getframeworks 2016-10-28 12:04:59 +00:00
marc_modification_templates.pl
modborrowers.pl Bug 16852: Remove GetBorrowerCategorycode 2016-11-02 10:56:39 +00:00
newHolidays.pl
overduerules.pl
picture-upload.pl Bug 17146: Raise Wrong CSRF token warnin for the 'Delete' action 2016-09-15 13:33:58 +00:00
quotes-upload.pl
quotes.pl
scheduler.pl
showdiffmarc.pl
stage-marc-import.pl
tools-home.pl
upload-cover-image.pl
upload-file.pl
upload.pl
viewlog.pl