Vote #66221
完了Spent Time Default Value of 0.0
0%
説明
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.
journals
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?
--------------------------------------------------------------------------------
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).
--------------------------------------------------------------------------------
See also issue #3075 which is a side-effect of the underlying issue. It also contains a "fix" for it.
HTH.
--------------------------------------------------------------------------------
Ran the following SQL on my MySQL install and Redmine no longer shows 0.0 default value for hours.
<pre>
ALTER TABLE `time_entries` CHANGE `hours` `hours` FLOAT NULL;
</pre>
--------------------------------------------------------------------------------
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.
--------------------------------------------------------------------------------
related_issues
relates,Closed,3075,Context-menu issue-status change fails under certain circumstances
relates,Closed,1147,Updating tickets add a time log with zero hours