Defect #16169

Wrong validation when updating integer custom field with spaces

Added by Vincent Robert over 4 years ago. Updated over 4 years ago.

Status:ClosedStart date:
Priority:NormalDue date:
Assignee:Jean-Philippe Lang% Done:

0%

Category:Custom fields
Target version:2.4.4
Resolution:Fixed Affected version:

Description

Our project custom field is an integer. When we update its value, we get an error message if we enter letters (that's fine) but we can enter and save spaces.
A string composed of spaces should not be authorized.

When the custom_value table contains wrong spaces values, it breaks some requests on custom fields because the current requests cast the values to decimals (like in the sql_for_field method in the query class).

Environment:
Redmine version 2.5.0.devel.12927
Ruby version 1.9.3-p484 (2013-11-22) [x86_64-darwin13.0.0]
Rails version 3.2.17
Database adapter PostgreSQL 9.3

Associated revisions

Revision 12938
Added by Jean-Philippe Lang over 4 years ago

Fixed that non-empty blank strings as custom field values are not properly validated (#16169).

History

#1 Updated by Jean-Philippe Lang over 4 years ago

  • Status changed from New to Resolved
  • Assignee set to Jean-Philippe Lang
  • Target version set to 2.4.4
  • Resolution set to Fixed

Fixed in r12938, thanks for pointing this out.

#2 Updated by Jean-Philippe Lang over 4 years ago

  • Status changed from Resolved to Closed

Also available in: Atom PDF