[Koha-bugs] [Bug 4162] Inventory Tool Fails Silently

bugzilla-daemon at bugs.koha-community.org bugzilla-daemon at bugs.koha-community.org
Sun Aug 17 00:26:37 CEST 2014


http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=4162

Chris Cormack <chris at bigballofwax.co.nz> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
  Attachment #30841|0                           |1
        is obsolete|                            |

--- Comment #9 from Chris Cormack <chris at bigballofwax.co.nz> ---
Created attachment 30880
  -->
http://bugs.koha-community.org/bugzilla3/attachment.cgi?id=30880&action=edit
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 at 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

-- 
You are receiving this mail because:
You are the QA Contact for the bug.
You are watching all bug changes.


More information about the Koha-bugs mailing list