diff options
author | Jean-Philippe Lang <jp_lang@yahoo.fr> | 2011-04-01 14:00:31 +0000 |
---|---|---|
committer | Jean-Philippe Lang <jp_lang@yahoo.fr> | 2011-04-01 14:00:31 +0000 |
commit | c6e34b0c1135b10a8d7a5dc2c1cb9b980a5f2478 (patch) | |
tree | c342b2630b12da561d714bbe634c816f93adf9a7 /app/controllers/issues_controller.rb | |
parent | 2be6f54f23451043f3bd94a6d3da601ddc39780f (diff) | |
download | redmine-c6e34b0c1135b10a8d7a5dc2c1cb9b980a5f2478.tar.gz redmine-c6e34b0c1135b10a8d7a5dc2c1cb9b980a5f2478.zip |
Initialize TimeEntry with issue and project for the issue edit form.
git-svn-id: svn+ssh://rubyforge.org/var/svn/redmine/trunk@5274 e93f8b46-1217-0410-a6f0-8f06a7374b81
Diffstat (limited to 'app/controllers/issues_controller.rb')
-rw-r--r-- | app/controllers/issues_controller.rb | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/app/controllers/issues_controller.rb b/app/controllers/issues_controller.rb index 051f89107..f51188fcc 100644 --- a/app/controllers/issues_controller.rb +++ b/app/controllers/issues_controller.rb @@ -112,7 +112,7 @@ class IssuesController < ApplicationController @allowed_statuses = @issue.new_statuses_allowed_to(User.current) @edit_allowed = User.current.allowed_to?(:edit_issues, @project) @priorities = IssuePriority.all - @time_entry = TimeEntry.new + @time_entry = TimeEntry.new(:issue => @issue, :project => @issue.project) respond_to do |format| format.html { render :template => 'issues/show.rhtml' } format.api @@ -265,7 +265,7 @@ private @allowed_statuses = @issue.new_statuses_allowed_to(User.current) @priorities = IssuePriority.all @edit_allowed = User.current.allowed_to?(:edit_issues, @project) - @time_entry = TimeEntry.new + @time_entry = TimeEntry.new(:issue => @issue, :project => @issue.project) @time_entry.attributes = params[:time_entry] @notes = params[:notes] || (params[:issue].present? ? params[:issue][:notes] : nil) |