Defect #2744
closedList-type custom fields do not allow decimals or fractions as default values
0%
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
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.
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.
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.