Defect #24041 » update_issue_subject.patch
app/helpers/timelog_helper.rb | ||
---|---|---|
75 | 75 |
end |
76 | 76 |
end |
77 | 77 | |
78 |
def format_issue_subject(issue) |
|
79 |
if issue && issue.visible? |
|
80 |
"#{issue.tracker.name} ##{issue.id}: #{issue.subject}" |
|
81 |
else |
|
82 |
'' |
|
83 |
end |
|
84 |
end |
|
85 | ||
78 | 86 |
def report_to_csv(report) |
79 | 87 |
Redmine::Export::CSV.generate do |csv| |
80 | 88 |
# Column headers |
app/views/timelog/_form.html.erb | ||
---|---|---|
13 | 13 |
<% end %> |
14 | 14 |
<p> |
15 | 15 |
<%= f.text_field :issue_id, :size => 6 %> |
16 |
<% if @time_entry.issue.try(:visible?) %>
|
|
17 |
<span id="time_entry_issue"><%= "#{@time_entry.issue.tracker.name} ##{@time_entry.issue.id}: #{@time_entry.issue.subject}" %></span>
|
|
18 |
<% end %>
|
|
16 |
<span id="time_entry_issue">
|
|
17 |
<%= format_issue_subject(@time_entry.issue) %>
|
|
18 |
</span>
|
|
19 | 19 |
</p> |
20 | 20 |
<p><%= f.date_field :spent_on, :size => 10, :required => true %><%= calendar_for('time_entry_spent_on') %></p> |
21 | 21 |
<p><%= f.text_field :hours, :size => 6, :required => true %></p> |
app/views/timelog/new.js.erb | ||
---|---|---|
1 | 1 |
$('#time_entry_activity_id').html('<%= escape_javascript options_for_select(activity_collection_for_select_options(@time_entry), @time_entry.activity_id) %>'); |
2 |
$('#time_entry_issue').html('<%= escape_javascript format_issue_subject(@time_entry.issue) %>'); |