https://www.redmine.org/https://www.redmine.org/favicon.ico?16793021292008-05-26T17:10:22ZRedmineRedmine - Defect #1302: Log Time fieldset in IssueController#edit doesn't set default Activity as defaulthttps://www.redmine.org/issues/1302?journal_id=29842008-05-26T17:10:22ZJean-Philippe Langjp_lang@yahoo.fr
<ul><li><strong>Category</strong> changed from <i>Issues</i> to <i>Time tracking</i></li><li><strong>Status</strong> changed from <i>New</i> to <i>Closed</i></li><li><strong>Target version</strong> set to <i>0.7.2</i></li><li><strong>Resolution</strong> set to <i>Fixed</i></li></ul><p>Fixed in <a class="changeset" title="Fixed: IssueController#edit doesn't set default Activity as default (#1302)." href="https://www.redmine.org/projects/redmine/repository/svn/revisions/1461">r1461</a>.<br />I fixed it at model level rather than in the controller. But thanks for pointing out the problem.</p> Redmine - Defect #1302: Log Time fieldset in IssueController#edit doesn't set default Activity as defaulthttps://www.redmine.org/issues/1302?journal_id=29862008-05-26T18:25:41Zrupert thurner
<ul><li><strong>% Done</strong> changed from <i>0</i> to <i>100</i></li></ul> Redmine - Defect #1302: Log Time fieldset in IssueController#edit doesn't set default Activity as defaulthttps://www.redmine.org/issues/1302?journal_id=32932008-06-13T15:58:16ZNobuhiro IMAI
<ul><li><strong>File</strong> <a href="/attachments/635">fix-time_entry-initialization.diff</a> <a class="icon-only icon-download" title="Download" href="/attachments/download/635/fix-time_entry-initialization.diff">fix-time_entry-initialization.diff</a> added</li><li><strong>Status</strong> changed from <i>Closed</i> to <i>Reopened</i></li></ul><p>After this change, new TimeEntry is always saved with default ACTI, even when<br />the another activity_id was sent from browser.</p>
<p>This is Rails fanon :-).</p>
<pre>
>> Foo.belongs_to :bar
>> Bar.has_one :foo
>> foo = Foo.new
>> foo.bar = Bar.find(1)
>> foo.bar_id
=> 1
>> foo.bar_id = 2
>> foo.bar_id
=> 2
>> foo.save
=> true
>> foo.bar_id
=> 1
</pre>
<p>The attached patch will fix this problem, I guess.</p>
<p>Thanks,</p> Redmine - Defect #1302: Log Time fieldset in IssueController#edit doesn't set default Activity as defaulthttps://www.redmine.org/issues/1302?journal_id=33182008-06-14T12:27:36ZJean-Philippe Langjp_lang@yahoo.fr
<ul><li><strong>Status</strong> changed from <i>Reopened</i> to <i>Closed</i></li></ul><p>Fixed in <a class="changeset" title="Fixed: time entries created with the default activity even if a different one is specified (#1302)." href="https://www.redmine.org/projects/redmine/repository/svn/revisions/1533">r1533</a>. Thanks.</p>