Project

General

Profile

Actions

Defect #16169

closed

Wrong validation when updating integer custom field with spaces

Added by Vincent Robert over 10 years ago. Updated about 10 years ago.

Status:
Closed
Priority:
Normal
Category:
Custom fields
Target version:
Start date:
Due date:
% Done:

0%

Estimated time:
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

Actions

Also available in: Atom PDF