mirror of
https://github.com/redmine/redmine.git
synced 2025-11-10 15:26:03 +01:00
Ability to add private comments from the issue bulk edit page (#22368).
git-svn-id: http://svn.redmine.org/redmine/trunk@17744 e93f8b46-1217-0410-a6f0-8f06a7374b81
This commit is contained in:
@@ -194,6 +194,13 @@
|
|||||||
<legend><%= l(:field_notes) %></legend>
|
<legend><%= l(:field_notes) %></legend>
|
||||||
<%= text_area_tag 'notes', @notes, :cols => 60, :rows => 10, :class => 'wiki-edit' %>
|
<%= text_area_tag 'notes', @notes, :cols => 60, :rows => 10, :class => 'wiki-edit' %>
|
||||||
<%= wikitoolbar_for 'notes' %>
|
<%= wikitoolbar_for 'notes' %>
|
||||||
|
|
||||||
|
<% if @safe_attributes.include?('private_notes') %>
|
||||||
|
<label class="inline">
|
||||||
|
<%= check_box_tag 'issue[private_notes]', 1, false %>
|
||||||
|
<%= l(:field_private_notes) %>
|
||||||
|
</label>
|
||||||
|
<% end %>
|
||||||
</fieldset>
|
</fieldset>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
|
|||||||
@@ -5819,6 +5819,23 @@ class IssuesControllerTest < Redmine::ControllerTest
|
|||||||
assert_redirected_to :controller => 'issues', :action => 'index', :project_id => 'ecookbook'
|
assert_redirected_to :controller => 'issues', :action => 'index', :project_id => 'ecookbook'
|
||||||
assert_equal 'Moving two issues', Issue.find(1).journals.sort_by(&:id).last.notes
|
assert_equal 'Moving two issues', Issue.find(1).journals.sort_by(&:id).last.notes
|
||||||
assert_equal 'Moving two issues', Issue.find(2).journals.sort_by(&:id).last.notes
|
assert_equal 'Moving two issues', Issue.find(2).journals.sort_by(&:id).last.notes
|
||||||
|
assert_equal false, Issue.find(1).journals.sort_by(&:id).last.private_notes
|
||||||
|
assert_equal false, Issue.find(2).journals.sort_by(&:id).last.private_notes
|
||||||
|
end
|
||||||
|
|
||||||
|
def test_bulk_update_with_private_notes
|
||||||
|
@request.session[:user_id] = 2
|
||||||
|
post :bulk_update, :params => {
|
||||||
|
:ids => [1, 2],
|
||||||
|
:notes => 'Moving two issues',
|
||||||
|
:issue => {:private_notes => 'true'}
|
||||||
|
}
|
||||||
|
|
||||||
|
assert_redirected_to :controller => 'issues', :action => 'index', :project_id => 'ecookbook'
|
||||||
|
assert_equal 'Moving two issues', Issue.find(1).journals.sort_by(&:id).last.notes
|
||||||
|
assert_equal 'Moving two issues', Issue.find(2).journals.sort_by(&:id).last.notes
|
||||||
|
assert_equal true, Issue.find(1).journals.sort_by(&:id).last.private_notes
|
||||||
|
assert_equal true, Issue.find(2).journals.sort_by(&:id).last.private_notes
|
||||||
end
|
end
|
||||||
|
|
||||||
def test_bulk_update_parent_id
|
def test_bulk_update_parent_id
|
||||||
|
|||||||
Reference in New Issue
Block a user