Koha-clms/tools
Fridolin Somers 4c943184db 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: Julian Maurice <julian.maurice@biblibre.com>
2016-11-30 13:20:17 +01: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-24 12:50:33 +02:00
ajax-inventory.pl Bug 11944: use CGI( -utf8 ) everywhere 2015-01-13 13:07:21 -03:00
background-job-progress.pl Bug 14589: Adjust authorities_merge_ajax and replace some indirect syntax 2015-11-02 12:49:13 -03:00
batchMod.pl Bug 11490: Split MaxItemsForBatch into 2 prefs to clarify things 2016-08-17 14:58:22 +02:00
batch_delete_records.pl Bug 16154: CGI->multi_param - Declare a list 2016-05-16 14:38:51 +02:00
batch_record_modification.pl Bug 16154: CGI->multi_param - Declare a list 2016-05-16 14:38:51 +02:00
batch_records_ajax.pl Bug 11944: use CGI( -utf8 ) everywhere 2015-01-13 13:07:21 -03:00
cleanborrowers.pl Bug 14544: Get rid of GetSomeShelfNames 2015-11-05 09:58:02 -03: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 9978: Replace license header with the correct license (GPLv3+) 2015-04-20 09:59:38 -03:00
exceptionHolidays.pl Bug 16154: Fix some other occurrences 2016-05-16 14:43:23 +02:00
export.pl Bug 17420 - record export fails when itemtype on biblio 2016-11-30 13:20:17 +01:00
holidays.pl Bug 16154: Fix some other occurrences 2016-05-16 14:43:23 +02:00
import_borrowers.pl Bug 16426: follow-up of bug 15840 - correctly manage userid while inserting patrons 2016-05-09 10:35:49 +02:00
inventory.pl Bug 16154: Fix some other occurrences 2016-05-16 14:43:23 +02:00
koha-news.pl Bug 16550: Clean the tests 2016-05-25 11:27:25 +02:00
letter.pl Bug 16154: CGI->multi_param - Declare a list 2016-05-16 14:38:51 +02:00
manage-marc-import.pl Bug 15005: Replace $ENV{SCRIPT_NAME} with the hardcoded script paths 2015-10-19 09:36:43 -03:00
marc_modification_templates.pl Bug 16259: Replace CGI->param with CGI->multi_param in list context - part 2 2016-05-17 07:44:16 +02:00
modborrowers.pl Bug 16154: CGI->multi_param - Declare a list 2016-05-16 14:38:51 +02:00
newHolidays.pl Bug 14954: Remove C4::Dates from holiday related files in folder tools 2015-11-17 23:44:31 -03:00
overduerules.pl Bug 16154: CGI->multi_param - Declare a list 2016-05-16 14:38:51 +02:00
picture-upload.pl Bug 16886: Make the 'Upload patron images' tool plack safe 2016-09-16 08:55:44 +02: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-05-16 14:43:23 +02: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 15005: Replace $ENV{SCRIPT_NAME} with the hardcoded script paths 2015-10-19 09:36:43 -03:00
tools-home.pl Bug 9978: (followup) Replace license header with the correct license (GPLv3+) 2015-04-20 09:59:43 -03:00
upload-cover-image.pl Bug 14321: Integrate Upload.pm into Koha 2015-09-25 12:02:52 -03:00
upload-file.pl Bug 14321: [QA Follow-up] Changes for Upload.pm and upload-file.pl 2015-09-25 12:02:52 -03:00
upload.pl Bug 14321: Integrate Upload.pm into Koha 2015-09-25 12:02:52 -03:00
viewlog.pl Bug 16154: CGI->multi_param - Declare a list 2016-05-16 14:38:51 +02:00