summaryrefslogtreecommitdiffstats
path: root/app/controllers
diff options
context:
space:
mode:
authorJean-Philippe Lang <jp_lang@yahoo.fr>2008-06-14 14:10:47 +0000
committerJean-Philippe Lang <jp_lang@yahoo.fr>2008-06-14 14:10:47 +0000
commit34bcd5b80b0e7e60e2c307b0dcc0d9113e68d4b7 (patch)
tree3b045602901c7e0c89460d15f50700eebcf92048 /app/controllers
parent846045fd05909689644f4858897ac3fda7fdac36 (diff)
downloadredmine-34bcd5b80b0e7e60e2c307b0dcc0d9113e68d4b7.tar.gz
redmine-34bcd5b80b0e7e60e2c307b0dcc0d9113e68d4b7.zip
Fixed: Logtime info lost when there's an error updating an issue (#1400).
git-svn-id: http://redmine.rubyforge.org/svn/trunk@1535 e93f8b46-1217-0410-a6f0-8f06a7374b81
Diffstat (limited to 'app/controllers')
-rw-r--r--app/controllers/issues_controller.rb4
1 files changed, 2 insertions, 2 deletions
diff --git a/app/controllers/issues_controller.rb b/app/controllers/issues_controller.rb
index c042a80ef..a86e9b00c 100644
--- a/app/controllers/issues_controller.rb
+++ b/app/controllers/issues_controller.rb
@@ -186,13 +186,13 @@ class IssuesController < ApplicationController
@custom_values = @project.custom_fields_for_issues(@issue.tracker).collect { |x| CustomValue.new(:custom_field => x, :customized => @issue, :value => params["custom_fields"][x.id.to_s]) }
@issue.custom_values = @custom_values
end
+ @time_entry = TimeEntry.new(:project => @project, :issue => @issue, :user => User.current, :spent_on => Date.today)
+ @time_entry.attributes = params[:time_entry]
attachments = attach_files(@issue, params[:attachments])
attachments.each {|a| journal.details << JournalDetail.new(:property => 'attachment', :prop_key => a.id, :value => a.filename)}
if @issue.save
# Log spend time
if current_role.allowed_to?(:log_time)
- @time_entry = TimeEntry.new(:project => @project, :issue => @issue, :user => User.current, :spent_on => Date.today)
- @time_entry.attributes = params[:time_entry]
@time_entry.save
end
if !journal.new_record?