Defect #4449

Spent Time Default Value of 0.0

Added by ian dees almost 8 years ago. Updated almost 8 years ago.

Status:ClosedStart date:2009-12-18
Priority:NormalDue date:
Assignee:-% Done:

0%

Category:Issues
Target version:0.9.0
Resolution:Fixed Affected version:

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

Related to Redmine - Defect #3075: Context-menu issue-status change fails under certain circ... Closed 2009-03-30
Related to Redmine - Defect #1147: Updating tickets add a time log with zero hours Closed 2008-04-30

Associated revisions

Revision 3232
Added by Jean-Philippe Lang almost 8 years ago

Force TimeEntry#hours default to nil (#3075, #4449).

History

#1 Updated by Jean-Philippe Lang almost 8 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?

#2 Updated by ian dees almost 8 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).

#3 Updated by Mischa The Evil almost 8 years ago

See also issue #3075 which is a side-effect of the underlying issue. It also contains a "fix" for it.

HTH.

#4 Updated by ian dees almost 8 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;

#5 Updated by Jean-Philippe Lang almost 8 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.

Also available in: Atom PDF