Defect #12833

Input fields restricted on length should have maxlength parameter set

Added by Harald Glock almost 5 years ago. Updated almost 5 years ago.

Status:ClosedStart date:
Priority:NormalDue date:
Assignee:-% Done:

0%

Category:UI
Target version:2.2.2
Resolution:Fixed Affected version:

Description

When entering the subject of a ticket/issue or writing a comment in the timelog, you can enter as many characters in the input field as you want. But if you entered more then 255 characters, this will give an error later when sending it to the redmine instance ("... too long (maximum 255 characters)").

It would be better if the HTML input field already has the maxlength parameter set to 255 then. Having this parameter set, you cannot enter more than maxlength characters into the input field. Thus, the user would immediately recognize that he cannot enter more characters instead of getting an error later when he already typed the too long input.

I just checked for the 2 mentioned input fields, there are probably a lot more of them.

setMaximumLenght.diff Magnifier - Fixes maximum lenght for issues subject and timelog comment (1.33 KB) Daniel Felix, 2013-01-13 19:47

Associated revisions

Revision 11233
Added by Jean-Philippe Lang almost 5 years ago

Input fields restricted on length should have maxlength parameter set (#12833).

Revision 11234
Added by Jean-Philippe Lang almost 5 years ago

Backported r11233 from trunk (#12833).

History

#1 Updated by Daniel Felix almost 5 years ago

Hi,

I've attached a small patch which corrects this for timelog comments and issue subjects.

Best regards,
Daniel

#2 Updated by Harald Glock almost 5 years ago

Thanks Daniel.

Applied the patch with small change to redmine-2.1.4 (line no in app/views/timelog/_form.html.erb has changed since 2.1.4) and it works as expected.

Hope it will make it into redmine.

#3 Updated by Toshi MARUYAMA almost 5 years ago

  • Category set to UI

#4 Updated by Daniel Felix almost 5 years ago

  • Status changed from New to Resolved
  • Target version set to Candidate for next minor release
  • Resolution set to Fixed

#5 Updated by Daniel Felix almost 5 years ago

  • Target version changed from Candidate for next minor release to 2.2.2

#6 Updated by Jean-Philippe Lang almost 5 years ago

  • Status changed from Resolved to Closed

Committed.

Also available in: Atom PDF