Project

General

Profile

Actions

Defect #2744

closed

List-type custom fields do not allow decimals or fractions as default values

Added by Dave Abdemoulaie almost 16 years ago. Updated almost 16 years ago.

Status:
Closed
Priority:
Normal
Assignee:
-
Category:
Custom fields
Target version:
-
Start date:
2009-02-13
Due date:
% Done:

0%

Estimated time:
Resolution:
Affected version:

Description

I have defined a list custom field as follows:

1/2
1
2
3
5
8
13
21
34

When attempting to set the default value to '1/2' it doesn't work. I even tried using 0.5 in the list, and this doesn't work when used as a default either. If I edit the table directly, the application supports 1/2 as the default.

  • DB Version: mysql 5.0.70
  • Ruby Version: Ruby Enterprise ruby 1.8.6 (2008-12-15 patchlevel 286) [i686-linux]
  • Rails Version: 2.1.2
  • Redmine Revision: latest
  • Error Displayed: « Default value » is invalid
Actions #1

Updated by Jean-Philippe Lang almost 16 years ago

I'm not able to reproduce. It works in both cases (fraction or decimal).
Was it a new field or an existing field that you were trying to update? Can you post the content of the corresponding row (eg. select * from custom_fields where id = ?) please.

Actions #2

Updated by Dave Abdemoulaie almost 16 years ago

Jean-Philippe Lang wrote:

I'm not able to reproduce. It works in both cases (fraction or decimal).
Was it a new field or an existing field that you were trying to update? Can you post the content of the corresponding row (eg. select * from custom_fields where id = ?) please.

Ah, it was a modification of an existing field. It was previously a float field with a regex applied:

^(.5|1|2|3|5|8|13|20|30|40)$

Apparently switching to List preserved the regex.

Actions #3

Updated by Jean-Philippe Lang almost 16 years ago

  • Status changed from New to Closed

The "Type" field is disabled in r2475 when updating a custom field to prevent this kind of problem.

Actions

Also available in: Atom PDF