diff --git a/app/controllers/work_time_controller.rb b/app/controllers/work_time_controller.rb index 66018dd..97d27f9 100644 --- a/app/controllers/work_time_controller.rb +++ b/app/controllers/work_time_controller.rb @@ -781,7 +781,7 @@ private append_text += " add time entry of ##{issue.id.to_s}: #{tm_vals[:hours].to_f}h" update_daily_memo(append_text, true) end - new_entry = TimeEntry.new(:project => issue.project, :issue => issue, :user => @this_user, :spent_on => @this_date) + new_entry = TimeEntry.new(:project => issue.project, :issue => issue, :user => @this_user, :author => User.current, :spent_on => @this_date) new_entry.safe_attributes = tm_vals new_entry.save append_error_message_html(@message, hour_update_check_error(new_entry, issue_id)) diff --git a/app/views/work_time/_user_day_table.html.erb b/app/views/work_time/_user_day_table.html.erb index b3b86c5..2f07c66 100644 --- a/app/views/work_time/_user_day_table.html.erb +++ b/app/views/work_time/_user_day_table.html.erb @@ -147,7 +147,7 @@ prj_pack[:odr_issues].each do |issue_pack| <%= text_field_tag("new_time_entry["+issue_id.to_s+"][0][comments]", "", :size=>80)%> <%if @custom_fields.length != 0 - dummy_hour = TimeEntry.new(:project => issue.project, :issue => issue, :user => @this_user, :spent_on => @this_date) + dummy_hour = TimeEntry.new(:project => issue.project, :issue => issue, :user => @this_user, :author => User.current, :spent_on => @this_date) dummy_hour.custom_field_values.each do |cfv| %> <%= custom_field_tag "new_time_entry_"+issue_id.to_s+"_0", cfv %> diff --git a/app/views/work_time/ajax_add_tickets_insert.html.erb b/app/views/work_time/ajax_add_tickets_insert.html.erb index 6955beb..3f4b8e7 100644 --- a/app/views/work_time/ajax_add_tickets_insert.html.erb +++ b/app/views/work_time/ajax_add_tickets_insert.html.erb @@ -63,7 +63,7 @@ <%= text_field_tag("new_time_entry["+@add_issue_id+"]["+@add_count+"][comments]", "", :size=>80)%> <%if @custom_fields.length != 0 - dummy_hour = TimeEntry.new(:project => @add_issue.project, :issue => @add_issue, :user => @this_user, :spent_on => @this_date) + dummy_hour = TimeEntry.new(:project => @add_issue.project, :issue => @add_issue, :user => @this_user, :author => User.current, :spent_on => @this_date) dummy_hour.custom_field_values.each do |cfv| %> <%= custom_field_tag "new_time_entry_"+@add_issue_id+"_"+@add_count, cfv %>