@@ -186,13 +186,13 class IssuesController < ApplicationController | |||||
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]) } |
|
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 | @issue.custom_values = @custom_values |
|
187 | @issue.custom_values = @custom_values | |
188 | end |
|
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 | attachments = attach_files(@issue, params[:attachments]) |
|
191 | attachments = attach_files(@issue, params[:attachments]) | |
190 | attachments.each {|a| journal.details << JournalDetail.new(:property => 'attachment', :prop_key => a.id, :value => a.filename)} |
|
192 | attachments.each {|a| journal.details << JournalDetail.new(:property => 'attachment', :prop_key => a.id, :value => a.filename)} | |
191 | if @issue.save |
|
193 | if @issue.save | |
192 | # Log spend time |
|
194 | # Log spend time | |
193 | if current_role.allowed_to?(:log_time) |
|
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 | @time_entry.save |
|
196 | @time_entry.save | |
197 | end |
|
197 | end | |
198 | if !journal.new_record? |
|
198 | if !journal.new_record? |
General Comments 0
You need to be logged in to leave comments.
Login now