summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--app/views/issues/bulk_edit.html.erb7
-rw-r--r--test/functional/issues_controller_test.rb17
2 files changed, 24 insertions, 0 deletions
diff --git a/app/views/issues/bulk_edit.html.erb b/app/views/issues/bulk_edit.html.erb
index 7e10d03b6..097e14e6f 100644
--- a/app/views/issues/bulk_edit.html.erb
+++ b/app/views/issues/bulk_edit.html.erb
@@ -194,6 +194,13 @@
<legend><%= l(:field_notes) %></legend>
<%= text_area_tag 'notes', @notes, :cols => 60, :rows => 10, :class => 'wiki-edit' %>
<%= 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>
</div>
diff --git a/test/functional/issues_controller_test.rb b/test/functional/issues_controller_test.rb
index 91b3efa82..08a2187ff 100644
--- a/test/functional/issues_controller_test.rb
+++ b/test/functional/issues_controller_test.rb
@@ -5819,6 +5819,23 @@ class IssuesControllerTest < Redmine::ControllerTest
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 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
def test_bulk_update_parent_id