Bug 18312 - Export is broken unless a file is supplied
Summary: Export is broken unless a file is supplied
Status: CLOSED FIXED
Alias: None
Product: Koha
Classification: Unclassified
Component: Tools (show other bugs)
Version: master
Hardware: All All
: P5 - low critical (vote)
Assignee: Jonathan Druart
QA Contact: Marcel de Rooy
URL:
Keywords:
: 18301 18311 (view as bug list)
Depends on: 15451 18087
Blocks:
  Show dependency treegraph
 
Reported: 2017-03-21 14:24 UTC by Jonathan Druart
Modified: 2019-06-27 09:24 UTC (History)
8 users (show)

See Also:
Change sponsored?: ---
Patch complexity: Small patch
Documentation contact:
Documentation submission:
Text to go in the release notes:
Version(s) released in:


Attachments
Bug 18312: Fix export unless a file is supplied (1.60 KB, patch)
2017-03-21 14:26 UTC, Jonathan Druart
Details | Diff | Splinter Review
Bug 18312: Fix export unless a file is supplied (1.67 KB, patch)
2017-03-22 09:36 UTC, Jesse Maseto
Details | Diff | Splinter Review
Bug 18312: Fix export unless a file is supplied (1.76 KB, patch)
2017-03-24 12:48 UTC, Marcel de Rooy
Details | Diff | Splinter Review

Note You need to log in before you can comment on or make changes to this bug.
Description Jonathan Druart 2017-03-21 14:24:13 UTC
Bug 18087 breaks export unless a file is supplied
Comment 1 Jonathan Druart 2017-03-21 14:26:52 UTC
Created attachment 61391 [details] [review]
Bug 18312: Fix export unless a file is supplied

Bug 18087 breaks export unless a file is supplied.

Can't use an undefined value as a HASH reference at
/home/vagrant/kohaclone/tools/export.pl line 75.

Test plan:
Export records using a file of id that is not a valid file (not txt or
csv)
Export records using a valid file
Export records without supplying a file

=> The export should work or fail as expected.
Comment 2 Nick Clemens 2017-03-21 14:27:53 UTC
*** Bug 18311 has been marked as a duplicate of this bug. ***
Comment 3 Jesse Maseto 2017-03-22 09:36:13 UTC
Created attachment 61434 [details] [review]
Bug 18312: Fix export unless a file is supplied

Bug 18087 breaks export unless a file is supplied.

Can't use an undefined value as a HASH reference at
/home/vagrant/kohaclone/tools/export.pl line 75.

Test plan:
Export records using a file of id that is not a valid file (not txt or
csv)
Export records using a valid file
Export records without supplying a file

=> The export should work or fail as expected.

Signed-off-by: Jesse Maseto <jesse@bywatersolutions.com>
Comment 4 Tomás Cohen Arazi 2017-03-22 18:07:18 UTC
I get an empty file no matter what I do. Tried with a 'biblios' file with valid biblionumbers, tried renaming to 'biblios.txt' and even tried without a file. The result is always an empty .mrc file.
Comment 5 Jonathan Druart 2017-03-22 18:28:28 UTC
(In reply to Tomás Cohen Arazi from comment #4)
> I get an empty file no matter what I do. Tried with a 'biblios' file with
> valid biblionumbers, tried renaming to 'biblios.txt' and even tried without
> a file. The result is always an empty .mrc file.

Works ok for me, please give it another try.
Comment 6 Jonathan Druart 2017-03-23 20:05:22 UTC
It impacts stable release, upping severity. Please QA ASAP
Comment 7 Marcel de Rooy 2017-03-24 12:43:47 UTC
Last one :)
Comment 8 Marcel de Rooy 2017-03-24 12:46:37 UTC
(In reply to Tomás Cohen Arazi from comment #4)
> I get an empty file no matter what I do. Tried with a 'biblios' file with
> valid biblionumbers, tried renaming to 'biblios.txt' and even tried without
> a file. The result is always an empty .mrc file.

Problem reproduced.
Comment 9 Marcel de Rooy 2017-03-24 12:48:31 UTC
Created attachment 61609 [details] [review]
Bug 18312: Fix export unless a file is supplied

Bug 18087 breaks export unless a file is supplied.

Can't use an undefined value as a HASH reference at
/home/vagrant/kohaclone/tools/export.pl line 75.

Test plan:
Export records using a file of id that is not a valid file (not txt or
csv)
Export records using a valid file
Export records without supplying a file

=> The export should work or fail as expected.

Signed-off-by: Jesse Maseto <jesse@bywatersolutions.com>

Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Comment 10 Jonathan Druart 2017-03-24 14:40:34 UTC
(In reply to Marcel de Rooy from comment #8)
> (In reply to Tomás Cohen Arazi from comment #4)
> > I get an empty file no matter what I do. Tried with a 'biblios' file with
> > valid biblionumbers, tried renaming to 'biblios.txt' and even tried without
> > a file. The result is always an empty .mrc file.
> 
> Problem reproduced.

I do not understand, Tomas is saying that the patch is buggy, you confirmed, but PQA?
Comment 11 Marcel de Rooy 2017-03-24 16:31:54 UTC
(In reply to Jonathan Druart from comment #10)
> (In reply to Marcel de Rooy from comment #8)
> > (In reply to Tomás Cohen Arazi from comment #4)
> > > I get an empty file no matter what I do. Tried with a 'biblios' file with
> > > valid biblionumbers, tried renaming to 'biblios.txt' and even tried without
> > > a file. The result is always an empty .mrc file.
> > 
> > Problem reproduced.
> 
> I do not understand, Tomas is saying that the patch is buggy, you confirmed,
> but PQA?

No, I confirm that the problem can be reproduced. And the patch resolves it.
Comment 12 Marcel de Rooy 2017-03-24 16:35:01 UTC
(In reply to Marcel de Rooy from comment #11)
> (In reply to Jonathan Druart from comment #10)
> > (In reply to Marcel de Rooy from comment #8)
> > > (In reply to Tomás Cohen Arazi from comment #4)
> > > > I get an empty file no matter what I do. Tried with a 'biblios' file with
> > > > valid biblionumbers, tried renaming to 'biblios.txt' and even tried without
> > > > a file. The result is always an empty .mrc file.
> > > 
> > > Problem reproduced.
> > 
> > I do not understand, Tomas is saying that the patch is buggy, you confirmed,
> > but PQA?
> 
> No, I confirm that the problem can be reproduced. And the patch resolves it.

Problem reproduced == Internal server error.
Comment 13 Kyle M Hall 2017-03-29 13:11:06 UTC
Pushed to master for 17.05, thanks Jonathan!
Comment 14 Jonathan Druart 2017-03-29 14:35:47 UTC
*** Bug 18301 has been marked as a duplicate of this bug. ***
Comment 15 Katrin Fischer 2017-04-02 15:59:36 UTC
This patch has been pushed to 16.11.x and will be in 16.11.07.
Comment 16 Mason James 2017-04-23 23:06:26 UTC
Blocked by Enhancement, skipping for 16.05.x
Comment 17 Ahmad Najeh 2018-01-30 11:06:18 UTC
Hi,

We have koha version "'when I tried to export record per item type I got this message 

Software error:
DBIx::Class::Storage::DBI::_dbh_execute(): Unknown column 'biblioitems.itemtype' in 'where clause' at /usr/share/koha/lib/Koha/Objects.pm line 150
For help, please send mail to the webmaster ([no address given]), giving this error message and the time and date of the error.

Anybody can help?Please.
Thanks
Ahmad
Comment 18 Jonathan Druart 2018-01-30 19:44:46 UTC
(In reply to Ahmad Najeh from comment #17)
> Software error:
> DBIx::Class::Storage::DBI::_dbh_execute(): Unknown column
> 'biblioitems.itemtype' in 'where clause' at
> /usr/share/koha/lib/Koha/Objects.pm line 150
> For help, please send mail to the webmaster ([no address given]), giving
> this error message and the time and date of the error.

Please open a new bug report with more information.