https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=12146

--- Comment #11 from Martin Renvoize (ashimema) 
<[email protected]> ---
Created attachment 206837
  -->
https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=206837&action=edit
Bug 12146: Resize currency.isocode to CHAR(3)

ISO 4217 alpha currency codes are always exactly three letters, but
currency.isocode was a free-text varchar(5) with no format enforcement
on the admin Currencies form (just maxlength="5", matching the column).
That mismatch meant code relying on isocode being a valid ISO 4217
code (e.g. SIP2's fixed-width BH currency field) couldn't trust it.

Resize the column to CHAR(3), normalizing existing data first:
uppercase any value that already fits, and clear anything that
doesn't so the resize can't silently truncate bad data. Shrink the
admin form's ISO code field to match (maxlength="3").

Also fixes two Currencies.t test fixtures ('isoc1'/'isoc2') that no
longer fit the new column width.

Test plan:
1) prove t/db_dependent/Koha/Acquisition/Currencies.t
2) perl installer/data/mysql/updatedatabase.pl
3) Go to Administration > Currencies, edit a currency, confirm the
   ISO code field only accepts 3 characters

-- 
You are receiving this mail because:
You are watching all bug changes.
_______________________________________________
Koha-bugs mailing list -- [email protected]
To unsubscribe send an email to [email protected]
website : http://www.koha-community.org/
git : http://git.koha-community.org/
bugs : http://bugs.koha-community.org/

Reply via email to