diff --git a/app/views/queries/_form.html.erb b/app/views/queries/_form.html.erb index 5f4fa3490..9ff2e2619 100644 --- a/app/views/queries/_form.html.erb +++ b/app/views/queries/_form.html.erb @@ -12,7 +12,7 @@ <% if User.current.admin? || User.current.allowed_to?(:manage_public_queries, @query.project) %>
- + <% unless @query.type == 'ProjectQuery' %> diff --git a/config/locales/en.yml b/config/locales/en.yml index 0fa3b0234..8ca3e226f 100644 --- a/config/locales/en.yml +++ b/config/locales/en.yml @@ -1046,7 +1046,8 @@ en: label_cross_project_hierarchy: With project hierarchy label_cross_project_system: With all projects label_gantt_progress_line: Progress line - label_visibility_private: to me only + label_visibility_private: to the author only + label_visibility_me: to me only label_visibility_roles: to these roles only label_visibility_public: to any users label_link: Link diff --git a/test/functional/queries_controller_test.rb b/test/functional/queries_controller_test.rb index 0d15c4087..0ecb312b2 100644 --- a/test/functional/queries_controller_test.rb +++ b/test/functional/queries_controller_test.rb @@ -48,6 +48,9 @@ class QueriesControllerTest < Redmine::ControllerTest assert_select 'option[value=tracker]' assert_select 'option[value=subject]' end + # Label for VISIBILITY_PRIVATE should be "to me only" for 'new' action, + # but it should be "to the author only" for 'edit' action + assert_select 'label', text: /to me only/ end def test_new_global_query @@ -619,6 +622,7 @@ class QueriesControllerTest < Redmine::ControllerTest assert_select 'input[name=?][value="2"][checked=checked]', 'query[visibility]' assert_select 'input[name=query_is_for_all][type=checkbox][checked=checked]' + assert_select 'label', text: /to the author only/ end def test_edit_global_private_query