mirror of
https://github.com/redmine/redmine.git
synced 2025-11-08 22:36:02 +01:00
Spent hours ignoring "Time Span Format" Setting on several pages (#40924).
Patch by Go MAEDA (@maeda). git-svn-id: https://svn.redmine.org/redmine/trunk@22902 e93f8b46-1217-0410-a6f0-8f06a7374b81
This commit is contained in:
@@ -3,7 +3,7 @@
|
|||||||
<%= form_tag({}, :method => :delete) do %>
|
<%= form_tag({}, :method => :delete) do %>
|
||||||
<%= @issues.collect {|i| hidden_field_tag('ids[]', i.id, :id => nil)}.join("\n").html_safe %>
|
<%= @issues.collect {|i| hidden_field_tag('ids[]', i.id, :id => nil)}.join("\n").html_safe %>
|
||||||
<div class="box">
|
<div class="box">
|
||||||
<p><strong><%= l(:text_destroy_time_entries_question, :hours => number_with_precision(@hours, :precision => 2)) %></strong></p>
|
<p><strong><%= l(:text_destroy_time_entries_question, :hours => format_hours(@hours)) %></strong></p>
|
||||||
<p>
|
<p>
|
||||||
<label><%= radio_button_tag 'todo', 'destroy', true %> <%= l(:text_destroy_time_entries) %></label><br />
|
<label><%= radio_button_tag 'todo', 'destroy', true %> <%= l(:text_destroy_time_entries) %></label><br />
|
||||||
<% unless Setting.timelog_required_fields.include?('issue_id') %>
|
<% unless Setting.timelog_required_fields.include?('issue_id') %>
|
||||||
|
|||||||
@@ -21,7 +21,7 @@
|
|||||||
<%=
|
<%=
|
||||||
content_tag 'li',
|
content_tag 'li',
|
||||||
link_to(
|
link_to(
|
||||||
"#{format_date(entry.spent_on)} - #{entry.project}: #{l(:label_f_hour_plural, :value => entry.hours)} (#{entry.user})",
|
"#{format_date(entry.spent_on)} - #{entry.project}: #{l(:label_f_hour_plural, :value => format_hours(entry.hours))} (#{entry.user})",
|
||||||
edit_time_entry_path(entry)
|
edit_time_entry_path(entry)
|
||||||
)
|
)
|
||||||
%>
|
%>
|
||||||
|
|||||||
@@ -8272,14 +8272,16 @@ class IssuesControllerTest < Redmine::ControllerTest
|
|||||||
leaf = Issue.generate!
|
leaf = Issue.generate!
|
||||||
TimeEntry.generate!(:issue => leaf)
|
TimeEntry.generate!(:issue => leaf)
|
||||||
@request.session[:user_id] = 2
|
@request.session[:user_id] = 2
|
||||||
|
with_settings :timespan_format => 'minutes' do
|
||||||
delete(
|
delete(
|
||||||
:destroy,
|
:destroy,
|
||||||
:params => {
|
:params => {
|
||||||
:ids => [parent.id, leaf.id]
|
:ids => [parent.id, leaf.id]
|
||||||
}
|
}
|
||||||
)
|
)
|
||||||
|
end
|
||||||
assert_response :success
|
assert_response :success
|
||||||
assert_select 'p', :text => /3\.00 hours were reported/
|
assert_select 'p', :text => /3:00 hours were reported/
|
||||||
end
|
end
|
||||||
|
|
||||||
def test_destroy_issues_and_destroy_time_entries
|
def test_destroy_issues_and_destroy_time_entries
|
||||||
|
|||||||
@@ -727,12 +727,14 @@ class TimelogControllerTest < Redmine::ControllerTest
|
|||||||
def test_get_bulk_edit
|
def test_get_bulk_edit
|
||||||
@request.session[:user_id] = 2
|
@request.session[:user_id] = 2
|
||||||
|
|
||||||
|
with_settings :timespan_format => 'minutes' do
|
||||||
get :bulk_edit, :params => {:ids => [1, 2]}
|
get :bulk_edit, :params => {:ids => [1, 2]}
|
||||||
|
end
|
||||||
assert_response :success
|
assert_response :success
|
||||||
|
|
||||||
assert_select 'ul#bulk-selection' do
|
assert_select 'ul#bulk-selection' do
|
||||||
assert_select 'li', 2
|
assert_select 'li', 2
|
||||||
assert_select 'li a', :text => '03/23/2007 - eCookbook: 4.25 hours (John Smith)'
|
assert_select 'li a', :text => '03/23/2007 - eCookbook: 4:15 hours (John Smith)'
|
||||||
end
|
end
|
||||||
|
|
||||||
assert_select 'form#bulk_edit_form[action=?]', '/time_entries/bulk_update' do
|
assert_select 'form#bulk_edit_form[action=?]', '/time_entries/bulk_update' do
|
||||||
|
|||||||
Reference in New Issue
Block a user