[Bug 27991] New: Message field for OPAC problem reporting should have a maxlength set
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=27991 Bug ID: 27991 Summary: Message field for OPAC problem reporting should have a maxlength set Change sponsored?: --- Product: Koha Version: 20.05 Hardware: All OS: All Status: NEW Severity: enhancement Priority: P5 - low Component: OPAC Assignee: oleonard@myacpl.org Reporter: jrobb@sekls.org QA Contact: testopia@bugs.koha-community.org Currently when a user is submitting a problem report via the OPAC at opac-reportproblem.pl, they can write as much as they want in the "message" field. When the report is submitted, only the first 255 characters are kept due to the field size of problem_reports.content which can result in a cut off message. It would be good to set a maxlength for the field and also make users aware of the limit. I'm using jQuery to set the maxlength attribute and add a character countdown so users know exactly how much they can type. //Problem Reporting $(document).ready(function() { //Enforce character limit on message field $('#opac-reportproblem #message').attr('maxlength', '255'); //Add character countdown $('#opac-reportproblem #message').after('<span id="charcounter">255</span> characters remaining'); //Update character countdown as data is entered var maxLength = 255; $('#opac-reportproblem #message').keyup(function() { var length = $(this).val().length; var length = maxLength-length; $('#opac-reportproblem #charcounter').text(length); }); }); -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=27991 Heather <heather_hernandez@nps.gov> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |heather_hernandez@nps.gov -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=27991 Owen Leonard <oleonard@myacpl.org> changed: What |Removed |Added ---------------------------------------------------------------------------- Version|20.05 |master Status|NEW |ASSIGNED -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=27991 Owen Leonard <oleonard@myacpl.org> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|ASSIGNED |Needs Signoff 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=27991 --- Comment #1 from Owen Leonard <oleonard@myacpl.org> --- Created attachment 118469 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=118469&action=edit Bug 27991: Message field for OPAC problem reporting should have a maxlength set This patch adds a maxlength attribute to the form field for entering checkout notes in the OPAC, matching the character limit of the database column. A note is added to show the 255 character limit. To test, apply the patch and enable the AllowCheckoutNotes system preference. - Log in to the OPAC as a user who has checkouts. - On the "Your summary" page, the "Report a problem" fields should have a hint below them, "255 characters maximum." - Try entering text in one of the fields. You should not be able to enter more than 255 characters: Lorem ipsum dolor sit amet, consectetur adipiscing elit. Suspendisse nunc mi, fringilla in mauris quis, hendrerit feugiat mi. Sed ultrices mollis nulla sit amet faucibus. Sed volutpat augue risus, eu rutrum eros commodo eu. Proin rhoncus nisi vitae magna_ - Test that your submission is saved correctly. -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=27991 Amit Gupta <amitddng135@gmail.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #118469|0 |1 is obsolete| | CC| |amitddng135@gmail.com --- Comment #2 from Amit Gupta <amitddng135@gmail.com> --- Created attachment 118492 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=118492&action=edit Bug 27991: Message field for OPAC problem reporting should have a maxlength set This patch adds a maxlength attribute to the form field for entering checkout notes in the OPAC, matching the character limit of the database column. A note is added to show the 255 character limit. To test, apply the patch and enable the AllowCheckoutNotes system preference. - Log in to the OPAC as a user who has checkouts. - On the "Your summary" page, the "Report a problem" fields should have a hint below them, "255 characters maximum." - Try entering text in one of the fields. You should not be able to enter more than 255 characters: Lorem ipsum dolor sit amet, consectetur adipiscing elit. Suspendisse nunc mi, fringilla in mauris quis, hendrerit feugiat mi. Sed ultrices mollis nulla sit amet faucibus. Sed volutpat augue risus, eu rutrum eros commodo eu. Proin rhoncus nisi vitae magna_ - Test that your submission is saved correctly. Works ok -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=27991 Amit Gupta <amitddng135@gmail.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|Needs Signoff |Signed Off -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=27991 Katrin Fischer <katrin.fischer@bsz-bw.de> changed: What |Removed |Added ---------------------------------------------------------------------------- Summary|Message field for OPAC |Message field for checkout |problem reporting should |notes should have a |have a maxlength set |maxlength set --- Comment #3 from Katrin Fischer <katrin.fischer@bsz-bw.de> --- The bug description I think meant something different to what was actually fixed here: OPAC problem reports, which would have made it a duplicate to bug 27726. But now we have fixed checkout notes here. Fixing the bug description :) -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=27991 Katrin Fischer <katrin.fischer@bsz-bw.de> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|Signed Off |Passed QA -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=27991 --- Comment #4 from Katrin Fischer <katrin.fischer@bsz-bw.de> --- Created attachment 118914 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=118914&action=edit Bug 27991: Message field for OPAC problem reporting should have a maxlength set This patch adds a maxlength attribute to the form field for entering checkout notes in the OPAC, matching the character limit of the database column. A note is added to show the 255 character limit. To test, apply the patch and enable the AllowCheckoutNotes system preference. - Log in to the OPAC as a user who has checkouts. - On the "Your summary" page, the "Report a problem" fields should have a hint below them, "255 characters maximum." - Try entering text in one of the fields. You should not be able to enter more than 255 characters: Lorem ipsum dolor sit amet, consectetur adipiscing elit. Suspendisse nunc mi, fringilla in mauris quis, hendrerit feugiat mi. Sed ultrices mollis nulla sit amet faucibus. Sed volutpat augue risus, eu rutrum eros commodo eu. Proin rhoncus nisi vitae magna_ - Test that your submission is saved correctly. Signed-off-by: Amit Gupta <amit.gupta@informaticsglobal.com> Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de> -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=27991 Jonathan Druart <jonathan.druart@bugs.koha-community.org> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |jonathan.druart@bugs.koha-c | |ommunity.org Attachment #118492|0 |1 is obsolete| | -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=27991 Jonathan Druart <jonathan.druart@bugs.koha-community.org> changed: What |Removed |Added ---------------------------------------------------------------------------- Version(s)| |21.05.00 released in| | Status|Passed QA |Pushed to master -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=27991 --- Comment #5 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=27991 Fridolin Somers <fridolin.somers@biblibre.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Version(s)|21.05.00 |21.05.00,20.11.05 released in| | CC| |fridolin.somers@biblibre.co | |m Status|Pushed to master |Pushed to stable --- Comment #6 from Fridolin Somers <fridolin.somers@biblibre.com> --- Small usefull enhancement, I choose to backport. Pushed to 20.11.x for 20.11.05 -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=27991 Andrew Fuerste-Henry <andrew@bywatersolutions.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Version(s)|21.05.00,20.11.05 |21.05.00,20.11.05,20.05.11 released in| | CC| |andrew@bywatersolutions.com Status|Pushed to stable |Pushed to oldstable --- Comment #7 from Andrew Fuerste-Henry <andrew@bywatersolutions.com> --- Pushed to 20.05.x for 20.05.11 -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=27991 Victor Grousset/tuxayo <victor@tuxayo.net> changed: What |Removed |Added ---------------------------------------------------------------------------- Resolution|--- |FIXED Status|Pushed to oldstable |RESOLVED CC| |victor@tuxayo.net --- Comment #8 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.
participants (1)
-
bugzilla-daemon@bugs.koha-community.org