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 MT2116: Addons to the CSV export 2010-02-17 07:51:33 -05:00
quotes Bug 17411: Remove 3 other occurrences of exit 1 2016-10-21 15:08:54 +00:00
ajax-inventory.pl Bug 11944: use CGI( -utf8 ) everywhere 2015-01-13 13:07:21 -03:00
automatic_item_modification_by_age.pl Bug 16889: Remove C4::Items::biblioitems_columns and use Koha::Biblioitems->columns instead 2016-07-15 18:12:13 +00:00
background-job-progress.pl Bug 14589: Adjust authorities_merge_ajax and replace some indirect syntax 2015-11-02 12:49:13 -03:00
batch_delete_records.pl bug 14504: (QA followup) fixing DelItemCheck arguments 2016-08-26 12:07:26 +00:00
batch_record_modification.pl Bug 16154: CGI->multi_param - Declare a list 2016-04-26 23:16:42 +00:00
batch_records_ajax.pl Bug 11944: use CGI( -utf8 ) everywhere 2015-01-13 13:07:21 -03:00
batchMod.pl Bug 15758: Koha::Libraries - Ultimate duel for C4::Branch 2016-09-08 14:36:04 +00:00
cleanborrowers.pl Bug 16907: Koha::Patrons - Move HandleDelBorrower to ->delete 2016-10-21 16:20:41 +00:00
copy-holidays.pl Bug 9978: Replace license header with the correct license (GPLv3+) 2015-04-20 09:59:38 -03:00
csv-profiles.pl Bug 15451: Better error handling 2016-07-22 17:18:37 +00:00
exceptionHolidays.pl Bug 16154: Fix some other occurrences 2016-04-26 23:16:44 +00:00
export.pl Bug 17420 - record export fails when itemtype on biblio 2016-11-12 02:32:41 +00:00
holidays.pl Bug 15758: Koha::Libraries - Remove GetBranches 2016-09-08 14:36:03 +00:00
import_borrowers.pl Bug 16911: Koha::Patron::Categories - Move GetExpiryDate to ->get_expiry_date 2016-09-09 09:45:31 +00:00
inventory.pl Bug 15801: Koha::BiblioFrameworks - Remove C4::Koha::getframeworks 2016-10-28 12:04:59 +00:00
koha-news.pl Bug 15758: Koha::Libraries - Remove GetBranches 2016-09-08 14:36:03 +00:00
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 Bug 16148 - Revised layout and behavior of marc modification template management 2016-06-17 16:11:43 +00:00
modborrowers.pl Bug 16852: Remove GetBorrowerCategorycode 2016-11-02 10:56:39 +00:00
newHolidays.pl Bug 15758: Koha::Libraries - Remove GetBranches 2016-09-08 14:36:03 +00:00
overduerules.pl Bug 15758: Koha::Libraries - Move mybranch to C4::Context 2016-09-08 14:36:03 +00:00
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 Bug 9978: Replace license header with the correct license (GPLv3+) 2015-04-20 09:59:38 -03:00
quotes.pl Bug 9978: Replace license header with the correct license (GPLv3+) 2015-04-20 09:59:38 -03:00
scheduler.pl Bug 16154: Fix some other occurrences 2016-04-26 23:16:44 +00:00
showdiffmarc.pl Bug 15005: Replace $ENV{SCRIPT_NAME} with the hardcoded script paths 2015-10-19 09:36:43 -03:00
stage-marc-import.pl Bug 16586: Koha Plugins: Limit results of GetPlugins by metadata 2016-09-09 12:13:39 +00:00
tools-home.pl Bug 15839: Koha::Reviews - Remove getnumberofreviews 2016-09-09 10:29:58 +00:00
upload-cover-image.pl Bug 14321: Integrate Upload.pm into Koha 2015-09-25 12:02:52 -03:00
upload-file.pl Bug 14686: [QA Follow-up] Move allows_add_by to Upload.pm 2016-04-27 16:14:18 +00:00
upload.pl Bug 14686: Add Upload to Tools menu 2016-04-27 16:14:17 +00:00
viewlog.pl Bug 15758: Koha::Libraries - Ultimate duel for C4::Branch 2016-09-08 14:36:04 +00:00