##// END OF EJS Templates
Fixed: Logtime info lost when there's an error updating an issue (#1400)....
Jean-Philippe Lang -
r1521:34bcd5b80b0e
parent child
Show More
@@ -186,13 +186,13 class IssuesController < ApplicationController
186 186 @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]) }
187 187 @issue.custom_values = @custom_values
188 188 end
189 @time_entry = TimeEntry.new(:project => @project, :issue => @issue, :user => User.current, :spent_on => Date.today)
190 @time_entry.attributes = params[:time_entry]
189 191 attachments = attach_files(@issue, params[:attachments])
190 192 attachments.each {|a| journal.details << JournalDetail.new(:property => 'attachment', :prop_key => a.id, :value => a.filename)}
191 193 if @issue.save
192 194 # Log spend time
193 195 if current_role.allowed_to?(:log_time)
194 @time_entry = TimeEntry.new(:project => @project, :issue => @issue, :user => User.current, :spent_on => Date.today)
195 @time_entry.attributes = params[:time_entry]
196 196 @time_entry.save
197 197 end
198 198 if !journal.new_record?
General Comments 0
You need to be logged in to leave comments. Login now