mirror of
https://github.com/redmine/redmine.git
synced 2026-01-21 06:53:08 +01:00
Merged r20801 from trunk to 4.1-stable (#33550).
git-svn-id: http://svn.redmine.org/redmine/branches/4.1-stable@20807 e93f8b46-1217-0410-a6f0-8f06a7374b81
This commit is contained in:
@@ -21,7 +21,7 @@
|
||||
</div>
|
||||
</div>
|
||||
<p><%= time_entry.text_field :comments, :size => 60 %></p>
|
||||
<% @time_entry.custom_field_values.each do |value| %>
|
||||
<% @time_entry.editable_custom_field_values.each do |value| %>
|
||||
<p><%= custom_field_tag_with_label :time_entry, value %></p>
|
||||
<% end %>
|
||||
<% end %>
|
||||
|
||||
@@ -4875,6 +4875,41 @@ class IssuesControllerTest < Redmine::ControllerTest
|
||||
end
|
||||
end
|
||||
|
||||
def test_get_edit_should_display_visible_spent_time_custom_field
|
||||
@request.session[:user_id] = 2
|
||||
|
||||
get(
|
||||
:edit,
|
||||
:params => {
|
||||
:id => 13,
|
||||
}
|
||||
)
|
||||
|
||||
assert_response :success
|
||||
|
||||
assert_select '#issue-form select#time_entry_custom_field_values_10', 1
|
||||
end
|
||||
|
||||
def test_get_edit_should_not_display_spent_time_custom_field_not_visible
|
||||
cf = TimeEntryCustomField.find(10)
|
||||
cf.visible = false
|
||||
cf.role_ids = [1]
|
||||
cf.save!
|
||||
|
||||
@request.session[:user_id] = 2
|
||||
|
||||
get(
|
||||
:edit,
|
||||
:params => {
|
||||
:id => 13,
|
||||
}
|
||||
)
|
||||
|
||||
assert_response :success
|
||||
|
||||
assert_select '#issue-form select#time_entry_custom_field_values_10', 0
|
||||
end
|
||||
|
||||
def test_update_form_for_existing_issue
|
||||
@request.session[:user_id] = 2
|
||||
patch :edit, :params => {
|
||||
|
||||
Reference in New Issue
Block a user