[Bug 26946] New: Limit size of cash register's name on the UI
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=26946 Bug ID: 26946 Summary: Limit size of cash register's name on the UI Change sponsored?: --- Product: Koha Version: unspecified Hardware: All OS: All Status: ASSIGNED Severity: normal Priority: P5 - low Component: Staff Client Assignee: martin.renvoize@ptfs-europe.com Reporter: jonathan.druart@bugs.koha-community.org QA Contact: testopia@bugs.koha-community.org CC: gmcharlt@gmail.com Depends on: 23321 If you create a new cash register with a "long" (not that long actually) name, the submit form fails with: 2020/11/06 09:56:19] [WARN] DBD::mysql::st execute failed: Data too long for column 'name' at row 1 [for Statement "INSERT INTO `cash_registers` ( `branch`, `description`, `name`, `starting_float`) VALUES ( ?, ?, ?, ? )" with ParamValues: 0="CPL", 1="<script>alert("â¤");</script>", 2="<script>alert("â¤");</script>", 3="0.00"] at /usr/share/perl5/DBIx/Class/Storage/DBI.pm line 1836. Referenced Bugs: https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=23321 [Bug 23321] Add 'cash registers' to the accounts system -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=26946 --- Comment #1 from Martin Renvoize <martin.renvoize@ptfs-europe.com> --- Good catch, I'll take a look now -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=26946 --- Comment #2 from Martin Renvoize <martin.renvoize@ptfs-europe.com> --- Created attachment 113310 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=113310&action=edit Bug 26946: Set maxlength for cash register name The cash register names is limited to 24 characters at the database level and so that restriction should also be reflected in the UI. Test plan 1/ Add or Edit a cash register ( admin > accounts > cash registers ) 2/ Note that you can enter a cash register name longer than 24 characters, but upon save the value is truncated. 3/ Apply patch 4/ Note you can not longer enter a cash register name longer than 24 characters. 5/ Signoff -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=26946 Martin Renvoize <martin.renvoize@ptfs-europe.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|ASSIGNED |Needs Signoff -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=26946 Martin Renvoize <martin.renvoize@ptfs-europe.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Patch complexity|--- |Trivial patch -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=26946 ByWater Sandboxes <bws.sandboxes@gmail.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #113310|0 |1 is obsolete| | --- Comment #3 from ByWater Sandboxes <bws.sandboxes@gmail.com> --- Created attachment 113338 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=113338&action=edit Bug 26946: Set maxlength for cash register name The cash register names is limited to 24 characters at the database level and so that restriction should also be reflected in the UI. Test plan 1/ Add or Edit a cash register ( admin > accounts > cash registers ) 2/ Note that you can enter a cash register name longer than 24 characters, but upon save the value is truncated. 3/ Apply patch 4/ Note you can not longer enter a cash register name longer than 24 characters. 5/ Signoff Signed-off-by: Sally <sally.healey@cheshiresharedservices.gov.uk> -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=26946 Sally <sally.healey@cheshiresharedservices.gov.uk> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |sally.healey@cheshireshared | |services.gov.uk Status|Needs Signoff |Signed Off --- Comment #4 from Sally <sally.healey@cheshiresharedservices.gov.uk> --- Works perfectly, signed off. -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=26946 Victor Grousset/tuxayo <victor@tuxayo.net> changed: What |Removed |Added ---------------------------------------------------------------------------- QA Contact|testopia@bugs.koha-communit |victor@tuxayo.net |y.org | CC| |victor@tuxayo.net --- Comment #5 from Victor Grousset/tuxayo <victor@tuxayo.net> --- Is ther -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=26946 --- Comment #6 from Victor Grousset/tuxayo <victor@tuxayo.net> --- Is there a reason to limit the size of the description? The database type is a LONGTEXT (2147483647). And also, the initial float limit is actually 22 before the decimal (number (28,6)) -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=26946 --- Comment #7 from Martin Renvoize <martin.renvoize@ptfs-europe.com> --- (In reply to Victor Grousset/tuxayo from comment #6)
Is there a reason to limit the size of the description? The database type is a LONGTEXT (2147483647). And also, the initial float limit is actually 22 before the decimal (number (28,6))
We're only setting 'length' and not 'maxlength' for description.. it's purely a styleing thing to keep the two text boxes lined up, it doesn't actually limit the input in the description case. -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=26946 Victor Grousset/tuxayo <victor@tuxayo.net> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #113338|0 |1 is obsolete| | --- Comment #8 from Victor Grousset/tuxayo <victor@tuxayo.net> --- Created attachment 114269 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=114269&action=edit Bug 26946: Set maxlength for cash register name The cash register names is limited to 24 characters at the database level and so that restriction should also be reflected in the UI. Test plan 1/ Add or Edit a cash register ( admin > accounts > cash registers ) 2/ Note that you can enter a cash register name longer than 24 characters, but upon save the value is truncated. 3/ Apply patch 4/ Note you can not longer enter a cash register name longer than 24 characters. 5/ Signoff Signed-off-by: Sally <sally.healey@cheshiresharedservices.gov.uk> Signed-off-by: Victor Grousset/tuxayo <victor@tuxayo.net> -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=26946 Victor Grousset/tuxayo <victor@tuxayo.net> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|Signed Off |Passed QA --- Comment #9 from Victor Grousset/tuxayo <victor@tuxayo.net> --- (In reply to Martin Renvoize from comment #7)
We're only setting 'length' and not 'maxlength' for description..
Indeed! I forgot about that one, thanks. So, works as expected and no QA issue ^^ -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=26946 Jonathan Druart <jonathan.druart@bugs.koha-community.org> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|Passed QA |Pushed to master Version(s)| |21.05.00 released in| | -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=26946 --- Comment #10 from Jonathan Druart <jonathan.druart@bugs.koha-community.org> --- Pushed to master for 21.05, thanks to everybody involved! -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=26946 Fridolin Somers <fridolin.somers@biblibre.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|Pushed to master |Pushed to stable Version(s)|21.05.00 |21.05.00,20.11.01 released in| | CC| |fridolin.somers@biblibre.co | |m --- Comment #11 from Fridolin Somers <fridolin.somers@biblibre.com> --- Pushed to 20.11.x for 20.11.01 -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=26946 Andrew Fuerste-Henry <andrew@bywatersolutions.com> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |andrew@bywatersolutions.com Version(s)|21.05.00,20.11.01 |21.05.00,20.11.01,20.05.07 released in| | Status|Pushed to stable |Pushed to oldstable --- Comment #12 from Andrew Fuerste-Henry <andrew@bywatersolutions.com> --- Pushed to 20.05.x for 20.05.07 -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=26946 --- Comment #13 from Victor Grousset/tuxayo <victor@tuxayo.net> --- Not backported to oldoldstable (19.11.x). Feel free to ask if it's needed. -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=26946 Victor Grousset/tuxayo <victor@tuxayo.net> changed: What |Removed |Added ---------------------------------------------------------------------------- Resolution|--- |FIXED Status|Pushed to oldstable |RESOLVED -- You are receiving this mail because: You are watching all bug changes.
participants (1)
-
bugzilla-daemon@bugs.koha-community.org