in current master, I staged a file of records, and tried to use it to create orders in a basket. I got the following error : http://pro.koha-msaby/cgi-bin/koha/acqui/addorderiso2709.pl?import_batch_id=18&basketno=21&booksellerid=1 'Can't use string ("") as a HASH ref while "strict refs" in use at /home/msaby/kohamaster/src/C4/Items.pm line 2712.' Git blame says this line was changed the 27th of march, by commit 9f2189d0, created by bug 9902. line 2712 : $defaultvalue = $defaultvalues->{branchcode} || C4::Context->userenv->{branch}; M. Saby
line 129 of addorderiso2709.pl call PrepareItemrecordDisplay this way my $cell = PrepareItemrecordDisplay( '', '', '', 'ACQ' ); I suppose this is not correct. M. Saby
Created attachment 17668 [details] [review] Bug 10088: FIX adding an order from a staged file. Bug 9902 introduced an issue in the C4::Items::PrepareItemrecordDisplay routine. The existence of $defaulvalue hashref should be tested before getting to the branchcode key. Test plan: Before applying the patch, an error occurred when you try to create an order from a staged file. After applying the patch, the error does not appear anymore.
Created attachment 17681 [details] [review] [PATCH][SIGNED OFF] Bug 10088: FIX adding an order from a staged file. Your patch is working. I sign off. Mathieu
Created attachment 17750 [details] [review] Bug 10088: FIX adding an order from a staged file. Bug 9902 introduced an issue in the C4::Items::PrepareItemrecordDisplay routine. The existence of $defaulvalue hashref should be tested before getting to the branchcode key. Test plan: Before applying the patch, an error occurred when you try to create an order from a staged file. After applying the patch, the error does not appear anymore. Signed-off-by: Mathieu Saby <mathieu.saby@univ-rennes2.fr> Signed-off-by: Mason James <mtj@kohaaloha.com>
> Signed-off-by: Mathieu Saby <mathieu.saby@univ-rennes2.fr> > Signed-off-by: Mason James <mtj@kohaaloha.com> passing QA, patch works well!
This patch has been pushed to master and 3.12.x. I was not able to recreate this problem, but the logic is demonstrably correct, so I am pushing it anyway.
Bug 9902 is not in 3.10.x so this is not needed
Bug 9902 in now on 3.10.x, so we need this. Pushed to 3.10.x, will be in 3.10.10
Pushed to 3.8.x, will be in 3.8.17