Project

General

Profile

Actions

Defect #4449

closed

Spent Time Default Value of 0.0

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

Status:
Closed
Priority:
Normal
Assignee:
-
Category:
Issues
Target version:
Start date:
2009-12-18
Due date:
% Done:

0%

Estimated time:
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 circumstancesClosed2009-03-30

Actions
Related to Redmine - Defect #1147: Updating tickets add a time log with zero hoursClosed2008-04-30

Actions
Actions #1

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?

Actions #2

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).

Actions #3

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.

Actions #4

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;
Actions #5

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.

Actions

Also available in: Atom PDF