Koha/koha-tmpl/intranet-tmpl/prog/en/modules
Mark Tompsett cd8ca4717c Bug 4162 The inventory tool lacks validation for barcodes
The inventory tool had no form of validating on what was assumed
to be a valid barcode number.

To solve this, an extra loop to read before processing was added.
This allows to validate length and content. By using a check
of \p{Print}, this includes Unicode characters such as umlauts,
but excludes unusual control characters.

The template was modified to accomodate validation messages
related to the length and content errors. Additionally, it says
how many "barcodes" were read. Barcodes are supposed to be on
separate lines.

TEST PLAN
---------
1) Attempt to select a file which does not contain barcodes and
   is not a text file.
   -- a horrible lack of validation and spamminess ensues.
2) Apply patch
3) Create three files.
   a) One containing valid barcodes on each line
      -- this file should trigger no errors. Attempt a valid
         barcode with an umlaut.
   b) A copy of the first with an extra line of >20 characters
      (e.g. The Quick Red Fox Jumped Over The Brown Fence^A^B^C)
      -- this file should trigger the singular error message case.
         ^A^B^C are actually CTRL-A,CTRL-B,CTRL-C, and it is left
         as an exercise to the reader to add them to the line.
   c) A copy of the second with the last line duplicated
      -- this file should trigger the plural error message case.
4) Attempt each of the three files.
5) Run koha-qa tools.

Signed-off-by: Chris Cormack <chris@bigballofwax.co.nz>

I have a feeling that the column size could be better fetched from
Koha::Database. But it is an improvement in functionality signing off

Signed-off-by: Katrin Fischer <Katrin.Fischer.83@web.de>
Works as described, no problems found.
Passes tests and QA script.

Another thing for another day:
Empty lines are counted for the potential barcodes.

Signed-off-by: Tomas Cohen Arazi <tomascohen@gmail.com>
Works as expected, tried with arab strings, umlauts and no regressions found.
2014-08-20 17:55:11 -03:00
..
acqui Bug 11744: A receipt should not be cancelled if holds exist 2014-07-14 11:17:42 -03:00
admin Bug 11504: Untranslatable "Item Type" or "Collection Code" in branch transfer limits 2014-08-15 15:30:18 -03:00
authorities Bug 12708 - Unexpected behaviour in IE 9 and lower when using openWindow 2014-08-19 09:31:25 -03:00
basket Bug 11357 - biblioitems.size value not correctly displayed in list emails sent from OPAC and intranet 2014-07-01 15:29:29 +12:00
batch
catalogue Bug 12675: Remove CGI::scrolling_list from labeledMARCdetail.pl 2014-08-03 16:53:00 -03:00
cataloguing Bug 1561 - z39.50 results do not show search terms 2014-08-20 12:28:58 -03:00
circ Bug 12666 - Fix poor HTML from circ/offline.tt 2014-08-15 14:59:17 -03:00
course_reserves Bug 12635 - Course reserves item list should use "Checked out" instead of "On Loan" 2014-08-07 11:03:56 -03:00
errors
help Bug 12749 - Better translatability for list module 2014-08-14 20:05:26 -03:00
installer Bug 12658: Wording of link text and translatability inside JavaScript 2014-08-15 15:36:11 -03:00
labels Bug 12589 - Manage label batch view should show item type description instead of code 2014-08-19 12:44:55 -03:00
members Bug 12693 - colspan calculation done by members/statistics.pl should be moved to template 2014-08-11 15:47:14 -03:00
offline_circ
patron_lists ug 11857 - Number of patrons on a patron list not accurate 2014-07-02 15:44:14 -03:00
patroncards Bug 5502 - Patron card category search field should be menu 2014-08-10 09:30:47 -03:00
plugins
reports Bug 12432 [QA Followup] - Make "All" tab work when switching back to it 2014-08-19 09:54:33 -03:00
reserve Bug 4231 - Placing holds from cart fails silently 2014-08-15 15:33:01 -03:00
reviews
rotating_collections
serials Bug 12673: (followup) fix Supplemental issue too 2014-08-14 20:19:06 -03:00
services Bug 12673: Remove CGI::scrolling_list from C4::Items.pm 2014-08-03 17:21:08 -03:00
sms
suggestion
tags
test
tools Bug 4162 The inventory tool lacks validation for barcodes 2014-08-20 17:55:11 -03:00
virtualshelves Bug 12749 - Better translatability for list module 2014-08-14 20:05:26 -03:00
z3950
about.tt Bug 7143 Updating the about page 2014-08-19 09:38:32 -03:00
auth.tt
intranet-main.tt