---- Reported by oleonard@myacpl.org 2010-05-05 12:51:35 ---- I tried uploading a file of known good barcodes to the batch item modification tool and it reported that the barcodes were not found. Testing shows that the problem was the Windows line endings of the file I was uploading. Re-saving the same file with Unix line endings resulted in a successful read. Interestingly, the item number file upload is not sensitive to the difference in line endings. Either works. --- Bug imported by chris@bigballofwax.co.nz 2010-05-21 01:27 UTC --- This bug was previously known as _bug_ 4451 at http://bugs.koha.org/cgi-bin/bugzilla3/show_bug.cgi?id=4451 Actual time not defined. Setting to 0.0 Setting qa contact to the default for this product. This bug either had no qa contact or an invalid one.
Some info on IRC from the discussion of Bug 4973: pianohack > magnus: All chomp does is remove the line ending on the platform you're running on pianohack > linux server, windows client? magnus > yup magnus > adding $command_line =~ s/\r//g; solves it gmcharlt > s/\r$//g; would be slightly more precise pianohack > magnus: You might consider just replacing chomp entirely with s/[\r\n]*$//g Guessing this is the cause of this bug as well I looked for chomp in batchMod.pl: 174 chomp $content; And changed it based on the pianohack's suggestion: 174 $content = s/[\r\n]*$//g; This seems to fix the problem.
Created attachment 2337 [details] [review] Proposed fix
Created attachment 2345 [details] [review] Proposed fix, corrected Typo corrected
Pushed, please test
This bug is mentioned in: Fix for Bug 4451 Batch item tool can't process file with Windows line endings http://lists.koha-community.org/pipermail/koha-patches/2010-November/012978.html bug 4451 followup - don't need /g for this replace http://lists.koha-community.org/pipermail/koha-patches/2010-November/012979.html