https://www.redmine.org/https://www.redmine.org/favicon.ico?16793021292009-12-19T09:49:32ZRedmineRedmine - Defect #4449: Spent Time Default Value of 0.0https://www.redmine.org/issues/4449?journal_id=131122009-12-19T09:49:32ZJean-Philippe Langjp_lang@yahoo.fr
<ul></ul><p>I can't reproduce with latest trunk (<a class="changeset" title="Fixes 'follows' relation validation." href="https://www.redmine.org/projects/redmine/repository/svn/revisions/3191">r3191</a>).</p>
<p>Please provide the information requested in <a class="wiki-page" href="https://www.redmine.org/projects/redmine/wiki/SubmittingBugs">SubmittingBugs</a>. Can also check your database to see if you have a default value on the "hours" column of the "time_entries" table?</p> Redmine - Defect #4449: Spent Time Default Value of 0.0https://www.redmine.org/issues/4449?journal_id=131402009-12-20T15:26:05Zian dees
<ul></ul><p>Sorry, should have read that page more carefully:</p>
<p>DB: MySQL 5.0.51a-3ubuntu5.4<br />Ruby: ruby 1.8.6 (2007-09-24 patchlevel 111) [i486-linux]<br />Local Gems:<br />actionmailer (2.3.5, 2.3.4, 2.1.2)<br />actionpack (2.3.5, 2.3.4, 2.1.2)<br />activerecord (2.3.5, 2.3.4, 2.1.2)<br />activeresource (2.3.5, 2.3.4, 2.1.2)<br />activesupport (2.3.5, 2.3.4, 2.1.2)<br />fastthread (1.0.7)<br />passenger (2.2.7)<br />rack (1.0.1)<br />rails (2.3.5, 2.3.4, 2.1.2)<br />rake (0.8.7)<br />rubygems-update (1.3.5)</p>
<p>Redmine version: trunk @ <a class="changeset" title="Adds 'follows' relation (#1432)." href="https://www.redmine.org/projects/redmine/repository/svn/revisions/3190">r3190</a></p>
<hr />
<p>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).</p> Redmine - Defect #4449: Spent Time Default Value of 0.0https://www.redmine.org/issues/4449?journal_id=131482009-12-20T22:21:22ZMischa The Evil
<ul></ul><p>See also issue <a class="issue tracker-1 status-5 priority-5 priority-high2 closed" title="Defect: Context-menu issue-status change fails under certain circumstances (Closed)" href="https://www.redmine.org/issues/3075">#3075</a> which is a side-effect of the underlying issue. It also contains a "fix" for it.</p>
<p>HTH.</p> Redmine - Defect #4449: Spent Time Default Value of 0.0https://www.redmine.org/issues/4449?journal_id=131502009-12-20T23:12:32Zian dees
<ul></ul><p>Ran the following SQL on my MySQL install and Redmine no longer shows 0.0 default value for hours.</p>
<pre>
ALTER TABLE `time_entries` CHANGE `hours` `hours` FLOAT NULL;
</pre> Redmine - Defect #4449: Spent Time Default Value of 0.0https://www.redmine.org/issues/4449?journal_id=132172009-12-23T20:01:10ZJean-Philippe Langjp_lang@yahoo.fr
<ul><li><strong>Status</strong> changed from <i>New</i> to <i>Closed</i></li><li><strong>Target version</strong> set to <i>0.9.0</i></li><li><strong>Resolution</strong> set to <i>Fixed</i></li></ul><p>I don't know why you have a default value for this.<br />Anyway, I committed a fix in <a class="changeset" title="Force TimeEntry#hours default to nil (#3075, #4449)." href="https://www.redmine.org/projects/redmine/repository/svn/revisions/3232">r3232</a> that will force TimeEntry#hours to be nil.<br />Thanks for your feedback.</p>