Defect #4449
closedSpent Time Default Value of 0.0
0%
Description
I just switched from 0.8-stable branch to trunk hoping to get rid of the default value of "0.0" for the "Spent Time" field in Issues.
Could we please remove the default value so that users who do not want to enter "Spent Time" do not have to tab through that form element and delete the contents?
Related to #1147.
Related issues
Updated by Jean-Philippe Lang almost 15 years ago
I can't reproduce with latest trunk (r3191).
Please provide the information requested in SubmittingBugs. Can also check your database to see if you have a default value on the "hours" column of the "time_entries" table?
Updated by ian dees almost 15 years ago
Sorry, should have read that page more carefully:
DB: MySQL 5.0.51a-3ubuntu5.4
Ruby: ruby 1.8.6 (2007-09-24 patchlevel 111) [i486-linux]
Local Gems:
actionmailer (2.3.5, 2.3.4, 2.1.2)
actionpack (2.3.5, 2.3.4, 2.1.2)
activerecord (2.3.5, 2.3.4, 2.1.2)
activeresource (2.3.5, 2.3.4, 2.1.2)
activesupport (2.3.5, 2.3.4, 2.1.2)
fastthread (1.0.7)
passenger (2.2.7)
rack (1.0.1)
rails (2.3.5, 2.3.4, 2.1.2)
rake (0.8.7)
rubygems-update (1.3.5)
Redmine version: trunk @ r3190
Default value for the "hours" column is indeed 0. NULL is set to no, too. I probably missed a migration when switching (there was an error so I had to force-apply the migration).
Updated by Mischa The Evil almost 15 years ago
See also issue #3075 which is a side-effect of the underlying issue. It also contains a "fix" for it.
HTH.
Updated by ian dees almost 15 years ago
Ran the following SQL on my MySQL install and Redmine no longer shows 0.0 default value for hours.
ALTER TABLE `time_entries` CHANGE `hours` `hours` FLOAT NULL;
Updated by Jean-Philippe Lang almost 15 years ago
- Status changed from New to Closed
- Target version set to 0.9.0
- Resolution set to Fixed
I don't know why you have a default value for this.
Anyway, I committed a fix in r3232 that will force TimeEntry#hours to be nil.
Thanks for your feedback.