プロジェクト

全般

プロフィール

Defect #1507 » 1507-worktime-user-invalid.patch

Yuichi HARADA, 2020/08/04 09:42

差分を表示:

app/controllers/work_time_controller.rb
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))
app/views/work_time/_user_day_table.html.erb
<%= text_field_tag("new_time_entry["+issue_id.to_s+"][0][comments]", "", :size=>80)%>
</td>
<%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|
%>
<td><%= custom_field_tag "new_time_entry_"+issue_id.to_s+"_0", cfv %></td>
app/views/work_time/ajax_add_tickets_insert.html.erb
<%= text_field_tag("new_time_entry["+@add_issue_id+"]["+@add_count+"][comments]", "", :size=>80)%>
</td>
<%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|
%>
<td><%= custom_field_tag "new_time_entry_"+@add_issue_id+"_"+@add_count, cfv %></td>
(2-2/2)