From e0c70b025262e2658d41a6aba61c7f907263e1b3 Mon Sep 17 00:00:00 2001 From: Toshi MARUYAMA Date: Sun, 22 May 2016 04:18:24 +0000 Subject: [PATCH 0001/1117] Traditional Chinese translation updated by ChunChang Lo (#22788) git-svn-id: http://svn.redmine.org/redmine/trunk@15424 e93f8b46-1217-0410-a6f0-8f06a7374b81 --- public/javascripts/jstoolbar/lang/jstoolbar-zh-tw.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/public/javascripts/jstoolbar/lang/jstoolbar-zh-tw.js b/public/javascripts/jstoolbar/lang/jstoolbar-zh-tw.js index cd852467c..c1a19576e 100644 --- a/public/javascripts/jstoolbar/lang/jstoolbar-zh-tw.js +++ b/public/javascripts/jstoolbar/lang/jstoolbar-zh-tw.js @@ -7,7 +7,7 @@ jsToolBar.strings['Code'] = '程式碼'; jsToolBar.strings['Heading 1'] = '標題 1'; jsToolBar.strings['Heading 2'] = '標題 2'; jsToolBar.strings['Heading 3'] = '標題 3'; -jsToolBar.strings['Highlighted code'] = 'Highlighted code'; +jsToolBar.strings['Highlighted code'] = '反白程式碼'; jsToolBar.strings['Unordered list'] = '項目清單'; jsToolBar.strings['Ordered list'] = '編號清單'; jsToolBar.strings['Quote'] = '引文'; From 016d79fa30cadfccd96d3ef659a7678fba132aa0 Mon Sep 17 00:00:00 2001 From: Toshi MARUYAMA Date: Sun, 22 May 2016 04:18:35 +0000 Subject: [PATCH 0002/1117] Korean translation updated by Yonghwan SO (#22809) git-svn-id: http://svn.redmine.org/redmine/trunk@15425 e93f8b46-1217-0410-a6f0-8f06a7374b81 --- config/locales/ko.yml | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/config/locales/ko.yml b/config/locales/ko.yml index 5e51443ff..a9b982e11 100644 --- a/config/locales/ko.yml +++ b/config/locales/ko.yml @@ -1235,9 +1235,9 @@ ko: mail_body_security_notification_notify_disabled: '%{value}(으)로 더 이상 알람이 발송되지 않습니다.' mail_body_settings_updated: ! '다음의 설정이 변경되었습니다:' field_remote_ip: IP 주소 - label_wiki_page_new: New wiki page - label_relations: Relations - button_filter: Filter - mail_body_password_updated: Your password has been changed. - label_no_preview: No preview available - setting_new_project_issue_tab_enabled: Display the "New issue" tab + label_wiki_page_new: 새 위키 페이지 + label_relations: 관계 + button_filter: 필터 + mail_body_password_updated: 암호가 변경되었습니다. + label_no_preview: 미리보기 없음 + setting_new_project_issue_tab_enabled: '"새 일감" 탭 표시' From 95bf7fbc375014e942b11a341aeac757663328e8 Mon Sep 17 00:00:00 2001 From: Jean-Philippe Lang Date: Sat, 28 May 2016 11:31:14 +0000 Subject: [PATCH 0003/1117] Preserve from parameter when selecting new activity filters (#22912). Patch by Jan Schulz-Hofen. git-svn-id: http://svn.redmine.org/redmine/trunk@15428 e93f8b46-1217-0410-a6f0-8f06a7374b81 --- app/views/activities/index.html.erb | 1 + 1 file changed, 1 insertion(+) diff --git a/app/views/activities/index.html.erb b/app/views/activities/index.html.erb index 58664d1cf..c191ccba5 100644 --- a/app/views/activities/index.html.erb +++ b/app/views/activities/index.html.erb @@ -61,6 +61,7 @@

<% end %> <%= hidden_field_tag('user_id', params[:user_id]) unless params[:user_id].blank? %> +<%= hidden_field_tag('from', params[:from]) unless params[:from].blank? %>

<%= submit_tag l(:button_apply), :class => 'button-small', :name => 'submit' %>

<% end %> <% end %> From fad71f8b4bd8f1079c3fe355dc2dafeb2b5ca9ee Mon Sep 17 00:00:00 2001 From: Jean-Philippe Lang Date: Sat, 28 May 2016 11:37:28 +0000 Subject: [PATCH 0004/1117] NoMethodError: undefined method `id' error on EnumerationFormat#value_from_keyword (#22911). Patch by Haihan Ji. git-svn-id: http://svn.redmine.org/redmine/trunk@15429 e93f8b46-1217-0410-a6f0-8f06a7374b81 --- lib/redmine/field_format.rb | 2 +- test/unit/lib/redmine/field_format/enumeration_format_test.rb | 4 ++++ 2 files changed, 5 insertions(+), 1 deletion(-) diff --git a/lib/redmine/field_format.rb b/lib/redmine/field_format.rb index c7e8115a6..dd94eeefd 100644 --- a/lib/redmine/field_format.rb +++ b/lib/redmine/field_format.rb @@ -715,7 +715,7 @@ module Redmine end def value_from_keyword(custom_field, keyword, object) - value = custom_field.enumerations.where("LOWER(name) LIKE LOWER(?)", keyword) + value = custom_field.enumerations.where("LOWER(name) LIKE LOWER(?)", keyword).first value ? value.id : nil end end diff --git a/test/unit/lib/redmine/field_format/enumeration_format_test.rb b/test/unit/lib/redmine/field_format/enumeration_format_test.rb index a78bdf137..467c1ed9d 100644 --- a/test/unit/lib/redmine/field_format/enumeration_format_test.rb +++ b/test/unit/lib/redmine/field_format/enumeration_format_test.rb @@ -84,4 +84,8 @@ class Redmine::EnumerationFieldFormatTest < ActionView::TestCase end end end + + def test_value_from_keyword_should_return_enumeration_id + assert_equal @foo.id, @field.value_from_keyword('foo', nil) + end end From a6828512c02b20eaeb9c42fc2612c7010ede73fa Mon Sep 17 00:00:00 2001 From: Jean-Philippe Lang Date: Mon, 30 May 2016 18:20:13 +0000 Subject: [PATCH 0005/1117] Adds Issue#allowed_target_trackers (#7839). git-svn-id: http://svn.redmine.org/redmine/trunk@15430 e93f8b46-1217-0410-a6f0-8f06a7374b81 --- app/controllers/context_menus_controller.rb | 3 +- app/controllers/issues_controller.rb | 4 +-- app/helpers/issues_helper.rb | 10 +++++++ app/models/issue.rb | 32 ++++++++++++--------- app/models/mail_handler.rb | 13 +++++---- app/views/issues/_form.html.erb | 2 +- app/views/issues/index.html.erb | 2 +- lib/redmine.rb | 2 +- test/unit/issue_test.rb | 5 ++-- 9 files changed, 46 insertions(+), 27 deletions(-) diff --git a/app/controllers/context_menus_controller.rb b/app/controllers/context_menus_controller.rb index 1e5652d09..59ee3a77a 100644 --- a/app/controllers/context_menus_controller.rb +++ b/app/controllers/context_menus_controller.rb @@ -41,12 +41,11 @@ class ContextMenusController < ApplicationController else @assignables = @project.assignable_users end - @trackers = @project.trackers else #when multiple projects, we only keep the intersection of each set @assignables = @projects.map(&:assignable_users).reduce(:&) - @trackers = @projects.map(&:trackers).reduce(:&) end + @trackers = @projects.map {|p| Issue.allowed_target_trackers(p) }.reduce(:&) @versions = @projects.map {|p| p.shared_versions.open}.reduce(:&) @priorities = IssuePriority.active.reverse diff --git a/app/controllers/issues_controller.rb b/app/controllers/issues_controller.rb index cf402de22..1db5e6ff8 100644 --- a/app/controllers/issues_controller.rb +++ b/app/controllers/issues_controller.rb @@ -230,7 +230,7 @@ class IssuesController < ApplicationController end @custom_fields = @issues.map{|i|i.editable_custom_fields}.reduce(:&) @assignables = target_projects.map(&:assignable_users).reduce(:&) - @trackers = target_projects.map(&:trackers).reduce(:&) + @trackers = target_projects.map {|p| Issue.allowed_target_trackers(p) }.reduce(:&) @versions = target_projects.map {|p| p.shared_versions.open}.reduce(:&) @categories = target_projects.map {|p| p.issue_categories}.reduce(:&) if @copy @@ -465,7 +465,7 @@ class IssuesController < ApplicationController @issue.safe_attributes = attrs if @issue.project - @issue.tracker ||= @issue.project.trackers.first + @issue.tracker ||= @issue.allowed_target_trackers.first if @issue.tracker.nil? render_error l(:error_no_tracker_in_project) return false diff --git a/app/helpers/issues_helper.rb b/app/helpers/issues_helper.rb index b505765d8..ce6d9f8f2 100644 --- a/app/helpers/issues_helper.rb +++ b/app/helpers/issues_helper.rb @@ -168,6 +168,16 @@ module IssuesHelper link_to(l(:button_add), new_project_issue_path(issue.project, :issue => attrs)) end + def trackers_options_for_select(issue) + trackers = issue.allowed_target_trackers + if issue.new_record? && issue.parent_issue_id.present? + trackers = trackers.reject do |tracker| + issue.tracker_id != tracker.id && tracker.disabled_core_fields.include?('parent_issue_id') + end + end + trackers.collect {|t| [t.name, t.id]} + end + class IssueFieldsRows include ActionView::Helpers::TagHelper diff --git a/app/models/issue.rb b/app/models/issue.rb index 0ee8ff3d3..d6133d3a9 100644 --- a/app/models/issue.rb +++ b/app/models/issue.rb @@ -479,12 +479,14 @@ class Issue < ActiveRecord::Base end if (t = attrs.delete('tracker_id')) && safe_attribute?('tracker_id') - self.tracker_id = t + if allowed_target_trackers(user).where(:id => t.to_i).exists? + self.tracker_id = t + end end if project - # Set the default tracker to accept custom field values + # Set a default tracker to accept custom field values # even if tracker is not specified - self.tracker ||= project.trackers.first + self.tracker ||= allowed_target_trackers(user).first end statuses_allowed = new_statuses_allowed_to(user) @@ -822,16 +824,6 @@ class Issue < ActiveRecord::Base !leaf? end - def assignable_trackers - trackers = project.trackers - if new_record? && parent_issue_id.present? - trackers = trackers.reject do |tracker| - tracker_id != tracker.id && tracker.disabled_core_fields.include?('parent_issue_id') - end - end - trackers - end - # Users the issue can be assigned to def assignable_users users = project.assignable_users.to_a @@ -1373,6 +1365,20 @@ class Issue < ActiveRecord::Base end Project.where(condition).having_trackers end + + # Returns a scope of trackers that user can assign the issue to + def allowed_target_trackers(user=User.current) + if project + self.class.allowed_target_trackers(project, user, tracker_id_was) + else + Tracker.none + end + end + + # Returns a scope of trackers that user can assign project issues to + def self.allowed_target_trackers(project, user=User.current, current_tracker=nil) + project.trackers.sorted + end private diff --git a/app/models/mail_handler.rb b/app/models/mail_handler.rb index 40bd02a07..a619f115d 100644 --- a/app/models/mail_handler.rb +++ b/app/models/mail_handler.rb @@ -199,7 +199,14 @@ class MailHandler < ActionMailer::Base end issue = Issue.new(:author => user, :project => project) - issue.safe_attributes = issue_attributes_from_keywords(issue) + attributes = issue_attributes_from_keywords(issue) + if handler_options[:no_permission_check] + issue.tracker_id = attributes['tracker_id'] + if project + issue.tracker_id ||= project.trackers.first.try(:id) + end + end + issue.safe_attributes = attributes issue.safe_attributes = {'custom_field_values' => custom_field_values_from_keywords(issue)} issue.subject = cleaned_up_subject if issue.subject.blank? @@ -420,10 +427,6 @@ class MailHandler < ActionMailer::Base 'done_ratio' => get_keyword(:done_ratio, :format => '(\d|10)?0') }.delete_if {|k, v| v.blank? } - if issue.new_record? && attrs['tracker_id'].nil? - attrs['tracker_id'] = issue.project.trackers.first.try(:id) - end - attrs end diff --git a/app/views/issues/_form.html.erb b/app/views/issues/_form.html.erb index 788a2f38e..1e82b6f84 100644 --- a/app/views/issues/_form.html.erb +++ b/app/views/issues/_form.html.erb @@ -14,7 +14,7 @@ <% end %> <% if @issue.safe_attribute? 'tracker_id' %> -

<%= f.select :tracker_id, @issue.assignable_trackers.collect {|t| [t.name, t.id]}, {:required => true}, +

<%= f.select :tracker_id, trackers_options_for_select(@issue), {:required => true}, :onchange => "updateIssueFrom('#{escape_javascript update_issue_form_path(@project, @issue)}', this)" %>

<% end %> diff --git a/app/views/issues/index.html.erb b/app/views/issues/index.html.erb index 7dcba2629..fd762023f 100644 --- a/app/views/issues/index.html.erb +++ b/app/views/issues/index.html.erb @@ -1,5 +1,5 @@
- <% if User.current.allowed_to?(:add_issues, @project, :global => true) && (@project.nil? || @project.trackers.any?) %> + <% if User.current.allowed_to?(:add_issues, @project, :global => true) && (@project.nil? || Issue.allowed_target_trackers(@project).any?) %> <%= link_to l(:label_issue_new), _new_project_issue_path(@project), :class => 'icon icon-add new-issue' %> <% end %>
diff --git a/lib/redmine.rb b/lib/redmine.rb index 1d37a523b..0c670d1b5 100644 --- a/lib/redmine.rb +++ b/lib/redmine.rb @@ -233,7 +233,7 @@ Redmine::MenuManager.map :project_menu do |menu| menu.push :issues, { :controller => 'issues', :action => 'index' }, :param => :project_id, :caption => :label_issue_plural menu.push :new_issue, { :controller => 'issues', :action => 'new', :copy_from => nil }, :param => :project_id, :caption => :label_issue_new, :html => { :accesskey => Redmine::AccessKeys.key_for(:new_issue) }, - :if => Proc.new { |p| Setting.new_project_issue_tab_enabled? && p.trackers.any? }, + :if => Proc.new { |p| Setting.new_project_issue_tab_enabled? && Issue.allowed_target_trackers(p).any? }, :permission => :add_issues menu.push :gantt, { :controller => 'gantts', :action => 'show' }, :param => :project_id, :caption => :label_gantt menu.push :calendar, { :controller => 'calendars', :action => 'show' }, :param => :project_id, :caption => :label_calendar diff --git a/test/unit/issue_test.rb b/test/unit/issue_test.rb index d7c7d231b..363cdd071 100644 --- a/test/unit/issue_test.rb +++ b/test/unit/issue_test.rb @@ -737,9 +737,10 @@ class IssueTest < ActiveSupport::TestCase target = Tracker.find(2) target.core_fields = %w(assigned_to_id due_date) target.save! + user = User.find(2) - issue = Issue.new(:tracker => source) - issue.safe_attributes = {'tracker_id' => 2, 'due_date' => '2012-07-14'} + issue = Issue.new(:project => Project.find(1), :tracker => source) + issue.send :safe_attributes=, {'tracker_id' => 2, 'due_date' => '2012-07-14'}, user assert_equal target, issue.tracker assert_equal Date.parse('2012-07-14'), issue.due_date end From c246ffa184a5c773c05dfa568188575aa978f3ed Mon Sep 17 00:00:00 2001 From: Jean-Philippe Lang Date: Wed, 1 Jun 2016 16:55:37 +0000 Subject: [PATCH 0006/1117] Limits the schemes that Markdown links can use (#22924). git-svn-id: http://svn.redmine.org/redmine/trunk@15431 e93f8b46-1217-0410-a6f0-8f06a7374b81 --- lib/redmine/helpers/url.rb | 35 +++++++++++++++++++ .../wiki_formatting/markdown/formatter.rb | 3 ++ 2 files changed, 38 insertions(+) create mode 100644 lib/redmine/helpers/url.rb diff --git a/lib/redmine/helpers/url.rb b/lib/redmine/helpers/url.rb new file mode 100644 index 000000000..4177bf23e --- /dev/null +++ b/lib/redmine/helpers/url.rb @@ -0,0 +1,35 @@ +# Redmine - project management software +# Copyright (C) 2006-2016 Jean-Philippe Lang +# +# This program is free software; you can redistribute it and/or +# modify it under the terms of the GNU General Public License +# as published by the Free Software Foundation; either version 2 +# of the License, or (at your option) any later version. +# +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU General Public License for more details. +# +# You should have received a copy of the GNU General Public License +# along with this program; if not, write to the Free Software +# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. + +require 'uri' + +module Redmine + module Helpers + module URL + def uri_with_safe_scheme?(uri, schemes = ['http', 'https', 'ftp', 'mailto', nil]) + # URLs relative to the current document or document root (without a protocol + # separator, should be harmless + return true unless uri.include? ":" + + # Other URLs need to be parsed + schemes.include? URI.parse(uri).scheme + rescue URI::InvalidURIError + false + end + end + end +end diff --git a/lib/redmine/wiki_formatting/markdown/formatter.rb b/lib/redmine/wiki_formatting/markdown/formatter.rb index 62ad6f14e..2d6f66559 100644 --- a/lib/redmine/wiki_formatting/markdown/formatter.rb +++ b/lib/redmine/wiki_formatting/markdown/formatter.rb @@ -22,8 +22,11 @@ module Redmine module Markdown class HTML < Redcarpet::Render::HTML include ActionView::Helpers::TagHelper + include Redmine::Helpers::URL def link(link, title, content) + return nil unless uri_with_safe_scheme?(link) + css = nil unless link && link.starts_with?('/') css = 'external' From 1be535443a2071d8143dd24f6727f29e82353548 Mon Sep 17 00:00:00 2001 From: Jean-Philippe Lang Date: Wed, 1 Jun 2016 16:58:19 +0000 Subject: [PATCH 0007/1117] Limits the schemes that project homepage can use (#22925). git-svn-id: http://svn.redmine.org/redmine/trunk@15432 e93f8b46-1217-0410-a6f0-8f06a7374b81 --- app/helpers/application_helper.rb | 1 + app/views/projects/show.html.erb | 2 +- 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/app/helpers/application_helper.rb b/app/helpers/application_helper.rb index 3e857e3d9..c727d0be5 100644 --- a/app/helpers/application_helper.rb +++ b/app/helpers/application_helper.rb @@ -28,6 +28,7 @@ module ApplicationHelper include Redmine::SudoMode::Helper include Redmine::Themes::Helper include Redmine::Hook::Helper + include Redmine::Helpers::URL extend Forwardable def_delegators :wiki_helper, :wikitoolbar_for, :heads_for_wiki_formatter diff --git a/app/views/projects/show.html.erb b/app/views/projects/show.html.erb index 33f423ca5..007f0fab2 100644 --- a/app/views/projects/show.html.erb +++ b/app/views/projects/show.html.erb @@ -26,7 +26,7 @@ <% if @project.homepage.present? || @subprojects.any? || @project.visible_custom_field_values.any?(&:present?) %>
    <% unless @project.homepage.blank? %> -
  • <%=l(:field_homepage)%>: <%= link_to @project.homepage, @project.homepage %>
  • +
  • <%=l(:field_homepage)%>: <%= link_to_if uri_with_safe_scheme?(@project.homepage), @project.homepage, @project.homepage %>
  • <% end %> <% if @subprojects.any? %>
  • <%=l(:label_subproject_plural)%>: From a4bc8980126f08323e758fc8f0edcd53594083d2 Mon Sep 17 00:00:00 2001 From: Jean-Philippe Lang Date: Wed, 1 Jun 2016 17:32:35 +0000 Subject: [PATCH 0008/1117] Limits the schemes that inline images can use (#22926). git-svn-id: http://svn.redmine.org/redmine/trunk@15433 e93f8b46-1217-0410-a6f0-8f06a7374b81 --- lib/redcloth3.rb | 3 +++ lib/redmine/wiki_formatting/markdown/formatter.rb | 6 ++++++ 2 files changed, 9 insertions(+) diff --git a/lib/redcloth3.rb b/lib/redcloth3.rb index f9c9054b8..b96ee7ab0 100644 --- a/lib/redcloth3.rb +++ b/lib/redcloth3.rb @@ -165,6 +165,7 @@ # class RedCloth::Textile.new( str ) class RedCloth3 < String + include Redmine::Helpers::URL VERSION = '3.0.4' DEFAULT_RULES = [:textile, :markdown] @@ -960,6 +961,8 @@ class RedCloth3 < String href, alt_title = check_refs( href ) if href url, url_title = check_refs( url ) + return m unless uri_with_safe_scheme?(url) + out = '' out << "" if href out << "" diff --git a/lib/redmine/wiki_formatting/markdown/formatter.rb b/lib/redmine/wiki_formatting/markdown/formatter.rb index 2d6f66559..4afbc2fdd 100644 --- a/lib/redmine/wiki_formatting/markdown/formatter.rb +++ b/lib/redmine/wiki_formatting/markdown/formatter.rb @@ -43,6 +43,12 @@ module Redmine "
    " + CGI.escapeHTML(code) + "
    " end end + + def image(link, title, alt_text) + return unless uri_with_safe_scheme?(link) + + tag('img', :src => link, :alt => alt_text || "", :title => title) + end end class Formatter From dac22ebb396248529da588664da8ea4046aa38d1 Mon Sep 17 00:00:00 2001 From: Jean-Philippe Lang Date: Wed, 1 Jun 2016 18:48:26 +0000 Subject: [PATCH 0009/1117] Test failure (#22926). git-svn-id: http://svn.redmine.org/redmine/trunk@15434 e93f8b46-1217-0410-a6f0-8f06a7374b81 --- test/unit/helpers/application_helper_test.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/test/unit/helpers/application_helper_test.rb b/test/unit/helpers/application_helper_test.rb index d2b195568..35a9b8ce2 100644 --- a/test/unit/helpers/application_helper_test.rb +++ b/test/unit/helpers/application_helper_test.rb @@ -164,7 +164,7 @@ RAW attachment = Attachment.generate!(:filename => 'café.jpg') with_settings :text_formatting => 'markdown' do - assert_include %(), + assert_include %(), textilizable("![](café.jpg)", :attachments => [attachment]) end end From 91e991e9517fdeecf7b495957e90af7536486547 Mon Sep 17 00:00:00 2001 From: Jean-Philippe Lang Date: Wed, 1 Jun 2016 19:27:09 +0000 Subject: [PATCH 0010/1117] Limits the schemes that custom field URL patterns can use (#22925). git-svn-id: http://svn.redmine.org/redmine/trunk@15435 e93f8b46-1217-0410-a6f0-8f06a7374b81 --- app/models/custom_field.rb | 8 ++++++++ lib/redmine/field_format.rb | 17 +++++++++++++++-- .../redmine/field_format/field_format_test.rb | 15 +++++++++++++++ 3 files changed, 38 insertions(+), 2 deletions(-) diff --git a/app/models/custom_field.rb b/app/models/custom_field.rb index 511299523..370ce7090 100644 --- a/app/models/custom_field.rb +++ b/app/models/custom_field.rb @@ -262,6 +262,14 @@ class CustomField < ActiveRecord::Base args.include?(field_format) end + def self.human_attribute_name(attribute_key_name, *args) + attr_name = attribute_key_name.to_s + if attr_name == 'url_pattern' + attr_name = "url" + end + super(attr_name, *args) + end + protected # Removes multiple values for the custom field after setting the multiple attribute to false diff --git a/lib/redmine/field_format.rb b/lib/redmine/field_format.rb index dd94eeefd..77014579b 100644 --- a/lib/redmine/field_format.rb +++ b/lib/redmine/field_format.rb @@ -48,6 +48,7 @@ module Redmine class Base include Singleton include Redmine::I18n + include Redmine::Helpers::URL include ERB::Util class_attribute :format_name @@ -149,7 +150,12 @@ module Redmine # Returns the validation errors for custom_field # Should return an empty array if custom_field is valid def validate_custom_field(custom_field) - [] + errors = [] + pattern = custom_field.url_pattern + if pattern.present? && !uri_with_safe_scheme?(url_pattern_without_tokens(pattern)) + errors << [:url_pattern, :invalid] + end + errors end # Returns the validation error messages for custom_value @@ -178,7 +184,7 @@ module Redmine url = url_from_pattern(custom_field, single_value, customized) [text, url] end - links = texts_and_urls.sort_by(&:first).map {|text, url| view.link_to text, url} + links = texts_and_urls.sort_by(&:first).map {|text, url| view.link_to_if uri_with_safe_scheme?(url), text, url} links.join(', ').html_safe else casted @@ -210,6 +216,13 @@ module Redmine end protected :url_from_pattern + # Returns the URL pattern with substitution tokens removed, + # for validation purpose + def url_pattern_without_tokens(url_pattern) + url_pattern.to_s.gsub(/%(value|id|project_id|project_identifier|m\d+)%/, '') + end + protected :url_pattern_without_tokens + def edit_tag(view, tag_id, tag_name, custom_value, options={}) view.text_field_tag(tag_name, custom_value.value, options.merge(:id => tag_id)) end diff --git a/test/unit/lib/redmine/field_format/field_format_test.rb b/test/unit/lib/redmine/field_format/field_format_test.rb index 9864d0c41..1f3bc20ea 100644 --- a/test/unit/lib/redmine/field_format/field_format_test.rb +++ b/test/unit/lib/redmine/field_format/field_format_test.rb @@ -20,6 +20,10 @@ require File.expand_path('../../../../../test_helper', __FILE__) class Redmine::FieldFormatTest < ActionView::TestCase include ApplicationHelper + def setup + set_language_if_valid 'en' + end + def test_string_field_with_text_formatting_disabled_should_not_format_text field = IssueCustomField.new(:field_format => 'string') custom_value = CustomValue.new(:custom_field => field, :customized => Issue.new, :value => "*foo*") @@ -52,6 +56,17 @@ class Redmine::FieldFormatTest < ActionView::TestCase assert_include "foo", field.format.formatted_custom_value(self, custom_value, true) end + def test_should_validate_url_pattern_with_safe_scheme + field = IssueCustomField.new(:field_format => 'string', :name => 'URL', :url_pattern => 'http://foo/%value%') + assert_save field + end + + def test_should_not_validate_url_pattern_with_unsafe_scheme + field = IssueCustomField.new(:field_format => 'string', :name => 'URL', :url_pattern => 'foo://foo/%value%') + assert !field.save + assert_include "URL is invalid", field.errors.full_messages + end + def test_text_field_with_url_pattern_should_format_as_link field = IssueCustomField.new(:field_format => 'string', :url_pattern => 'http://foo/%value%') custom_value = CustomValue.new(:custom_field => field, :customized => Issue.new, :value => "bar") From f20f49a76b9efe4e90659cc1decf973de4149452 Mon Sep 17 00:00:00 2001 From: Jean-Philippe Lang Date: Sat, 4 Jun 2016 07:31:29 +0000 Subject: [PATCH 0011/1117] Fix HTML generated for floating images in paragraphs (#22898). Patch by Gregor Schmidt. git-svn-id: http://svn.redmine.org/redmine/trunk@15442 e93f8b46-1217-0410-a6f0-8f06a7374b81 --- lib/redcloth3.rb | 2 +- test/unit/helpers/application_helper_test.rb | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/lib/redcloth3.rb b/lib/redcloth3.rb index b96ee7ab0..31051fa96 100644 --- a/lib/redcloth3.rb +++ b/lib/redcloth3.rb @@ -973,7 +973,7 @@ class RedCloth3 < String if stln == "

    " out = "

    #{ out }" else - out = "#{ stln }

    #{ out }
    " + out = "#{ stln }#{ out }" end else out = stln + out diff --git a/test/unit/helpers/application_helper_test.rb b/test/unit/helpers/application_helper_test.rb index 35a9b8ce2..89af800be 100644 --- a/test/unit/helpers/application_helper_test.rb +++ b/test/unit/helpers/application_helper_test.rb @@ -116,7 +116,7 @@ class ApplicationHelperTest < ActionView::TestCase def test_inline_images to_test = { '!http://foo.bar/image.jpg!' => '', - 'floating !>http://foo.bar/image.jpg!' => 'floating
    ', + 'floating !>http://foo.bar/image.jpg!' => 'floating ', 'with class !(some-class)http://foo.bar/image.jpg!' => 'with class ', 'with style !{width:100px;height:100px}http://foo.bar/image.jpg!' => 'with style ', 'with title !http://foo.bar/image.jpg(This is a title)!' => 'with title This is a title', From 681740d5beb8441d81a4cc3ed328fe019d88b6a3 Mon Sep 17 00:00:00 2001 From: Jean-Philippe Lang Date: Sat, 4 Jun 2016 07:41:05 +0000 Subject: [PATCH 0012/1117] Tests for #22754. git-svn-id: http://svn.redmine.org/redmine/trunk@15443 e93f8b46-1217-0410-a6f0-8f06a7374b81 --- .../api_test/custom_fields_attribute_test.rb | 20 +++++++++++++++++++ 1 file changed, 20 insertions(+) diff --git a/test/integration/api_test/custom_fields_attribute_test.rb b/test/integration/api_test/custom_fields_attribute_test.rb index 7fbfc19e1..401b06506 100644 --- a/test/integration/api_test/custom_fields_attribute_test.rb +++ b/test/integration/api_test/custom_fields_attribute_test.rb @@ -40,6 +40,26 @@ class Redmine::ApiTest::CustomFieldsAttributeTest < Redmine::ApiTest::Base assert_equal "52", group.custom_field_value(field) end + def test_boolean_custom_fields_should_accept_strings + field = GroupCustomField.generate!(:field_format => 'bool') + + post '/groups.json', %({"group":{"name":"Foo","custom_field_values":{"#{field.id}": "1"}}}), + {'CONTENT_TYPE' => 'application/json'}.merge(credentials('admin')) + assert_response :created + group = Group.order('id DESC').first + assert_equal "1", group.custom_field_value(field) + end + + def test_boolean_custom_fields_should_accept_integers + field = GroupCustomField.generate!(:field_format => 'bool') + + post '/groups.json', %({"group":{"name":"Foo","custom_field_values":{"#{field.id}": 1}}}), + {'CONTENT_TYPE' => 'application/json'}.merge(credentials('admin')) + assert_response :created + group = Group.order('id DESC').first + assert_equal "1", group.custom_field_value(field) + end + def test_multivalued_custom_fields_should_accept_an_array field = GroupCustomField.generate!( :field_format => 'list', From 02ca7ae79170350246d9198dce773bc96aeef16d Mon Sep 17 00:00:00 2001 From: Jean-Philippe Lang Date: Sat, 4 Jun 2016 10:05:26 +0000 Subject: [PATCH 0013/1117] German translation update (#22979). Patch by Tobias Fischer. git-svn-id: http://svn.redmine.org/redmine/trunk@15446 e93f8b46-1217-0410-a6f0-8f06a7374b81 --- config/locales/de.yml | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/config/locales/de.yml b/config/locales/de.yml index 98e3047f2..dafce612d 100644 --- a/config/locales/de.yml +++ b/config/locales/de.yml @@ -1199,9 +1199,9 @@ de: label_any_open_issues: irgendein offenes Ticket label_no_open_issues: kein offenes Ticket label_default_values_for_new_users: Standardwerte für neue Benutzer - error_ldap_bind_credentials: Invalid LDAP Account/Password - mail_body_settings_updated: ! 'The following settings were changed:' - label_relations: Relations + error_ldap_bind_credentials: Ungültiges LDAP Konto/Passwort + mail_body_settings_updated: ! 'Die folgenden Einstellungen wurden geändert:' + label_relations: Beziehungen button_filter: Filter - mail_body_password_updated: Your password has been changed. - setting_new_project_issue_tab_enabled: Display the "New issue" tab + mail_body_password_updated: Ihr Passwort wurde geändert. + setting_new_project_issue_tab_enabled: Tab "Neues Ticket" anzeigen From a260715ea2b651b5d1bc3801321d4a19c61c7c27 Mon Sep 17 00:00:00 2001 From: Jean-Philippe Lang Date: Sat, 4 Jun 2016 10:07:41 +0000 Subject: [PATCH 0014/1117] Czech translation update (#22974). MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Patch by Karel Pičman. git-svn-id: http://svn.redmine.org/redmine/trunk@15448 e93f8b46-1217-0410-a6f0-8f06a7374b81 --- config/locales/cs.yml | 98 +++++++++---------- .../cs/wiki_syntax_detailed_markdown.html | 8 +- .../help/cs/wiki_syntax_detailed_textile.html | 8 +- 3 files changed, 57 insertions(+), 57 deletions(-) diff --git a/config/locales/cs.yml b/config/locales/cs.yml index baf157bef..d76b10df0 100644 --- a/config/locales/cs.yml +++ b/config/locales/cs.yml @@ -1,4 +1,4 @@ -# Update to 2.2, 2.4, 2.5, 2.6, 3.1 by Karel Picman +# Update to 2.2, 2.4, 2.5, 2.6, 3.1, 3.3 by Karel Picman # Update to 1.1 by Michal Gebauer # Updated by Josef Liška # CZ translation by Maxim Krušina | Massimo Filippi, s.r.o. | maxim@mxm.cz @@ -1149,57 +1149,57 @@ cs: label_member_management_selected_roles_only: Pouze tyto role label_password_required: Pro pokračování potvrďte vaše heslo label_total_spent_time: Celkem strávený čas - notice_import_finished: All %{count} items have been imported. - notice_import_finished_with_errors: ! '%{count} out of %{total} items could not be - imported.' - error_invalid_file_encoding: The file is not a valid %{encoding} encoded file - error_invalid_csv_file_or_settings: The file is not a CSV file or does not match the - settings below - error_can_not_read_import_file: An error occurred while reading the file to import - permission_import_issues: Import issues - label_import_issues: Import issues - label_select_file_to_import: Select the file to import - label_fields_separator: Field separator - label_fields_wrapper: Field wrapper - label_encoding: Encoding - label_comma_char: Comma - label_semi_colon_char: Semicolon - label_quote_char: Quote - label_double_quote_char: Double quote - label_fields_mapping: Fields mapping - label_file_content_preview: File content preview - label_create_missing_values: Create missing values + notice_import_finished: Všech %{count} položek bylo naimportováno. + notice_import_finished_with_errors: ! '%{count} z %{total} položek nemohlo být + naimportováno.' + error_invalid_file_encoding: Soubor není platným souborem s kódováním %{encoding} + error_invalid_csv_file_or_settings: Soubor není CSV soubor nebo neodpovídá + níže uvedenému nastavení + error_can_not_read_import_file: Chyba při čtení souboru pro import + permission_import_issues: Import úkolů + label_import_issues: Import úkolů + label_select_file_to_import: Vyberte soubor pro import + label_fields_separator: Oddělovač pole + label_fields_wrapper: Oddělovač textu + label_encoding: Kódování + label_comma_char: Čárka + label_semi_colon_char: Středník + label_quote_char: Uvozovky + label_double_quote_char: Dvojté uvozovky + label_fields_mapping: Mapování polí + label_file_content_preview: Náhled obsahu souboru + label_create_missing_values: Vytvořit chybějící hodnoty button_import: Import - field_total_estimated_hours: Total estimated time + field_total_estimated_hours: Celkový odhadovaný čas label_api: API - label_total_plural: Totals - label_assigned_issues: Assigned issues - label_field_format_enumeration: Key/value list - label_f_hour_short: '%{value} h' - field_default_version: Default version - error_attachment_extension_not_allowed: Attachment extension %{extension} is not allowed - setting_attachment_extensions_allowed: Allowed extensions - setting_attachment_extensions_denied: Disallowed extensions - label_any_open_issues: any open issues - label_no_open_issues: no open issues - label_default_values_for_new_users: Default values for new users - error_ldap_bind_credentials: Invalid LDAP Account/Password + label_total_plural: Celkem + label_assigned_issues: Přiřazené úkoly + label_field_format_enumeration: Seznam klíčů/hodnot + label_f_hour_short: '%{value} hod' + field_default_version: Výchozí verze + error_attachment_extension_not_allowed: Přípona přílohy %{extension} není povolena + setting_attachment_extensions_allowed: Povolené přípony + setting_attachment_extensions_denied: Nepovolené přípony + label_any_open_issues: otevřené úkoly + label_no_open_issues: bez otevřených úkolů + label_default_values_for_new_users: Výchozí hodnoty pro nové uživatele + error_ldap_bind_credentials: Neplatný účet/heslo LDAP setting_sys_api_key: API klíč setting_lost_password: Zapomenuté heslo - mail_subject_security_notification: Security notification - mail_body_security_notification_change: ! '%{field} was changed.' - mail_body_security_notification_change_to: ! '%{field} was changed to %{value}.' - mail_body_security_notification_add: ! '%{field} %{value} was added.' + mail_subject_security_notification: Bezpečnostní upozornění + mail_body_security_notification_change: ! '%{field} bylo změněno.' + mail_body_security_notification_change_to: ! '%{field} bylo změněno na %{value}.' + mail_body_security_notification_add: ! '%{field} %{value} bylo přidáno.' mail_body_security_notification_remove: ! '%{field} %{value} was removed.' - mail_body_security_notification_notify_enabled: Email address %{value} now receives - notifications. - mail_body_security_notification_notify_disabled: Email address %{value} no longer - receives notifications. + mail_body_security_notification_notify_enabled: Email %{value} nyní dostává + notifikace. + mail_body_security_notification_notify_disabled: Email %{value} už nedostává + notifikace. mail_body_settings_updated: ! 'The following settings were changed:' - field_remote_ip: IP address - label_wiki_page_new: New wiki page - label_relations: Relations - button_filter: Filter - mail_body_password_updated: Your password has been changed. - label_no_preview: No preview available - setting_new_project_issue_tab_enabled: Display the "New issue" tab + field_remote_ip: IP adresa + label_wiki_page_new: Nová wiki stránka + label_relations: Relace + button_filter: Filtr + mail_body_password_updated: Vaše heslo bylo změněno. + label_no_preview: Náhled není k dispozici + setting_new_project_issue_tab_enabled: Zobraz záložku "Nový úkol" diff --git a/public/help/cs/wiki_syntax_detailed_markdown.html b/public/help/cs/wiki_syntax_detailed_markdown.html index bf5d9aaf2..967e7bce2 100644 --- a/public/help/cs/wiki_syntax_detailed_markdown.html +++ b/public/help/cs/wiki_syntax_detailed_markdown.html @@ -124,11 +124,11 @@
    -
  • Forums: +
  • Diskuzní fóra:
      -
    • forum#1 (link to forum with id 1
    • -
    • forum:Support (link to forum named Support)
    • -
    • forum:"Technical Support" (use double quotes if forum name contains spaces)
    • +
    • forum#1 (odkaz na fórum s id 1
    • +
    • forum:Support (odkaz na fórum pojmenované Support)
    • +
    • forum:"Technical Support" (Použij dvojté uvozovkym jestliže název fóra obsahuje mezery.)
diff --git a/public/help/cs/wiki_syntax_detailed_textile.html b/public/help/cs/wiki_syntax_detailed_textile.html index b8be74f62..5168ea97b 100644 --- a/public/help/cs/wiki_syntax_detailed_textile.html +++ b/public/help/cs/wiki_syntax_detailed_textile.html @@ -120,11 +120,11 @@
    -
  • Forums: +
  • Diskuzní fóra:
      -
    • forum#1 (link to forum with id 1
    • -
    • forum:Support (link to forum named Support)
    • -
    • forum:"Technical Support" (use double quotes if forum name contains spaces)
    • +
    • forum#1 (odkaz na fórum s id 1
    • +
    • forum:Support (odkaz na fórum pojmenované Support)
    • +
    • forum:"Technical Support" (Použij dvojté uvozovkym jestliže název fóra obsahuje mezery.)
From 765b6e32d696c97fef16a7ccc5ea0792e511077a Mon Sep 17 00:00:00 2001 From: Jean-Philippe Lang Date: Sat, 4 Jun 2016 10:26:57 +0000 Subject: [PATCH 0015/1117] Don't query for each role. git-svn-id: http://svn.redmine.org/redmine/trunk@15450 e93f8b46-1217-0410-a6f0-8f06a7374b81 --- app/views/roles/_form.html.erb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app/views/roles/_form.html.erb b/app/views/roles/_form.html.erb index 33fc08d5e..84d5de185 100644 --- a/app/views/roles/_form.html.erb +++ b/app/views/roles/_form.html.erb @@ -31,7 +31,7 @@ <% Role.givable.sorted.each do |role| %> <% end %> From 25eab86bbaf9d31d966b690ff788f47e27e92c70 Mon Sep 17 00:00:00 2001 From: Jean-Philippe Lang Date: Sun, 5 Jun 2016 07:06:48 +0000 Subject: [PATCH 0016/1117] Fixed colspan value (#22932). Patch by Marius BALTEANU. git-svn-id: http://svn.redmine.org/redmine/trunk@15452 e93f8b46-1217-0410-a6f0-8f06a7374b81 --- app/views/issues/_list.html.erb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app/views/issues/_list.html.erb b/app/views/issues/_list.html.erb index 7d3654169..26287e75c 100644 --- a/app/views/issues/_list.html.erb +++ b/app/views/issues/_list.html.erb @@ -18,7 +18,7 @@ <% if group_name %> <% reset_cycle %> - +   <%= group_name %> <%= group_count %> <%= group_totals %> <%= link_to_function("#{l(:button_collapse_all)}/#{l(:button_expand_all)}", From b094df56f22879bdaffa3854f9001ad6ed068e2d Mon Sep 17 00:00:00 2001 From: Jean-Philippe Lang Date: Sun, 5 Jun 2016 07:12:53 +0000 Subject: [PATCH 0017/1117] CHANGELOG for 3.2.3. git-svn-id: http://svn.redmine.org/redmine/trunk@15455 e93f8b46-1217-0410-a6f0-8f06a7374b81 --- doc/CHANGELOG | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/doc/CHANGELOG b/doc/CHANGELOG index c56cc7789..36d032dc8 100644 --- a/doc/CHANGELOG +++ b/doc/CHANGELOG @@ -4,6 +4,16 @@ Redmine - project management software Copyright (C) 2006-2016 Jean-Philippe Lang http://www.redmine.org/ +== 2016-06-05 v3.2.3 + +* Defect #22808: Malformed SQL query with SQLServer when grouping and sorting by fixed version +* Defect #22912: Selecting a new filter on Activities should not reset the date range +* Defect #22932: "Group by" row from issues listing has the colspan attribute bigger with one than the number of columns from the table +* Patch #22427: pt-BR translation for 3.2.stable +* Patch #22761: Korean translation for 3.2-stable +* Patch #22898: !>image.png! generates invalid HTML +* Patch #22911: Error raised when importing issue with Key/Value List custom field + == 2016-05-05 v3.2.2 * Defect #5156: Bulk edit form lacks estimated time field From 939a7137ef985647d34fdacadf419b313bcd9110 Mon Sep 17 00:00:00 2001 From: Jean-Philippe Lang Date: Sun, 5 Jun 2016 07:20:55 +0000 Subject: [PATCH 0018/1117] CHANGELOG. git-svn-id: http://svn.redmine.org/redmine/trunk@15459 e93f8b46-1217-0410-a6f0-8f06a7374b81 --- doc/CHANGELOG | 3 +++ 1 file changed, 3 insertions(+) diff --git a/doc/CHANGELOG b/doc/CHANGELOG index 36d032dc8..24af2b7ff 100644 --- a/doc/CHANGELOG +++ b/doc/CHANGELOG @@ -8,6 +8,9 @@ http://www.redmine.org/ * Defect #22808: Malformed SQL query with SQLServer when grouping and sorting by fixed version * Defect #22912: Selecting a new filter on Activities should not reset the date range +* Defect #22924: Persistent XSS in Markdown parsing +* Defect #22925: Persistent XSS in project homepage field +* Defect #22926: Persistent XSS in Textile parsing * Defect #22932: "Group by" row from issues listing has the colspan attribute bigger with one than the number of columns from the table * Patch #22427: pt-BR translation for 3.2.stable * Patch #22761: Korean translation for 3.2-stable From 79df68e17fc09a4d8bc87cad8efb4bc31c085dcd Mon Sep 17 00:00:00 2001 From: Jean-Philippe Lang Date: Sun, 5 Jun 2016 10:06:17 +0000 Subject: [PATCH 0019/1117] Limit trackers for new issue to certain roles (#7839). git-svn-id: http://svn.redmine.org/redmine/trunk@15464 e93f8b46-1217-0410-a6f0-8f06a7374b81 --- app/controllers/issues_controller.rb | 8 +- app/models/issue.rb | 23 +++-- app/models/issue_import.rb | 2 +- app/models/role.rb | 51 +++++++++++ app/views/roles/_form.html.erb | 44 ++++++++++ config/locales/en.yml | 2 + config/locales/fr.yml | 2 + .../20160529063352_add_roles_settings.rb | 5 ++ test/functional/issues_controller_test.rb | 42 +++++++++ test/functional/roles_controller_test.rb | 16 ++++ test/unit/issue_test.rb | 85 +++++++++++++++++++ 11 files changed, 272 insertions(+), 8 deletions(-) create mode 100644 db/migrate/20160529063352_add_roles_settings.rb diff --git a/app/controllers/issues_controller.rb b/app/controllers/issues_controller.rb index 1db5e6ff8..37825c995 100644 --- a/app/controllers/issues_controller.rb +++ b/app/controllers/issues_controller.rb @@ -467,7 +467,13 @@ class IssuesController < ApplicationController if @issue.project @issue.tracker ||= @issue.allowed_target_trackers.first if @issue.tracker.nil? - render_error l(:error_no_tracker_in_project) + if @issue.project.trackers.any? + # None of the project trackers is allowed to the user + render_error :message => l(:error_no_tracker_allowed_for_new_issue_in_project), :status => 403 + else + # Project has no trackers + render_error l(:error_no_tracker_in_project) + end return false end if @issue.status.nil? diff --git a/app/models/issue.rb b/app/models/issue.rb index d6133d3a9..2baaea3f8 100644 --- a/app/models/issue.rb +++ b/app/models/issue.rb @@ -1368,16 +1368,27 @@ class Issue < ActiveRecord::Base # Returns a scope of trackers that user can assign the issue to def allowed_target_trackers(user=User.current) - if project - self.class.allowed_target_trackers(project, user, tracker_id_was) - else - Tracker.none - end + self.class.allowed_target_trackers(project, user, tracker_id_was) end # Returns a scope of trackers that user can assign project issues to def self.allowed_target_trackers(project, user=User.current, current_tracker=nil) - project.trackers.sorted + if project + scope = project.trackers.sorted + unless user.admin? + roles = user.roles_for_project(project).select {|r| r.has_permission?(:add_issues)} + unless roles.any? {|r| r.permissions_all_trackers?(:add_issues)} + tracker_ids = roles.map {|r| r.permissions_tracker_ids(:add_issues)}.flatten.uniq + if current_tracker + tracker_ids << current_tracker + end + scope = scope.where(:id => tracker_ids) + end + end + scope + else + Tracker.none + end end private diff --git a/app/models/issue_import.rb b/app/models/issue_import.rb index b6b20a1b1..5b19ac966 100644 --- a/app/models/issue_import.rb +++ b/app/models/issue_import.rb @@ -37,7 +37,7 @@ class IssueImport < Import # Returns a scope of trackers that user is allowed to # import issue to def allowed_target_trackers - project.trackers + Issue.allowed_target_trackers(project, user) end def tracker diff --git a/app/models/role.rb b/app/models/role.rb index defbc311d..89538aa4d 100644 --- a/app/models/role.rb +++ b/app/models/role.rb @@ -73,6 +73,7 @@ class Role < ActiveRecord::Base acts_as_positioned :scope => :builtin serialize :permissions, ::Role::PermissionsAttributeCoder + store :settings, :accessors => [:permissions_all_trackers, :permissions_tracker_ids] attr_protected :builtin validates_presence_of :name @@ -188,6 +189,56 @@ class Role < ActiveRecord::Base setable_permissions end + def permissions_tracker_ids(*args) + if args.any? + Array(permissions_tracker_ids[args.first.to_s]).map(&:to_i) + else + super || {} + end + end + + def permissions_tracker_ids=(arg) + h = arg.to_hash + h.values.each {|v| v.reject!(&:blank?)} + super(h) + end + + # Returns true if tracker_id belongs to the list of + # trackers for which permission is given + def permissions_tracker_ids?(permission, tracker_id) + permissions_tracker_ids(permission).include?(tracker_id) + end + + def permissions_all_trackers + super || {} + end + + def permissions_all_trackers=(arg) + super(arg.to_hash) + end + + # Returns true if permission is given for all trackers + def permissions_all_trackers?(permission) + permissions_all_trackers[permission.to_s].to_s != '0' + end + + # Sets the trackers that are allowed for a permission. + # tracker_ids can be an array of tracker ids or :all for + # no restrictions. + # + # Examples: + # role.set_permission_trackers :add_issues, [1, 3] + # role.set_permission_trackers :add_issues, :all + def set_permission_trackers(permission, tracker_ids) + h = {permission.to_s => (tracker_ids == :all ? '1' : '0')} + self.permissions_all_trackers = permissions_all_trackers.merge(h) + + h = {permission.to_s => (tracker_ids == :all ? [] : tracker_ids)} + self.permissions_tracker_ids = permissions_tracker_ids.merge(h) + + self + end + # Find all the roles that can be given to a project member def self.find_all_givable Role.givable.to_a diff --git a/app/views/roles/_form.html.erb b/app/views/roles/_form.html.erb index 84d5de185..524c273d0 100644 --- a/app/views/roles/_form.html.erb +++ b/app/views/roles/_form.html.erb @@ -62,6 +62,50 @@ <%= hidden_field_tag 'role[permissions][]', '' %> +
+

<%= l(:label_issue_tracking) %>

+<% permissions = %w(add_issues) %> + + + + + <% permissions.each do |permission| %> + + <% end %> + + + + + <% permissions.each do |permission| %> + + <% end %> + + <% Tracker.sorted.all.each do |tracker| %> + + + <% permissions.each do |permission| %> + + <% end %> + + <% end %> + +
<%= l(:label_tracker) %><%= l("permission_#{permission}") %>
<%= l(:label_tracker_all) %> + <%= hidden_field_tag "role[permissions_all_trackers][#{permission}]", '0', :id => nil %> + <%= check_box_tag "role[permissions_all_trackers][#{permission}]", + '1', + @role.permissions_all_trackers?(permission), + :data => {:disables => ".#{permission}_tracker"} %> +
<%= tracker.name %><%= check_box_tag "role[permissions_tracker_ids][#{permission}][]", + tracker.id, + @role.permissions_tracker_ids?(permission, tracker.id), + :class => "#{permission}_tracker", + :id => "role_permissions_tracker_ids_add_issues_#{tracker.id}" %>
+ +<% permissions.each do |permission| %> + <%= hidden_field_tag "role[permissions_tracker_ids][#{permission}][]", '' %> +<% end %> +
+ <%= javascript_tag do %> $(document).ready(function(){ $("#role_permissions_manage_members").change(function(){ diff --git a/config/locales/en.yml b/config/locales/en.yml index 9dd03560c..522cb5227 100644 --- a/config/locales/en.yml +++ b/config/locales/en.yml @@ -213,6 +213,7 @@ en: error_can_not_read_import_file: "An error occurred while reading the file to import" error_attachment_extension_not_allowed: "Attachment extension %{extension} is not allowed" error_ldap_bind_credentials: "Invalid LDAP Account/Password" + error_no_tracker_allowed_for_new_issue_in_project: "The project doesn't have any trackers for which you can create an issue" mail_subject_lost_password: "Your %{value} password" mail_body_lost_password: 'To change your password, click on the following link:' @@ -561,6 +562,7 @@ en: label_member_plural: Members label_tracker: Tracker label_tracker_plural: Trackers + label_tracker_all: All trackers label_tracker_new: New tracker label_workflow: Workflow label_issue_status: Issue status diff --git a/config/locales/fr.yml b/config/locales/fr.yml index 6a72024f6..760c84c95 100644 --- a/config/locales/fr.yml +++ b/config/locales/fr.yml @@ -233,6 +233,7 @@ fr: error_can_not_read_import_file: "Une erreur est survenue lors de la lecture du fichier à importer" error_attachment_extension_not_allowed: "L'extension %{extension} n'est pas autorisée" error_ldap_bind_credentials: "Identifiant ou mot de passe LDAP incorrect" + error_no_tracker_allowed_for_new_issue_in_project: "Le projet ne dispose d'aucun tracker sur lequel vous pouvez créer une demande" mail_subject_lost_password: "Votre mot de passe %{value}" mail_body_lost_password: 'Pour changer votre mot de passe, cliquez sur le lien suivant :' @@ -573,6 +574,7 @@ fr: label_member_plural: Membres label_tracker: Tracker label_tracker_plural: Trackers + label_tracker_all: Tous les trackers label_tracker_new: Nouveau tracker label_workflow: Workflow label_issue_status: Statut de demandes diff --git a/db/migrate/20160529063352_add_roles_settings.rb b/db/migrate/20160529063352_add_roles_settings.rb new file mode 100644 index 000000000..921187ec1 --- /dev/null +++ b/db/migrate/20160529063352_add_roles_settings.rb @@ -0,0 +1,5 @@ +class AddRolesSettings < ActiveRecord::Migration + def change + add_column :roles, :settings, :text + end +end \ No newline at end of file diff --git a/test/functional/issues_controller_test.rb b/test/functional/issues_controller_test.rb index 32f9d8f11..8888cf712 100644 --- a/test/functional/issues_controller_test.rb +++ b/test/functional/issues_controller_test.rb @@ -1864,6 +1864,31 @@ class IssuesControllerTest < ActionController::TestCase end end + def test_new_should_propose_allowed_trackers + role = Role.find(1) + role.set_permission_trackers 'add_issues', [1, 3] + role.save! + @request.session[:user_id] = 2 + + get :new, :project_id => 1 + assert_response :success + assert_select 'select[name=?]', 'issue[tracker_id]' do + assert_select 'option', 2 + assert_select 'option[value="1"]' + assert_select 'option[value="3"]' + end + end + + def test_new_without_allowed_trackers_should_respond_with_403 + role = Role.find(1) + role.set_permission_trackers 'add_issues', [] + role.save! + @request.session[:user_id] = 2 + + get :new, :project_id => 1 + assert_response 403 + end + def test_new_should_preselect_default_version version = Version.generate!(:project_id => 1) Project.find(1).update_attribute :default_version_id, version.id @@ -2432,6 +2457,23 @@ class IssuesControllerTest < ActionController::TestCase assert_nil issue.custom_field_value(cf2) end + def test_create_should_ignore_unallowed_trackers + role = Role.find(1) + role.set_permission_trackers :add_issues, [3] + role.save! + @request.session[:user_id] = 2 + + issue = new_record(Issue) do + post :create, :project_id => 1, :issue => { + :tracker_id => 1, + :status_id => 1, + :subject => 'Test' + } + assert_response 302 + end + assert_equal 3, issue.tracker_id + end + def test_post_create_with_watchers @request.session[:user_id] = 2 ActionMailer::Base.deliveries.clear diff --git a/test/functional/roles_controller_test.rb b/test/functional/roles_controller_test.rb index 8ce469395..915b658c9 100644 --- a/test/functional/roles_controller_test.rb +++ b/test/functional/roles_controller_test.rb @@ -132,6 +132,22 @@ class RolesControllerTest < ActionController::TestCase assert_equal [:edit_project], role.permissions end + def test_update_trackers_permissions + put :update, :id => 1, :role => { + :permissions_all_trackers => {'add_issues' => '0'}, + :permissions_tracker_ids => {'add_issues' => ['1', '3', '']} + } + + assert_redirected_to '/roles' + role = Role.find(1) + + assert_equal({'add_issues' => '0'}, role.permissions_all_trackers) + assert_equal({'add_issues' => ['1', '3']}, role.permissions_tracker_ids) + + assert_equal false, role.permissions_all_trackers?(:add_issues) + assert_equal [1, 3], role.permissions_tracker_ids(:add_issues).sort + end + def test_update_with_failure put :update, :id => 1, :role => {:name => ''} assert_response :success diff --git a/test/unit/issue_test.rb b/test/unit/issue_test.rb index 363cdd071..f7f7003d2 100644 --- a/test/unit/issue_test.rb +++ b/test/unit/issue_test.rb @@ -1438,6 +1438,91 @@ class IssueTest < ActiveSupport::TestCase assert_not_include project, Issue.allowed_target_projects(User.find(1)) end + def test_allowed_target_trackers_with_one_role_allowed_on_all_trackers + user = User.generate! + role = Role.generate! + role.add_permission! :add_issues + role.set_permission_trackers :add_issues, :all + role.save! + User.add_to_project(user, Project.find(1), role) + + assert_equal [1, 2, 3], Issue.new(:project => Project.find(1)).allowed_target_trackers(user).ids.sort + end + + def test_allowed_target_trackers_with_one_role_allowed_on_some_trackers + user = User.generate! + role = Role.generate! + role.add_permission! :add_issues + role.set_permission_trackers :add_issues, [1, 3] + role.save! + User.add_to_project(user, Project.find(1), role) + + assert_equal [1, 3], Issue.new(:project => Project.find(1)).allowed_target_trackers(user).ids.sort + end + + def test_allowed_target_trackers_with_two_roles_allowed_on_some_trackers + user = User.generate! + role1 = Role.generate! + role1.add_permission! :add_issues + role1.set_permission_trackers :add_issues, [1] + role1.save! + role2 = Role.generate! + role2.add_permission! :add_issues + role2.set_permission_trackers :add_issues, [3] + role2.save! + User.add_to_project(user, Project.find(1), [role1, role2]) + + assert_equal [1, 3], Issue.new(:project => Project.find(1)).allowed_target_trackers(user).ids.sort + end + + def test_allowed_target_trackers_with_two_roles_allowed_on_all_trackers_and_some_trackers + user = User.generate! + role1 = Role.generate! + role1.add_permission! :add_issues + role1.set_permission_trackers :add_issues, :all + role1.save! + role2 = Role.generate! + role2.add_permission! :add_issues + role2.set_permission_trackers :add_issues, [1, 3] + role2.save! + User.add_to_project(user, Project.find(1), [role1, role2]) + + assert_equal [1, 2, 3], Issue.new(:project => Project.find(1)).allowed_target_trackers(user).ids.sort + end + + def test_allowed_target_trackers_should_not_consider_roles_without_add_issues_permission + user = User.generate! + role1 = Role.generate! + role1.remove_permission! :add_issues + role1.set_permission_trackers :add_issues, :all + role1.save! + role2 = Role.generate! + role2.add_permission! :add_issues + role2.set_permission_trackers :add_issues, [1, 3] + role2.save! + User.add_to_project(user, Project.find(1), [role1, role2]) + + assert_equal [1, 3], Issue.new(:project => Project.find(1)).allowed_target_trackers(user).ids.sort + end + + def test_allowed_target_trackers_without_project_should_be_empty + issue = Issue.new + assert_nil issue.project + assert_equal [], issue.allowed_target_trackers(User.find(2)).ids + end + + def test_allowed_target_trackers_should_include_current_tracker + user = User.generate! + role = Role.generate! + role.add_permission! :add_issues + role.set_permission_trackers :add_issues, [3] + role.save! + User.add_to_project(user, Project.find(1), role) + + issue = Issue.generate!(:project => Project.find(1), :tracker => Tracker.find(1)) + assert_equal [1, 3], issue.allowed_target_trackers(user).ids.sort + end + def test_move_to_another_project_with_same_category issue = Issue.find(1) issue.project = Project.find(2) From a23450fe08f367a1d4a03e937c3f8e90f83383fe Mon Sep 17 00:00:00 2001 From: Jean-Philippe Lang Date: Sun, 5 Jun 2016 11:50:09 +0000 Subject: [PATCH 0020/1117] Adds issue visibility by role/tracker (#285). git-svn-id: http://svn.redmine.org/redmine/trunk@15465 e93f8b46-1217-0410-a6f0-8f06a7374b81 --- app/models/issue.rb | 19 ++++++++-- app/views/roles/_form.html.erb | 2 +- test/unit/issue_test.rb | 63 ++++++++++++++++++++++++++++++++++ 3 files changed, 80 insertions(+), 4 deletions(-) diff --git a/app/models/issue.rb b/app/models/issue.rb index 2baaea3f8..91ea73a6f 100644 --- a/app/models/issue.rb +++ b/app/models/issue.rb @@ -120,10 +120,10 @@ class Issue < ActiveRecord::Base # Returns a SQL conditions string used to find all issues visible by the specified user def self.visible_condition(user, options={}) Project.allowed_to_condition(user, :view_issues, options) do |role, user| - if user.id && user.logged? + sql = if user.id && user.logged? case role.issues_visibility when 'all' - nil + '1=1' when 'default' user_ids = [user.id] + user.groups.map(&:id).compact "(#{table_name}.is_private = #{connection.quoted_false} OR #{table_name}.author_id = #{user.id} OR #{table_name}.assigned_to_id IN (#{user_ids.join(',')}))" @@ -136,13 +136,22 @@ class Issue < ActiveRecord::Base else "(#{table_name}.is_private = #{connection.quoted_false})" end + unless role.permissions_all_trackers?(:view_issues) + tracker_ids = role.permissions_tracker_ids(:view_issues) + if tracker_ids.any? + sql = "(#{sql} AND #{table_name}.tracker_id IN (#{tracker_ids.join(',')}))" + else + sql = '1=0' + end + end + sql end end # Returns true if usr or current user is allowed to view the issue def visible?(usr=nil) (usr || User.current).allowed_to?(:view_issues, self.project) do |role, user| - if user.logged? + visible = if user.logged? case role.issues_visibility when 'all' true @@ -156,6 +165,10 @@ class Issue < ActiveRecord::Base else !self.is_private? end + unless role.permissions_all_trackers?(:view_issues) + visible &&= role.permissions_tracker_ids?(:view_issues, tracker_id) + end + visible end end diff --git a/app/views/roles/_form.html.erb b/app/views/roles/_form.html.erb index 524c273d0..c8a3a61cc 100644 --- a/app/views/roles/_form.html.erb +++ b/app/views/roles/_form.html.erb @@ -64,7 +64,7 @@

<%= l(:label_issue_tracking) %>

-<% permissions = %w(add_issues) %> +<% permissions = %w(view_issues add_issues) %> diff --git a/test/unit/issue_test.rb b/test/unit/issue_test.rb index f7f7003d2..3b7391a3c 100644 --- a/test/unit/issue_test.rb +++ b/test/unit/issue_test.rb @@ -342,6 +342,69 @@ class IssueTest < ActiveSupport::TestCase assert_include issue, issues end + def test_visible_scope_for_member_with_limited_tracker_ids + role = Role.find(1) + role.set_permission_trackers :view_issues, [2] + role.save! + user = User.find(2) + + issues = Issue.where(:project_id => 1).visible(user).to_a + assert issues.any? + assert_equal [2], issues.map(&:tracker_id).uniq + + assert Issue.where(:project_id => 1).all? {|issue| issue.visible?(user) ^ issue.tracker_id != 2} + end + + def test_visible_scope_should_consider_tracker_ids_on_each_project + user = User.generate! + + project1 = Project.generate! + role1 = Role.generate! + role1.add_permission! :view_issues + role1.set_permission_trackers :view_issues, :all + role1.save! + User.add_to_project(user, project1, role1) + + project2 = Project.generate! + role2 = Role.generate! + role2.add_permission! :view_issues + role2.set_permission_trackers :view_issues, [2] + role2.save! + User.add_to_project(user, project2, role2) + + visible_issues = [ + Issue.generate!(:project => project1, :tracker_id => 1), + Issue.generate!(:project => project1, :tracker_id => 2), + Issue.generate!(:project => project2, :tracker_id => 2) + ] + hidden_issue = Issue.generate!(:project => project2, :tracker_id => 1) + + issues = Issue.where(:project_id => [project1.id, project2.id]).visible(user) + assert_equal visible_issues.map(&:id), issues.ids.sort + + assert visible_issues.all? {|issue| issue.visible?(user)} + assert !hidden_issue.visible?(user) + end + + def test_visible_scope_should_not_consider_roles_without_view_issues_permission + user = User.generate! + role1 = Role.generate! + role1.remove_permission! :view_issues + role1.set_permission_trackers :view_issues, :all + role1.save! + role2 = Role.generate! + role2.add_permission! :view_issues + role2.set_permission_trackers :view_issues, [2] + role2.save! + User.add_to_project(user, Project.find(1), [role1, role2]) + + issues = Issue.where(:project_id => 1).visible(user).to_a + assert issues.any? + assert_equal [2], issues.map(&:tracker_id).uniq + + assert Issue.where(:project_id => 1).all? {|issue| issue.visible?(user) ^ issue.tracker_id != 2} + end + def test_visible_scope_for_admin user = User.find(1) user.members.each(&:destroy) From c4fd1750f703a7649f0b3b52b25cf32fa532b5b3 Mon Sep 17 00:00:00 2001 From: Jean-Philippe Lang Date: Sun, 5 Jun 2016 13:45:10 +0000 Subject: [PATCH 0021/1117] Adds permission to edit and delete issues by role/tracker (#285). git-svn-id: http://svn.redmine.org/redmine/trunk@15466 e93f8b46-1217-0410-a6f0-8f06a7374b81 --- app/controllers/context_menus_controller.rb | 4 +- app/controllers/issues_controller.rb | 9 ++++ app/models/issue.rb | 27 ++++++++--- app/views/issues/_action_menu.html.erb | 2 +- app/views/issues/_edit.html.erb | 29 ++++++------ app/views/issues/_history.html.erb | 2 +- app/views/issues/show.html.erb | 2 +- app/views/roles/_form.html.erb | 7 ++- public/stylesheets/application.css | 1 + test/functional/issues_controller_test.rb | 50 +++++++++++++++++++++ 10 files changed, 106 insertions(+), 27 deletions(-) diff --git a/app/controllers/context_menus_controller.rb b/app/controllers/context_menus_controller.rb index 59ee3a77a..66ec35085 100644 --- a/app/controllers/context_menus_controller.rb +++ b/app/controllers/context_menus_controller.rb @@ -29,11 +29,11 @@ class ContextMenusController < ApplicationController @allowed_statuses = @issues.map(&:new_statuses_allowed_to).reduce(:&) - @can = {:edit => User.current.allowed_to?(:edit_issues, @projects), + @can = {:edit => @issues.all?(&:attributes_editable?), :log_time => (@project && User.current.allowed_to?(:log_time, @project)), :copy => User.current.allowed_to?(:copy_issues, @projects) && Issue.allowed_target_projects.any?, :add_watchers => User.current.allowed_to?(:add_issue_watchers, @projects), - :delete => User.current.allowed_to?(:delete_issues, @projects) + :delete => @issues.all?(&:deletable?) } if @project if @issue diff --git a/app/controllers/issues_controller.rb b/app/controllers/issues_controller.rb index 37825c995..67956667a 100644 --- a/app/controllers/issues_controller.rb +++ b/app/controllers/issues_controller.rb @@ -211,6 +211,10 @@ class IssuesController < ApplicationController unless User.current.allowed_to?(:copy_issues, @projects) raise ::Unauthorized end + else + unless @issues.all?(&:attributes_editable?) + raise ::Unauthorized + end end @allowed_projects = Issue.allowed_target_projects @@ -263,6 +267,10 @@ class IssuesController < ApplicationController unless User.current.allowed_to?(:add_issues, target_projects) raise ::Unauthorized end + else + unless @issues.all?(&:attributes_editable?) + raise ::Unauthorized + end end unsaved_issues = [] @@ -316,6 +324,7 @@ class IssuesController < ApplicationController end def destroy + raise Unauthorized unless @issues.all?(&:deletable?) @hours = TimeEntry.where(:issue_id => @issues.map(&:id)).sum(:hours).to_f if @hours > 0 case params[:todo] diff --git a/app/models/issue.rb b/app/models/issue.rb index 91ea73a6f..28a7f9fe6 100644 --- a/app/models/issue.rb +++ b/app/models/issue.rb @@ -172,14 +172,24 @@ class Issue < ActiveRecord::Base end end - # Returns true if user or current user is allowed to edit or add a note to the issue + # Returns true if user or current user is allowed to edit or add notes to the issue def editable?(user=User.current) - attributes_editable?(user) || user.allowed_to?(:add_issue_notes, project) + attributes_editable?(user) || notes_addable?(user) end # Returns true if user or current user is allowed to edit the issue def attributes_editable?(user=User.current) - user.allowed_to?(:edit_issues, project) + user_tracker_permission?(user, :edit_issues) + end + + # Returns true if user or current user is allowed to add notes to the issue + def notes_addable?(user=User.current) + user_tracker_permission?(user, :add_issue_notes) + end + + # Returns true if user or current user is allowed to delete the issue + def deletable?(user=User.current) + user_tracker_permission?(user, :delete_issues) end def initialize(attributes=nil, *args) @@ -429,10 +439,10 @@ class Issue < ActiveRecord::Base 'custom_fields', 'lock_version', 'notes', - :if => lambda {|issue, user| issue.new_record? || user.allowed_to?(:edit_issues, issue.project) } + :if => lambda {|issue, user| issue.new_record? || issue.attributes_editable?(user) } safe_attributes 'notes', - :if => lambda {|issue, user| user.allowed_to?(:add_issue_notes, issue.project)} + :if => lambda {|issue, user| issue.notes_addable?(user)} safe_attributes 'private_notes', :if => lambda {|issue, user| !issue.new_record? && user.allowed_to?(:set_notes_private, issue.project)} @@ -447,7 +457,7 @@ class Issue < ActiveRecord::Base } safe_attributes 'parent_issue_id', - :if => lambda {|issue, user| (issue.new_record? || user.allowed_to?(:edit_issues, issue.project)) && + :if => lambda {|issue, user| (issue.new_record? || issue.attributes_editable?(user)) && user.allowed_to?(:manage_subtasks, issue.project)} def safe_attribute_names(user=nil) @@ -1406,6 +1416,11 @@ class Issue < ActiveRecord::Base private + def user_tracker_permission?(user, permission) + roles = user.roles_for_project(project).select {|r| r.has_permission?(permission)} + roles.any? {|r| r.permissions_all_trackers?(permission) || r.permissions_tracker_ids?(permission, tracker_id)} + end + def after_project_change # Update project_id on related time entries TimeEntry.where({:issue_id => id}).update_all(["project_id = ?", project_id]) diff --git a/app/views/issues/_action_menu.html.erb b/app/views/issues/_action_menu.html.erb index c3304626d..b535faec9 100644 --- a/app/views/issues/_action_menu.html.erb +++ b/app/views/issues/_action_menu.html.erb @@ -3,5 +3,5 @@ <%= link_to l(:button_log_time), new_issue_time_entry_path(@issue), :class => 'icon icon-time-add' if User.current.allowed_to?(:log_time, @project) %> <%= watcher_link(@issue, User.current) %> <%= link_to l(:button_copy), project_copy_issue_path(@project, @issue), :class => 'icon icon-copy' if User.current.allowed_to?(:copy_issues, @project) && Issue.allowed_target_projects.any? %> -<%= link_to l(:button_delete), issue_path(@issue), :data => {:confirm => issues_destroy_confirmation_message(@issue)}, :method => :delete, :class => 'icon icon-del' if User.current.allowed_to?(:delete_issues, @project) %> +<%= link_to l(:button_delete), issue_path(@issue), :data => {:confirm => issues_destroy_confirmation_message(@issue)}, :method => :delete, :class => 'icon icon-del' if @issue.deletable? %> diff --git a/app/views/issues/_edit.html.erb b/app/views/issues/_edit.html.erb index 24a01cad0..67e33246d 100644 --- a/app/views/issues/_edit.html.erb +++ b/app/views/issues/_edit.html.erb @@ -27,21 +27,22 @@ <% end %> <% end %> - -
<%= l(:field_notes) %> - <%= f.text_area :notes, :cols => 60, :rows => 10, :class => 'wiki-edit', :no_label => true %> - <%= wikitoolbar_for 'issue_notes' %> - - <% if @issue.safe_attribute? 'private_notes' %> - <%= f.check_box :private_notes, :no_label => true %> + <% if @issue.notes_addable? %> +
<%= l(:field_notes) %> + <%= f.text_area :notes, :cols => 60, :rows => 10, :class => 'wiki-edit', :no_label => true %> + <%= wikitoolbar_for 'issue_notes' %> + + <% if @issue.safe_attribute? 'private_notes' %> + <%= f.check_box :private_notes, :no_label => true %> + <% end %> + + <%= call_hook(:view_issues_edit_notes_bottom, { :issue => @issue, :notes => @notes, :form => f }) %> +
+ +
<%= l(:label_attachment_plural) %> +

<%= render :partial => 'attachments/form', :locals => {:container => @issue} %>

+
<% end %> - - <%= call_hook(:view_issues_edit_notes_bottom, { :issue => @issue, :notes => @notes, :form => f }) %> -
- -
<%= l(:label_attachment_plural) %> -

<%= render :partial => 'attachments/form', :locals => {:container => @issue} %>

-
<%= f.hidden_field :lock_version %> diff --git a/app/views/issues/_history.html.erb b/app/views/issues/_history.html.erb index 993dfee3c..307ac909b 100644 --- a/app/views/issues/_history.html.erb +++ b/app/views/issues/_history.html.erb @@ -1,4 +1,4 @@ -<% reply_links = authorize_for('issues', 'edit') -%> +<% reply_links = issue.notes_addable? -%> <% for journal in journals %>
diff --git a/app/views/issues/show.html.erb b/app/views/issues/show.html.erb index 70a7fe165..2cbff32e5 100644 --- a/app/views/issues/show.html.erb +++ b/app/views/issues/show.html.erb @@ -77,7 +77,7 @@ end %> <% if @issue.description? %>
- <%= link_to l(:button_quote), quoted_issue_path(@issue), :remote => true, :method => 'post', :class => 'icon icon-comment' if authorize_for('issues', 'edit') %> + <%= link_to l(:button_quote), quoted_issue_path(@issue), :remote => true, :method => 'post', :class => 'icon icon-comment' if @issue.notes_addable? %>

<%=l(:field_description)%>

diff --git a/app/views/roles/_form.html.erb b/app/views/roles/_form.html.erb index c8a3a61cc..8b7b94c73 100644 --- a/app/views/roles/_form.html.erb +++ b/app/views/roles/_form.html.erb @@ -64,7 +64,9 @@

<%= l(:label_issue_tracking) %>

-<% permissions = %w(view_issues add_issues) %> +<% permissions = %w(view_issues add_issues edit_issues add_issue_notes delete_issues) %> + +
@@ -87,7 +89,7 @@ <% end %> <% Tracker.sorted.all.each do |tracker| %> - + "> <% permissions.each do |permission| %>
<%= tracker.name %><%= check_box_tag "role[permissions_tracker_ids][#{permission}][]", @@ -100,6 +102,7 @@ <% end %>
+
<% permissions.each do |permission| %> <%= hidden_field_tag "role[permissions_tracker_ids][#{permission}][]", '' %> diff --git a/public/stylesheets/application.css b/public/stylesheets/application.css index 83060eaa2..c276ebd27 100644 --- a/public/stylesheets/application.css +++ b/public/stylesheets/application.css @@ -152,6 +152,7 @@ table.list td.buttons img, div.buttons img {vertical-align:middle;} table.list td.reorder {width:15%; white-space:nowrap; text-align:center; } table.list table.progress td {padding-right:0px;} table.list caption { text-align: left; padding: 0.5em 0.5em 0.5em 0; } +#role-permissions-trackers table.list th {white-space:normal;} .table-list-cell {display: table-cell; vertical-align: top; padding:2px; } diff --git a/test/functional/issues_controller_test.rb b/test/functional/issues_controller_test.rb index 8888cf712..dc50d1331 100644 --- a/test/functional/issues_controller_test.rb +++ b/test/functional/issues_controller_test.rb @@ -3872,6 +3872,30 @@ class IssuesControllerTest < ActionController::TestCase assert_redirected_to '/issues/11?issue_count=3&issue_position=2&next_issue_id=12&prev_issue_id=8' end + def test_update_with_permission_on_tracker_should_be_allowed + role = Role.find(1) + role.set_permission_trackers :edit_issues, [1] + role.save! + issue = Issue.generate!(:project_id => 1, :tracker_id => 1, :subject => 'Original subject') + + @request.session[:user_id] = 2 + put :update, :id => issue.id, :issue => {:subject => 'Changed subject'} + assert_response 302 + assert_equal 'Changed subject', issue.reload.subject + end + + def test_update_without_permission_on_tracker_should_be_denied + role = Role.find(1) + role.set_permission_trackers :edit_issues, [1] + role.save! + issue = Issue.generate!(:project_id => 1, :tracker_id => 2, :subject => 'Original subject') + + @request.session[:user_id] = 2 + put :update, :id => issue.id, :issue => {:subject => 'Changed subject'} + assert_response 302 + assert_equal 'Original subject', issue.reload.subject + end + def test_get_bulk_edit @request.session[:user_id] = 2 get :bulk_edit, :ids => [1, 3] @@ -4702,6 +4726,32 @@ class IssuesControllerTest < ActionController::TestCase assert_response 404 end + def test_destroy_with_permission_on_tracker_should_be_allowed + role = Role.find(1) + role.set_permission_trackers :delete_issues, [1] + role.save! + issue = Issue.generate!(:project_id => 1, :tracker_id => 1) + + @request.session[:user_id] = 2 + assert_difference 'Issue.count', -1 do + delete :destroy, :id => issue.id + end + assert_response 302 + end + + def test_destroy_without_permission_on_tracker_should_be_denied + role = Role.find(1) + role.set_permission_trackers :delete_issues, [2] + role.save! + issue = Issue.generate!(:project_id => 1, :tracker_id => 1) + + @request.session[:user_id] = 2 + assert_no_difference 'Issue.count' do + delete :destroy, :id => issue.id + end + assert_response 403 + end + def test_default_search_scope get :index From 2691613c55c14c907948f96c6bbe762294afd560 Mon Sep 17 00:00:00 2001 From: Jean-Philippe Lang Date: Sun, 5 Jun 2016 17:44:38 +0000 Subject: [PATCH 0022/1117] Display view permissions first. git-svn-id: http://svn.redmine.org/redmine/trunk@15467 e93f8b46-1217-0410-a6f0-8f06a7374b81 --- lib/redmine.rb | 28 ++++++++++++++-------------- 1 file changed, 14 insertions(+), 14 deletions(-) diff --git a/lib/redmine.rb b/lib/redmine.rb index 0c670d1b5..6dfc880ff 100644 --- a/lib/redmine.rb +++ b/lib/redmine.rb @@ -88,8 +88,6 @@ Redmine::AccessControl.map do |map| map.permission :add_subprojects, {:projects => [:new, :create]}, :require => :member map.project_module :issue_tracking do |map| - # Issue categories - map.permission :manage_categories, {:projects => :settings, :issue_categories => [:index, :show, :new, :create, :edit, :update, :destroy]}, :require => :member # Issues map.permission :view_issues, {:issues => [:index, :show], :auto_complete => [:issues], @@ -120,62 +118,64 @@ Redmine::AccessControl.map do |map| map.permission :add_issue_watchers, {:watchers => [:new, :create, :append, :autocomplete_for_user]} map.permission :delete_issue_watchers, {:watchers => :destroy} map.permission :import_issues, {:imports => [:new, :create, :settings, :mapping, :run, :show]} + # Issue categories + map.permission :manage_categories, {:projects => :settings, :issue_categories => [:index, :show, :new, :create, :edit, :update, :destroy]}, :require => :member end map.project_module :time_tracking do |map| - map.permission :log_time, {:timelog => [:new, :create]}, :require => :loggedin map.permission :view_time_entries, {:timelog => [:index, :report, :show]}, :read => true + map.permission :log_time, {:timelog => [:new, :create]}, :require => :loggedin map.permission :edit_time_entries, {:timelog => [:edit, :update, :destroy, :bulk_edit, :bulk_update]}, :require => :member map.permission :edit_own_time_entries, {:timelog => [:edit, :update, :destroy,:bulk_edit, :bulk_update]}, :require => :loggedin map.permission :manage_project_activities, {:project_enumerations => [:update, :destroy]}, :require => :member end map.project_module :news do |map| - map.permission :manage_news, {:news => [:new, :create, :edit, :update, :destroy], :comments => [:destroy], :attachments => :upload}, :require => :member map.permission :view_news, {:news => [:index, :show]}, :public => true, :read => true + map.permission :manage_news, {:news => [:new, :create, :edit, :update, :destroy], :comments => [:destroy], :attachments => :upload}, :require => :member map.permission :comment_news, {:comments => :create} end map.project_module :documents do |map| + map.permission :view_documents, {:documents => [:index, :show, :download]}, :read => true map.permission :add_documents, {:documents => [:new, :create, :add_attachment], :attachments => :upload}, :require => :loggedin map.permission :edit_documents, {:documents => [:edit, :update, :add_attachment], :attachments => :upload}, :require => :loggedin map.permission :delete_documents, {:documents => [:destroy]}, :require => :loggedin - map.permission :view_documents, {:documents => [:index, :show, :download]}, :read => true end map.project_module :files do |map| - map.permission :manage_files, {:files => [:new, :create], :attachments => :upload}, :require => :loggedin map.permission :view_files, {:files => :index, :versions => :download}, :read => true + map.permission :manage_files, {:files => [:new, :create], :attachments => :upload}, :require => :loggedin end map.project_module :wiki do |map| - map.permission :manage_wiki, {:wikis => [:edit, :destroy]}, :require => :member + map.permission :view_wiki_pages, {:wiki => [:index, :show, :special, :date_index]}, :read => true + map.permission :view_wiki_edits, {:wiki => [:history, :diff, :annotate]}, :read => true + map.permission :export_wiki_pages, {:wiki => [:export]}, :read => true + map.permission :edit_wiki_pages, :wiki => [:new, :edit, :update, :preview, :add_attachment], :attachments => :upload map.permission :rename_wiki_pages, {:wiki => :rename}, :require => :member map.permission :delete_wiki_pages, {:wiki => [:destroy, :destroy_version]}, :require => :member - map.permission :view_wiki_pages, {:wiki => [:index, :show, :special, :date_index]}, :read => true - map.permission :export_wiki_pages, {:wiki => [:export]}, :read => true - map.permission :view_wiki_edits, {:wiki => [:history, :diff, :annotate]}, :read => true - map.permission :edit_wiki_pages, :wiki => [:new, :edit, :update, :preview, :add_attachment], :attachments => :upload map.permission :delete_wiki_pages_attachments, {} map.permission :protect_wiki_pages, {:wiki => :protect}, :require => :member + map.permission :manage_wiki, {:wikis => [:edit, :destroy]}, :require => :member end map.project_module :repository do |map| - map.permission :manage_repository, {:repositories => [:new, :create, :edit, :update, :committers, :destroy]}, :require => :member - map.permission :browse_repository, {:repositories => [:show, :browse, :entry, :raw, :annotate, :changes, :diff, :stats, :graph]}, :read => true map.permission :view_changesets, {:repositories => [:show, :revisions, :revision]}, :read => true + map.permission :browse_repository, {:repositories => [:show, :browse, :entry, :raw, :annotate, :changes, :diff, :stats, :graph]}, :read => true map.permission :commit_access, {} map.permission :manage_related_issues, {:repositories => [:add_related_issue, :remove_related_issue]} + map.permission :manage_repository, {:repositories => [:new, :create, :edit, :update, :committers, :destroy]}, :require => :member end map.project_module :boards do |map| - map.permission :manage_boards, {:boards => [:new, :create, :edit, :update, :destroy]}, :require => :member map.permission :view_messages, {:boards => [:index, :show], :messages => [:show]}, :public => true, :read => true map.permission :add_messages, {:messages => [:new, :reply, :quote], :attachments => :upload} map.permission :edit_messages, {:messages => :edit, :attachments => :upload}, :require => :member map.permission :edit_own_messages, {:messages => :edit, :attachments => :upload}, :require => :loggedin map.permission :delete_messages, {:messages => :destroy}, :require => :member map.permission :delete_own_messages, {:messages => :destroy}, :require => :loggedin + map.permission :manage_boards, {:boards => [:new, :create, :edit, :update, :destroy]}, :require => :member end map.project_module :calendar do |map| From bfd5b919baca5c63bb3837836af55b473c78be6f Mon Sep 17 00:00:00 2001 From: Jean-Philippe Lang Date: Sun, 5 Jun 2016 17:45:41 +0000 Subject: [PATCH 0023/1117] Hide options when permission is not given. git-svn-id: http://svn.redmine.org/redmine/trunk@15468 e93f8b46-1217-0410-a6f0-8f06a7374b81 --- app/views/roles/_form.html.erb | 26 ++++++++++---------------- public/javascripts/application.js | 5 +++-- 2 files changed, 13 insertions(+), 18 deletions(-) diff --git a/app/views/roles/_form.html.erb b/app/views/roles/_form.html.erb index 8b7b94c73..49cba3617 100644 --- a/app/views/roles/_form.html.erb +++ b/app/views/roles/_form.html.erb @@ -7,17 +7,17 @@ <% end %> <% unless @role.anonymous? %> -

<%= f.select :issues_visibility, Role::ISSUES_VISIBILITY_OPTIONS.collect {|v| [l(v.last), v.first]} %>

+

<%= f.select :issues_visibility, Role::ISSUES_VISIBILITY_OPTIONS.collect {|v| [l(v.last), v.first]} %>

<% end %> <% unless @role.anonymous? %> -

<%= f.select :time_entries_visibility, Role::TIME_ENTRIES_VISIBILITY_OPTIONS.collect {|v| [l(v.last), v.first]} %>

+

<%= f.select :time_entries_visibility, Role::TIME_ENTRIES_VISIBILITY_OPTIONS.collect {|v| [l(v.last), v.first]}, {}, :class => "view_time_entries_enabled" %>

<% end %>

<%= f.select :users_visibility, Role::USERS_VISIBILITY_OPTIONS.collect {|v| [l(v.last), v.first]} %>

<% unless @role.builtin? %> -

+

+

<%= l(:label_issue_tracking) %>

<% permissions = %w(view_issues add_issues edit_issues add_issue_notes delete_issues) %> @@ -72,18 +73,19 @@ <%= l(:label_tracker) %> <% permissions.each do |permission| %> - <%= l("permission_#{permission}") %> + "><%= l("permission_#{permission}") %> <% end %> <%= l(:label_tracker_all) %> <% permissions.each do |permission| %> - + "> <%= hidden_field_tag "role[permissions_all_trackers][#{permission}]", '0', :id => nil %> <%= check_box_tag "role[permissions_all_trackers][#{permission}]", '1', @role.permissions_all_trackers?(permission), + :class => "#{permission}_shown", :data => {:disables => ".#{permission}_tracker"} %> <% end %> @@ -92,7 +94,7 @@ "> <%= tracker.name %> <% permissions.each do |permission| %> - <%= check_box_tag "role[permissions_tracker_ids][#{permission}][]", + "><%= check_box_tag "role[permissions_tracker_ids][#{permission}][]", tracker.id, @role.permissions_tracker_ids?(permission, tracker.id), :class => "#{permission}_tracker", @@ -108,11 +110,3 @@ <%= hidden_field_tag "role[permissions_tracker_ids][#{permission}][]", '' %> <% end %>
- -<%= javascript_tag do %> -$(document).ready(function(){ - $("#role_permissions_manage_members").change(function(){ - $("#manage_members_options").toggle($(this).is(":checked")); - }).change(); -}); -<% end %> diff --git a/public/javascripts/application.js b/public/javascripts/application.js index 743b14ff6..347611bb2 100644 --- a/public/javascripts/application.js +++ b/public/javascripts/application.js @@ -719,9 +719,10 @@ function toggleDisabledOnChange() { var checked = $(this).is(':checked'); $($(this).data('disables')).attr('disabled', checked); $($(this).data('enables')).attr('disabled', !checked); + $($(this).data('shows')).toggle(checked); } function toggleDisabledInit() { - $('input[data-disables], input[data-enables]').each(toggleDisabledOnChange); + $('input[data-disables], input[data-enables], input[data-shows]').each(toggleDisabledOnChange); } (function ( $ ) { @@ -751,7 +752,7 @@ function toggleDisabledInit() { }( jQuery )); $(document).ready(function(){ - $('#content').on('change', 'input[data-disables], input[data-enables]', toggleDisabledOnChange); + $('#content').on('change', 'input[data-disables], input[data-enables], input[data-shows]', toggleDisabledOnChange); toggleDisabledInit(); }); From 41eb88183ceeeed9264acd827ec3c98581b7695a Mon Sep 17 00:00:00 2001 From: Jean-Philippe Lang Date: Sun, 5 Jun 2016 18:02:55 +0000 Subject: [PATCH 0024/1117] Removed unused class. git-svn-id: http://svn.redmine.org/redmine/trunk@15469 e93f8b46-1217-0410-a6f0-8f06a7374b81 --- app/views/roles/_form.html.erb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app/views/roles/_form.html.erb b/app/views/roles/_form.html.erb index 49cba3617..39acc34a4 100644 --- a/app/views/roles/_form.html.erb +++ b/app/views/roles/_form.html.erb @@ -11,7 +11,7 @@ <% end %> <% unless @role.anonymous? %> -

<%= f.select :time_entries_visibility, Role::TIME_ENTRIES_VISIBILITY_OPTIONS.collect {|v| [l(v.last), v.first]}, {}, :class => "view_time_entries_enabled" %>

+

<%= f.select :time_entries_visibility, Role::TIME_ENTRIES_VISIBILITY_OPTIONS.collect {|v| [l(v.last), v.first]} %>

<% end %>

<%= f.select :users_visibility, Role::USERS_VISIBILITY_OPTIONS.collect {|v| [l(v.last), v.first]} %>

From ce8144a420e1a2829460442beb72e54b9f5ac669 Mon Sep 17 00:00:00 2001 From: Toshi MARUYAMA Date: Mon, 6 Jun 2016 05:17:48 +0000 Subject: [PATCH 0025/1117] generate i18 keys (#7839) git-svn-id: http://svn.redmine.org/redmine/trunk@15472 e93f8b46-1217-0410-a6f0-8f06a7374b81 --- config/locales/ar.yml | 3 +++ config/locales/az.yml | 3 +++ config/locales/bg.yml | 3 +++ config/locales/bs.yml | 3 +++ config/locales/ca.yml | 3 +++ config/locales/cs.yml | 3 +++ config/locales/da.yml | 3 +++ config/locales/de.yml | 3 +++ config/locales/el.yml | 3 +++ config/locales/en-GB.yml | 3 +++ config/locales/es-PA.yml | 3 +++ config/locales/es.yml | 3 +++ config/locales/et.yml | 3 +++ config/locales/eu.yml | 3 +++ config/locales/fa.yml | 3 +++ config/locales/fi.yml | 3 +++ config/locales/gl.yml | 3 +++ config/locales/he.yml | 3 +++ config/locales/hr.yml | 3 +++ config/locales/hu.yml | 3 +++ config/locales/id.yml | 3 +++ config/locales/it.yml | 3 +++ config/locales/ja.yml | 3 +++ config/locales/ko.yml | 3 +++ config/locales/lt.yml | 3 +++ config/locales/lv.yml | 3 +++ config/locales/mk.yml | 3 +++ config/locales/mn.yml | 3 +++ config/locales/nl.yml | 3 +++ config/locales/no.yml | 3 +++ config/locales/pl.yml | 3 +++ config/locales/pt-BR.yml | 3 +++ config/locales/pt.yml | 3 +++ config/locales/ro.yml | 3 +++ config/locales/ru.yml | 3 +++ config/locales/sk.yml | 3 +++ config/locales/sl.yml | 3 +++ config/locales/sq.yml | 3 +++ config/locales/sr-YU.yml | 3 +++ config/locales/sr.yml | 3 +++ config/locales/sv.yml | 3 +++ config/locales/th.yml | 3 +++ config/locales/tr.yml | 3 +++ config/locales/uk.yml | 3 +++ config/locales/vi.yml | 3 +++ config/locales/zh-TW.yml | 3 +++ config/locales/zh.yml | 3 +++ 47 files changed, 141 insertions(+) diff --git a/config/locales/ar.yml b/config/locales/ar.yml index 67efd757e..e13172192 100644 --- a/config/locales/ar.yml +++ b/config/locales/ar.yml @@ -1202,3 +1202,6 @@ ar: mail_body_password_updated: Your password has been changed. label_no_preview: No preview available setting_new_project_issue_tab_enabled: Display the "New issue" tab + error_no_tracker_allowed_for_new_issue_in_project: The project doesn't have any trackers + for which you can create an issue + label_tracker_all: All trackers diff --git a/config/locales/az.yml b/config/locales/az.yml index 09d305928..7a5cdb924 100644 --- a/config/locales/az.yml +++ b/config/locales/az.yml @@ -1297,3 +1297,6 @@ az: mail_body_password_updated: Your password has been changed. label_no_preview: No preview available setting_new_project_issue_tab_enabled: Display the "New issue" tab + error_no_tracker_allowed_for_new_issue_in_project: The project doesn't have any trackers + for which you can create an issue + label_tracker_all: All trackers diff --git a/config/locales/bg.yml b/config/locales/bg.yml index fc05e2071..d5baac680 100644 --- a/config/locales/bg.yml +++ b/config/locales/bg.yml @@ -1191,3 +1191,6 @@ bg: mail_body_password_updated: Your password has been changed. label_no_preview: No preview available setting_new_project_issue_tab_enabled: Display the "New issue" tab + error_no_tracker_allowed_for_new_issue_in_project: The project doesn't have any trackers + for which you can create an issue + label_tracker_all: All trackers diff --git a/config/locales/bs.yml b/config/locales/bs.yml index 253e214b7..aa47a22e9 100644 --- a/config/locales/bs.yml +++ b/config/locales/bs.yml @@ -1215,3 +1215,6 @@ bs: mail_body_password_updated: Your password has been changed. label_no_preview: No preview available setting_new_project_issue_tab_enabled: Display the "New issue" tab + error_no_tracker_allowed_for_new_issue_in_project: The project doesn't have any trackers + for which you can create an issue + label_tracker_all: All trackers diff --git a/config/locales/ca.yml b/config/locales/ca.yml index dc7e0454f..ec0b3ca5a 100644 --- a/config/locales/ca.yml +++ b/config/locales/ca.yml @@ -1195,3 +1195,6 @@ ca: mail_body_password_updated: Your password has been changed. label_no_preview: No preview available setting_new_project_issue_tab_enabled: Display the "New issue" tab + error_no_tracker_allowed_for_new_issue_in_project: The project doesn't have any trackers + for which you can create an issue + label_tracker_all: All trackers diff --git a/config/locales/cs.yml b/config/locales/cs.yml index d76b10df0..f0ef5a476 100644 --- a/config/locales/cs.yml +++ b/config/locales/cs.yml @@ -1203,3 +1203,6 @@ cs: mail_body_password_updated: Vaše heslo bylo změněno. label_no_preview: Náhled není k dispozici setting_new_project_issue_tab_enabled: Zobraz záložku "Nový úkol" + error_no_tracker_allowed_for_new_issue_in_project: The project doesn't have any trackers + for which you can create an issue + label_tracker_all: All trackers diff --git a/config/locales/da.yml b/config/locales/da.yml index 4c00e5ee3..9b2020b33 100644 --- a/config/locales/da.yml +++ b/config/locales/da.yml @@ -1219,3 +1219,6 @@ da: mail_body_password_updated: Your password has been changed. label_no_preview: No preview available setting_new_project_issue_tab_enabled: Display the "New issue" tab + error_no_tracker_allowed_for_new_issue_in_project: The project doesn't have any trackers + for which you can create an issue + label_tracker_all: All trackers diff --git a/config/locales/de.yml b/config/locales/de.yml index dafce612d..bf6a11c48 100644 --- a/config/locales/de.yml +++ b/config/locales/de.yml @@ -1205,3 +1205,6 @@ de: button_filter: Filter mail_body_password_updated: Ihr Passwort wurde geändert. setting_new_project_issue_tab_enabled: Tab "Neues Ticket" anzeigen + error_no_tracker_allowed_for_new_issue_in_project: The project doesn't have any trackers + for which you can create an issue + label_tracker_all: All trackers diff --git a/config/locales/el.yml b/config/locales/el.yml index 10f714868..66f96bfdc 100644 --- a/config/locales/el.yml +++ b/config/locales/el.yml @@ -1202,3 +1202,6 @@ el: mail_body_password_updated: Your password has been changed. label_no_preview: No preview available setting_new_project_issue_tab_enabled: Display the "New issue" tab + error_no_tracker_allowed_for_new_issue_in_project: The project doesn't have any trackers + for which you can create an issue + label_tracker_all: All trackers diff --git a/config/locales/en-GB.yml b/config/locales/en-GB.yml index d9e36c2b2..cf6f9770a 100644 --- a/config/locales/en-GB.yml +++ b/config/locales/en-GB.yml @@ -1204,3 +1204,6 @@ en-GB: button_filter: Filter mail_body_password_updated: Your password has been changed. setting_new_project_issue_tab_enabled: Display the "New issue" tab + error_no_tracker_allowed_for_new_issue_in_project: The project doesn't have any trackers + for which you can create an issue + label_tracker_all: All trackers diff --git a/config/locales/es-PA.yml b/config/locales/es-PA.yml index 619dba8f2..0b76bdada 100644 --- a/config/locales/es-PA.yml +++ b/config/locales/es-PA.yml @@ -1236,3 +1236,6 @@ es-PA: mail_body_password_updated: Your password has been changed. label_no_preview: No preview available setting_new_project_issue_tab_enabled: Display the "New issue" tab + error_no_tracker_allowed_for_new_issue_in_project: The project doesn't have any trackers + for which you can create an issue + label_tracker_all: All trackers diff --git a/config/locales/es.yml b/config/locales/es.yml index 56b774ef1..d9e781495 100644 --- a/config/locales/es.yml +++ b/config/locales/es.yml @@ -1234,3 +1234,6 @@ es: mail_body_password_updated: Your password has been changed. label_no_preview: No preview available setting_new_project_issue_tab_enabled: Display the "New issue" tab + error_no_tracker_allowed_for_new_issue_in_project: The project doesn't have any trackers + for which you can create an issue + label_tracker_all: All trackers diff --git a/config/locales/et.yml b/config/locales/et.yml index c440265b6..f8ae0fbd9 100644 --- a/config/locales/et.yml +++ b/config/locales/et.yml @@ -1206,3 +1206,6 @@ et: mail_body_password_updated: Your password has been changed. label_no_preview: No preview available setting_new_project_issue_tab_enabled: Display the "New issue" tab + error_no_tracker_allowed_for_new_issue_in_project: The project doesn't have any trackers + for which you can create an issue + label_tracker_all: All trackers diff --git a/config/locales/eu.yml b/config/locales/eu.yml index 5522c787a..1dbfed25c 100644 --- a/config/locales/eu.yml +++ b/config/locales/eu.yml @@ -1203,3 +1203,6 @@ eu: mail_body_password_updated: Your password has been changed. label_no_preview: No preview available setting_new_project_issue_tab_enabled: Display the "New issue" tab + error_no_tracker_allowed_for_new_issue_in_project: The project doesn't have any trackers + for which you can create an issue + label_tracker_all: All trackers diff --git a/config/locales/fa.yml b/config/locales/fa.yml index 9930da14a..b9e7377e6 100644 --- a/config/locales/fa.yml +++ b/config/locales/fa.yml @@ -1203,3 +1203,6 @@ fa: mail_body_password_updated: Your password has been changed. label_no_preview: No preview available setting_new_project_issue_tab_enabled: Display the "New issue" tab + error_no_tracker_allowed_for_new_issue_in_project: The project doesn't have any trackers + for which you can create an issue + label_tracker_all: All trackers diff --git a/config/locales/fi.yml b/config/locales/fi.yml index d5b8db109..14aa38cc8 100644 --- a/config/locales/fi.yml +++ b/config/locales/fi.yml @@ -1223,3 +1223,6 @@ fi: mail_body_password_updated: Your password has been changed. label_no_preview: No preview available setting_new_project_issue_tab_enabled: Display the "New issue" tab + error_no_tracker_allowed_for_new_issue_in_project: The project doesn't have any trackers + for which you can create an issue + label_tracker_all: All trackers diff --git a/config/locales/gl.yml b/config/locales/gl.yml index 0595be810..437bf4b3f 100644 --- a/config/locales/gl.yml +++ b/config/locales/gl.yml @@ -1210,3 +1210,6 @@ gl: mail_body_password_updated: Your password has been changed. label_no_preview: No preview available setting_new_project_issue_tab_enabled: Display the "New issue" tab + error_no_tracker_allowed_for_new_issue_in_project: The project doesn't have any trackers + for which you can create an issue + label_tracker_all: All trackers diff --git a/config/locales/he.yml b/config/locales/he.yml index 50878d2ee..aad81c4a0 100644 --- a/config/locales/he.yml +++ b/config/locales/he.yml @@ -1207,3 +1207,6 @@ he: mail_body_password_updated: Your password has been changed. label_no_preview: No preview available setting_new_project_issue_tab_enabled: Display the "New issue" tab + error_no_tracker_allowed_for_new_issue_in_project: The project doesn't have any trackers + for which you can create an issue + label_tracker_all: All trackers diff --git a/config/locales/hr.yml b/config/locales/hr.yml index 5967340cc..a09064a5f 100644 --- a/config/locales/hr.yml +++ b/config/locales/hr.yml @@ -1201,3 +1201,6 @@ hr: mail_body_password_updated: Your password has been changed. label_no_preview: No preview available setting_new_project_issue_tab_enabled: Display the "New issue" tab + error_no_tracker_allowed_for_new_issue_in_project: The project doesn't have any trackers + for which you can create an issue + label_tracker_all: All trackers diff --git a/config/locales/hu.yml b/config/locales/hu.yml index 33ec0c223..6f7f075a8 100644 --- a/config/locales/hu.yml +++ b/config/locales/hu.yml @@ -1221,3 +1221,6 @@ mail_body_password_updated: Your password has been changed. label_no_preview: No preview available setting_new_project_issue_tab_enabled: Display the "New issue" tab + error_no_tracker_allowed_for_new_issue_in_project: The project doesn't have any trackers + for which you can create an issue + label_tracker_all: All trackers diff --git a/config/locales/id.yml b/config/locales/id.yml index ae2c3fcdd..dfa63dc8e 100644 --- a/config/locales/id.yml +++ b/config/locales/id.yml @@ -1206,3 +1206,6 @@ id: mail_body_password_updated: Your password has been changed. label_no_preview: No preview available setting_new_project_issue_tab_enabled: Display the "New issue" tab + error_no_tracker_allowed_for_new_issue_in_project: The project doesn't have any trackers + for which you can create an issue + label_tracker_all: All trackers diff --git a/config/locales/it.yml b/config/locales/it.yml index 6d94d74e6..b5310caad 100644 --- a/config/locales/it.yml +++ b/config/locales/it.yml @@ -1197,3 +1197,6 @@ it: mail_body_password_updated: Your password has been changed. label_no_preview: No preview available setting_new_project_issue_tab_enabled: Display the "New issue" tab + error_no_tracker_allowed_for_new_issue_in_project: The project doesn't have any trackers + for which you can create an issue + label_tracker_all: All trackers diff --git a/config/locales/ja.yml b/config/locales/ja.yml index 1c1f56a62..4b3945285 100644 --- a/config/locales/ja.yml +++ b/config/locales/ja.yml @@ -1213,3 +1213,6 @@ ja: mail_body_password_updated: パスワードが変更されました。 label_no_preview: このファイルはプレビューできません setting_new_project_issue_tab_enabled: '"新しいチケット" タブを表示' + error_no_tracker_allowed_for_new_issue_in_project: The project doesn't have any trackers + for which you can create an issue + label_tracker_all: All trackers diff --git a/config/locales/ko.yml b/config/locales/ko.yml index a9b982e11..5f9fd63da 100644 --- a/config/locales/ko.yml +++ b/config/locales/ko.yml @@ -1241,3 +1241,6 @@ ko: mail_body_password_updated: 암호가 변경되었습니다. label_no_preview: 미리보기 없음 setting_new_project_issue_tab_enabled: '"새 일감" 탭 표시' + error_no_tracker_allowed_for_new_issue_in_project: The project doesn't have any trackers + for which you can create an issue + label_tracker_all: All trackers diff --git a/config/locales/lt.yml b/config/locales/lt.yml index d8ddd935f..6aa63dcac 100644 --- a/config/locales/lt.yml +++ b/config/locales/lt.yml @@ -1191,3 +1191,6 @@ lt: mail_body_password_updated: Your password has been changed. label_no_preview: No preview available setting_new_project_issue_tab_enabled: Display the "New issue" tab + error_no_tracker_allowed_for_new_issue_in_project: The project doesn't have any trackers + for which you can create an issue + label_tracker_all: All trackers diff --git a/config/locales/lv.yml b/config/locales/lv.yml index b4da9c85f..2a7dc3c1d 100644 --- a/config/locales/lv.yml +++ b/config/locales/lv.yml @@ -1196,3 +1196,6 @@ lv: mail_body_password_updated: Your password has been changed. label_no_preview: No preview available setting_new_project_issue_tab_enabled: Display the "New issue" tab + error_no_tracker_allowed_for_new_issue_in_project: The project doesn't have any trackers + for which you can create an issue + label_tracker_all: All trackers diff --git a/config/locales/mk.yml b/config/locales/mk.yml index 13b0dc66d..02757abe0 100644 --- a/config/locales/mk.yml +++ b/config/locales/mk.yml @@ -1202,3 +1202,6 @@ mk: mail_body_password_updated: Your password has been changed. label_no_preview: No preview available setting_new_project_issue_tab_enabled: Display the "New issue" tab + error_no_tracker_allowed_for_new_issue_in_project: The project doesn't have any trackers + for which you can create an issue + label_tracker_all: All trackers diff --git a/config/locales/mn.yml b/config/locales/mn.yml index e88d9ab7e..6176c97e5 100644 --- a/config/locales/mn.yml +++ b/config/locales/mn.yml @@ -1203,3 +1203,6 @@ mn: mail_body_password_updated: Your password has been changed. label_no_preview: No preview available setting_new_project_issue_tab_enabled: Display the "New issue" tab + error_no_tracker_allowed_for_new_issue_in_project: The project doesn't have any trackers + for which you can create an issue + label_tracker_all: All trackers diff --git a/config/locales/nl.yml b/config/locales/nl.yml index eed218007..e356bab91 100644 --- a/config/locales/nl.yml +++ b/config/locales/nl.yml @@ -1181,3 +1181,6 @@ nl: mail_body_password_updated: Your password has been changed. label_no_preview: No preview available setting_new_project_issue_tab_enabled: Display the "New issue" tab + error_no_tracker_allowed_for_new_issue_in_project: The project doesn't have any trackers + for which you can create an issue + label_tracker_all: All trackers diff --git a/config/locales/no.yml b/config/locales/no.yml index 43480cb46..083a956ac 100644 --- a/config/locales/no.yml +++ b/config/locales/no.yml @@ -1192,3 +1192,6 @@ mail_body_password_updated: Your password has been changed. label_no_preview: No preview available setting_new_project_issue_tab_enabled: Display the "New issue" tab + error_no_tracker_allowed_for_new_issue_in_project: The project doesn't have any trackers + for which you can create an issue + label_tracker_all: All trackers diff --git a/config/locales/pl.yml b/config/locales/pl.yml index 4bbf3b407..a183a2130 100644 --- a/config/locales/pl.yml +++ b/config/locales/pl.yml @@ -1217,3 +1217,6 @@ pl: mail_body_password_updated: Your password has been changed. label_no_preview: No preview available setting_new_project_issue_tab_enabled: Display the "New issue" tab + error_no_tracker_allowed_for_new_issue_in_project: The project doesn't have any trackers + for which you can create an issue + label_tracker_all: All trackers diff --git a/config/locales/pt-BR.yml b/config/locales/pt-BR.yml index acaf50dca..b8c360141 100644 --- a/config/locales/pt-BR.yml +++ b/config/locales/pt-BR.yml @@ -1220,3 +1220,6 @@ pt-BR: mail_body_password_updated: Your password has been changed. label_no_preview: No preview available setting_new_project_issue_tab_enabled: Display the "New issue" tab + error_no_tracker_allowed_for_new_issue_in_project: The project doesn't have any trackers + for which you can create an issue + label_tracker_all: All trackers diff --git a/config/locales/pt.yml b/config/locales/pt.yml index f86b32936..38b4b882d 100644 --- a/config/locales/pt.yml +++ b/config/locales/pt.yml @@ -1204,3 +1204,6 @@ pt: mail_body_password_updated: Your password has been changed. label_no_preview: No preview available setting_new_project_issue_tab_enabled: Display the "New issue" tab + error_no_tracker_allowed_for_new_issue_in_project: The project doesn't have any trackers + for which you can create an issue + label_tracker_all: All trackers diff --git a/config/locales/ro.yml b/config/locales/ro.yml index 8a7d847f5..34e5405e3 100644 --- a/config/locales/ro.yml +++ b/config/locales/ro.yml @@ -1197,3 +1197,6 @@ ro: mail_body_password_updated: Your password has been changed. label_no_preview: No preview available setting_new_project_issue_tab_enabled: Display the "New issue" tab + error_no_tracker_allowed_for_new_issue_in_project: The project doesn't have any trackers + for which you can create an issue + label_tracker_all: All trackers diff --git a/config/locales/ru.yml b/config/locales/ru.yml index d9dd166ea..a7ad22514 100644 --- a/config/locales/ru.yml +++ b/config/locales/ru.yml @@ -1303,3 +1303,6 @@ ru: mail_body_password_updated: Your password has been changed. label_no_preview: No preview available setting_new_project_issue_tab_enabled: Display the "New issue" tab + error_no_tracker_allowed_for_new_issue_in_project: The project doesn't have any trackers + for which you can create an issue + label_tracker_all: All trackers diff --git a/config/locales/sk.yml b/config/locales/sk.yml index e6b75c354..b6c843947 100644 --- a/config/locales/sk.yml +++ b/config/locales/sk.yml @@ -1192,3 +1192,6 @@ sk: mail_body_password_updated: Your password has been changed. label_no_preview: No preview available setting_new_project_issue_tab_enabled: Display the "New issue" tab + error_no_tracker_allowed_for_new_issue_in_project: The project doesn't have any trackers + for which you can create an issue + label_tracker_all: All trackers diff --git a/config/locales/sl.yml b/config/locales/sl.yml index 6ad101641..7d2d755fe 100644 --- a/config/locales/sl.yml +++ b/config/locales/sl.yml @@ -1202,3 +1202,6 @@ sl: mail_body_password_updated: Your password has been changed. label_no_preview: No preview available setting_new_project_issue_tab_enabled: Display the "New issue" tab + error_no_tracker_allowed_for_new_issue_in_project: The project doesn't have any trackers + for which you can create an issue + label_tracker_all: All trackers diff --git a/config/locales/sq.yml b/config/locales/sq.yml index 710ab5234..98d1f5e8a 100644 --- a/config/locales/sq.yml +++ b/config/locales/sq.yml @@ -1198,3 +1198,6 @@ sq: mail_body_password_updated: Your password has been changed. label_no_preview: No preview available setting_new_project_issue_tab_enabled: Display the "New issue" tab + error_no_tracker_allowed_for_new_issue_in_project: The project doesn't have any trackers + for which you can create an issue + label_tracker_all: All trackers diff --git a/config/locales/sr-YU.yml b/config/locales/sr-YU.yml index 39e5b9acf..bf35302d2 100644 --- a/config/locales/sr-YU.yml +++ b/config/locales/sr-YU.yml @@ -1204,3 +1204,6 @@ sr-YU: mail_body_password_updated: Your password has been changed. label_no_preview: No preview available setting_new_project_issue_tab_enabled: Display the "New issue" tab + error_no_tracker_allowed_for_new_issue_in_project: The project doesn't have any trackers + for which you can create an issue + label_tracker_all: All trackers diff --git a/config/locales/sr.yml b/config/locales/sr.yml index a62470a3a..9d12a7d60 100644 --- a/config/locales/sr.yml +++ b/config/locales/sr.yml @@ -1203,3 +1203,6 @@ sr: mail_body_password_updated: Your password has been changed. label_no_preview: No preview available setting_new_project_issue_tab_enabled: Display the "New issue" tab + error_no_tracker_allowed_for_new_issue_in_project: The project doesn't have any trackers + for which you can create an issue + label_tracker_all: All trackers diff --git a/config/locales/sv.yml b/config/locales/sv.yml index ab90b697b..4bdf72a51 100644 --- a/config/locales/sv.yml +++ b/config/locales/sv.yml @@ -1235,3 +1235,6 @@ sv: mail_body_password_updated: Your password has been changed. label_no_preview: No preview available setting_new_project_issue_tab_enabled: Display the "New issue" tab + error_no_tracker_allowed_for_new_issue_in_project: The project doesn't have any trackers + for which you can create an issue + label_tracker_all: All trackers diff --git a/config/locales/th.yml b/config/locales/th.yml index 5ea0a63c0..bfdc38490 100644 --- a/config/locales/th.yml +++ b/config/locales/th.yml @@ -1199,3 +1199,6 @@ th: mail_body_password_updated: Your password has been changed. label_no_preview: No preview available setting_new_project_issue_tab_enabled: Display the "New issue" tab + error_no_tracker_allowed_for_new_issue_in_project: The project doesn't have any trackers + for which you can create an issue + label_tracker_all: All trackers diff --git a/config/locales/tr.yml b/config/locales/tr.yml index 6e07512a4..8eeb40698 100644 --- a/config/locales/tr.yml +++ b/config/locales/tr.yml @@ -1209,3 +1209,6 @@ tr: mail_body_password_updated: Your password has been changed. label_no_preview: No preview available setting_new_project_issue_tab_enabled: Display the "New issue" tab + error_no_tracker_allowed_for_new_issue_in_project: The project doesn't have any trackers + for which you can create an issue + label_tracker_all: All trackers diff --git a/config/locales/uk.yml b/config/locales/uk.yml index 783ce26f6..cb2447159 100644 --- a/config/locales/uk.yml +++ b/config/locales/uk.yml @@ -1197,3 +1197,6 @@ uk: mail_body_password_updated: Your password has been changed. label_no_preview: No preview available setting_new_project_issue_tab_enabled: Display the "New issue" tab + error_no_tracker_allowed_for_new_issue_in_project: The project doesn't have any trackers + for which you can create an issue + label_tracker_all: All trackers diff --git a/config/locales/vi.yml b/config/locales/vi.yml index a9744ab52..04a4b45b7 100644 --- a/config/locales/vi.yml +++ b/config/locales/vi.yml @@ -1255,3 +1255,6 @@ vi: mail_body_password_updated: Your password has been changed. label_no_preview: No preview available setting_new_project_issue_tab_enabled: Display the "New issue" tab + error_no_tracker_allowed_for_new_issue_in_project: The project doesn't have any trackers + for which you can create an issue + label_tracker_all: All trackers diff --git a/config/locales/zh-TW.yml b/config/locales/zh-TW.yml index b547486ca..4c188cef3 100644 --- a/config/locales/zh-TW.yml +++ b/config/locales/zh-TW.yml @@ -1273,3 +1273,6 @@ description_date_from: 輸入起始日期 description_date_to: 輸入結束日期 text_repository_identifier_info: '僅允許使用小寫英文字母 (a-z), 阿拉伯數字, 虛線與底線。
一旦儲存之後, 代碼便無法再次被更改。' + error_no_tracker_allowed_for_new_issue_in_project: The project doesn't have any trackers + for which you can create an issue + label_tracker_all: All trackers diff --git a/config/locales/zh.yml b/config/locales/zh.yml index 4d71c38e8..1faec6d94 100644 --- a/config/locales/zh.yml +++ b/config/locales/zh.yml @@ -1195,3 +1195,6 @@ zh: mail_body_password_updated: Your password has been changed. label_no_preview: No preview available setting_new_project_issue_tab_enabled: Display the "New issue" tab + error_no_tracker_allowed_for_new_issue_in_project: The project doesn't have any trackers + for which you can create an issue + label_tracker_all: All trackers From b25f902d55d9a98ae7b16f05a44fc3b3588e2f2a Mon Sep 17 00:00:00 2001 From: Toshi MARUYAMA Date: Mon, 6 Jun 2016 05:17:59 +0000 Subject: [PATCH 0026/1117] Simplified Chinese translation updated by Haihan Ji (#22983) git-svn-id: http://svn.redmine.org/redmine/trunk@15473 e93f8b46-1217-0410-a6f0-8f06a7374b81 --- config/locales/zh.yml | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/config/locales/zh.yml b/config/locales/zh.yml index 1faec6d94..d66b2954c 100644 --- a/config/locales/zh.yml +++ b/config/locales/zh.yml @@ -1189,12 +1189,12 @@ zh: mail_body_security_notification_notify_disabled: 邮件地址 %{value} 不再接收通知. mail_body_settings_updated: "下列设置已更新:" field_remote_ip: IP 地址 - label_wiki_page_new: New wiki page - label_relations: Relations - button_filter: Filter - mail_body_password_updated: Your password has been changed. - label_no_preview: No preview available - setting_new_project_issue_tab_enabled: Display the "New issue" tab + label_wiki_page_new: 新建Wiki页面 + label_relations: 相关的问题 + button_filter: 设置为过滤条件 + mail_body_password_updated: 您的密码已经变更。 + label_no_preview: 没有可以显示的预览内容 + setting_new_project_issue_tab_enabled: 显示“新建问题”标签 error_no_tracker_allowed_for_new_issue_in_project: The project doesn't have any trackers for which you can create an issue label_tracker_all: All trackers From c87783d50d559915847ffcfc9c95bde274eaad0d Mon Sep 17 00:00:00 2001 From: Jean-Philippe Lang Date: Mon, 6 Jun 2016 06:32:10 +0000 Subject: [PATCH 0027/1117] Always authorize admin users. git-svn-id: http://svn.redmine.org/redmine/trunk@15475 e93f8b46-1217-0410-a6f0-8f06a7374b81 --- app/models/issue.rb | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/app/models/issue.rb b/app/models/issue.rb index 28a7f9fe6..0044e73b2 100644 --- a/app/models/issue.rb +++ b/app/models/issue.rb @@ -1417,8 +1417,12 @@ class Issue < ActiveRecord::Base private def user_tracker_permission?(user, permission) - roles = user.roles_for_project(project).select {|r| r.has_permission?(permission)} - roles.any? {|r| r.permissions_all_trackers?(permission) || r.permissions_tracker_ids?(permission, tracker_id)} + if user.admin? + true + else + roles = user.roles_for_project(project).select {|r| r.has_permission?(permission)} + roles.any? {|r| r.permissions_all_trackers?(permission) || r.permissions_tracker_ids?(permission, tracker_id)} + end end def after_project_change From 026bcc4236138dd26e56c674784f58194fd172f7 Mon Sep 17 00:00:00 2001 From: Jean-Philippe Lang Date: Mon, 6 Jun 2016 06:41:06 +0000 Subject: [PATCH 0028/1117] Same permission for editing the issue and its attachments. git-svn-id: http://svn.redmine.org/redmine/trunk@15476 e93f8b46-1217-0410-a6f0-8f06a7374b81 --- app/models/issue.rb | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/app/models/issue.rb b/app/models/issue.rb index 0044e73b2..e0b99e4e6 100644 --- a/app/models/issue.rb +++ b/app/models/issue.rb @@ -182,6 +182,11 @@ class Issue < ActiveRecord::Base user_tracker_permission?(user, :edit_issues) end + # Overrides Redmine::Acts::Attachable::InstanceMethods#attachments_editable? + def attachments_editable?(user=User.current) + attributes_editable?(user) + end + # Returns true if user or current user is allowed to add notes to the issue def notes_addable?(user=User.current) user_tracker_permission?(user, :add_issue_notes) From 2b8011c408b876f48bb02b50ec87b7b1327210eb Mon Sep 17 00:00:00 2001 From: Jean-Philippe Lang Date: Mon, 6 Jun 2016 07:26:07 +0000 Subject: [PATCH 0029/1117] Removes the border around avatars. git-svn-id: http://svn.redmine.org/redmine/trunk@15477 e93f8b46-1217-0410-a6f0-8f06a7374b81 --- public/stylesheets/application.css | 13 +------------ 1 file changed, 1 insertion(+), 12 deletions(-) diff --git a/public/stylesheets/application.css b/public/stylesheets/application.css index c276ebd27..021cb822d 100644 --- a/public/stylesheets/application.css +++ b/public/stylesheets/application.css @@ -1210,24 +1210,13 @@ tr.ui-sortable-helper { border:1px solid #e4e4e4; } .contextual>.icon:not(:first-child), .buttons>.icon:not(:first-child) { margin-left: 5px; } img.gravatar { - padding: 2px; - border: solid 1px #d5d5d5; - background: #fff; vertical-align: middle; + border-radius: 20%; } div.issue img.gravatar { float: left; margin: 0 6px 0 0; - padding: 5px; -} - -div.issue .attributes img.gravatar { - height: 14px; - width: 14px; - padding: 2px; - float: left; - margin: 0 0.5em 0 0; } h2 img.gravatar {margin: -2px 4px -4px 0;} From 3119ca041d4d85d1c2f384bc45d06d63f09e78d5 Mon Sep 17 00:00:00 2001 From: Toshi MARUYAMA Date: Mon, 6 Jun 2016 10:14:01 +0000 Subject: [PATCH 0030/1117] add newline at end of db/migrate/20160529063352_add_roles_settings.rb git-svn-id: http://svn.redmine.org/redmine/trunk@15481 e93f8b46-1217-0410-a6f0-8f06a7374b81 --- db/migrate/20160529063352_add_roles_settings.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/db/migrate/20160529063352_add_roles_settings.rb b/db/migrate/20160529063352_add_roles_settings.rb index 921187ec1..a4d18fcbc 100644 --- a/db/migrate/20160529063352_add_roles_settings.rb +++ b/db/migrate/20160529063352_add_roles_settings.rb @@ -2,4 +2,4 @@ class AddRolesSettings < ActiveRecord::Migration def change add_column :roles, :settings, :text end -end \ No newline at end of file +end From 02a9df07209098cde1aeca4666dee24e60a7216c Mon Sep 17 00:00:00 2001 From: Toshi MARUYAMA Date: Mon, 6 Jun 2016 10:14:12 +0000 Subject: [PATCH 0031/1117] Japanese translation updated by Go MAEDA (#22991) git-svn-id: http://svn.redmine.org/redmine/trunk@15482 e93f8b46-1217-0410-a6f0-8f06a7374b81 --- config/locales/ja.yml | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/config/locales/ja.yml b/config/locales/ja.yml index 4b3945285..2c5a63514 100644 --- a/config/locales/ja.yml +++ b/config/locales/ja.yml @@ -1213,6 +1213,5 @@ ja: mail_body_password_updated: パスワードが変更されました。 label_no_preview: このファイルはプレビューできません setting_new_project_issue_tab_enabled: '"新しいチケット" タブを表示' - error_no_tracker_allowed_for_new_issue_in_project: The project doesn't have any trackers - for which you can create an issue - label_tracker_all: All trackers + error_no_tracker_allowed_for_new_issue_in_project: このプロジェクトにはチケットの追加が許可されているトラッカーがありません + label_tracker_all: すべてのトラッカー From 28cf06c0048000820ae2c142feae68d37d41a978 Mon Sep 17 00:00:00 2001 From: Toshi MARUYAMA Date: Tue, 7 Jun 2016 12:19:25 +0000 Subject: [PATCH 0032/1117] Bulgarian translation for 3.1-stable updated by Ivan Cenov (#23000, #23003) git-svn-id: http://svn.redmine.org/redmine/trunk@15484 e93f8b46-1217-0410-a6f0-8f06a7374b81 --- config/locales/bg.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/config/locales/bg.yml b/config/locales/bg.yml index d5baac680..69923ba0a 100644 --- a/config/locales/bg.yml +++ b/config/locales/bg.yml @@ -410,7 +410,7 @@ bg: setting_file_max_size_displayed: Максимален размер на текстовите файлове, показвани inline setting_repository_log_display_limit: Максимален брой на показванете ревизии в лог файла setting_openid: Рарешаване на OpenID вход и регистрация - setting_password_max_age: Require password change after + setting_password_max_age: Изискване за смяна на паролата след setting_password_min_length: Минимална дължина на парола setting_new_project_user_role_id: Роля, давана на потребител, създаващ проекти, който не е администратор setting_default_projects_modules: Активирани модули по подразбиране за нов проект From b935539f287a18924d510de8649f38fffdb85f50 Mon Sep 17 00:00:00 2001 From: Toshi MARUYAMA Date: Tue, 7 Jun 2016 12:19:36 +0000 Subject: [PATCH 0033/1117] Bulgarian translation for 3.3-stable updated by Ivan Cenov (#23000) git-svn-id: http://svn.redmine.org/redmine/trunk@15485 e93f8b46-1217-0410-a6f0-8f06a7374b81 --- config/locales/bg.yml | 23 +++++++++++------------ 1 file changed, 11 insertions(+), 12 deletions(-) diff --git a/config/locales/bg.yml b/config/locales/bg.yml index 69923ba0a..b6412c92b 100644 --- a/config/locales/bg.yml +++ b/config/locales/bg.yml @@ -216,6 +216,7 @@ bg: error_can_not_read_import_file: Грешка по време на четене на импортирания файл error_attachment_extension_not_allowed: Файлове от тип %{extension} не са позволени error_ldap_bind_credentials: Невалидни LDAP име/парола + error_no_tracker_allowed_for_new_issue_in_project: Проектът няма тракери, за които да създавате задачи mail_subject_lost_password: "Вашата парола (%{value})" mail_body_lost_password: 'За да смените паролата си, използвайте следния линк:' @@ -239,6 +240,7 @@ bg: mail_body_security_notification_notify_enabled: Имейл адрес %{value} вече получава известия. mail_body_security_notification_notify_disabled: Имейл адрес %{value} вече не получава известия. mail_body_settings_updated: ! 'Изменения в конфигурацията:' + mail_body_password_updated: Вашата парола е сменена. field_name: Име field_description: Описание @@ -402,7 +404,8 @@ bg: setting_enabled_scm: Разрешена SCM setting_mail_handler_body_delimiters: Отрязване на e-mail-ите след един от тези редове setting_mail_handler_api_enabled: Разрешаване на WS за входящи e-mail-и - setting_mail_handler_api_key: API ключ + setting_mail_handler_api_key: API ключ за входящи e-mail-и + setting_sys_api_key: API ключ за хранилища setting_sequential_project_identifiers: Генериране на последователни проектни идентификатори setting_gravatar_enabled: Използване на портребителски икони от Gravatar setting_gravatar_default: Подразбиращо се изображение от Gravatar @@ -412,6 +415,7 @@ bg: setting_openid: Рарешаване на OpenID вход и регистрация setting_password_max_age: Изискване за смяна на паролата след setting_password_min_length: Минимална дължина на парола + setting_lost_password: Забравена парола setting_new_project_user_role_id: Роля, давана на потребител, създаващ проекти, който не е администратор setting_default_projects_modules: Активирани модули по подразбиране за нов проект setting_issue_done_ratio: Изчисление на процента на готови задачи с @@ -443,6 +447,7 @@ bg: setting_search_results_per_page: Резултати от търсене на страница setting_attachment_extensions_allowed: Позволени типове на файлове setting_attachment_extensions_denied: Разрешени типове на файлове + setting_new_project_issue_tab_enabled: Показване на меню-елемент "Нова задача" permission_add_project: Създаване на проект permission_add_subprojects: Създаване на подпроекти @@ -560,6 +565,7 @@ bg: label_member_plural: Членове label_tracker: Тракер label_tracker_plural: Тракери + label_tracker_all: Всички тракери label_tracker_new: Нов тракер label_workflow: Работен процес label_issue_status: Състояние на задача @@ -618,6 +624,7 @@ bg: label_attribute: Атрибут label_attribute_plural: Атрибути label_no_data: Няма изходни данни + label_no_preview: Няма наличен преглед (preview) label_change_status: Промяна на състоянието label_history: История label_attachment: Файл @@ -765,6 +772,7 @@ bg: label_wiki_edit_plural: Wiki редакции label_wiki_page: Wiki страница label_wiki_page_plural: Wiki страници + label_wiki_page_new: Нова wiki страница label_index_by_title: Индекс label_index_by_date: Индекс по дата label_current_version: Текуща версия @@ -989,6 +997,7 @@ bg: label_api: API label_field_format_enumeration: Списък ключ/стойност label_default_values_for_new_users: Стойности по подразбиране за нови потребители + label_relations: Релации button_login: Вход button_submit: Изпращане @@ -1043,6 +1052,7 @@ bg: button_close: Затваряне button_reopen: Отваряне button_import: Импорт + button_filter: Филтър status_active: активен status_registered: регистриран @@ -1183,14 +1193,3 @@ bg: description_date_from: Въведете начална дата description_date_to: Въведете крайна дата text_repository_identifier_info: 'Позволени са малки букви (a-z), цифри, тирета и _.
Промяна след създаването му не е възможна.' - setting_sys_api_key: API ключ - setting_lost_password: Забравена парола - label_wiki_page_new: New wiki page - label_relations: Relations - button_filter: Filter - mail_body_password_updated: Your password has been changed. - label_no_preview: No preview available - setting_new_project_issue_tab_enabled: Display the "New issue" tab - error_no_tracker_allowed_for_new_issue_in_project: The project doesn't have any trackers - for which you can create an issue - label_tracker_all: All trackers From e3875ffd5739a60e59f54ff431d2c0bf17f8a55e Mon Sep 17 00:00:00 2001 From: Jean-Philippe Lang Date: Tue, 7 Jun 2016 18:23:42 +0000 Subject: [PATCH 0034/1117] Make Tracker map-able for CSV import (#22951). git-svn-id: http://svn.redmine.org/redmine/trunk@15490 e93f8b46-1217-0410-a6f0-8f06a7374b81 --- app/controllers/imports_controller.rb | 6 +--- app/helpers/imports_helper.rb | 6 +++- app/models/issue_import.rb | 34 ++++++++++++++++++++-- app/views/imports/_fields_mapping.html.erb | 12 ++++---- app/views/imports/mapping.html.erb | 2 +- test/fixtures/files/import_issues.csv | 8 ++--- test/object_helpers.rb | 2 +- test/unit/issue_import_test.rb | 33 ++++++++++++++++++++- 8 files changed, 81 insertions(+), 22 deletions(-) diff --git a/app/controllers/imports_controller.rb b/app/controllers/imports_controller.rb index 79a5ced4b..75d4da933 100644 --- a/app/controllers/imports_controller.rb +++ b/app/controllers/imports_controller.rb @@ -57,11 +57,7 @@ class ImportsController < ApplicationController end def mapping - issue = Issue.new - issue.project = @import.project - issue.tracker = @import.tracker - @attributes = issue.safe_attribute_names - @custom_fields = issue.editable_custom_field_values.map(&:custom_field) + @custom_fields = @import.mappable_custom_fields if request.post? respond_to do |format| diff --git a/app/helpers/imports_helper.rb b/app/helpers/imports_helper.rb index 2fecfca24..edbf2d13e 100644 --- a/app/helpers/imports_helper.rb +++ b/app/helpers/imports_helper.rb @@ -23,12 +23,16 @@ module ImportsHelper blank_text = options[:required] ? "-- #{l(:actionview_instancetag_blank_option)} --" : " ".html_safe tags << content_tag('option', blank_text, :value => '') tags << options_for_select(import.columns_options, import.mapping[field]) + if values = options[:values] + tags << content_tag('option', '--', :disabled => true) + tags << options_for_select(values.map {|text, value| [text, "value:#{value}"]}, import.mapping[field]) + end tags end def mapping_select_tag(import, field, options={}) name = "import_settings[mapping][#{field}]" - select_tag name, options_for_mapping_select(import, field, options) + select_tag name, options_for_mapping_select(import, field, options), :id => "import_mapping_#{field}" end # Returns the options for the date_format setting diff --git a/app/models/issue_import.rb b/app/models/issue_import.rb index 5b19ac966..e7d7a56aa 100644 --- a/app/models/issue_import.rb +++ b/app/models/issue_import.rb @@ -41,8 +41,10 @@ class IssueImport < Import end def tracker - tracker_id = mapping['tracker_id'].to_i - allowed_target_trackers.find_by_id(tracker_id) || allowed_target_trackers.first + if mapping['tracker'].to_s =~ /\Avalue:(\d+)\z/ + tracker_id = $1.to_i + allowed_target_trackers.find_by_id(tracker_id) + end end # Returns true if missing categories should be created during the import @@ -57,6 +59,19 @@ class IssueImport < Import mapping['create_versions'] == '1' end + def mappable_custom_fields + if tracker + issue = Issue.new + issue.project = project + issue.tracker = tracker + issue.editable_custom_field_values(user).map(&:custom_field) + elsif project + project.all_issue_custom_fields + else + [] + end + end + private def build_object(row) @@ -64,12 +79,20 @@ class IssueImport < Import issue.author = user issue.notify = false + tracker_id = nil + if tracker + tracker_id = tracker.id + elsif tracker_name = row_value(row, 'tracker') + tracker_id = allowed_target_trackers.named(tracker_name).first.try(:id) + end + attributes = { 'project_id' => mapping['project_id'], - 'tracker_id' => mapping['tracker_id'], + 'tracker_id' => tracker_id, 'subject' => row_value(row, 'subject'), 'description' => row_value(row, 'description') } + attributes issue.send :safe_attributes=, attributes, user attributes = {} @@ -149,6 +172,11 @@ class IssueImport < Import end issue.send :safe_attributes=, attributes, user + + if issue.tracker_id != tracker_id + issue.tracker_id = nil + end + issue end end diff --git a/app/views/imports/_fields_mapping.html.erb b/app/views/imports/_fields_mapping.html.erb index bb6467eca..4ac2b570f 100644 --- a/app/views/imports/_fields_mapping.html.erb +++ b/app/views/imports/_fields_mapping.html.erb @@ -1,17 +1,17 @@ -
-

<%= select_tag 'import_settings[mapping][project_id]', options_for_select(project_tree_options_for_select(@import.allowed_target_projects, :selected => @import.project)), - :id => 'issue_project_id' %> + :id => 'import_mapping_project_id' %>

- <%= select_tag 'import_settings[mapping][tracker_id]', - options_for_select(@import.allowed_target_trackers.sorted.map {|t| [t.name, t.id]}, @import.tracker.try(:id)), - :id => 'issue_tracker_id' %> + <%= mapping_select_tag @import, 'tracker', :required => true, + :values => @import.allowed_target_trackers.sorted.map {|t| [t.name, t.id]} %>

+ +
+

<%= mapping_select_tag @import, 'subject', :required => true %> diff --git a/app/views/imports/mapping.html.erb b/app/views/imports/mapping.html.erb index 283bddb04..2e225d6c2 100644 --- a/app/views/imports/mapping.html.erb +++ b/app/views/imports/mapping.html.erb @@ -35,7 +35,7 @@ <%= javascript_tag do %> $(document).ready(function() { - $('#fields-mapping').on('change', '#issue_project_id, #issue_tracker_id', function(){ + $('#fields-mapping').on('change', '#import_mapping_project_id, #import_mapping_tracker', function(){ $.ajax({ url: '<%= import_mapping_path(@import, :format => 'js') %>', type: 'post', diff --git a/test/fixtures/files/import_issues.csv b/test/fixtures/files/import_issues.csv index 918f9fc7e..6990cb534 100644 --- a/test/fixtures/files/import_issues.csv +++ b/test/fixtures/files/import_issues.csv @@ -1,4 +1,4 @@ -priority;subject;description;start_date;due_date;parent;private;progress;custom;version;category;user;estimated_hours -High;First;First description;2015-07-08;2015-08-25;;no;;PostgreSQL;;New category;dlopper;1 -Normal;Child 1;Child description;;;1;yes;10;MySQL;2.0;New category;;2 -Normal;Child of existing issue;Child description;;;#2;no;20;;2.1;Printing;;3 +priority;subject;description;start_date;due_date;parent;private;progress;custom;version;category;user;estimated_hours;tracker +High;First;First description;2015-07-08;2015-08-25;;no;;PostgreSQL;;New category;dlopper;1;bug +Normal;Child 1;Child description;;;1;yes;10;MySQL;2.0;New category;;2;feature request +Normal;Child of existing issue;Child description;;;#2;no;20;;2.1;Printing;;3;bug diff --git a/test/object_helpers.rb b/test/object_helpers.rb index 2b3327961..7ea4a619a 100644 --- a/test/object_helpers.rb +++ b/test/object_helpers.rb @@ -235,7 +235,7 @@ module ObjectHelpers import.settings = { 'separator' => ";", 'wrapper' => '"', 'encoding' => "UTF-8", - 'mapping' => {'project_id' => '1', 'tracker_id' => '2', 'subject' => '1'} + 'mapping' => {'project_id' => '1', 'tracker' => '13', 'subject' => '1'} } import.save! import diff --git a/test/unit/issue_import_test.rb b/test/unit/issue_import_test.rb index 61e100700..6d39214d5 100644 --- a/test/unit/issue_import_test.rb +++ b/test/unit/issue_import_test.rb @@ -58,6 +58,37 @@ class IssueImportTest < ActiveSupport::TestCase assert_equal 'New category', category.name end + def test_mapping_with_fixed_tracker + import = generate_import_with_mapping + import.mapping.merge!('tracker' => 'value:2') + import.save! + + issues = new_records(Issue, 3) { import.run } + assert_equal [2], issues.map(&:tracker_id).uniq + end + + def test_mapping_with_mapped_tracker + import = generate_import_with_mapping + import.mapping.merge!('tracker' => '13') + import.save! + + issues = new_records(Issue, 3) { import.run } + assert_equal [1, 2, 1], issues.map(&:tracker_id) + end + + def test_should_not_import_with_default_tracker_when_tracker_is_invalid + Tracker.find_by_name('Feature request').update!(:name => 'Feature') + + import = generate_import_with_mapping + import.mapping.merge!('tracker' => '13') + import.save! + import.run + + assert_equal 1, import.unsaved_items.count + item = import.unsaved_items.first + assert_include "Tracker cannot be blank", item.message + end + def test_parent_should_be_set import = generate_import_with_mapping import.mapping.merge!('parent_issue_id' => '5') @@ -101,7 +132,7 @@ class IssueImportTest < ActiveSupport::TestCase field = IssueCustomField.generate!(:field_format => 'date', :is_for_all => true, :trackers => Tracker.all) import = generate_import_with_mapping('import_dates.csv') import.settings.merge!('date_format' => Import::DATE_FORMATS[1]) - import.mapping.merge!('subject' => '0', 'start_date' => '1', 'due_date' => '2', "cf_#{field.id}" => '3') + import.mapping.merge!('tracker' => 'value:1', 'subject' => '0', 'start_date' => '1', 'due_date' => '2', "cf_#{field.id}" => '3') import.save! issue = new_record(Issue) { import.run } # only 1 valid issue From d18ef93c85518dd76d3d8ecd6a99c1c5036a7fb0 Mon Sep 17 00:00:00 2001 From: Jean-Philippe Lang Date: Tue, 7 Jun 2016 18:25:32 +0000 Subject: [PATCH 0035/1117] Always display the list of imported issues. git-svn-id: http://svn.redmine.org/redmine/trunk@15491 e93f8b46-1217-0410-a6f0-8f06a7374b81 --- app/views/imports/show.html.erb | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/app/views/imports/show.html.erb b/app/views/imports/show.html.erb index d9848cdb5..142129137 100644 --- a/app/views/imports/show.html.erb +++ b/app/views/imports/show.html.erb @@ -1,6 +1,6 @@

<%= l(:label_import_issues) %>

-<% if @import.unsaved_items.count == 0 %> +<% if @import.unsaved_items.count > 0 %>

<%= l(:notice_import_finished, :count => @import.saved_items.count) %>

    @@ -8,7 +8,9 @@
  • <%= link_to_issue issue %>
  • <% end %>
-<% else %> +<% end %> + +<% if @import.unsaved_items.count > 0 %>

<%= l(:notice_import_finished_with_errors, :count => @import.unsaved_items.count, :total => @import.total_items) %>

From 90d14b71b3656a8362d7508dd88b2aea43c6fa31 Mon Sep 17 00:00:00 2001 From: Jean-Philippe Lang Date: Tue, 7 Jun 2016 18:29:17 +0000 Subject: [PATCH 0036/1117] Don't add the inclusion error when tracker is not set, the blank error is enough. git-svn-id: http://svn.redmine.org/redmine/trunk@15492 e93f8b46-1217-0410-a6f0-8f06a7374b81 --- app/models/issue.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app/models/issue.rb b/app/models/issue.rb index e0b99e4e6..98e348d6a 100644 --- a/app/models/issue.rb +++ b/app/models/issue.rb @@ -691,7 +691,7 @@ class Issue < ActiveRecord::Base # Checks that the issue can not be added/moved to a disabled tracker if project && (tracker_id_changed? || project_id_changed?) - unless project.trackers.include?(tracker) + if tracker && !project.trackers.include?(tracker) errors.add :tracker_id, :inclusion end end From f6754a0f7a37973d3f7296d0c75ac8d20204d682 Mon Sep 17 00:00:00 2001 From: Jean-Philippe Lang Date: Tue, 7 Jun 2016 18:39:44 +0000 Subject: [PATCH 0037/1117] Make Status map-able for CSV import (#22951). git-svn-id: http://svn.redmine.org/redmine/trunk@15493 e93f8b46-1217-0410-a6f0-8f06a7374b81 --- app/models/issue_import.rb | 6 +++++- app/views/imports/_fields_mapping.html.erb | 4 ++++ test/fixtures/files/import_issues.csv | 8 ++++---- test/unit/issue_import_test.rb | 9 +++++++++ 4 files changed, 22 insertions(+), 5 deletions(-) diff --git a/app/models/issue_import.rb b/app/models/issue_import.rb index e7d7a56aa..4ecd4b517 100644 --- a/app/models/issue_import.rb +++ b/app/models/issue_import.rb @@ -92,7 +92,11 @@ class IssueImport < Import 'subject' => row_value(row, 'subject'), 'description' => row_value(row, 'description') } - attributes + if status_name = row_value(row, 'status') + if status_id = IssueStatus.named(status_name).first.try(:id) + attributes['status_id'] = status_id + end + end issue.send :safe_attributes=, attributes, user attributes = {} diff --git a/app/views/imports/_fields_mapping.html.erb b/app/views/imports/_fields_mapping.html.erb index 4ac2b570f..0e1d455fa 100644 --- a/app/views/imports/_fields_mapping.html.erb +++ b/app/views/imports/_fields_mapping.html.erb @@ -9,6 +9,10 @@ <%= mapping_select_tag @import, 'tracker', :required => true, :values => @import.allowed_target_trackers.sorted.map {|t| [t.name, t.id]} %>

+

+ + <%= mapping_select_tag @import, 'status' %> +

diff --git a/test/fixtures/files/import_issues.csv b/test/fixtures/files/import_issues.csv index 6990cb534..fa9d22665 100644 --- a/test/fixtures/files/import_issues.csv +++ b/test/fixtures/files/import_issues.csv @@ -1,4 +1,4 @@ -priority;subject;description;start_date;due_date;parent;private;progress;custom;version;category;user;estimated_hours;tracker -High;First;First description;2015-07-08;2015-08-25;;no;;PostgreSQL;;New category;dlopper;1;bug -Normal;Child 1;Child description;;;1;yes;10;MySQL;2.0;New category;;2;feature request -Normal;Child of existing issue;Child description;;;#2;no;20;;2.1;Printing;;3;bug +priority;subject;description;start_date;due_date;parent;private;progress;custom;version;category;user;estimated_hours;tracker;status +High;First;First description;2015-07-08;2015-08-25;;no;;PostgreSQL;;New category;dlopper;1;bug;new +Normal;Child 1;Child description;;;1;yes;10;MySQL;2.0;New category;;2;feature request;new +Normal;Child of existing issue;Child description;;;#2;no;20;;2.1;Printing;;3;bug;assigned diff --git a/test/unit/issue_import_test.rb b/test/unit/issue_import_test.rb index 6d39214d5..88da82c88 100644 --- a/test/unit/issue_import_test.rb +++ b/test/unit/issue_import_test.rb @@ -89,6 +89,15 @@ class IssueImportTest < ActiveSupport::TestCase assert_include "Tracker cannot be blank", item.message end + def test_status_should_be_set + import = generate_import_with_mapping + import.mapping.merge!('status' => '14') + import.save! + + issues = new_records(Issue, 3) { import.run } + assert_equal ['New', 'New', 'Assigned'], issues.map(&:status).map(&:name) + end + def test_parent_should_be_set import = generate_import_with_mapping import.mapping.merge!('parent_issue_id' => '5') From a6f364e705102f0106ec980806c0d3f00bcc4009 Mon Sep 17 00:00:00 2001 From: Toshi MARUYAMA Date: Wed, 8 Jun 2016 10:26:02 +0000 Subject: [PATCH 0038/1117] Traditional Chinese translation updated by ChunChang Lo (#23013) git-svn-id: http://svn.redmine.org/redmine/trunk@15494 e93f8b46-1217-0410-a6f0-8f06a7374b81 --- config/locales/zh-TW.yml | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/config/locales/zh-TW.yml b/config/locales/zh-TW.yml index 4c188cef3..7ce98871c 100644 --- a/config/locales/zh-TW.yml +++ b/config/locales/zh-TW.yml @@ -297,6 +297,7 @@ error_can_not_read_import_file: "讀取匯入檔案時發生錯誤" error_attachment_extension_not_allowed: "附件之附檔名不允許使用 %{extension}" error_ldap_bind_credentials: "無效的 LDAP 帳號/密碼" + error_no_tracker_allowed_for_new_issue_in_project: "此專案沒有您可用來建立新議題的追蹤標籤" mail_subject_lost_password: 您的 Redmine 網站密碼 mail_body_lost_password: '欲變更您的 Redmine 網站密碼, 請點選以下鏈結:' @@ -645,6 +646,7 @@ label_member_plural: 成員 label_tracker: 追蹤標籤 label_tracker_plural: 追蹤標籤清單 + label_tracker_all: 所有的追蹤標籤 label_tracker_new: 建立新的追蹤標籤 label_workflow: 流程 label_issue_status: 議題狀態 @@ -1273,6 +1275,3 @@ description_date_from: 輸入起始日期 description_date_to: 輸入結束日期 text_repository_identifier_info: '僅允許使用小寫英文字母 (a-z), 阿拉伯數字, 虛線與底線。
一旦儲存之後, 代碼便無法再次被更改。' - error_no_tracker_allowed_for_new_issue_in_project: The project doesn't have any trackers - for which you can create an issue - label_tracker_all: All trackers From 85097a89a16ce2d98b272fa89cc66fae7be00a0f Mon Sep 17 00:00:00 2001 From: Jean-Philippe Lang Date: Wed, 8 Jun 2016 17:10:09 +0000 Subject: [PATCH 0039/1117] Fixes r15491. git-svn-id: http://svn.redmine.org/redmine/trunk@15496 e93f8b46-1217-0410-a6f0-8f06a7374b81 --- app/views/imports/show.html.erb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app/views/imports/show.html.erb b/app/views/imports/show.html.erb index 142129137..96b40a663 100644 --- a/app/views/imports/show.html.erb +++ b/app/views/imports/show.html.erb @@ -1,6 +1,6 @@

<%= l(:label_import_issues) %>

-<% if @import.unsaved_items.count > 0 %> +<% if @import.saved_items.count > 0 %>

<%= l(:notice_import_finished, :count => @import.saved_items.count) %>

    From 712d08a5d31f09bf5d0f90255d8a4024bd3a2f3c Mon Sep 17 00:00:00 2001 From: Jean-Philippe Lang Date: Wed, 8 Jun 2016 17:14:40 +0000 Subject: [PATCH 0040/1117] Adds assertions for import result. git-svn-id: http://svn.redmine.org/redmine/trunk@15497 e93f8b46-1217-0410-a6f0-8f06a7374b81 --- app/views/imports/show.html.erb | 10 +++++++--- test/functional/imports_controller_test.rb | 3 +++ 2 files changed, 10 insertions(+), 3 deletions(-) diff --git a/app/views/imports/show.html.erb b/app/views/imports/show.html.erb index 96b40a663..a50db99fe 100644 --- a/app/views/imports/show.html.erb +++ b/app/views/imports/show.html.erb @@ -3,7 +3,7 @@ <% if @import.saved_items.count > 0 %>

    <%= l(:notice_import_finished, :count => @import.saved_items.count) %>

    -
      +
        <% @import.saved_objects.each do |issue| %>
      • <%= link_to_issue issue %>
      • <% end %> @@ -14,16 +14,20 @@

        <%= l(:notice_import_finished_with_errors, :count => @import.unsaved_items.count, :total => @import.total_items) %>

+ - <% @import.unsaved_items.each do |item| %> + + + <% @import.unsaved_items.each do |item| %> - <% end %> + <% end %> +
Position Message
<%= item.position %> <%= simple_format_without_paragraph item.message %>
<% end %> diff --git a/test/functional/imports_controller_test.rb b/test/functional/imports_controller_test.rb index 9c8dafa34..5c41c10d7 100644 --- a/test/functional/imports_controller_test.rb +++ b/test/functional/imports_controller_test.rb @@ -184,6 +184,8 @@ class ImportsControllerTest < ActionController::TestCase get :show, :id => import.to_param assert_response :success assert_template 'show' + assert_select 'ul#saved-items' + assert_select 'ul#saved-items li', import.saved_items.count assert_select 'table#unsaved-items', 0 end @@ -197,5 +199,6 @@ class ImportsControllerTest < ActionController::TestCase assert_response :success assert_template 'show' assert_select 'table#unsaved-items' + assert_select 'table#unsaved-items tbody tr', import.unsaved_items.count end end From 431a73c968e1222a60983039f695b2da7904ddc9 Mon Sep 17 00:00:00 2001 From: Toshi MARUYAMA Date: Thu, 9 Jun 2016 06:35:43 +0000 Subject: [PATCH 0041/1117] fix Russian "setting_thumbnails_enabled" misspelling (#23021) Contributed by Antonio Kless. git-svn-id: http://svn.redmine.org/redmine/trunk@15498 e93f8b46-1217-0410-a6f0-8f06a7374b81 --- config/locales/ru.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/config/locales/ru.yml b/config/locales/ru.yml index a7ad22514..fdce0f253 100644 --- a/config/locales/ru.yml +++ b/config/locales/ru.yml @@ -1140,7 +1140,7 @@ ru: notice_user_successful_create: Пользователь %{id} создан. field_core_fields: Стандартные поля field_timeout: Таймаут (в секундах) - setting_thumbnails_enabled: Отображать превью для приложений + setting_thumbnails_enabled: Отображать превью для вложений setting_thumbnails_size: Размер первью (в пикселях) label_status_transitions: Статус-переходы label_fields_permissions: Права на изменения полей From 53710d80fc886297d901ac913b4b7570ff5acdb4 Mon Sep 17 00:00:00 2001 From: Jean-Philippe Lang Date: Sat, 11 Jun 2016 06:21:52 +0000 Subject: [PATCH 0042/1117] Introduce virtual MenuNodes (#15880). They are characterized by having a blank url. they will only be rendered if the user is authorized to see at least one of its children. they render as links which do nothing when clicked. Patch by Jan Schulz-Hofen. git-svn-id: http://svn.redmine.org/redmine/trunk@15501 e93f8b46-1217-0410-a6f0-8f06a7374b81 --- lib/redmine/menu_manager.rb | 19 ++++++++-- .../redmine/menu_manager/menu_helper_test.rb | 35 +++++++++++++++++++ 2 files changed, 52 insertions(+), 2 deletions(-) diff --git a/lib/redmine/menu_manager.rb b/lib/redmine/menu_manager.rb index fa7777065..0d2d19a43 100644 --- a/lib/redmine/menu_manager.rb +++ b/lib/redmine/menu_manager.rb @@ -147,7 +147,15 @@ module Redmine end def render_single_menu_node(item, caption, url, selected) - link_to(h(caption), url, item.html_options(:selected => selected)) + options = item.html_options(:selected => selected) + + # virtual nodes are only there for their children to be displayed in the menu + # and should not do anything on click, except if otherwise defined elsewhere + if url.blank? + url = '#' + options.reverse_merge!(:onclick => 'return false;') + end + link_to(h(caption), url, options) end def render_unattached_menu_item(menu_item, project) @@ -433,7 +441,14 @@ module Redmine # * Checking the permission or the url target (project only) # * Checking the conditions of the item def allowed?(user, project) - if user && project + if url.blank? + # this is a virtual node that is only there for its children to be diplayed in the menu + # it is considered an allowed node if at least one of the children is allowed + all_children = children + all_children += child_menus.call(project) if child_menus + return true if all_children.detect{|child| child.allowed?(user, project) } + return false + elsif user && project if permission unless user.allowed_to?(permission, project) return false diff --git a/test/unit/lib/redmine/menu_manager/menu_helper_test.rb b/test/unit/lib/redmine/menu_manager/menu_helper_test.rb index 404ec6406..e19f066e0 100644 --- a/test/unit/lib/redmine/menu_manager/menu_helper_test.rb +++ b/test/unit/lib/redmine/menu_manager/menu_helper_test.rb @@ -208,6 +208,41 @@ class Redmine::MenuManager::MenuHelperTest < ActionView::TestCase end end end + + def test_render_empty_virtual_menu_node_with_children + + # only empty item with no click target + Redmine::MenuManager.map :menu1 do |menu| + menu.push(:parent_node, nil, { }) + end + + # parent with unallowed unattached child + Redmine::MenuManager.map :menu2 do |menu| + menu.push(:parent_node, nil, {:children => Proc.new {|p| + [Redmine::MenuManager::MenuItem.new("test_child_unallowed", {:controller => 'issues', :action => 'new'}, {})] + } }) + end + + # parent with unallowed standard child + Redmine::MenuManager.map :menu3 do |menu| + menu.push(:parent_node, nil, {}) + menu.push(:test_child_unallowed, {:controller =>'issues', :action => 'new'}, {:parent => :parent_node}) + end + + # should not be displayed to anonymous + User.current = User.find(6) + assert_nil render_menu(:menu1, Project.find(1)) + assert_nil render_menu(:menu2, Project.find(1)) + assert_nil render_menu(:menu3, Project.find(1)) + + # should be displayed to an admin + User.current = User.find(1) + @output_buffer = render_menu(:menu2, Project.find(1)) + assert_select("ul li a.parent-node", "Parent node") + @output_buffer = render_menu(:menu3, Project.find(1)) + assert_select("ul li a.parent-node", "Parent node") + + end def test_render_menu_node_with_children_without_an_array parent_node = Redmine::MenuManager::MenuItem.new(:parent_node, From cf7ff1acc93c08e09132c971671f752613978464 Mon Sep 17 00:00:00 2001 From: Jean-Philippe Lang Date: Sat, 11 Jun 2016 06:22:27 +0000 Subject: [PATCH 0043/1117] Style nested menus as drop downs on hover (#15880). Patch by Jan Schulz-Hofen. git-svn-id: http://svn.redmine.org/redmine/trunk@15502 e93f8b46-1217-0410-a6f0-8f06a7374b81 --- public/stylesheets/application.css | 17 +++++++++++++++++ .../alternate/stylesheets/application.css | 9 +++++++++ .../themes/classic/stylesheets/application.css | 9 +++++++++ 3 files changed, 35 insertions(+) diff --git a/public/stylesheets/application.css b/public/stylesheets/application.css index 021cb822d..c6d6e4c05 100644 --- a/public/stylesheets/application.css +++ b/public/stylesheets/application.css @@ -51,7 +51,24 @@ pre, code {font-family: Consolas, Menlo, "Liberation Mono", Courier, monospace;} padding: 4px 10px 4px 10px; } #main-menu li a:hover {background:#759FCF; color:#fff;} +#main-menu li:hover ul.menu-children {display: block;} #main-menu li a.selected, #main-menu li a.selected:hover {background:#fff; color:#555;} +#main-menu li a.new-object { background-color:#759FCF; } + +#main-menu .menu-children { + display: none; + position:absolute; + width: inherit; + z-index:1; + background-color:#fff; + border-right: 1px solid #759FCF; + border-bottom: 1px solid #759FCF; + border-left: 1px solid #759FCF; +} +#main-menu .menu-children li {float:left; clear:both; width:100%;} +#main-menu .menu-children li a {color: #555; background-color:#fff; font-weight:normal;} +#main-menu .menu-children li a:hover {color: #fff; background-color: #759FCF;} + #main-menu .tabs-buttons { right: 6px; background-color: transparent; diff --git a/public/themes/alternate/stylesheets/application.css b/public/themes/alternate/stylesheets/application.css index efa1129ed..4ad6b7923 100644 --- a/public/themes/alternate/stylesheets/application.css +++ b/public/themes/alternate/stylesheets/application.css @@ -13,6 +13,15 @@ h2, h3, h4, .wiki h1, .wiki h2, .wiki h3 {border-bottom: 0px;} #main-menu li a { background-color: #507AAA; font-weight: bold;} #main-menu li a:hover { background: #507AAA; text-decoration: underline; } #main-menu li a.selected, #main-menu li a.selected:hover { background-color:#EEEEEE; } +#main-menu li a.new-object { background-color:#507AAA; text-decoration: none; } + +#main-menu .menu-children { + border-right: 1px solid #507AAA; + border-bottom: 1px solid #507AAA; + border-left: 1px solid #507AAA; +} +#main-menu .menu-children li a:hover { background-color: #507AAA;} + /* Tables */ table.list tbody td, table.list tbody tr:hover td { border: solid 1px #d7d7d7; } diff --git a/public/themes/classic/stylesheets/application.css b/public/themes/classic/stylesheets/application.css index 3f855fe96..523104dcb 100644 --- a/public/themes/classic/stylesheets/application.css +++ b/public/themes/classic/stylesheets/application.css @@ -12,6 +12,15 @@ body{ color:#303030; background:#e8eaec; } #main-menu li a { background-color: #578bb8; border-right: 1px solid #fff; font-size: 90%; padding: 4px 8px 4px 8px; font-weight: bold; } #main-menu li a:hover { background-color: #80b0da; color: #ffffff; } #main-menu li a.selected, #main-menu li a.selected:hover { background-color: #80b0da; color: #ffffff; } +#main-menu li a.new-object { background-color:#80b0da; } + +#main-menu .menu-children { + border-right: 1px solid #80b0da; + border-bottom: 1px solid #80b0da; + border-left: 1px solid #80b0da; +} +#main-menu .menu-children li a { border-right: none; } +#main-menu .menu-children li a:hover { background-color: #80b0da } #footer { background-color: #578bb8; border: 0; color: #fff;} #footer a { color: #fff; font-weight: bold; } From 5adc6a5c9f59946d6ac0588cc9052012784d7b0a Mon Sep 17 00:00:00 2001 From: Jean-Philippe Lang Date: Sat, 11 Jun 2016 06:23:33 +0000 Subject: [PATCH 0044/1117] Add virtual menu at the beginning of the project menu (#15880). It contains menu items for creating issue categories, versions, news, documents, and files. Patch by Jan Schulz-Hofen. git-svn-id: http://svn.redmine.org/redmine/trunk@15503 e93f8b46-1217-0410-a6f0-8f06a7374b81 --- lib/redmine.rb | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/lib/redmine.rb b/lib/redmine.rb index 6dfc880ff..bed89ef68 100644 --- a/lib/redmine.rb +++ b/lib/redmine.rb @@ -226,6 +226,17 @@ Redmine::MenuManager.map :admin_menu do |menu| end Redmine::MenuManager.map :project_menu do |menu| + menu.push :new_object, nil, :caption => ' + ' + menu.push :new_issue_category, {:controller => 'issue_categories', :action => 'new'}, :param => :project_id, :caption => :label_issue_category_new, + :parent => :new_object + menu.push :new_version, {:controller => 'versions', :action => 'new'}, :param => :project_id, :caption => :label_version_new, + :parent => :new_object + menu.push :new_news, {:controller => 'news', :action => 'new'}, :param => :project_id, :caption => :label_news_new, + :parent => :new_object + menu.push :new_document, {:controller => 'documents', :action => 'new'}, :param => :project_id, :caption => :label_document_new, + :parent => :new_object + menu.push :new_file, {:controller => 'files', :action => 'new'}, :param => :project_id, :caption => :label_attachment_new, + :parent => :new_object menu.push :overview, { :controller => 'projects', :action => 'show' } menu.push :activity, { :controller => 'activities', :action => 'index' } menu.push :roadmap, { :controller => 'versions', :action => 'index' }, :param => :project_id, From 3da6062d7eb55f98c61e42216915e0e0f1d85af1 Mon Sep 17 00:00:00 2001 From: Jean-Philippe Lang Date: Sat, 11 Jun 2016 06:26:03 +0000 Subject: [PATCH 0045/1117] Keep the "new object" drop down open when the + sign was clicked (#15880). For touch displays where :hover does not exist. Patch by Jan Schulz-Hofen. git-svn-id: http://svn.redmine.org/redmine/trunk@15504 e93f8b46-1217-0410-a6f0-8f06a7374b81 --- lib/redmine.rb | 3 ++- public/javascripts/application.js | 9 +++++++++ public/stylesheets/application.css | 2 +- 3 files changed, 12 insertions(+), 2 deletions(-) diff --git a/lib/redmine.rb b/lib/redmine.rb index bed89ef68..d75cfd336 100644 --- a/lib/redmine.rb +++ b/lib/redmine.rb @@ -226,7 +226,8 @@ Redmine::MenuManager.map :admin_menu do |menu| end Redmine::MenuManager.map :project_menu do |menu| - menu.push :new_object, nil, :caption => ' + ' + menu.push :new_object, nil, :caption => ' + ', + :html => { :id => 'new-object', :onclick => 'toggleNewObjectDropdown(); return false;' } menu.push :new_issue_category, {:controller => 'issue_categories', :action => 'new'}, :param => :project_id, :caption => :label_issue_category_new, :parent => :new_object menu.push :new_version, {:controller => 'versions', :action => 'new'}, :param => :project_id, :caption => :label_version_new, diff --git a/public/javascripts/application.js b/public/javascripts/application.js index 347611bb2..eedeae08b 100644 --- a/public/javascripts/application.js +++ b/public/javascripts/application.js @@ -725,6 +725,15 @@ function toggleDisabledInit() { $('input[data-disables], input[data-enables], input[data-shows]').each(toggleDisabledOnChange); } +function toggleNewObjectDropdown() { + var dropdown = $('#new-object + ul.menu-children'); + if(dropdown.hasClass('visible')){ + dropdown.removeClass('visible'); + }else{ + dropdown.addClass('visible'); + } +} + (function ( $ ) { // detect if native date input is supported diff --git a/public/stylesheets/application.css b/public/stylesheets/application.css index c6d6e4c05..3ab2eccf2 100644 --- a/public/stylesheets/application.css +++ b/public/stylesheets/application.css @@ -51,7 +51,7 @@ pre, code {font-family: Consolas, Menlo, "Liberation Mono", Courier, monospace;} padding: 4px 10px 4px 10px; } #main-menu li a:hover {background:#759FCF; color:#fff;} -#main-menu li:hover ul.menu-children {display: block;} +#main-menu li:hover ul.menu-children, #main-menu li ul.menu-children.visible {display: block;} #main-menu li a.selected, #main-menu li a.selected:hover {background:#fff; color:#555;} #main-menu li a.new-object { background-color:#759FCF; } From a25a2e91124325d814b2aac4207bc90cc001a5f9 Mon Sep 17 00:00:00 2001 From: Jean-Philippe Lang Date: Sat, 11 Jun 2016 06:28:01 +0000 Subject: [PATCH 0046/1117] Move "New issue" menu item to the new object menu (#15880). Patch by Jan Schulz-Hofen. git-svn-id: http://svn.redmine.org/redmine/trunk@15505 e93f8b46-1217-0410-a6f0-8f06a7374b81 --- lib/redmine.rb | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/lib/redmine.rb b/lib/redmine.rb index d75cfd336..56b578a97 100644 --- a/lib/redmine.rb +++ b/lib/redmine.rb @@ -228,6 +228,11 @@ end Redmine::MenuManager.map :project_menu do |menu| menu.push :new_object, nil, :caption => ' + ', :html => { :id => 'new-object', :onclick => 'toggleNewObjectDropdown(); return false;' } + menu.push :new_issue_sub, { :controller => 'issues', :action => 'new', :copy_from => nil }, :param => :project_id, :caption => :label_issue_new, + :html => { :accesskey => Redmine::AccessKeys.key_for(:new_issue) }, + :if => Proc.new { |p| Issue.allowed_target_trackers(p).any? }, + :permission => :add_issues, + :parent => :new_object menu.push :new_issue_category, {:controller => 'issue_categories', :action => 'new'}, :param => :project_id, :caption => :label_issue_category_new, :parent => :new_object menu.push :new_version, {:controller => 'versions', :action => 'new'}, :param => :project_id, :caption => :label_version_new, @@ -244,7 +249,6 @@ Redmine::MenuManager.map :project_menu do |menu| :if => Proc.new { |p| p.shared_versions.any? } menu.push :issues, { :controller => 'issues', :action => 'index' }, :param => :project_id, :caption => :label_issue_plural menu.push :new_issue, { :controller => 'issues', :action => 'new', :copy_from => nil }, :param => :project_id, :caption => :label_issue_new, - :html => { :accesskey => Redmine::AccessKeys.key_for(:new_issue) }, :if => Proc.new { |p| Setting.new_project_issue_tab_enabled? && Issue.allowed_target_trackers(p).any? }, :permission => :add_issues menu.push :gantt, { :controller => 'gantts', :action => 'show' }, :param => :project_id, :caption => :label_gantt From cec8fe4cfad241276304db40a5e592db6b08edda Mon Sep 17 00:00:00 2001 From: Jean-Philippe Lang Date: Sat, 11 Jun 2016 06:29:34 +0000 Subject: [PATCH 0047/1117] Add link to add a new wiki page to "new object" menu (#15880). Patch by Jan Schulz-Hofen. git-svn-id: http://svn.redmine.org/redmine/trunk@15506 e93f8b46-1217-0410-a6f0-8f06a7374b81 --- lib/redmine.rb | 2 ++ 1 file changed, 2 insertions(+) diff --git a/lib/redmine.rb b/lib/redmine.rb index 56b578a97..fc166b650 100644 --- a/lib/redmine.rb +++ b/lib/redmine.rb @@ -241,6 +241,8 @@ Redmine::MenuManager.map :project_menu do |menu| :parent => :new_object menu.push :new_document, {:controller => 'documents', :action => 'new'}, :param => :project_id, :caption => :label_document_new, :parent => :new_object + menu.push :new_wiki_page, {:controller => 'wiki', :action => 'new'}, :param => :project_id, :caption => :label_wiki_page_new, + :parent => :new_object menu.push :new_file, {:controller => 'files', :action => 'new'}, :param => :project_id, :caption => :label_attachment_new, :parent => :new_object menu.push :overview, { :controller => 'projects', :action => 'show' } From 893c96a9909d0365a28c8cf4ac5fa7d4a3ec75e3 Mon Sep 17 00:00:00 2001 From: Jean-Philippe Lang Date: Sat, 11 Jun 2016 07:06:10 +0000 Subject: [PATCH 0048/1117] Don't skip condition if defined (#15880). git-svn-id: http://svn.redmine.org/redmine/trunk@15507 e93f8b46-1217-0410-a6f0-8f06a7374b81 --- lib/redmine/menu_manager.rb | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/lib/redmine/menu_manager.rb b/lib/redmine/menu_manager.rb index 0d2d19a43..3d19edce7 100644 --- a/lib/redmine/menu_manager.rb +++ b/lib/redmine/menu_manager.rb @@ -446,8 +446,7 @@ module Redmine # it is considered an allowed node if at least one of the children is allowed all_children = children all_children += child_menus.call(project) if child_menus - return true if all_children.detect{|child| child.allowed?(user, project) } - return false + return false unless all_children.detect{|child| child.allowed?(user, project) } elsif user && project if permission unless user.allowed_to?(permission, project) From 79fcbc82dc9c8d9d7023823e6e44e56e4970ff9d Mon Sep 17 00:00:00 2001 From: Jean-Philippe Lang Date: Sat, 11 Jun 2016 07:26:23 +0000 Subject: [PATCH 0049/1117] Adds a setting for choosing the new object menu item style (#15880). Set to use the new "+" drop-down by default, but let users revert to the "New issue" tab, or no menu item at all. git-svn-id: http://svn.redmine.org/redmine/trunk@15508 e93f8b46-1217-0410-a6f0-8f06a7374b81 --- app/controllers/issues_controller.rb | 2 +- app/views/settings/_display.html.erb | 2 +- config/locales/ar.yml | 2 +- config/locales/az.yml | 2 +- config/locales/bg.yml | 2 +- config/locales/bs.yml | 2 +- config/locales/ca.yml | 2 +- config/locales/cs.yml | 2 +- config/locales/da.yml | 2 +- config/locales/de.yml | 2 +- config/locales/el.yml | 2 +- config/locales/en-GB.yml | 2 +- config/locales/en.yml | 4 +++- config/locales/es-PA.yml | 2 +- config/locales/es.yml | 2 +- config/locales/et.yml | 2 +- config/locales/eu.yml | 2 +- config/locales/fa.yml | 2 +- config/locales/fi.yml | 2 +- config/locales/fr.yml | 4 +++- config/locales/gl.yml | 2 +- config/locales/he.yml | 2 +- config/locales/hr.yml | 2 +- config/locales/hu.yml | 2 +- config/locales/id.yml | 2 +- config/locales/it.yml | 2 +- config/locales/ja.yml | 2 +- config/locales/ko.yml | 2 +- config/locales/lt.yml | 2 +- config/locales/lv.yml | 2 +- config/locales/mk.yml | 2 +- config/locales/mn.yml | 2 +- config/locales/nl.yml | 2 +- config/locales/no.yml | 2 +- config/locales/pl.yml | 2 +- config/locales/pt-BR.yml | 2 +- config/locales/pt.yml | 2 +- config/locales/ro.yml | 2 +- config/locales/ru.yml | 2 +- config/locales/sk.yml | 2 +- config/locales/sl.yml | 2 +- config/locales/sq.yml | 2 +- config/locales/sr-YU.yml | 2 +- config/locales/sr.yml | 2 +- config/locales/sv.yml | 2 +- config/locales/th.yml | 2 +- config/locales/tr.yml | 2 +- config/locales/uk.yml | 2 +- config/locales/vi.yml | 2 +- config/locales/zh-TW.yml | 2 +- config/locales/zh.yml | 2 +- config/settings.yml | 4 ++-- lib/redmine.rb | 4 +++- test/functional/issues_controller_test.rb | 10 +++++----- 54 files changed, 65 insertions(+), 59 deletions(-) diff --git a/app/controllers/issues_controller.rb b/app/controllers/issues_controller.rb index 67956667a..95c58674c 100644 --- a/app/controllers/issues_controller.rb +++ b/app/controllers/issues_controller.rb @@ -362,7 +362,7 @@ class IssuesController < ApplicationController # Overrides Redmine::MenuManager::MenuController::ClassMethods for # when the "New issue" tab is enabled def current_menu_item - if Setting.new_project_issue_tab_enabled? && [:new, :create].include?(action_name.to_sym) + if Setting.new_item_menu_tab == '1' && [:new, :create].include?(action_name.to_sym) :new_issue else super diff --git a/app/views/settings/_display.html.erb b/app/views/settings/_display.html.erb index 1185a7cae..be3e70e34 100644 --- a/app/views/settings/_display.html.erb +++ b/app/views/settings/_display.html.erb @@ -25,7 +25,7 @@

<%= setting_text_field :thumbnails_size, :size => 6 %>

-

<%= setting_check_box :new_project_issue_tab_enabled %>

+

<%= setting_select :new_item_menu_tab, [[l(:label_none), '0'], [l(:label_new_project_issue_tab_enabled), '1'], [l(:label_new_object_tab_enabled), '2']] %>

<%= submit_tag l(:button_save) %> diff --git a/config/locales/ar.yml b/config/locales/ar.yml index e13172192..a6b841ff3 100644 --- a/config/locales/ar.yml +++ b/config/locales/ar.yml @@ -1201,7 +1201,7 @@ ar: button_filter: Filter mail_body_password_updated: Your password has been changed. label_no_preview: No preview available - setting_new_project_issue_tab_enabled: Display the "New issue" tab error_no_tracker_allowed_for_new_issue_in_project: The project doesn't have any trackers for which you can create an issue label_tracker_all: All trackers + label_new_project_issue_tab_enabled: Display the "New issue" tab diff --git a/config/locales/az.yml b/config/locales/az.yml index 7a5cdb924..fa7a30b0e 100644 --- a/config/locales/az.yml +++ b/config/locales/az.yml @@ -1296,7 +1296,7 @@ az: button_filter: Filter mail_body_password_updated: Your password has been changed. label_no_preview: No preview available - setting_new_project_issue_tab_enabled: Display the "New issue" tab error_no_tracker_allowed_for_new_issue_in_project: The project doesn't have any trackers for which you can create an issue label_tracker_all: All trackers + label_new_project_issue_tab_enabled: Display the "New issue" tab diff --git a/config/locales/bg.yml b/config/locales/bg.yml index b6412c92b..672881f3a 100644 --- a/config/locales/bg.yml +++ b/config/locales/bg.yml @@ -447,7 +447,6 @@ bg: setting_search_results_per_page: Резултати от търсене на страница setting_attachment_extensions_allowed: Позволени типове на файлове setting_attachment_extensions_denied: Разрешени типове на файлове - setting_new_project_issue_tab_enabled: Показване на меню-елемент "Нова задача" permission_add_project: Създаване на проект permission_add_subprojects: Създаване на подпроекти @@ -1193,3 +1192,4 @@ bg: description_date_from: Въведете начална дата description_date_to: Въведете крайна дата text_repository_identifier_info: 'Позволени са малки букви (a-z), цифри, тирета и _.
Промяна след създаването му не е възможна.' + label_new_project_issue_tab_enabled: Показване на меню-елемент "Нова задача" diff --git a/config/locales/bs.yml b/config/locales/bs.yml index aa47a22e9..38995599d 100644 --- a/config/locales/bs.yml +++ b/config/locales/bs.yml @@ -1214,7 +1214,7 @@ bs: button_filter: Filter mail_body_password_updated: Your password has been changed. label_no_preview: No preview available - setting_new_project_issue_tab_enabled: Display the "New issue" tab error_no_tracker_allowed_for_new_issue_in_project: The project doesn't have any trackers for which you can create an issue label_tracker_all: All trackers + label_new_project_issue_tab_enabled: Display the "New issue" tab diff --git a/config/locales/ca.yml b/config/locales/ca.yml index ec0b3ca5a..f165aed6e 100644 --- a/config/locales/ca.yml +++ b/config/locales/ca.yml @@ -1194,7 +1194,7 @@ ca: button_filter: Filter mail_body_password_updated: Your password has been changed. label_no_preview: No preview available - setting_new_project_issue_tab_enabled: Display the "New issue" tab error_no_tracker_allowed_for_new_issue_in_project: The project doesn't have any trackers for which you can create an issue label_tracker_all: All trackers + label_new_project_issue_tab_enabled: Display the "New issue" tab diff --git a/config/locales/cs.yml b/config/locales/cs.yml index f0ef5a476..610033882 100644 --- a/config/locales/cs.yml +++ b/config/locales/cs.yml @@ -1202,7 +1202,7 @@ cs: button_filter: Filtr mail_body_password_updated: Vaše heslo bylo změněno. label_no_preview: Náhled není k dispozici - setting_new_project_issue_tab_enabled: Zobraz záložku "Nový úkol" error_no_tracker_allowed_for_new_issue_in_project: The project doesn't have any trackers for which you can create an issue label_tracker_all: All trackers + label_new_project_issue_tab_enabled: Zobraz záložku "Nový úkol" diff --git a/config/locales/da.yml b/config/locales/da.yml index 9b2020b33..188731a02 100644 --- a/config/locales/da.yml +++ b/config/locales/da.yml @@ -1218,7 +1218,7 @@ da: button_filter: Filter mail_body_password_updated: Your password has been changed. label_no_preview: No preview available - setting_new_project_issue_tab_enabled: Display the "New issue" tab error_no_tracker_allowed_for_new_issue_in_project: The project doesn't have any trackers for which you can create an issue label_tracker_all: All trackers + label_new_project_issue_tab_enabled: Display the "New issue" tab diff --git a/config/locales/de.yml b/config/locales/de.yml index bf6a11c48..3aa5271a3 100644 --- a/config/locales/de.yml +++ b/config/locales/de.yml @@ -1204,7 +1204,7 @@ de: label_relations: Beziehungen button_filter: Filter mail_body_password_updated: Ihr Passwort wurde geändert. - setting_new_project_issue_tab_enabled: Tab "Neues Ticket" anzeigen error_no_tracker_allowed_for_new_issue_in_project: The project doesn't have any trackers for which you can create an issue label_tracker_all: All trackers + label_new_project_issue_tab_enabled: Tab "Neues Ticket" anzeigen diff --git a/config/locales/el.yml b/config/locales/el.yml index 66f96bfdc..03563effb 100644 --- a/config/locales/el.yml +++ b/config/locales/el.yml @@ -1201,7 +1201,7 @@ el: button_filter: Filter mail_body_password_updated: Your password has been changed. label_no_preview: No preview available - setting_new_project_issue_tab_enabled: Display the "New issue" tab error_no_tracker_allowed_for_new_issue_in_project: The project doesn't have any trackers for which you can create an issue label_tracker_all: All trackers + label_new_project_issue_tab_enabled: Display the "New issue" tab diff --git a/config/locales/en-GB.yml b/config/locales/en-GB.yml index cf6f9770a..e738493bb 100644 --- a/config/locales/en-GB.yml +++ b/config/locales/en-GB.yml @@ -1203,7 +1203,7 @@ en-GB: label_relations: Relations button_filter: Filter mail_body_password_updated: Your password has been changed. - setting_new_project_issue_tab_enabled: Display the "New issue" tab error_no_tracker_allowed_for_new_issue_in_project: The project doesn't have any trackers for which you can create an issue label_tracker_all: All trackers + label_new_project_issue_tab_enabled: Display the "New issue" tab diff --git a/config/locales/en.yml b/config/locales/en.yml index 522cb5227..908aa119a 100644 --- a/config/locales/en.yml +++ b/config/locales/en.yml @@ -444,7 +444,7 @@ en: setting_search_results_per_page: Search results per page setting_attachment_extensions_allowed: Allowed extensions setting_attachment_extensions_denied: Disallowed extensions - setting_new_project_issue_tab_enabled: Display the "New issue" tab + setting_new_item_menu_tab: Project menu tab for creating new objects permission_add_project: Create project permission_add_subprojects: Create subprojects @@ -995,6 +995,8 @@ en: label_field_format_enumeration: Key/value list label_default_values_for_new_users: Default values for new users label_relations: Relations + label_new_project_issue_tab_enabled: Display the "New issue" tab + label_new_object_tab_enabled: Display the "+" drop-down button_login: Login button_submit: Submit diff --git a/config/locales/es-PA.yml b/config/locales/es-PA.yml index 0b76bdada..54bde6b13 100644 --- a/config/locales/es-PA.yml +++ b/config/locales/es-PA.yml @@ -1235,7 +1235,7 @@ es-PA: button_filter: Filter mail_body_password_updated: Your password has been changed. label_no_preview: No preview available - setting_new_project_issue_tab_enabled: Display the "New issue" tab error_no_tracker_allowed_for_new_issue_in_project: The project doesn't have any trackers for which you can create an issue label_tracker_all: All trackers + label_new_project_issue_tab_enabled: Display the "New issue" tab diff --git a/config/locales/es.yml b/config/locales/es.yml index d9e781495..345ac90a3 100644 --- a/config/locales/es.yml +++ b/config/locales/es.yml @@ -1233,7 +1233,7 @@ es: button_filter: Filter mail_body_password_updated: Your password has been changed. label_no_preview: No preview available - setting_new_project_issue_tab_enabled: Display the "New issue" tab error_no_tracker_allowed_for_new_issue_in_project: The project doesn't have any trackers for which you can create an issue label_tracker_all: All trackers + label_new_project_issue_tab_enabled: Display the "New issue" tab diff --git a/config/locales/et.yml b/config/locales/et.yml index f8ae0fbd9..fa3be6329 100644 --- a/config/locales/et.yml +++ b/config/locales/et.yml @@ -1205,7 +1205,7 @@ et: button_filter: Filter mail_body_password_updated: Your password has been changed. label_no_preview: No preview available - setting_new_project_issue_tab_enabled: Display the "New issue" tab error_no_tracker_allowed_for_new_issue_in_project: The project doesn't have any trackers for which you can create an issue label_tracker_all: All trackers + label_new_project_issue_tab_enabled: Display the "New issue" tab diff --git a/config/locales/eu.yml b/config/locales/eu.yml index 1dbfed25c..dc21ead28 100644 --- a/config/locales/eu.yml +++ b/config/locales/eu.yml @@ -1202,7 +1202,7 @@ eu: button_filter: Filter mail_body_password_updated: Your password has been changed. label_no_preview: No preview available - setting_new_project_issue_tab_enabled: Display the "New issue" tab error_no_tracker_allowed_for_new_issue_in_project: The project doesn't have any trackers for which you can create an issue label_tracker_all: All trackers + label_new_project_issue_tab_enabled: Display the "New issue" tab diff --git a/config/locales/fa.yml b/config/locales/fa.yml index b9e7377e6..6c7eb49a5 100644 --- a/config/locales/fa.yml +++ b/config/locales/fa.yml @@ -1202,7 +1202,7 @@ fa: button_filter: Filter mail_body_password_updated: Your password has been changed. label_no_preview: No preview available - setting_new_project_issue_tab_enabled: Display the "New issue" tab error_no_tracker_allowed_for_new_issue_in_project: The project doesn't have any trackers for which you can create an issue label_tracker_all: All trackers + label_new_project_issue_tab_enabled: Display the "New issue" tab diff --git a/config/locales/fi.yml b/config/locales/fi.yml index 14aa38cc8..49e510707 100644 --- a/config/locales/fi.yml +++ b/config/locales/fi.yml @@ -1222,7 +1222,7 @@ fi: button_filter: Filter mail_body_password_updated: Your password has been changed. label_no_preview: No preview available - setting_new_project_issue_tab_enabled: Display the "New issue" tab error_no_tracker_allowed_for_new_issue_in_project: The project doesn't have any trackers for which you can create an issue label_tracker_all: All trackers + label_new_project_issue_tab_enabled: Display the "New issue" tab diff --git a/config/locales/fr.yml b/config/locales/fr.yml index 760c84c95..49803506b 100644 --- a/config/locales/fr.yml +++ b/config/locales/fr.yml @@ -456,7 +456,7 @@ fr: setting_attachment_extensions_denied: Extensions non autorisées setting_sys_api_key: Clé de protection de l'API setting_lost_password: Autoriser la réinitialisation par email de mot de passe perdu - setting_new_project_issue_tab_enabled: Afficher l'onglet "Nouvelle demande" + setting_new_item_menu_tab: Onglet de création d'objets dans le menu du project permission_add_project: Créer un projet permission_add_subprojects: Créer des sous-projets @@ -1004,6 +1004,8 @@ fr: label_field_format_enumeration: Liste clé/valeur label_default_values_for_new_users: Valeurs par défaut pour les nouveaux utilisateurs label_relations: Relations + label_new_project_issue_tab_enabled: Afficher l'onglet "Nouvelle demande" + label_new_object_tab_enabled: Afficher le menu déroulant "+" button_login: Connexion button_submit: Soumettre diff --git a/config/locales/gl.yml b/config/locales/gl.yml index 437bf4b3f..70afa9072 100644 --- a/config/locales/gl.yml +++ b/config/locales/gl.yml @@ -1209,7 +1209,7 @@ gl: button_filter: Filter mail_body_password_updated: Your password has been changed. label_no_preview: No preview available - setting_new_project_issue_tab_enabled: Display the "New issue" tab error_no_tracker_allowed_for_new_issue_in_project: The project doesn't have any trackers for which you can create an issue label_tracker_all: All trackers + label_new_project_issue_tab_enabled: Display the "New issue" tab diff --git a/config/locales/he.yml b/config/locales/he.yml index aad81c4a0..a5b1b7d0b 100644 --- a/config/locales/he.yml +++ b/config/locales/he.yml @@ -1206,7 +1206,7 @@ he: button_filter: Filter mail_body_password_updated: Your password has been changed. label_no_preview: No preview available - setting_new_project_issue_tab_enabled: Display the "New issue" tab error_no_tracker_allowed_for_new_issue_in_project: The project doesn't have any trackers for which you can create an issue label_tracker_all: All trackers + label_new_project_issue_tab_enabled: Display the "New issue" tab diff --git a/config/locales/hr.yml b/config/locales/hr.yml index a09064a5f..0a603db95 100644 --- a/config/locales/hr.yml +++ b/config/locales/hr.yml @@ -1200,7 +1200,7 @@ hr: button_filter: Filter mail_body_password_updated: Your password has been changed. label_no_preview: No preview available - setting_new_project_issue_tab_enabled: Display the "New issue" tab error_no_tracker_allowed_for_new_issue_in_project: The project doesn't have any trackers for which you can create an issue label_tracker_all: All trackers + label_new_project_issue_tab_enabled: Display the "New issue" tab diff --git a/config/locales/hu.yml b/config/locales/hu.yml index 6f7f075a8..e6b1f8595 100644 --- a/config/locales/hu.yml +++ b/config/locales/hu.yml @@ -1220,7 +1220,7 @@ button_filter: Filter mail_body_password_updated: Your password has been changed. label_no_preview: No preview available - setting_new_project_issue_tab_enabled: Display the "New issue" tab error_no_tracker_allowed_for_new_issue_in_project: The project doesn't have any trackers for which you can create an issue label_tracker_all: All trackers + label_new_project_issue_tab_enabled: Display the "New issue" tab diff --git a/config/locales/id.yml b/config/locales/id.yml index dfa63dc8e..3e1aedcad 100644 --- a/config/locales/id.yml +++ b/config/locales/id.yml @@ -1205,7 +1205,7 @@ id: button_filter: Filter mail_body_password_updated: Your password has been changed. label_no_preview: No preview available - setting_new_project_issue_tab_enabled: Display the "New issue" tab error_no_tracker_allowed_for_new_issue_in_project: The project doesn't have any trackers for which you can create an issue label_tracker_all: All trackers + label_new_project_issue_tab_enabled: Display the "New issue" tab diff --git a/config/locales/it.yml b/config/locales/it.yml index b5310caad..08e5f1467 100644 --- a/config/locales/it.yml +++ b/config/locales/it.yml @@ -1196,7 +1196,7 @@ it: button_filter: Filter mail_body_password_updated: Your password has been changed. label_no_preview: No preview available - setting_new_project_issue_tab_enabled: Display the "New issue" tab error_no_tracker_allowed_for_new_issue_in_project: The project doesn't have any trackers for which you can create an issue label_tracker_all: All trackers + label_new_project_issue_tab_enabled: Display the "New issue" tab diff --git a/config/locales/ja.yml b/config/locales/ja.yml index 2c5a63514..f7661003b 100644 --- a/config/locales/ja.yml +++ b/config/locales/ja.yml @@ -1212,6 +1212,6 @@ ja: button_filter: フィルタ mail_body_password_updated: パスワードが変更されました。 label_no_preview: このファイルはプレビューできません - setting_new_project_issue_tab_enabled: '"新しいチケット" タブを表示' error_no_tracker_allowed_for_new_issue_in_project: このプロジェクトにはチケットの追加が許可されているトラッカーがありません label_tracker_all: すべてのトラッカー + label_new_project_issue_tab_enabled: '"新しいチケット" タブを表示' diff --git a/config/locales/ko.yml b/config/locales/ko.yml index 5f9fd63da..4f7a6f220 100644 --- a/config/locales/ko.yml +++ b/config/locales/ko.yml @@ -1240,7 +1240,7 @@ ko: button_filter: 필터 mail_body_password_updated: 암호가 변경되었습니다. label_no_preview: 미리보기 없음 - setting_new_project_issue_tab_enabled: '"새 일감" 탭 표시' error_no_tracker_allowed_for_new_issue_in_project: The project doesn't have any trackers for which you can create an issue label_tracker_all: All trackers + label_new_project_issue_tab_enabled: '"새 일감" 탭 표시' diff --git a/config/locales/lt.yml b/config/locales/lt.yml index 6aa63dcac..e1dbd6b83 100644 --- a/config/locales/lt.yml +++ b/config/locales/lt.yml @@ -1190,7 +1190,7 @@ lt: button_filter: Filter mail_body_password_updated: Your password has been changed. label_no_preview: No preview available - setting_new_project_issue_tab_enabled: Display the "New issue" tab error_no_tracker_allowed_for_new_issue_in_project: The project doesn't have any trackers for which you can create an issue label_tracker_all: All trackers + label_new_project_issue_tab_enabled: Display the "New issue" tab diff --git a/config/locales/lv.yml b/config/locales/lv.yml index 2a7dc3c1d..39dbaac17 100644 --- a/config/locales/lv.yml +++ b/config/locales/lv.yml @@ -1195,7 +1195,7 @@ lv: button_filter: Filter mail_body_password_updated: Your password has been changed. label_no_preview: No preview available - setting_new_project_issue_tab_enabled: Display the "New issue" tab error_no_tracker_allowed_for_new_issue_in_project: The project doesn't have any trackers for which you can create an issue label_tracker_all: All trackers + label_new_project_issue_tab_enabled: Display the "New issue" tab diff --git a/config/locales/mk.yml b/config/locales/mk.yml index 02757abe0..ef587684f 100644 --- a/config/locales/mk.yml +++ b/config/locales/mk.yml @@ -1201,7 +1201,7 @@ mk: button_filter: Filter mail_body_password_updated: Your password has been changed. label_no_preview: No preview available - setting_new_project_issue_tab_enabled: Display the "New issue" tab error_no_tracker_allowed_for_new_issue_in_project: The project doesn't have any trackers for which you can create an issue label_tracker_all: All trackers + label_new_project_issue_tab_enabled: Display the "New issue" tab diff --git a/config/locales/mn.yml b/config/locales/mn.yml index 6176c97e5..0f2cec180 100644 --- a/config/locales/mn.yml +++ b/config/locales/mn.yml @@ -1202,7 +1202,7 @@ mn: button_filter: Filter mail_body_password_updated: Your password has been changed. label_no_preview: No preview available - setting_new_project_issue_tab_enabled: Display the "New issue" tab error_no_tracker_allowed_for_new_issue_in_project: The project doesn't have any trackers for which you can create an issue label_tracker_all: All trackers + label_new_project_issue_tab_enabled: Display the "New issue" tab diff --git a/config/locales/nl.yml b/config/locales/nl.yml index e356bab91..421cf6872 100644 --- a/config/locales/nl.yml +++ b/config/locales/nl.yml @@ -1180,7 +1180,7 @@ nl: button_filter: Filter mail_body_password_updated: Your password has been changed. label_no_preview: No preview available - setting_new_project_issue_tab_enabled: Display the "New issue" tab error_no_tracker_allowed_for_new_issue_in_project: The project doesn't have any trackers for which you can create an issue label_tracker_all: All trackers + label_new_project_issue_tab_enabled: Display the "New issue" tab diff --git a/config/locales/no.yml b/config/locales/no.yml index 083a956ac..07657a820 100644 --- a/config/locales/no.yml +++ b/config/locales/no.yml @@ -1191,7 +1191,7 @@ button_filter: Filter mail_body_password_updated: Your password has been changed. label_no_preview: No preview available - setting_new_project_issue_tab_enabled: Display the "New issue" tab error_no_tracker_allowed_for_new_issue_in_project: The project doesn't have any trackers for which you can create an issue label_tracker_all: All trackers + label_new_project_issue_tab_enabled: Display the "New issue" tab diff --git a/config/locales/pl.yml b/config/locales/pl.yml index a183a2130..06691733f 100644 --- a/config/locales/pl.yml +++ b/config/locales/pl.yml @@ -1216,7 +1216,7 @@ pl: button_filter: Filter mail_body_password_updated: Your password has been changed. label_no_preview: No preview available - setting_new_project_issue_tab_enabled: Display the "New issue" tab error_no_tracker_allowed_for_new_issue_in_project: The project doesn't have any trackers for which you can create an issue label_tracker_all: All trackers + label_new_project_issue_tab_enabled: Display the "New issue" tab diff --git a/config/locales/pt-BR.yml b/config/locales/pt-BR.yml index b8c360141..bdd3f5a77 100644 --- a/config/locales/pt-BR.yml +++ b/config/locales/pt-BR.yml @@ -1219,7 +1219,7 @@ pt-BR: button_filter: Filter mail_body_password_updated: Your password has been changed. label_no_preview: No preview available - setting_new_project_issue_tab_enabled: Display the "New issue" tab error_no_tracker_allowed_for_new_issue_in_project: The project doesn't have any trackers for which you can create an issue label_tracker_all: All trackers + label_new_project_issue_tab_enabled: Display the "New issue" tab diff --git a/config/locales/pt.yml b/config/locales/pt.yml index 38b4b882d..1d6f7323d 100644 --- a/config/locales/pt.yml +++ b/config/locales/pt.yml @@ -1203,7 +1203,7 @@ pt: button_filter: Filter mail_body_password_updated: Your password has been changed. label_no_preview: No preview available - setting_new_project_issue_tab_enabled: Display the "New issue" tab error_no_tracker_allowed_for_new_issue_in_project: The project doesn't have any trackers for which you can create an issue label_tracker_all: All trackers + label_new_project_issue_tab_enabled: Display the "New issue" tab diff --git a/config/locales/ro.yml b/config/locales/ro.yml index 34e5405e3..3e2f20b0c 100644 --- a/config/locales/ro.yml +++ b/config/locales/ro.yml @@ -1196,7 +1196,7 @@ ro: button_filter: Filter mail_body_password_updated: Your password has been changed. label_no_preview: No preview available - setting_new_project_issue_tab_enabled: Display the "New issue" tab error_no_tracker_allowed_for_new_issue_in_project: The project doesn't have any trackers for which you can create an issue label_tracker_all: All trackers + label_new_project_issue_tab_enabled: Display the "New issue" tab diff --git a/config/locales/ru.yml b/config/locales/ru.yml index fdce0f253..5261356e6 100644 --- a/config/locales/ru.yml +++ b/config/locales/ru.yml @@ -1302,7 +1302,7 @@ ru: button_filter: Filter mail_body_password_updated: Your password has been changed. label_no_preview: No preview available - setting_new_project_issue_tab_enabled: Display the "New issue" tab error_no_tracker_allowed_for_new_issue_in_project: The project doesn't have any trackers for which you can create an issue label_tracker_all: All trackers + label_new_project_issue_tab_enabled: Display the "New issue" tab diff --git a/config/locales/sk.yml b/config/locales/sk.yml index b6c843947..9b3a4534b 100644 --- a/config/locales/sk.yml +++ b/config/locales/sk.yml @@ -1191,7 +1191,7 @@ sk: button_filter: Filter mail_body_password_updated: Your password has been changed. label_no_preview: No preview available - setting_new_project_issue_tab_enabled: Display the "New issue" tab error_no_tracker_allowed_for_new_issue_in_project: The project doesn't have any trackers for which you can create an issue label_tracker_all: All trackers + label_new_project_issue_tab_enabled: Display the "New issue" tab diff --git a/config/locales/sl.yml b/config/locales/sl.yml index 7d2d755fe..1cb294cdf 100644 --- a/config/locales/sl.yml +++ b/config/locales/sl.yml @@ -1201,7 +1201,7 @@ sl: button_filter: Filter mail_body_password_updated: Your password has been changed. label_no_preview: No preview available - setting_new_project_issue_tab_enabled: Display the "New issue" tab error_no_tracker_allowed_for_new_issue_in_project: The project doesn't have any trackers for which you can create an issue label_tracker_all: All trackers + label_new_project_issue_tab_enabled: Display the "New issue" tab diff --git a/config/locales/sq.yml b/config/locales/sq.yml index 98d1f5e8a..cf6bda0ba 100644 --- a/config/locales/sq.yml +++ b/config/locales/sq.yml @@ -1197,7 +1197,7 @@ sq: button_filter: Filter mail_body_password_updated: Your password has been changed. label_no_preview: No preview available - setting_new_project_issue_tab_enabled: Display the "New issue" tab error_no_tracker_allowed_for_new_issue_in_project: The project doesn't have any trackers for which you can create an issue label_tracker_all: All trackers + label_new_project_issue_tab_enabled: Display the "New issue" tab diff --git a/config/locales/sr-YU.yml b/config/locales/sr-YU.yml index bf35302d2..c11de67ce 100644 --- a/config/locales/sr-YU.yml +++ b/config/locales/sr-YU.yml @@ -1203,7 +1203,7 @@ sr-YU: button_filter: Filter mail_body_password_updated: Your password has been changed. label_no_preview: No preview available - setting_new_project_issue_tab_enabled: Display the "New issue" tab error_no_tracker_allowed_for_new_issue_in_project: The project doesn't have any trackers for which you can create an issue label_tracker_all: All trackers + label_new_project_issue_tab_enabled: Display the "New issue" tab diff --git a/config/locales/sr.yml b/config/locales/sr.yml index 9d12a7d60..a68ae5d6a 100644 --- a/config/locales/sr.yml +++ b/config/locales/sr.yml @@ -1202,7 +1202,7 @@ sr: button_filter: Filter mail_body_password_updated: Your password has been changed. label_no_preview: No preview available - setting_new_project_issue_tab_enabled: Display the "New issue" tab error_no_tracker_allowed_for_new_issue_in_project: The project doesn't have any trackers for which you can create an issue label_tracker_all: All trackers + label_new_project_issue_tab_enabled: Display the "New issue" tab diff --git a/config/locales/sv.yml b/config/locales/sv.yml index 4bdf72a51..fd8c22f42 100644 --- a/config/locales/sv.yml +++ b/config/locales/sv.yml @@ -1234,7 +1234,7 @@ sv: button_filter: Filter mail_body_password_updated: Your password has been changed. label_no_preview: No preview available - setting_new_project_issue_tab_enabled: Display the "New issue" tab error_no_tracker_allowed_for_new_issue_in_project: The project doesn't have any trackers for which you can create an issue label_tracker_all: All trackers + label_new_project_issue_tab_enabled: Display the "New issue" tab diff --git a/config/locales/th.yml b/config/locales/th.yml index bfdc38490..e0fdd892b 100644 --- a/config/locales/th.yml +++ b/config/locales/th.yml @@ -1198,7 +1198,7 @@ th: button_filter: Filter mail_body_password_updated: Your password has been changed. label_no_preview: No preview available - setting_new_project_issue_tab_enabled: Display the "New issue" tab error_no_tracker_allowed_for_new_issue_in_project: The project doesn't have any trackers for which you can create an issue label_tracker_all: All trackers + label_new_project_issue_tab_enabled: Display the "New issue" tab diff --git a/config/locales/tr.yml b/config/locales/tr.yml index 8eeb40698..510c0dc78 100644 --- a/config/locales/tr.yml +++ b/config/locales/tr.yml @@ -1208,7 +1208,7 @@ tr: button_filter: Filter mail_body_password_updated: Your password has been changed. label_no_preview: No preview available - setting_new_project_issue_tab_enabled: Display the "New issue" tab error_no_tracker_allowed_for_new_issue_in_project: The project doesn't have any trackers for which you can create an issue label_tracker_all: All trackers + label_new_project_issue_tab_enabled: Display the "New issue" tab diff --git a/config/locales/uk.yml b/config/locales/uk.yml index cb2447159..fe0746c98 100644 --- a/config/locales/uk.yml +++ b/config/locales/uk.yml @@ -1196,7 +1196,7 @@ uk: button_filter: Filter mail_body_password_updated: Your password has been changed. label_no_preview: No preview available - setting_new_project_issue_tab_enabled: Display the "New issue" tab error_no_tracker_allowed_for_new_issue_in_project: The project doesn't have any trackers for which you can create an issue label_tracker_all: All trackers + label_new_project_issue_tab_enabled: Display the "New issue" tab diff --git a/config/locales/vi.yml b/config/locales/vi.yml index 04a4b45b7..a4e09b773 100644 --- a/config/locales/vi.yml +++ b/config/locales/vi.yml @@ -1254,7 +1254,7 @@ vi: button_filter: Filter mail_body_password_updated: Your password has been changed. label_no_preview: No preview available - setting_new_project_issue_tab_enabled: Display the "New issue" tab error_no_tracker_allowed_for_new_issue_in_project: The project doesn't have any trackers for which you can create an issue label_tracker_all: All trackers + label_new_project_issue_tab_enabled: Display the "New issue" tab diff --git a/config/locales/zh-TW.yml b/config/locales/zh-TW.yml index 7ce98871c..a361f1256 100644 --- a/config/locales/zh-TW.yml +++ b/config/locales/zh-TW.yml @@ -528,7 +528,6 @@ setting_search_results_per_page: 每一頁的搜尋結果數目 setting_attachment_extensions_allowed: 允許使用的附檔名 setting_attachment_extensions_denied: 禁止使用的副檔名 - setting_new_project_issue_tab_enabled: 顯示「建立新議題」標籤頁面 permission_add_project: 建立專案 permission_add_subprojects: 建立子專案 @@ -1275,3 +1274,4 @@ description_date_from: 輸入起始日期 description_date_to: 輸入結束日期 text_repository_identifier_info: '僅允許使用小寫英文字母 (a-z), 阿拉伯數字, 虛線與底線。
一旦儲存之後, 代碼便無法再次被更改。' + label_new_project_issue_tab_enabled: 顯示「建立新議題」標籤頁面 diff --git a/config/locales/zh.yml b/config/locales/zh.yml index d66b2954c..8fedfbb27 100644 --- a/config/locales/zh.yml +++ b/config/locales/zh.yml @@ -1194,7 +1194,7 @@ zh: button_filter: 设置为过滤条件 mail_body_password_updated: 您的密码已经变更。 label_no_preview: 没有可以显示的预览内容 - setting_new_project_issue_tab_enabled: 显示“新建问题”标签 error_no_tracker_allowed_for_new_issue_in_project: The project doesn't have any trackers for which you can create an issue label_tracker_all: All trackers + label_new_project_issue_tab_enabled: 显示“新建问题”标签 diff --git a/config/settings.yml b/config/settings.yml index fd807c8a1..807f9b7a7 100644 --- a/config/settings.yml +++ b/config/settings.yml @@ -275,5 +275,5 @@ non_working_week_days: default: - '6' - '7' -new_project_issue_tab_enabled: - default: 0 +new_item_menu_tab: + default: 2 diff --git a/lib/redmine.rb b/lib/redmine.rb index fc166b650..71722cc8e 100644 --- a/lib/redmine.rb +++ b/lib/redmine.rb @@ -227,6 +227,7 @@ end Redmine::MenuManager.map :project_menu do |menu| menu.push :new_object, nil, :caption => ' + ', + :if => Proc.new { |p| Setting.new_item_menu_tab == '2' }, :html => { :id => 'new-object', :onclick => 'toggleNewObjectDropdown(); return false;' } menu.push :new_issue_sub, { :controller => 'issues', :action => 'new', :copy_from => nil }, :param => :project_id, :caption => :label_issue_new, :html => { :accesskey => Redmine::AccessKeys.key_for(:new_issue) }, @@ -251,7 +252,8 @@ Redmine::MenuManager.map :project_menu do |menu| :if => Proc.new { |p| p.shared_versions.any? } menu.push :issues, { :controller => 'issues', :action => 'index' }, :param => :project_id, :caption => :label_issue_plural menu.push :new_issue, { :controller => 'issues', :action => 'new', :copy_from => nil }, :param => :project_id, :caption => :label_issue_new, - :if => Proc.new { |p| Setting.new_project_issue_tab_enabled? && Issue.allowed_target_trackers(p).any? }, + :html => { :accesskey => Redmine::AccessKeys.key_for(:new_issue) }, + :if => Proc.new { |p| Setting.new_item_menu_tab == '1' && Issue.allowed_target_trackers(p).any? }, :permission => :add_issues menu.push :gantt, { :controller => 'gantts', :action => 'show' }, :param => :project_id, :caption => :label_gantt menu.push :calendar, { :controller => 'calendars', :action => 'show' }, :param => :project_id, :caption => :label_calendar diff --git a/test/functional/issues_controller_test.rb b/test/functional/issues_controller_test.rb index dc50d1331..046efb856 100644 --- a/test/functional/issues_controller_test.rb +++ b/test/functional/issues_controller_test.rb @@ -1104,7 +1104,7 @@ class IssuesControllerTest < ActionController::TestCase end def test_index_should_not_include_new_issue_tab_when_disabled - with_settings :new_project_issue_tab_enabled => '0' do + with_settings :new_item_menu_tab => '0' do @request.session[:user_id] = 2 get :index, :project_id => 1 assert_select '#main-menu a.new-issue', 0 @@ -1112,7 +1112,7 @@ class IssuesControllerTest < ActionController::TestCase end def test_index_should_include_new_issue_tab_when_enabled - with_settings :new_project_issue_tab_enabled => '1' do + with_settings :new_item_menu_tab => '1' do @request.session[:user_id] = 2 get :index, :project_id => 1 assert_select '#main-menu a.new-issue[href="/projects/ecookbook/issues/new"]', :text => 'New issue' @@ -1120,7 +1120,7 @@ class IssuesControllerTest < ActionController::TestCase end def test_new_should_have_new_issue_tab_as_current_menu_item - with_settings :new_project_issue_tab_enabled => '1' do + with_settings :new_item_menu_tab => '1' do @request.session[:user_id] = 2 get :new, :project_id => 1 assert_select '#main-menu a.new-issue.selected' @@ -1128,7 +1128,7 @@ class IssuesControllerTest < ActionController::TestCase end def test_index_should_not_include_new_issue_tab_for_project_without_trackers - with_settings :new_project_issue_tab_enabled => '1' do + with_settings :new_item_menu_tab => '1' do Project.find(1).trackers.clear @request.session[:user_id] = 2 @@ -1138,7 +1138,7 @@ class IssuesControllerTest < ActionController::TestCase end def test_index_should_not_include_new_issue_tab_for_users_with_copy_issues_permission_only - with_settings :new_project_issue_tab_enabled => '1' do + with_settings :new_item_menu_tab => '1' do role = Role.find(1) role.remove_permission! :add_issues role.add_permission! :copy_issues From c713aba762b595863eafe14c5c382c1a5c2ecdaa Mon Sep 17 00:00:00 2001 From: Jean-Philippe Lang Date: Sat, 11 Jun 2016 07:27:14 +0000 Subject: [PATCH 0050/1117] Updates locales (#15880). git-svn-id: http://svn.redmine.org/redmine/trunk@15509 e93f8b46-1217-0410-a6f0-8f06a7374b81 --- config/locales/ar.yml | 2 ++ config/locales/az.yml | 2 ++ config/locales/bg.yml | 2 ++ config/locales/bs.yml | 2 ++ config/locales/ca.yml | 2 ++ config/locales/cs.yml | 2 ++ config/locales/da.yml | 2 ++ config/locales/de.yml | 2 ++ config/locales/el.yml | 2 ++ config/locales/en-GB.yml | 2 ++ config/locales/es-PA.yml | 2 ++ config/locales/es.yml | 2 ++ config/locales/et.yml | 2 ++ config/locales/eu.yml | 2 ++ config/locales/fa.yml | 2 ++ config/locales/fi.yml | 2 ++ config/locales/gl.yml | 2 ++ config/locales/he.yml | 2 ++ config/locales/hr.yml | 2 ++ config/locales/hu.yml | 2 ++ config/locales/id.yml | 2 ++ config/locales/it.yml | 2 ++ config/locales/ja.yml | 2 ++ config/locales/ko.yml | 2 ++ config/locales/lt.yml | 2 ++ config/locales/lv.yml | 2 ++ config/locales/mk.yml | 2 ++ config/locales/mn.yml | 2 ++ config/locales/nl.yml | 2 ++ config/locales/no.yml | 2 ++ config/locales/pl.yml | 2 ++ config/locales/pt-BR.yml | 2 ++ config/locales/pt.yml | 2 ++ config/locales/ro.yml | 2 ++ config/locales/ru.yml | 2 ++ config/locales/sk.yml | 2 ++ config/locales/sl.yml | 2 ++ config/locales/sq.yml | 2 ++ config/locales/sr-YU.yml | 2 ++ config/locales/sr.yml | 2 ++ config/locales/sv.yml | 2 ++ config/locales/th.yml | 2 ++ config/locales/tr.yml | 2 ++ config/locales/uk.yml | 2 ++ config/locales/vi.yml | 2 ++ config/locales/zh-TW.yml | 2 ++ config/locales/zh.yml | 2 ++ 47 files changed, 94 insertions(+) diff --git a/config/locales/ar.yml b/config/locales/ar.yml index a6b841ff3..a265f6243 100644 --- a/config/locales/ar.yml +++ b/config/locales/ar.yml @@ -1205,3 +1205,5 @@ ar: for which you can create an issue label_tracker_all: All trackers label_new_project_issue_tab_enabled: Display the "New issue" tab + setting_new_item_menu_tab: Project menu tab for creating new objects + label_new_object_tab_enabled: Display the "+" drop-down diff --git a/config/locales/az.yml b/config/locales/az.yml index fa7a30b0e..649a55e42 100644 --- a/config/locales/az.yml +++ b/config/locales/az.yml @@ -1300,3 +1300,5 @@ az: for which you can create an issue label_tracker_all: All trackers label_new_project_issue_tab_enabled: Display the "New issue" tab + setting_new_item_menu_tab: Project menu tab for creating new objects + label_new_object_tab_enabled: Display the "+" drop-down diff --git a/config/locales/bg.yml b/config/locales/bg.yml index 672881f3a..e505068a3 100644 --- a/config/locales/bg.yml +++ b/config/locales/bg.yml @@ -1193,3 +1193,5 @@ bg: description_date_to: Въведете крайна дата text_repository_identifier_info: 'Позволени са малки букви (a-z), цифри, тирета и _.
Промяна след създаването му не е възможна.' label_new_project_issue_tab_enabled: Показване на меню-елемент "Нова задача" + setting_new_item_menu_tab: Project menu tab for creating new objects + label_new_object_tab_enabled: Display the "+" drop-down diff --git a/config/locales/bs.yml b/config/locales/bs.yml index 38995599d..d65fc1099 100644 --- a/config/locales/bs.yml +++ b/config/locales/bs.yml @@ -1218,3 +1218,5 @@ bs: for which you can create an issue label_tracker_all: All trackers label_new_project_issue_tab_enabled: Display the "New issue" tab + setting_new_item_menu_tab: Project menu tab for creating new objects + label_new_object_tab_enabled: Display the "+" drop-down diff --git a/config/locales/ca.yml b/config/locales/ca.yml index f165aed6e..8ab7b0f4b 100644 --- a/config/locales/ca.yml +++ b/config/locales/ca.yml @@ -1198,3 +1198,5 @@ ca: for which you can create an issue label_tracker_all: All trackers label_new_project_issue_tab_enabled: Display the "New issue" tab + setting_new_item_menu_tab: Project menu tab for creating new objects + label_new_object_tab_enabled: Display the "+" drop-down diff --git a/config/locales/cs.yml b/config/locales/cs.yml index 610033882..c09b6d013 100644 --- a/config/locales/cs.yml +++ b/config/locales/cs.yml @@ -1206,3 +1206,5 @@ cs: for which you can create an issue label_tracker_all: All trackers label_new_project_issue_tab_enabled: Zobraz záložku "Nový úkol" + setting_new_item_menu_tab: Project menu tab for creating new objects + label_new_object_tab_enabled: Display the "+" drop-down diff --git a/config/locales/da.yml b/config/locales/da.yml index 188731a02..77756968f 100644 --- a/config/locales/da.yml +++ b/config/locales/da.yml @@ -1222,3 +1222,5 @@ da: for which you can create an issue label_tracker_all: All trackers label_new_project_issue_tab_enabled: Display the "New issue" tab + setting_new_item_menu_tab: Project menu tab for creating new objects + label_new_object_tab_enabled: Display the "+" drop-down diff --git a/config/locales/de.yml b/config/locales/de.yml index 3aa5271a3..59ce6e6a8 100644 --- a/config/locales/de.yml +++ b/config/locales/de.yml @@ -1208,3 +1208,5 @@ de: for which you can create an issue label_tracker_all: All trackers label_new_project_issue_tab_enabled: Tab "Neues Ticket" anzeigen + setting_new_item_menu_tab: Project menu tab for creating new objects + label_new_object_tab_enabled: Display the "+" drop-down diff --git a/config/locales/el.yml b/config/locales/el.yml index 03563effb..63c6a774a 100644 --- a/config/locales/el.yml +++ b/config/locales/el.yml @@ -1205,3 +1205,5 @@ el: for which you can create an issue label_tracker_all: All trackers label_new_project_issue_tab_enabled: Display the "New issue" tab + setting_new_item_menu_tab: Project menu tab for creating new objects + label_new_object_tab_enabled: Display the "+" drop-down diff --git a/config/locales/en-GB.yml b/config/locales/en-GB.yml index e738493bb..0617b2227 100644 --- a/config/locales/en-GB.yml +++ b/config/locales/en-GB.yml @@ -1207,3 +1207,5 @@ en-GB: for which you can create an issue label_tracker_all: All trackers label_new_project_issue_tab_enabled: Display the "New issue" tab + setting_new_item_menu_tab: Project menu tab for creating new objects + label_new_object_tab_enabled: Display the "+" drop-down diff --git a/config/locales/es-PA.yml b/config/locales/es-PA.yml index 54bde6b13..e7072a7cd 100644 --- a/config/locales/es-PA.yml +++ b/config/locales/es-PA.yml @@ -1239,3 +1239,5 @@ es-PA: for which you can create an issue label_tracker_all: All trackers label_new_project_issue_tab_enabled: Display the "New issue" tab + setting_new_item_menu_tab: Project menu tab for creating new objects + label_new_object_tab_enabled: Display the "+" drop-down diff --git a/config/locales/es.yml b/config/locales/es.yml index 345ac90a3..6cef342f5 100644 --- a/config/locales/es.yml +++ b/config/locales/es.yml @@ -1237,3 +1237,5 @@ es: for which you can create an issue label_tracker_all: All trackers label_new_project_issue_tab_enabled: Display the "New issue" tab + setting_new_item_menu_tab: Project menu tab for creating new objects + label_new_object_tab_enabled: Display the "+" drop-down diff --git a/config/locales/et.yml b/config/locales/et.yml index fa3be6329..510c9236c 100644 --- a/config/locales/et.yml +++ b/config/locales/et.yml @@ -1209,3 +1209,5 @@ et: for which you can create an issue label_tracker_all: All trackers label_new_project_issue_tab_enabled: Display the "New issue" tab + setting_new_item_menu_tab: Project menu tab for creating new objects + label_new_object_tab_enabled: Display the "+" drop-down diff --git a/config/locales/eu.yml b/config/locales/eu.yml index dc21ead28..ebece4218 100644 --- a/config/locales/eu.yml +++ b/config/locales/eu.yml @@ -1206,3 +1206,5 @@ eu: for which you can create an issue label_tracker_all: All trackers label_new_project_issue_tab_enabled: Display the "New issue" tab + setting_new_item_menu_tab: Project menu tab for creating new objects + label_new_object_tab_enabled: Display the "+" drop-down diff --git a/config/locales/fa.yml b/config/locales/fa.yml index 6c7eb49a5..c9d527f67 100644 --- a/config/locales/fa.yml +++ b/config/locales/fa.yml @@ -1206,3 +1206,5 @@ fa: for which you can create an issue label_tracker_all: All trackers label_new_project_issue_tab_enabled: Display the "New issue" tab + setting_new_item_menu_tab: Project menu tab for creating new objects + label_new_object_tab_enabled: Display the "+" drop-down diff --git a/config/locales/fi.yml b/config/locales/fi.yml index 49e510707..c2449b0f1 100644 --- a/config/locales/fi.yml +++ b/config/locales/fi.yml @@ -1226,3 +1226,5 @@ fi: for which you can create an issue label_tracker_all: All trackers label_new_project_issue_tab_enabled: Display the "New issue" tab + setting_new_item_menu_tab: Project menu tab for creating new objects + label_new_object_tab_enabled: Display the "+" drop-down diff --git a/config/locales/gl.yml b/config/locales/gl.yml index 70afa9072..d0069b243 100644 --- a/config/locales/gl.yml +++ b/config/locales/gl.yml @@ -1213,3 +1213,5 @@ gl: for which you can create an issue label_tracker_all: All trackers label_new_project_issue_tab_enabled: Display the "New issue" tab + setting_new_item_menu_tab: Project menu tab for creating new objects + label_new_object_tab_enabled: Display the "+" drop-down diff --git a/config/locales/he.yml b/config/locales/he.yml index a5b1b7d0b..b17742433 100644 --- a/config/locales/he.yml +++ b/config/locales/he.yml @@ -1210,3 +1210,5 @@ he: for which you can create an issue label_tracker_all: All trackers label_new_project_issue_tab_enabled: Display the "New issue" tab + setting_new_item_menu_tab: Project menu tab for creating new objects + label_new_object_tab_enabled: Display the "+" drop-down diff --git a/config/locales/hr.yml b/config/locales/hr.yml index 0a603db95..9e37b7a2e 100644 --- a/config/locales/hr.yml +++ b/config/locales/hr.yml @@ -1204,3 +1204,5 @@ hr: for which you can create an issue label_tracker_all: All trackers label_new_project_issue_tab_enabled: Display the "New issue" tab + setting_new_item_menu_tab: Project menu tab for creating new objects + label_new_object_tab_enabled: Display the "+" drop-down diff --git a/config/locales/hu.yml b/config/locales/hu.yml index e6b1f8595..b8e9058f8 100644 --- a/config/locales/hu.yml +++ b/config/locales/hu.yml @@ -1224,3 +1224,5 @@ for which you can create an issue label_tracker_all: All trackers label_new_project_issue_tab_enabled: Display the "New issue" tab + setting_new_item_menu_tab: Project menu tab for creating new objects + label_new_object_tab_enabled: Display the "+" drop-down diff --git a/config/locales/id.yml b/config/locales/id.yml index 3e1aedcad..750eb2e44 100644 --- a/config/locales/id.yml +++ b/config/locales/id.yml @@ -1209,3 +1209,5 @@ id: for which you can create an issue label_tracker_all: All trackers label_new_project_issue_tab_enabled: Display the "New issue" tab + setting_new_item_menu_tab: Project menu tab for creating new objects + label_new_object_tab_enabled: Display the "+" drop-down diff --git a/config/locales/it.yml b/config/locales/it.yml index 08e5f1467..57afce9f0 100644 --- a/config/locales/it.yml +++ b/config/locales/it.yml @@ -1200,3 +1200,5 @@ it: for which you can create an issue label_tracker_all: All trackers label_new_project_issue_tab_enabled: Display the "New issue" tab + setting_new_item_menu_tab: Project menu tab for creating new objects + label_new_object_tab_enabled: Display the "+" drop-down diff --git a/config/locales/ja.yml b/config/locales/ja.yml index f7661003b..e10e1bd14 100644 --- a/config/locales/ja.yml +++ b/config/locales/ja.yml @@ -1215,3 +1215,5 @@ ja: error_no_tracker_allowed_for_new_issue_in_project: このプロジェクトにはチケットの追加が許可されているトラッカーがありません label_tracker_all: すべてのトラッカー label_new_project_issue_tab_enabled: '"新しいチケット" タブを表示' + setting_new_item_menu_tab: Project menu tab for creating new objects + label_new_object_tab_enabled: Display the "+" drop-down diff --git a/config/locales/ko.yml b/config/locales/ko.yml index 4f7a6f220..2fee6dc19 100644 --- a/config/locales/ko.yml +++ b/config/locales/ko.yml @@ -1244,3 +1244,5 @@ ko: for which you can create an issue label_tracker_all: All trackers label_new_project_issue_tab_enabled: '"새 일감" 탭 표시' + setting_new_item_menu_tab: Project menu tab for creating new objects + label_new_object_tab_enabled: Display the "+" drop-down diff --git a/config/locales/lt.yml b/config/locales/lt.yml index e1dbd6b83..2a8b0b5d2 100644 --- a/config/locales/lt.yml +++ b/config/locales/lt.yml @@ -1194,3 +1194,5 @@ lt: for which you can create an issue label_tracker_all: All trackers label_new_project_issue_tab_enabled: Display the "New issue" tab + setting_new_item_menu_tab: Project menu tab for creating new objects + label_new_object_tab_enabled: Display the "+" drop-down diff --git a/config/locales/lv.yml b/config/locales/lv.yml index 39dbaac17..81184dfac 100644 --- a/config/locales/lv.yml +++ b/config/locales/lv.yml @@ -1199,3 +1199,5 @@ lv: for which you can create an issue label_tracker_all: All trackers label_new_project_issue_tab_enabled: Display the "New issue" tab + setting_new_item_menu_tab: Project menu tab for creating new objects + label_new_object_tab_enabled: Display the "+" drop-down diff --git a/config/locales/mk.yml b/config/locales/mk.yml index ef587684f..e7dc7ee3e 100644 --- a/config/locales/mk.yml +++ b/config/locales/mk.yml @@ -1205,3 +1205,5 @@ mk: for which you can create an issue label_tracker_all: All trackers label_new_project_issue_tab_enabled: Display the "New issue" tab + setting_new_item_menu_tab: Project menu tab for creating new objects + label_new_object_tab_enabled: Display the "+" drop-down diff --git a/config/locales/mn.yml b/config/locales/mn.yml index 0f2cec180..eb63b988f 100644 --- a/config/locales/mn.yml +++ b/config/locales/mn.yml @@ -1206,3 +1206,5 @@ mn: for which you can create an issue label_tracker_all: All trackers label_new_project_issue_tab_enabled: Display the "New issue" tab + setting_new_item_menu_tab: Project menu tab for creating new objects + label_new_object_tab_enabled: Display the "+" drop-down diff --git a/config/locales/nl.yml b/config/locales/nl.yml index 421cf6872..23630b28e 100644 --- a/config/locales/nl.yml +++ b/config/locales/nl.yml @@ -1184,3 +1184,5 @@ nl: for which you can create an issue label_tracker_all: All trackers label_new_project_issue_tab_enabled: Display the "New issue" tab + setting_new_item_menu_tab: Project menu tab for creating new objects + label_new_object_tab_enabled: Display the "+" drop-down diff --git a/config/locales/no.yml b/config/locales/no.yml index 07657a820..ce5aef038 100644 --- a/config/locales/no.yml +++ b/config/locales/no.yml @@ -1195,3 +1195,5 @@ for which you can create an issue label_tracker_all: All trackers label_new_project_issue_tab_enabled: Display the "New issue" tab + setting_new_item_menu_tab: Project menu tab for creating new objects + label_new_object_tab_enabled: Display the "+" drop-down diff --git a/config/locales/pl.yml b/config/locales/pl.yml index 06691733f..0534b6bee 100644 --- a/config/locales/pl.yml +++ b/config/locales/pl.yml @@ -1220,3 +1220,5 @@ pl: for which you can create an issue label_tracker_all: All trackers label_new_project_issue_tab_enabled: Display the "New issue" tab + setting_new_item_menu_tab: Project menu tab for creating new objects + label_new_object_tab_enabled: Display the "+" drop-down diff --git a/config/locales/pt-BR.yml b/config/locales/pt-BR.yml index bdd3f5a77..28c5f2303 100644 --- a/config/locales/pt-BR.yml +++ b/config/locales/pt-BR.yml @@ -1223,3 +1223,5 @@ pt-BR: for which you can create an issue label_tracker_all: All trackers label_new_project_issue_tab_enabled: Display the "New issue" tab + setting_new_item_menu_tab: Project menu tab for creating new objects + label_new_object_tab_enabled: Display the "+" drop-down diff --git a/config/locales/pt.yml b/config/locales/pt.yml index 1d6f7323d..6656b7944 100644 --- a/config/locales/pt.yml +++ b/config/locales/pt.yml @@ -1207,3 +1207,5 @@ pt: for which you can create an issue label_tracker_all: All trackers label_new_project_issue_tab_enabled: Display the "New issue" tab + setting_new_item_menu_tab: Project menu tab for creating new objects + label_new_object_tab_enabled: Display the "+" drop-down diff --git a/config/locales/ro.yml b/config/locales/ro.yml index 3e2f20b0c..03e937afa 100644 --- a/config/locales/ro.yml +++ b/config/locales/ro.yml @@ -1200,3 +1200,5 @@ ro: for which you can create an issue label_tracker_all: All trackers label_new_project_issue_tab_enabled: Display the "New issue" tab + setting_new_item_menu_tab: Project menu tab for creating new objects + label_new_object_tab_enabled: Display the "+" drop-down diff --git a/config/locales/ru.yml b/config/locales/ru.yml index 5261356e6..363d1804c 100644 --- a/config/locales/ru.yml +++ b/config/locales/ru.yml @@ -1306,3 +1306,5 @@ ru: for which you can create an issue label_tracker_all: All trackers label_new_project_issue_tab_enabled: Display the "New issue" tab + setting_new_item_menu_tab: Project menu tab for creating new objects + label_new_object_tab_enabled: Display the "+" drop-down diff --git a/config/locales/sk.yml b/config/locales/sk.yml index 9b3a4534b..276c8ff2c 100644 --- a/config/locales/sk.yml +++ b/config/locales/sk.yml @@ -1195,3 +1195,5 @@ sk: for which you can create an issue label_tracker_all: All trackers label_new_project_issue_tab_enabled: Display the "New issue" tab + setting_new_item_menu_tab: Project menu tab for creating new objects + label_new_object_tab_enabled: Display the "+" drop-down diff --git a/config/locales/sl.yml b/config/locales/sl.yml index 1cb294cdf..d8f493a55 100644 --- a/config/locales/sl.yml +++ b/config/locales/sl.yml @@ -1205,3 +1205,5 @@ sl: for which you can create an issue label_tracker_all: All trackers label_new_project_issue_tab_enabled: Display the "New issue" tab + setting_new_item_menu_tab: Project menu tab for creating new objects + label_new_object_tab_enabled: Display the "+" drop-down diff --git a/config/locales/sq.yml b/config/locales/sq.yml index cf6bda0ba..658183886 100644 --- a/config/locales/sq.yml +++ b/config/locales/sq.yml @@ -1201,3 +1201,5 @@ sq: for which you can create an issue label_tracker_all: All trackers label_new_project_issue_tab_enabled: Display the "New issue" tab + setting_new_item_menu_tab: Project menu tab for creating new objects + label_new_object_tab_enabled: Display the "+" drop-down diff --git a/config/locales/sr-YU.yml b/config/locales/sr-YU.yml index c11de67ce..0ae915f25 100644 --- a/config/locales/sr-YU.yml +++ b/config/locales/sr-YU.yml @@ -1207,3 +1207,5 @@ sr-YU: for which you can create an issue label_tracker_all: All trackers label_new_project_issue_tab_enabled: Display the "New issue" tab + setting_new_item_menu_tab: Project menu tab for creating new objects + label_new_object_tab_enabled: Display the "+" drop-down diff --git a/config/locales/sr.yml b/config/locales/sr.yml index a68ae5d6a..5c27ec2be 100644 --- a/config/locales/sr.yml +++ b/config/locales/sr.yml @@ -1206,3 +1206,5 @@ sr: for which you can create an issue label_tracker_all: All trackers label_new_project_issue_tab_enabled: Display the "New issue" tab + setting_new_item_menu_tab: Project menu tab for creating new objects + label_new_object_tab_enabled: Display the "+" drop-down diff --git a/config/locales/sv.yml b/config/locales/sv.yml index fd8c22f42..059852400 100644 --- a/config/locales/sv.yml +++ b/config/locales/sv.yml @@ -1238,3 +1238,5 @@ sv: for which you can create an issue label_tracker_all: All trackers label_new_project_issue_tab_enabled: Display the "New issue" tab + setting_new_item_menu_tab: Project menu tab for creating new objects + label_new_object_tab_enabled: Display the "+" drop-down diff --git a/config/locales/th.yml b/config/locales/th.yml index e0fdd892b..c25b780bf 100644 --- a/config/locales/th.yml +++ b/config/locales/th.yml @@ -1202,3 +1202,5 @@ th: for which you can create an issue label_tracker_all: All trackers label_new_project_issue_tab_enabled: Display the "New issue" tab + setting_new_item_menu_tab: Project menu tab for creating new objects + label_new_object_tab_enabled: Display the "+" drop-down diff --git a/config/locales/tr.yml b/config/locales/tr.yml index 510c0dc78..7eb5f05e8 100644 --- a/config/locales/tr.yml +++ b/config/locales/tr.yml @@ -1212,3 +1212,5 @@ tr: for which you can create an issue label_tracker_all: All trackers label_new_project_issue_tab_enabled: Display the "New issue" tab + setting_new_item_menu_tab: Project menu tab for creating new objects + label_new_object_tab_enabled: Display the "+" drop-down diff --git a/config/locales/uk.yml b/config/locales/uk.yml index fe0746c98..8ea60d4a9 100644 --- a/config/locales/uk.yml +++ b/config/locales/uk.yml @@ -1200,3 +1200,5 @@ uk: for which you can create an issue label_tracker_all: All trackers label_new_project_issue_tab_enabled: Display the "New issue" tab + setting_new_item_menu_tab: Project menu tab for creating new objects + label_new_object_tab_enabled: Display the "+" drop-down diff --git a/config/locales/vi.yml b/config/locales/vi.yml index a4e09b773..73405c154 100644 --- a/config/locales/vi.yml +++ b/config/locales/vi.yml @@ -1258,3 +1258,5 @@ vi: for which you can create an issue label_tracker_all: All trackers label_new_project_issue_tab_enabled: Display the "New issue" tab + setting_new_item_menu_tab: Project menu tab for creating new objects + label_new_object_tab_enabled: Display the "+" drop-down diff --git a/config/locales/zh-TW.yml b/config/locales/zh-TW.yml index a361f1256..6722bb072 100644 --- a/config/locales/zh-TW.yml +++ b/config/locales/zh-TW.yml @@ -1275,3 +1275,5 @@ description_date_to: 輸入結束日期 text_repository_identifier_info: '僅允許使用小寫英文字母 (a-z), 阿拉伯數字, 虛線與底線。
一旦儲存之後, 代碼便無法再次被更改。' label_new_project_issue_tab_enabled: 顯示「建立新議題」標籤頁面 + setting_new_item_menu_tab: Project menu tab for creating new objects + label_new_object_tab_enabled: Display the "+" drop-down diff --git a/config/locales/zh.yml b/config/locales/zh.yml index 8fedfbb27..983730734 100644 --- a/config/locales/zh.yml +++ b/config/locales/zh.yml @@ -1198,3 +1198,5 @@ zh: for which you can create an issue label_tracker_all: All trackers label_new_project_issue_tab_enabled: 显示“新建问题”标签 + setting_new_item_menu_tab: Project menu tab for creating new objects + label_new_object_tab_enabled: Display the "+" drop-down From 246368a090fea7cdd8879e4a1dfcd0c781149cef Mon Sep 17 00:00:00 2001 From: Jean-Philippe Lang Date: Sat, 11 Jun 2016 07:42:00 +0000 Subject: [PATCH 0051/1117] Totals cannot be removed completely if some columns are set in the global settings (#22123). git-svn-id: http://svn.redmine.org/redmine/trunk@15510 e93f8b46-1217-0410-a6f0-8f06a7374b81 --- app/helpers/queries_helper.rb | 1 + test/ui/issues_test_ui.rb | 20 ++++++++++++++++++++ 2 files changed, 21 insertions(+) diff --git a/app/helpers/queries_helper.rb b/app/helpers/queries_helper.rb index 5ed8348e2..fd92af17a 100644 --- a/app/helpers/queries_helper.rb +++ b/app/helpers/queries_helper.rb @@ -89,6 +89,7 @@ module QueriesHelper query.available_totalable_columns.each do |column| tags << content_tag('label', check_box_tag('t[]', column.name.to_s, query.totalable_columns.include?(column), :id => nil) + " #{column.caption}", :class => 'inline') end + tags << hidden_field_tag('t[]', '') tags end diff --git a/test/ui/issues_test_ui.rb b/test/ui/issues_test_ui.rb index 1af658ebf..0ab5d6a8b 100644 --- a/test/ui/issues_test_ui.rb +++ b/test/ui/issues_test_ui.rb @@ -290,4 +290,24 @@ class Redmine::UiTest::IssuesTest < Redmine::UiTest::Base assert Issue.find(1).watched_by?(User.find_by_login('jsmith')) assert Issue.find(4).watched_by?(User.find_by_login('jsmith')) end + + def test_issue_list_with_default_totalable_columns + log_user('admin', 'admin') + with_settings :issue_list_default_totals => ['estimated_hours'] do + visit '/projects/ecookbook/issues' + # Check that the page shows the Estimated hours total + assert page.has_css?('p.query-totals') + assert page.has_css?('span.total-for-estimated-hours') + # Open the Options of the form (necessary for having the totalable columns options clickable) + page.all('legend')[1].click + # Deselect the default totalable column (none should be left) + page.first('input[name="t[]"][value="estimated_hours"]').click + within('#query_form') do + click_link 'Apply' + end + # Check that Totals are not present in the reloaded page + assert !page.has_css?('p.query-totals') + assert !page.has_css?('span.total-for-estimated-hours') + end + end end From 50a46c3515b32034a03fcfe1fb2d41a04269b604 Mon Sep 17 00:00:00 2001 From: Jean-Philippe Lang Date: Sat, 11 Jun 2016 07:48:19 +0000 Subject: [PATCH 0052/1117] Set default language in import tests (#22951). git-svn-id: http://svn.redmine.org/redmine/trunk@15511 e93f8b46-1217-0410-a6f0-8f06a7374b81 --- test/unit/issue_import_test.rb | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/test/unit/issue_import_test.rb b/test/unit/issue_import_test.rb index 88da82c88..61a0d3a9f 100644 --- a/test/unit/issue_import_test.rb +++ b/test/unit/issue_import_test.rb @@ -32,6 +32,10 @@ class IssueImportTest < ActiveSupport::TestCase :custom_fields_projects, :custom_fields_trackers + def setup + set_language_if_valid 'en' + end + def test_create_versions_should_create_missing_versions import = generate_import_with_mapping import.mapping.merge!('fixed_version' => '9', 'create_versions' => '1') From 010f75714dcc3732ed941803f80e091ebb064352 Mon Sep 17 00:00:00 2001 From: Jean-Philippe Lang Date: Sat, 11 Jun 2016 07:58:24 +0000 Subject: [PATCH 0053/1117] Include required module (#22951). git-svn-id: http://svn.redmine.org/redmine/trunk@15512 e93f8b46-1217-0410-a6f0-8f06a7374b81 --- test/unit/issue_import_test.rb | 2 ++ 1 file changed, 2 insertions(+) diff --git a/test/unit/issue_import_test.rb b/test/unit/issue_import_test.rb index 61a0d3a9f..9f238cafe 100644 --- a/test/unit/issue_import_test.rb +++ b/test/unit/issue_import_test.rb @@ -32,6 +32,8 @@ class IssueImportTest < ActiveSupport::TestCase :custom_fields_projects, :custom_fields_trackers + include Redmine::I18n + def setup set_language_if_valid 'en' end From 49cdcba2d2f19fde63ff1f0be9562c478ce08d38 Mon Sep 17 00:00:00 2001 From: Toshi MARUYAMA Date: Sun, 12 Jun 2016 06:52:22 +0000 Subject: [PATCH 0054/1117] Japanese translation updated by Go MAEDA (#23040) git-svn-id: http://svn.redmine.org/redmine/trunk@15516 e93f8b46-1217-0410-a6f0-8f06a7374b81 --- config/locales/ja.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/config/locales/ja.yml b/config/locales/ja.yml index e10e1bd14..770479b6e 100644 --- a/config/locales/ja.yml +++ b/config/locales/ja.yml @@ -1215,5 +1215,5 @@ ja: error_no_tracker_allowed_for_new_issue_in_project: このプロジェクトにはチケットの追加が許可されているトラッカーがありません label_tracker_all: すべてのトラッカー label_new_project_issue_tab_enabled: '"新しいチケット" タブを表示' - setting_new_item_menu_tab: Project menu tab for creating new objects - label_new_object_tab_enabled: Display the "+" drop-down + setting_new_item_menu_tab: 新規オブジェクト作成タブ + label_new_object_tab_enabled: '"+" ドロップダウンを表示' From 10c22b5384a4bc2c7977675716a2372e72def8da Mon Sep 17 00:00:00 2001 From: Jean-Philippe Lang Date: Sun, 12 Jun 2016 12:21:57 +0000 Subject: [PATCH 0055/1117] Preload principals. git-svn-id: http://svn.redmine.org/redmine/trunk@15518 e93f8b46-1217-0410-a6f0-8f06a7374b81 --- app/models/project.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app/models/project.rb b/app/models/project.rb index dee2e6dfd..e9b2647d4 100644 --- a/app/models/project.rb +++ b/app/models/project.rb @@ -524,7 +524,7 @@ class Project < ActiveRecord::Base # Returns the users that should be notified on project events def notified_users # TODO: User part should be extracted to User#notify_about? - members.select {|m| m.principal.present? && (m.mail_notification? || m.principal.mail_notification == 'all')}.collect {|m| m.principal} + members.preload(:principal).select {|m| m.principal.present? && (m.mail_notification? || m.principal.mail_notification == 'all')}.collect {|m| m.principal} end # Returns a scope of all custom fields enabled for project issues From db75a0237ead2fd0442d24a6323ff4611e0daf30 Mon Sep 17 00:00:00 2001 From: Jean-Philippe Lang Date: Sun, 12 Jun 2016 12:23:53 +0000 Subject: [PATCH 0056/1117] Preload assignee. git-svn-id: http://svn.redmine.org/redmine/trunk@15519 e93f8b46-1217-0410-a6f0-8f06a7374b81 --- app/helpers/issues_helper.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app/helpers/issues_helper.rb b/app/helpers/issues_helper.rb index ce6d9f8f2..b43dc3e94 100644 --- a/app/helpers/issues_helper.rb +++ b/app/helpers/issues_helper.rb @@ -106,7 +106,7 @@ module IssuesHelper def render_descendants_tree(issue) s = '
' - issue_list(issue.descendants.visible.preload(:status, :priority, :tracker).sort_by(&:lft)) do |child, level| + issue_list(issue.descendants.visible.preload(:status, :priority, :tracker, :assigned_to).sort_by(&:lft)) do |child, level| css = "issue issue-#{child.id} hascontextmenu #{issue.css_classes}" css << " idnt idnt-#{level}" if level > 0 s << content_tag('tr', From 63437c81378afec4826e336d109eb9cdaf725d4d Mon Sep 17 00:00:00 2001 From: Toshi MARUYAMA Date: Mon, 13 Jun 2016 04:49:20 +0000 Subject: [PATCH 0057/1117] fix typo in Azerbaijani general_lang_name (#23044) Contributed by Go MAEDA. git-svn-id: http://svn.redmine.org/redmine/trunk@15522 e93f8b46-1217-0410-a6f0-8f06a7374b81 --- config/locales/az.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/config/locales/az.yml b/config/locales/az.yml index 649a55e42..f29566d63 100644 --- a/config/locales/az.yml +++ b/config/locales/az.yml @@ -387,7 +387,7 @@ az: general_pdf_fontname: freesans general_pdf_monospaced_fontname: freemono general_first_day_of_week: '1' - general_lang_name: 'Azerbaijanian (Azeri)' + general_lang_name: 'Azerbaijani (Azeri)' general_text_no: 'xeyr' general_text_No: 'Xeyr' general_text_yes: 'bəli' From c82808f640632ef37dfde271bd83320da6ffb71c Mon Sep 17 00:00:00 2001 From: Toshi MARUYAMA Date: Mon, 13 Jun 2016 04:49:31 +0000 Subject: [PATCH 0058/1117] Traditional Chinese translation updated by ChunChang Lo (#23046) git-svn-id: http://svn.redmine.org/redmine/trunk@15523 e93f8b46-1217-0410-a6f0-8f06a7374b81 --- config/locales/zh-TW.yml | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/config/locales/zh-TW.yml b/config/locales/zh-TW.yml index 6722bb072..dc004144e 100644 --- a/config/locales/zh-TW.yml +++ b/config/locales/zh-TW.yml @@ -528,6 +528,7 @@ setting_search_results_per_page: 每一頁的搜尋結果數目 setting_attachment_extensions_allowed: 允許使用的附檔名 setting_attachment_extensions_denied: 禁止使用的副檔名 + setting_new_item_menu_tab: 建立新物件的專案功能分頁 permission_add_project: 建立專案 permission_add_subprojects: 建立子專案 @@ -1078,6 +1079,8 @@ label_field_format_enumeration: 鍵/值 清單 label_default_values_for_new_users: 新用戶使用之預設值 label_relations: 關聯 + label_new_project_issue_tab_enabled: 顯示「建立新議題」標籤頁面 + label_new_object_tab_enabled: 顯示 "+" 下拉功能表 button_login: 登入 button_submit: 送出 @@ -1274,6 +1277,3 @@ description_date_from: 輸入起始日期 description_date_to: 輸入結束日期 text_repository_identifier_info: '僅允許使用小寫英文字母 (a-z), 阿拉伯數字, 虛線與底線。
一旦儲存之後, 代碼便無法再次被更改。' - label_new_project_issue_tab_enabled: 顯示「建立新議題」標籤頁面 - setting_new_item_menu_tab: Project menu tab for creating new objects - label_new_object_tab_enabled: Display the "+" drop-down From 718ef3dffef68ef817a059a4522214fea97bc063 Mon Sep 17 00:00:00 2001 From: Toshi MARUYAMA Date: Mon, 13 Jun 2016 05:44:06 +0000 Subject: [PATCH 0059/1117] Bulgarian translation updated by Ivan Cenov (#23048) git-svn-id: http://svn.redmine.org/redmine/trunk@15526 e93f8b46-1217-0410-a6f0-8f06a7374b81 --- config/locales/bg.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/config/locales/bg.yml b/config/locales/bg.yml index e505068a3..0e4fccaf9 100644 --- a/config/locales/bg.yml +++ b/config/locales/bg.yml @@ -447,6 +447,7 @@ bg: setting_search_results_per_page: Резултати от търсене на страница setting_attachment_extensions_allowed: Позволени типове на файлове setting_attachment_extensions_denied: Разрешени типове на файлове + setting_new_item_menu_tab: Меню-елемент за добавяне на нови обекти (+) permission_add_project: Създаване на проект permission_add_subprojects: Създаване на подпроекти @@ -997,6 +998,7 @@ bg: label_field_format_enumeration: Списък ключ/стойност label_default_values_for_new_users: Стойности по подразбиране за нови потребители label_relations: Релации + label_new_object_tab_enabled: Показване на изпадащ списък за меню-елемент "+" button_login: Вход button_submit: Изпращане @@ -1193,5 +1195,3 @@ bg: description_date_to: Въведете крайна дата text_repository_identifier_info: 'Позволени са малки букви (a-z), цифри, тирета и _.
Промяна след създаването му не е възможна.' label_new_project_issue_tab_enabled: Показване на меню-елемент "Нова задача" - setting_new_item_menu_tab: Project menu tab for creating new objects - label_new_object_tab_enabled: Display the "+" drop-down From 5e480d36f9e5f7de661dfe0460ee16d1861cd90a Mon Sep 17 00:00:00 2001 From: Toshi MARUYAMA Date: Tue, 14 Jun 2016 03:49:22 +0000 Subject: [PATCH 0060/1117] Bulgarian translation (jstoolbar-bg.js) updated by Ivan Cenov (#23050) git-svn-id: http://svn.redmine.org/redmine/trunk@15528 e93f8b46-1217-0410-a6f0-8f06a7374b81 --- public/javascripts/jstoolbar/lang/jstoolbar-bg.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/public/javascripts/jstoolbar/lang/jstoolbar-bg.js b/public/javascripts/jstoolbar/lang/jstoolbar-bg.js index 7b76d1015..f74fd5594 100644 --- a/public/javascripts/jstoolbar/lang/jstoolbar-bg.js +++ b/public/javascripts/jstoolbar/lang/jstoolbar-bg.js @@ -7,7 +7,7 @@ jsToolBar.strings['Code'] = 'Вграден код'; jsToolBar.strings['Heading 1'] = 'Заглавие 1'; jsToolBar.strings['Heading 2'] = 'Заглавие 2'; jsToolBar.strings['Heading 3'] = 'Заглавие 3'; -jsToolBar.strings['Highlighted code'] = 'Highlighted code'; +jsToolBar.strings['Highlighted code'] = 'Вграден код'; jsToolBar.strings['Unordered list'] = 'Неподреден списък'; jsToolBar.strings['Ordered list'] = 'Подреден списък'; jsToolBar.strings['Quote'] = 'Цитат'; From e7bf4448b9c5d1855e75a4cba0e4bfbe8162236f Mon Sep 17 00:00:00 2001 From: Toshi MARUYAMA Date: Wed, 15 Jun 2016 05:55:12 +0000 Subject: [PATCH 0061/1117] fix confusing Japanese translation for permission_manage_related_issues (#23065) Contributed by Go MAEDA. git-svn-id: http://svn.redmine.org/redmine/trunk@15530 e93f8b46-1217-0410-a6f0-8f06a7374b81 --- config/locales/ja.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/config/locales/ja.yml b/config/locales/ja.yml index 770479b6e..872c4624f 100644 --- a/config/locales/ja.yml +++ b/config/locales/ja.yml @@ -1034,7 +1034,7 @@ ja: text_issue_conflict_resolution_overwrite: 自分の編集内容の保存を強行 (他のユーザーの更新内容は注記を除き上書きされます) notice_issue_update_conflict: このチケットを編集中に他のユーザーが更新しました。 text_issue_conflict_resolution_cancel: 自分の編集内容を破棄し %{link} を再表示 - permission_manage_related_issues: 関連するチケットの管理 + permission_manage_related_issues: リビジョンとチケットの関連の管理 field_auth_source_ldap_filter: LDAPフィルタ label_search_for_watchers: ウォッチャーを検索して追加 notice_account_deleted: アカウントが削除されました。 From 755839dad7f6c9447285c478299e0247afded34b Mon Sep 17 00:00:00 2001 From: Jean-Philippe Lang Date: Wed, 15 Jun 2016 18:18:24 +0000 Subject: [PATCH 0062/1117] Clearing time entry custom fields while bulk editing results in values set to __none__ (#23054). MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Patch by Felix Schäfer. git-svn-id: http://svn.redmine.org/redmine/trunk@15532 e93f8b46-1217-0410-a6f0-8f06a7374b81 --- app/controllers/timelog_controller.rb | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) diff --git a/app/controllers/timelog_controller.rb b/app/controllers/timelog_controller.rb index 597160191..59efb9d78 100644 --- a/app/controllers/timelog_controller.rb +++ b/app/controllers/timelog_controller.rb @@ -275,7 +275,16 @@ private def parse_params_for_bulk_time_entry_attributes(params) attributes = (params[:time_entry] || {}).reject {|k,v| v.blank?} attributes.keys.each {|k| attributes[k] = '' if attributes[k] == 'none'} - attributes[:custom_field_values].reject! {|k,v| v.blank?} if attributes[:custom_field_values] + if custom = attributes[:custom_field_values] + custom.reject! {|k,v| v.blank?} + custom.keys.each do |k| + if custom[k].is_a?(Array) + custom[k] << '' if custom[k].delete('__none__') + else + custom[k] = '' if custom[k] == '__none__' + end + end + end attributes end end From e04913c86393580f950fadece08cabd66800bb20 Mon Sep 17 00:00:00 2001 From: Jean-Philippe Lang Date: Wed, 15 Jun 2016 18:18:43 +0000 Subject: [PATCH 0063/1117] Adds a test for #23054. git-svn-id: http://svn.redmine.org/redmine/trunk@15533 e93f8b46-1217-0410-a6f0-8f06a7374b81 --- test/functional/timelog_controller_test.rb | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/test/functional/timelog_controller_test.rb b/test/functional/timelog_controller_test.rb index ce6f5936c..c3e96793d 100644 --- a/test/functional/timelog_controller_test.rb +++ b/test/functional/timelog_controller_test.rb @@ -527,6 +527,15 @@ class TimelogControllerTest < ActionController::TestCase assert_equal ["0", "0"], TimeEntry.where(:id => [1, 2]).collect {|i| i.custom_value_for(10).value} end + def test_bulk_update_clear_custom_field + field = TimeEntryCustomField.generate!(:field_format => 'string') + @request.session[:user_id] = 2 + post :bulk_update, :ids => [1, 2], :time_entry => { :custom_field_values => {field.id.to_s => '__none__'} } + + assert_response 302 + assert_equal ["", ""], TimeEntry.where(:id => [1, 2]).collect {|i| i.custom_value_for(field).value} + end + def test_post_bulk_update_should_redirect_back_using_the_back_url_parameter @request.session[:user_id] = 2 post :bulk_update, :ids => [1,2], :back_url => '/time_entries' From f694839c8242d37cde65d71813f114f80fe0353f Mon Sep 17 00:00:00 2001 From: Jean-Philippe Lang Date: Wed, 15 Jun 2016 18:24:02 +0000 Subject: [PATCH 0064/1117] Code cleanup (#23054). git-svn-id: http://svn.redmine.org/redmine/trunk@15534 e93f8b46-1217-0410-a6f0-8f06a7374b81 --- app/controllers/application_controller.rb | 16 ++++++++++++++++ app/controllers/issues_controller.rb | 18 +----------------- app/controllers/timelog_controller.rb | 18 +----------------- 3 files changed, 18 insertions(+), 34 deletions(-) diff --git a/app/controllers/application_controller.rb b/app/controllers/application_controller.rb index 48ad635e8..f998be775 100644 --- a/app/controllers/application_controller.rb +++ b/app/controllers/application_controller.rb @@ -352,6 +352,22 @@ class ApplicationController < ActionController::Base @attachments = att || [] end + def parse_params_for_bulk_update(params) + attributes = (params || {}).reject {|k,v| v.blank?} + attributes.keys.each {|k| attributes[k] = '' if attributes[k] == 'none'} + if custom = attributes[:custom_field_values] + custom.reject! {|k,v| v.blank?} + custom.keys.each do |k| + if custom[k].is_a?(Array) + custom[k] << '' if custom[k].delete('__none__') + else + custom[k] = '' if custom[k] == '__none__' + end + end + end + attributes + end + # make sure that the user is a member of the project (or admin) if project is private # used as a before_filter for actions that do not require any particular permission on the project def check_project_privacy diff --git a/app/controllers/issues_controller.rb b/app/controllers/issues_controller.rb index 95c58674c..b842023a7 100644 --- a/app/controllers/issues_controller.rb +++ b/app/controllers/issues_controller.rb @@ -252,7 +252,7 @@ class IssuesController < ApplicationController @issues.sort! @copy = params[:copy].present? - attributes = parse_params_for_bulk_issue_attributes(params) + attributes = parse_params_for_bulk_update(params[:issue]) copy_subtasks = (params[:copy_subtasks] == '1') copy_attachments = (params[:copy_attachments] == '1') @@ -495,22 +495,6 @@ class IssuesController < ApplicationController @allowed_statuses = @issue.new_statuses_allowed_to(User.current) end - def parse_params_for_bulk_issue_attributes(params) - attributes = (params[:issue] || {}).reject {|k,v| v.blank?} - attributes.keys.each {|k| attributes[k] = '' if attributes[k] == 'none'} - if custom = attributes[:custom_field_values] - custom.reject! {|k,v| v.blank?} - custom.keys.each do |k| - if custom[k].is_a?(Array) - custom[k] << '' if custom[k].delete('__none__') - else - custom[k] = '' if custom[k] == '__none__' - end - end - end - attributes - end - # Saves @issue and a time_entry from the parameters def save_issue_with_child_records Issue.transaction do diff --git a/app/controllers/timelog_controller.rb b/app/controllers/timelog_controller.rb index 59efb9d78..66ae97678 100644 --- a/app/controllers/timelog_controller.rb +++ b/app/controllers/timelog_controller.rb @@ -174,7 +174,7 @@ class TimelogController < ApplicationController end def bulk_update - attributes = parse_params_for_bulk_time_entry_attributes(params) + attributes = parse_params_for_bulk_update(params[:time_entry]) unsaved_time_entry_ids = [] @time_entries.each do |time_entry| @@ -271,20 +271,4 @@ private end scope end - - def parse_params_for_bulk_time_entry_attributes(params) - attributes = (params[:time_entry] || {}).reject {|k,v| v.blank?} - attributes.keys.each {|k| attributes[k] = '' if attributes[k] == 'none'} - if custom = attributes[:custom_field_values] - custom.reject! {|k,v| v.blank?} - custom.keys.each do |k| - if custom[k].is_a?(Array) - custom[k] << '' if custom[k].delete('__none__') - else - custom[k] = '' if custom[k] == '__none__' - end - end - end - attributes - end end From 3be2185683479f65e95cba89a419e30375a34df6 Mon Sep 17 00:00:00 2001 From: Jean-Philippe Lang Date: Wed, 15 Jun 2016 19:04:36 +0000 Subject: [PATCH 0065/1117] Removes the UTF8 checkmark that prevents redirect from back_url. git-svn-id: http://svn.redmine.org/redmine/trunk@15535 e93f8b46-1217-0410-a6f0-8f06a7374b81 --- app/helpers/application_helper.rb | 5 +++++ test/unit/helpers/application_helper_test.rb | 5 +++++ 2 files changed, 10 insertions(+) diff --git a/app/helpers/application_helper.rb b/app/helpers/application_helper.rb index c727d0be5..288f734f2 100644 --- a/app/helpers/application_helper.rb +++ b/app/helpers/application_helper.rb @@ -1109,6 +1109,11 @@ module ApplicationHelper url = params[:back_url] if url.nil? && referer = request.env['HTTP_REFERER'] url = CGI.unescape(referer.to_s) + # URLs that contains the utf8=[checkmark] parameter added by Rails are + # parsed as invalid by URI.parse so the redirect to the back URL would + # not be accepted (ApplicationController#validate_back_url would return + # false) + url.gsub!(/(\?|&)utf8=\u2713&?/, '\1') end url end diff --git a/test/unit/helpers/application_helper_test.rb b/test/unit/helpers/application_helper_test.rb index 89af800be..48260ccf7 100644 --- a/test/unit/helpers/application_helper_test.rb +++ b/test/unit/helpers/application_helper_test.rb @@ -1538,4 +1538,9 @@ RAW assert_equal "#{ja} #{ja}...", result assert !result.html_safe? end + + def test_back_url_should_remove_utf8_checkmark_from_referer + stubs(:request).returns(stub(:env => {'HTTP_REFERER' => "/path?utf8=\u2713&foo=bar"})) + assert_equal "/path?foo=bar", back_url + end end From adb9980728c0500046ce623dc023a295b4af21d5 Mon Sep 17 00:00:00 2001 From: Jean-Philippe Lang Date: Sat, 18 Jun 2016 05:59:20 +0000 Subject: [PATCH 0066/1117] Allow global versions to be shown outside of a project for version custom fields (#23083). Patch by Holger Just. git-svn-id: http://svn.redmine.org/redmine/trunk@15536 e93f8b46-1217-0410-a6f0-8f06a7374b81 --- lib/redmine/field_format.rb | 21 ++++++++++++------- .../field_format/version_field_format_test.rb | 9 ++++++++ 2 files changed, 23 insertions(+), 7 deletions(-) diff --git a/lib/redmine/field_format.rb b/lib/redmine/field_format.rb index 77014579b..874220933 100644 --- a/lib/redmine/field_format.rb +++ b/lib/redmine/field_format.rb @@ -802,17 +802,24 @@ module Redmine projects.map {|project| possible_values_options(custom_field, project)}.reduce(:&) || [] elsif object.respond_to?(:project) && object.project scope = object.project.shared_versions - if !all_statuses && custom_field.version_status.is_a?(Array) - statuses = custom_field.version_status.map(&:to_s).reject(&:blank?) - if statuses.any? - scope = scope.where(:status => statuses.map(&:to_s)) - end - end - scope.sort.collect {|u| [u.to_s, u.id.to_s]} + filtered_versions_options(custom_field, scope, all_statuses) + elsif object.nil? + scope = Version.visible.where(:sharing => 'system') + filtered_versions_options(custom_field, scope, all_statuses) else [] end end + + def filtered_versions_options(custom_field, scope, all_statuses=false) + if !all_statuses && custom_field.version_status.is_a?(Array) + statuses = custom_field.version_status.map(&:to_s).reject(&:blank?) + if statuses.any? + scope = scope.where(:status => statuses.map(&:to_s)) + end + end + scope.sort.collect{|u| [u.to_s, u.id.to_s] } + end end end end diff --git a/test/unit/lib/redmine/field_format/version_field_format_test.rb b/test/unit/lib/redmine/field_format/version_field_format_test.rb index 191895145..0b3006c65 100644 --- a/test/unit/lib/redmine/field_format/version_field_format_test.rb +++ b/test/unit/lib/redmine/field_format/version_field_format_test.rb @@ -51,6 +51,15 @@ class Redmine::VersionFieldFormatTest < ActionView::TestCase assert_equal expected, field.possible_values_options(project).map(&:first) end + + def test_possible_values_options_should_return_system_shared_versions_without_project + field = IssueCustomField.new(:field_format => 'version') + version = Version.generate!(:project => Project.find(1), :status => 'open', :sharing => 'system') + + expected = Version.visible.where(:sharing => 'system').sort.map(&:name) + assert_include version.name, expected + assert_equal expected, field.possible_values_options.map(&:first) + end def test_possible_values_options_should_return_project_versions_with_selected_status field = IssueCustomField.new(:field_format => 'version', :version_status => ["open"]) From bbd24fe350a3bdba18eaa3d1a1d9329fd538260d Mon Sep 17 00:00:00 2001 From: Jean-Philippe Lang Date: Sat, 18 Jun 2016 06:17:34 +0000 Subject: [PATCH 0067/1117] Custom field List Link values to URL breaks on entries with spaces (#23067). git-svn-id: http://svn.redmine.org/redmine/trunk@15539 e93f8b46-1217-0410-a6f0-8f06a7374b81 --- app/views/welcome/index.html.erb | 3 +++ lib/redmine/field_format.rb | 4 +++- test/unit/lib/redmine/field_format/field_format_test.rb | 8 ++++++++ 3 files changed, 14 insertions(+), 1 deletion(-) diff --git a/app/views/welcome/index.html.erb b/app/views/welcome/index.html.erb index ba0924a7c..d6e840ad2 100644 --- a/app/views/welcome/index.html.erb +++ b/app/views/welcome/index.html.erb @@ -7,6 +7,9 @@ <%= call_hook(:view_welcome_index_left) %> +<%= link_to "Test", "http://foo/test bar" %> +<%= link_to "Test", "http://foo/test%20bar" %> +
<% if @news.any? %>
diff --git a/lib/redmine/field_format.rb b/lib/redmine/field_format.rb index 874220933..0347ca8da 100644 --- a/lib/redmine/field_format.rb +++ b/lib/redmine/field_format.rb @@ -15,6 +15,8 @@ # along with this program; if not, write to the Free Software # Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. +require 'uri' + module Redmine module FieldFormat def self.add(name, klass) @@ -212,7 +214,7 @@ module Redmine end end end - url + URI.encode(url) end protected :url_from_pattern diff --git a/test/unit/lib/redmine/field_format/field_format_test.rb b/test/unit/lib/redmine/field_format/field_format_test.rb index 1f3bc20ea..13177375b 100644 --- a/test/unit/lib/redmine/field_format/field_format_test.rb +++ b/test/unit/lib/redmine/field_format/field_format_test.rb @@ -74,4 +74,12 @@ class Redmine::FieldFormatTest < ActionView::TestCase assert_equal "bar", field.format.formatted_custom_value(self, custom_value, false) assert_equal 'bar', field.format.formatted_custom_value(self, custom_value, true) end + + def test_text_field_with_url_pattern_and_value_containing_a_space_should_format_as_link + field = IssueCustomField.new(:field_format => 'string', :url_pattern => 'http://foo/%value%') + custom_value = CustomValue.new(:custom_field => field, :customized => Issue.new, :value => "foo bar") + + assert_equal "foo bar", field.format.formatted_custom_value(self, custom_value, false) + assert_equal 'foo bar', field.format.formatted_custom_value(self, custom_value, true) + end end From 6cd84af522bbc1904d937440a6ad2628cd75fce9 Mon Sep 17 00:00:00 2001 From: Jean-Philippe Lang Date: Sat, 18 Jun 2016 06:42:25 +0000 Subject: [PATCH 0068/1117] Limits the tracker list in filters and issue counts (#285). git-svn-id: http://svn.redmine.org/redmine/trunk@15540 e93f8b46-1217-0410-a6f0-8f06a7374b81 --- app/controllers/projects_controller.rb | 2 +- app/controllers/reports_controller.rb | 4 ++-- app/models/project.rb | 28 +++++++++++++++++--------- app/models/query.rb | 2 +- app/models/tracker.rb | 23 +++++++++++++++++++++ test/unit/tracker_test.rb | 14 ++++++++++++- 6 files changed, 58 insertions(+), 15 deletions(-) diff --git a/app/controllers/projects_controller.rb b/app/controllers/projects_controller.rb index 7e1798a06..8753badde 100644 --- a/app/controllers/projects_controller.rb +++ b/app/controllers/projects_controller.rb @@ -137,7 +137,7 @@ class ProjectsController < ApplicationController @users_by_role = @project.users_by_role @subprojects = @project.children.visible.to_a @news = @project.news.limit(5).includes(:author, :project).reorder("#{News.table_name}.created_on DESC").to_a - @trackers = @project.rolled_up_trackers + @trackers = @project.rolled_up_trackers.visible cond = @project.project_condition(Setting.display_subprojects_issues?) diff --git a/app/controllers/reports_controller.rb b/app/controllers/reports_controller.rb index b7bf920fd..20279871e 100644 --- a/app/controllers/reports_controller.rb +++ b/app/controllers/reports_controller.rb @@ -20,7 +20,7 @@ class ReportsController < ApplicationController before_filter :find_project, :authorize, :find_issue_statuses def issue_report - @trackers = @project.trackers + @trackers = @project.rolled_up_trackers(false).visible @versions = @project.shared_versions.sort @priorities = IssuePriority.all.reverse @categories = @project.issue_categories @@ -43,7 +43,7 @@ class ReportsController < ApplicationController case params[:detail] when "tracker" @field = "tracker_id" - @rows = @project.trackers + @rows = @project.rolled_up_trackers(false).visible @data = Issue.by_tracker(@project) @report_title = l(:field_tracker) when "version" diff --git a/app/models/project.rb b/app/models/project.rb index e9b2647d4..b6bc13dde 100644 --- a/app/models/project.rb +++ b/app/models/project.rb @@ -421,16 +421,24 @@ class Project < ActiveRecord::Base save end - # Returns an array of the trackers used by the project and its active sub projects - def rolled_up_trackers - @rolled_up_trackers ||= - Tracker. - joins(projects: :enabled_modules). - where("#{Project.table_name}.lft >= ? AND #{Project.table_name}.rgt <= ? AND #{Project.table_name}.status <> ?", lft, rgt, STATUS_ARCHIVED). - where("#{EnabledModule.table_name}.name = ?", 'issue_tracking'). - uniq. - sorted. - to_a + # Returns a scope of the trackers used by the project and its active sub projects + def rolled_up_trackers(include_subprojects=true) + if include_subprojects + @rolled_up_trackers ||= rolled_up_trackers_base_scope. + where("#{Project.table_name}.lft >= ? AND #{Project.table_name}.rgt <= ?", lft, rgt) + else + rolled_up_trackers_base_scope. + where(:projects => {:id => id}) + end + end + + def rolled_up_trackers_base_scope + Tracker. + joins(projects: :enabled_modules). + where("#{Project.table_name}.status <> ?", STATUS_ARCHIVED). + where(:enabled_modules => {:name => 'issue_tracking'}). + uniq. + sorted end # Closes open and locked project versions that are completed diff --git a/app/models/query.rb b/app/models/query.rb index bb1807f6e..8fab46669 100644 --- a/app/models/query.rb +++ b/app/models/query.rb @@ -301,7 +301,7 @@ class Query < ActiveRecord::Base end def trackers - @trackers ||= project.nil? ? Tracker.sorted.to_a : project.rolled_up_trackers + @trackers ||= (project.nil? ? Tracker.all : project.rolled_up_trackers).visible.sorted end # Returns a hash of localized labels for all filter operators diff --git a/app/models/tracker.rb b/app/models/tracker.rb index 73cf569fc..5e4a24b51 100644 --- a/app/models/tracker.rb +++ b/app/models/tracker.rb @@ -46,6 +46,29 @@ class Tracker < ActiveRecord::Base scope :sorted, lambda { order(:position) } scope :named, lambda {|arg| where("LOWER(#{table_name}.name) = LOWER(?)", arg.to_s.strip)} + # Returns the trackers that are visible by the user. + # + # Examples: + # project.trackers.visible(user) + # => returns the trackers that are visible by the user in project + # + # Tracker.visible(user) + # => returns the trackers that are visible by the user in at least on project + scope :visible, lambda {|*args| + user = args.shift || User.current + condition = Project.allowed_to_condition(user, :view_issues) do |role, user| + unless role.permissions_all_trackers?(:view_issues) + tracker_ids = role.permissions_tracker_ids(:view_issues) + if tracker_ids.any? + "#{Tracker.table_name}.id IN (#{tracker_ids.join(',')})" + else + '1=0' + end + end + end + joins(:projects).where(condition).uniq + } + def to_s; name end def <=>(tracker) diff --git a/test/unit/tracker_test.rb b/test/unit/tracker_test.rb index 658dbb7f6..d45291fd7 100644 --- a/test/unit/tracker_test.rb +++ b/test/unit/tracker_test.rb @@ -18,7 +18,7 @@ require File.expand_path('../../test_helper', __FILE__) class TrackerTest < ActiveSupport::TestCase - fixtures :trackers, :workflows, :issue_statuses, :roles, :issues + fixtures :trackers, :workflows, :issue_statuses, :roles, :issues, :projects, :projects_trackers def test_sorted_scope assert_equal Tracker.all.sort, Tracker.sorted.to_a @@ -28,6 +28,18 @@ class TrackerTest < ActiveSupport::TestCase assert_equal Tracker.find_by_name('Feature'), Tracker.named('feature').first end + def test_visible_scope_chained_with_project_rolled_up_trackers + project = Project.find(1) + role = Role.generate! + role.add_permission! :view_issues + role.set_permission_trackers :view_issues, [2] + role.save! + user = User.generate! + User.add_to_project user, project, role + + assert_equal [2], project.rolled_up_trackers(false).visible(user).map(&:id) + end + def test_copy_workflows source = Tracker.find(1) rules_count = source.workflow_rules.count From b5bc7d460449714169392116483184c2efc9e55d Mon Sep 17 00:00:00 2001 From: Jean-Philippe Lang Date: Sat, 18 Jun 2016 06:45:52 +0000 Subject: [PATCH 0069/1117] Test broken by r15536 (#23083). git-svn-id: http://svn.redmine.org/redmine/trunk@15541 e93f8b46-1217-0410-a6f0-8f06a7374b81 --- test/unit/custom_field_version_format_test.rb | 1 + 1 file changed, 1 insertion(+) diff --git a/test/unit/custom_field_version_format_test.rb b/test/unit/custom_field_version_format_test.rb index f8a95174e..a394dabc8 100644 --- a/test/unit/custom_field_version_format_test.rb +++ b/test/unit/custom_field_version_format_test.rb @@ -25,6 +25,7 @@ class CustomFieldVersionFormatTest < ActiveSupport::TestCase end def test_possible_values_options_with_no_arguments + Version.delete_all assert_equal [], @field.possible_values_options assert_equal [], @field.possible_values_options(nil) end From b58d01de11246d78cfa95bd3fe7053b1e223d147 Mon Sep 17 00:00:00 2001 From: Jean-Philippe Lang Date: Sat, 18 Jun 2016 06:50:32 +0000 Subject: [PATCH 0070/1117] Move subprojects to their own div on project overview. git-svn-id: http://svn.redmine.org/redmine/trunk@15543 e93f8b46-1217-0410-a6f0-8f06a7374b81 --- app/views/projects/show.html.erb | 14 +++++++++----- 1 file changed, 9 insertions(+), 5 deletions(-) diff --git a/app/views/projects/show.html.erb b/app/views/projects/show.html.erb index 007f0fab2..3e384530c 100644 --- a/app/views/projects/show.html.erb +++ b/app/views/projects/show.html.erb @@ -23,15 +23,11 @@ <%= textilizable @project.description %>
<% end %> - <% if @project.homepage.present? || @subprojects.any? || @project.visible_custom_field_values.any?(&:present?) %> + <% if @project.homepage.present? || @project.visible_custom_field_values.any?(&:present?) %>
    <% unless @project.homepage.blank? %>
  • <%=l(:field_homepage)%>: <%= link_to_if uri_with_safe_scheme?(@project.homepage), @project.homepage, @project.homepage %>
  • <% end %> - <% if @subprojects.any? %> -
  • <%=l(:label_subproject_plural)%>: - <%= @subprojects.collect{|p| link_to p, project_path(p)}.join(", ").html_safe %>
  • - <% end %> <% render_custom_field_values(@project) do |custom_field, formatted| %>
  • <%= custom_field.name %>: <%= formatted %>
  • <% end %> @@ -95,6 +91,14 @@

    <%= link_to l(:label_news_view_all), project_news_index_path(@project) %>

<% end %> + + <% if @subprojects.any? %> +
+

<%=l(:label_subproject_plural)%>

+ <%= @subprojects.collect{|p| link_to p, project_path(p)}.join(", ").html_safe %> +
+ <% end %> + <%= call_hook(:view_projects_show_right, :project => @project) %> From 93afc01e06abadd1330851d2ddf1122640144d2c Mon Sep 17 00:00:00 2001 From: Jean-Philippe Lang Date: Sat, 18 Jun 2016 06:51:59 +0000 Subject: [PATCH 0071/1117] Preload issue status when displaying activity. git-svn-id: http://svn.redmine.org/redmine/trunk@15545 e93f8b46-1217-0410-a6f0-8f06a7374b81 --- app/models/issue.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app/models/issue.rb b/app/models/issue.rb index 98e348d6a..9cf29532a 100644 --- a/app/models/issue.rb +++ b/app/models/issue.rb @@ -54,7 +54,7 @@ class Issue < ActiveRecord::Base :url => Proc.new {|o| {:controller => 'issues', :action => 'show', :id => o.id}}, :type => Proc.new {|o| 'issue' + (o.closed? ? ' closed' : '') } - acts_as_activity_provider :scope => preload(:project, :author, :tracker), + acts_as_activity_provider :scope => preload(:project, :author, :tracker, :status), :author_key => :author_id DONE_RATIO_OPTIONS = %w(issue_field issue_status) From ffdcb22ccb785a1efad942c250267c181d84c7df Mon Sep 17 00:00:00 2001 From: Jean-Philippe Lang Date: Sat, 18 Jun 2016 07:07:41 +0000 Subject: [PATCH 0072/1117] Ability to define a default assigned_to when receiving emails (#23020). git-svn-id: http://svn.redmine.org/redmine/trunk@15547 e93f8b46-1217-0410-a6f0-8f06a7374b81 --- app/models/mail_handler.rb | 2 +- extra/mail_handler/rdm-mailhandler.rb | 1 + lib/tasks/email.rake | 1 + test/unit/mail_handler_test.rb | 11 +++++++++++ 4 files changed, 14 insertions(+), 1 deletion(-) diff --git a/app/models/mail_handler.rb b/app/models/mail_handler.rb index a619f115d..28841310e 100644 --- a/app/models/mail_handler.rb +++ b/app/models/mail_handler.rb @@ -62,7 +62,7 @@ class MailHandler < ActionMailer::Base # Use when receiving emails with rake tasks def self.extract_options_from_env(env) options = {:issue => {}} - %w(project status tracker category priority fixed_version).each do |option| + %w(project status tracker category priority assigned_to fixed_version).each do |option| options[:issue][option.to_sym] = env[option] if env[option] end %w(allow_override unknown_user no_permission_check no_account_notice default_group project_from_subaddress).each do |option| diff --git a/extra/mail_handler/rdm-mailhandler.rb b/extra/mail_handler/rdm-mailhandler.rb index 7784f48dd..4a74df15a 100644 --- a/extra/mail_handler/rdm-mailhandler.rb +++ b/extra/mail_handler/rdm-mailhandler.rb @@ -93,6 +93,7 @@ class RedmineMailHandler opts.on("-t", "--tracker TRACKER", "name of the target tracker") {|v| self.issue_attributes['tracker'] = v} opts.on( "--category CATEGORY", "name of the target category") {|v| self.issue_attributes['category'] = v} opts.on( "--priority PRIORITY", "name of the target priority") {|v| self.issue_attributes['priority'] = v} + opts.on( "--assigned-to ASSIGNEE", "assignee (username or group name)") {|v| self.issue_attributes['assigned_to'] = v} opts.on( "--fixed-version VERSION","name of the target version") {|v| self.issue_attributes['fixed_version'] = v} opts.on( "--private", "create new issues as private") {|v| self.issue_attributes['is_private'] = '1'} opts.on("-o", "--allow-override ATTRS", "allow email content to set attributes values", diff --git a/lib/tasks/email.rake b/lib/tasks/email.rake index fe6fb92ab..1b62abb23 100644 --- a/lib/tasks/email.rake +++ b/lib/tasks/email.rake @@ -64,6 +64,7 @@ Issue attributes control options: tracker=TRACKER name of the target tracker category=CATEGORY name of the target category priority=PRIORITY name of the target priority + assigned_to=ASSIGNEE assignee (username or group name) fixed_version=VERSION name of the target version private create new issues as private allow_override=ATTRS allow email content to set attributes values diff --git a/test/unit/mail_handler_test.rb b/test/unit/mail_handler_test.rb index f08f2a6cd..07d579a5d 100644 --- a/test/unit/mail_handler_test.rb +++ b/test/unit/mail_handler_test.rb @@ -140,6 +140,17 @@ class MailHandlerTest < ActiveSupport::TestCase assert_equal 'Alpha', issue.reload.fixed_version.name end + def test_add_issue_with_default_assigned_to + # This email contains: 'Project: onlinestore' + issue = submit_email( + 'ticket_on_given_project.eml', + :issue => {:assigned_to => 'jsmith'} + ) + assert issue.is_a?(Issue) + assert !issue.new_record? + assert_equal 'jsmith', issue.reload.assigned_to.login + end + def test_add_issue_with_status_override # This email contains: 'Project: onlinestore' and 'Status: Resolved' issue = submit_email('ticket_on_given_project.eml', :allow_override => ['status']) From 038789fbccf7b5bfc4b2d405a800de9e5409a322 Mon Sep 17 00:00:00 2001 From: Jean-Philippe Lang Date: Sat, 18 Jun 2016 07:12:30 +0000 Subject: [PATCH 0073/1117] Preload custom values when displaying the roadmap. git-svn-id: http://svn.redmine.org/redmine/trunk@15548 e93f8b46-1217-0410-a6f0-8f06a7374b81 --- app/controllers/versions_controller.rb | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/app/controllers/versions_controller.rb b/app/controllers/versions_controller.rb index e52f4425b..beb0f16a3 100644 --- a/app/controllers/versions_controller.rb +++ b/app/controllers/versions_controller.rb @@ -36,8 +36,8 @@ class VersionsController < ApplicationController @with_subprojects = params[:with_subprojects].nil? ? Setting.display_subprojects_issues? : (params[:with_subprojects] == '1') project_ids = @with_subprojects ? @project.self_and_descendants.collect(&:id) : [@project.id] - @versions = @project.shared_versions || [] - @versions += @project.rolled_up_versions.visible if @with_subprojects + @versions = @project.shared_versions.preload(:custom_values) + @versions += @project.rolled_up_versions.visible.preload(:custom_values) if @with_subprojects @versions = @versions.uniq.sort unless params[:completed] @completed_versions = @versions.select(&:completed?) From dc7402dea7abd051f1dfa2cd5cf758cf0827aa27 Mon Sep 17 00:00:00 2001 From: Jean-Philippe Lang Date: Sat, 18 Jun 2016 07:32:33 +0000 Subject: [PATCH 0074/1117] Remove debug stuff introduced in r15539. git-svn-id: http://svn.redmine.org/redmine/trunk@15550 e93f8b46-1217-0410-a6f0-8f06a7374b81 --- app/views/welcome/index.html.erb | 3 --- 1 file changed, 3 deletions(-) diff --git a/app/views/welcome/index.html.erb b/app/views/welcome/index.html.erb index d6e840ad2..ba0924a7c 100644 --- a/app/views/welcome/index.html.erb +++ b/app/views/welcome/index.html.erb @@ -7,9 +7,6 @@ <%= call_hook(:view_welcome_index_left) %> -<%= link_to "Test", "http://foo/test bar" %> -<%= link_to "Test", "http://foo/test%20bar" %> -
<% if @news.any? %>
From 42e8ff4493e59b7fa7e54635e138522137654565 Mon Sep 17 00:00:00 2001 From: Jean-Philippe Lang Date: Sat, 18 Jun 2016 07:42:51 +0000 Subject: [PATCH 0075/1117] Add missing links to images in issue history (#22058). git-svn-id: http://svn.redmine.org/redmine/trunk@15551 e93f8b46-1217-0410-a6f0-8f06a7374b81 --- app/helpers/issues_helper.rb | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/app/helpers/issues_helper.rb b/app/helpers/issues_helper.rb index b43dc3e94..db9483274 100644 --- a/app/helpers/issues_helper.rb +++ b/app/helpers/issues_helper.rb @@ -451,7 +451,8 @@ module IssuesHelper atta = detail.journal.journalized.attachments.detect {|a| a.id == detail.prop_key.to_i} # Link to the attachment if it has not been removed value = link_to_attachment(atta, :download => true, :only_path => options[:only_path]) - if options[:only_path] != false && atta.is_text? + if options[:only_path] != false && (atta.is_text? || atta.is_image?) + value += ' ' value += link_to(l(:button_view), { :controller => 'attachments', :action => 'show', :id => atta, :filename => atta.filename }, From d33da51ebca7bfe6f2919c338e690e2e2650e1d7 Mon Sep 17 00:00:00 2001 From: Jean-Philippe Lang Date: Sat, 18 Jun 2016 07:44:05 +0000 Subject: [PATCH 0076/1117] Style no longer used. git-svn-id: http://svn.redmine.org/redmine/trunk@15552 e93f8b46-1217-0410-a6f0-8f06a7374b81 --- public/stylesheets/application.css | 1 - 1 file changed, 1 deletion(-) diff --git a/public/stylesheets/application.css b/public/stylesheets/application.css index 3ab2eccf2..deead0d44 100644 --- a/public/stylesheets/application.css +++ b/public/stylesheets/application.css @@ -429,7 +429,6 @@ div#issue-changesets div.changeset { padding: 4px;} div#issue-changesets div.changeset { border-bottom: 1px solid #ddd; } div#issue-changesets p { margin-top: 0; margin-bottom: 1em;} -.journal ul.details img {margin:0 0 -3px 4px;} div.journal {overflow:auto;} div.journal.private-notes {border-left:2px solid #d22; padding-left:4px; margin-left:-6px;} div.journal ul.details {color:#959595; margin-bottom: 1.5em;} From 53cf59f672d95fdc19883aaa45f03c7ea04ce820 Mon Sep 17 00:00:00 2001 From: Jean-Philippe Lang Date: Sat, 18 Jun 2016 07:50:25 +0000 Subject: [PATCH 0077/1117] Sets margin around thmubnails. git-svn-id: http://svn.redmine.org/redmine/trunk@15555 e93f8b46-1217-0410-a6f0-8f06a7374b81 --- public/stylesheets/application.css | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/public/stylesheets/application.css b/public/stylesheets/application.css index deead0d44..04194dee0 100644 --- a/public/stylesheets/application.css +++ b/public/stylesheets/application.css @@ -686,7 +686,7 @@ div.attachments p { margin:4px 0 2px 0; } div.attachments img { vertical-align: middle; } div.attachments span.author { font-size: 0.9em; color: #888; } -div.thumbnails {margin-top:0.6em;} +div.thumbnails {margin:0.6em;} div.thumbnails div {background:#fff;border:2px solid #ddd;display:inline-block;margin-right:2px;} div.thumbnails img {margin: 3px; vertical-align: middle;} #history div.thumbnails {margin-left: 2em;} From 03c957670d3c914254e36fe394e45ef473205961 Mon Sep 17 00:00:00 2001 From: Jean-Philippe Lang Date: Sat, 18 Jun 2016 10:24:52 +0000 Subject: [PATCH 0078/1117] Adds missing option to the Mail Handler test form. git-svn-id: http://svn.redmine.org/redmine/trunk@15561 e93f8b46-1217-0410-a6f0-8f06a7374b81 --- app/views/mail_handler/new.html.erb | 2 ++ 1 file changed, 2 insertions(+) diff --git a/app/views/mail_handler/new.html.erb b/app/views/mail_handler/new.html.erb index a9d069650..25cf05bae 100644 --- a/app/views/mail_handler/new.html.erb +++ b/app/views/mail_handler/new.html.erb @@ -33,6 +33,8 @@ + + From 483657f7c007fbd34cfe378cef29db4e3f3a9e08 Mon Sep 17 00:00:00 2001 From: Jean-Philippe Lang Date: Sat, 18 Jun 2016 10:47:02 +0000 Subject: [PATCH 0079/1117] Adjust i18n strings. git-svn-id: http://svn.redmine.org/redmine/trunk@15562 e93f8b46-1217-0410-a6f0-8f06a7374b81 --- app/views/imports/show.html.erb | 4 ++-- config/locales/ar.yml | 5 ++--- config/locales/az.yml | 5 ++--- config/locales/bg.yml | 5 ++--- config/locales/bs.yml | 5 ++--- config/locales/ca.yml | 2 +- config/locales/cs.yml | 5 ++--- config/locales/da.yml | 5 ++--- config/locales/de.yml | 4 ++-- config/locales/el.yml | 5 ++--- config/locales/en-GB.yml | 5 ++--- config/locales/en.yml | 4 ++-- config/locales/es-PA.yml | 5 ++--- config/locales/es.yml | 5 ++--- config/locales/et.yml | 4 ++-- config/locales/eu.yml | 5 ++--- config/locales/fa.yml | 5 ++--- config/locales/fi.yml | 5 ++--- config/locales/fr.yml | 4 ++-- config/locales/gl.yml | 5 ++--- config/locales/he.yml | 5 ++--- config/locales/hr.yml | 5 ++--- config/locales/hu.yml | 5 ++--- config/locales/id.yml | 5 ++--- config/locales/it.yml | 5 ++--- config/locales/ja.yml | 4 ++-- config/locales/ko.yml | 4 ++-- config/locales/lt.yml | 5 ++--- config/locales/lv.yml | 5 ++--- config/locales/mk.yml | 5 ++--- config/locales/mn.yml | 5 ++--- config/locales/nl.yml | 5 ++--- config/locales/no.yml | 5 ++--- config/locales/pl.yml | 5 ++--- config/locales/pt-BR.yml | 5 ++--- config/locales/pt.yml | 4 ++-- config/locales/ro.yml | 5 ++--- config/locales/ru.yml | 4 ++-- config/locales/sk.yml | 5 ++--- config/locales/sl.yml | 5 ++--- config/locales/sq.yml | 5 ++--- config/locales/sr-YU.yml | 5 ++--- config/locales/sr.yml | 5 ++--- config/locales/sv.yml | 5 ++--- config/locales/th.yml | 5 ++--- config/locales/tr.yml | 4 ++-- config/locales/uk.yml | 5 ++--- config/locales/vi.yml | 5 ++--- config/locales/zh-TW.yml | 4 ++-- config/locales/zh.yml | 2 +- 50 files changed, 98 insertions(+), 135 deletions(-) diff --git a/app/views/imports/show.html.erb b/app/views/imports/show.html.erb index a50db99fe..3a0d67611 100644 --- a/app/views/imports/show.html.erb +++ b/app/views/imports/show.html.erb @@ -1,7 +1,7 @@

<%= l(:label_import_issues) %>

<% if @import.saved_items.count > 0 %> -

<%= l(:notice_import_finished, :count => @import.saved_items.count) %>

+

<%= l(:notice_import_finished, :count => @import.saved_items.count) %>:

    <% @import.saved_objects.each do |issue| %> @@ -11,7 +11,7 @@ <% end %> <% if @import.unsaved_items.count > 0 %> -

    <%= l(:notice_import_finished_with_errors, :count => @import.unsaved_items.count, :total => @import.total_items) %>

    +

    <%= l(:notice_import_finished_with_errors, :count => @import.unsaved_items.count, :total => @import.total_items) %>:

diff --git a/config/locales/ar.yml b/config/locales/ar.yml index a265f6243..da90e8c60 100644 --- a/config/locales/ar.yml +++ b/config/locales/ar.yml @@ -1148,9 +1148,8 @@ ar: label_member_management_selected_roles_only: Only these roles label_password_required: Confirm your password to continue label_total_spent_time: الوقت الذي تم انفاقه كاملا - notice_import_finished: All %{count} items have been imported. - notice_import_finished_with_errors: ! '%{count} out of %{total} items could not be - imported.' + notice_import_finished: "%{count} items have been imported" + notice_import_finished_with_errors: "%{count} out of %{total} items could not be imported" error_invalid_file_encoding: The file is not a valid %{encoding} encoded file error_invalid_csv_file_or_settings: The file is not a CSV file or does not match the settings below diff --git a/config/locales/az.yml b/config/locales/az.yml index f29566d63..fdc6d30c0 100644 --- a/config/locales/az.yml +++ b/config/locales/az.yml @@ -1243,9 +1243,8 @@ az: label_member_management_selected_roles_only: Only these roles label_password_required: Confirm your password to continue label_total_spent_time: Cəmi sərf olunan vaxt - notice_import_finished: All %{count} items have been imported. - notice_import_finished_with_errors: ! '%{count} out of %{total} items could not be - imported.' + notice_import_finished: "%{count} items have been imported" + notice_import_finished_with_errors: "%{count} out of %{total} items could not be imported" error_invalid_file_encoding: The file is not a valid %{encoding} encoded file error_invalid_csv_file_or_settings: The file is not a CSV file or does not match the settings below diff --git a/config/locales/bg.yml b/config/locales/bg.yml index 0e4fccaf9..9bb3767d1 100644 --- a/config/locales/bg.yml +++ b/config/locales/bg.yml @@ -186,9 +186,8 @@ bg: notice_account_deleted: Вашият профил беше премахнат без възможност за възстановяване. notice_user_successful_create: Потребител %{id} е създаден. notice_new_password_must_be_different: Новата парола трябва да бъде различна от сегашната парола - notice_import_finished: Всички %{count} обекта бяха импортирани. - notice_import_finished_with_errors: ! '%{count} от общо %{total} обекта не бяха инпортирани.' - + notice_import_finished: "%{count} обекта бяха импортирани" + notice_import_finished_with_errors: "%{count} от общо %{total} обекта не бяха инпортирани" error_can_t_load_default_data: "Грешка при зареждане на началната информация: %{value}" error_scm_not_found: Несъществуващ обект в хранилището. error_scm_command_failed: "Грешка при опит за комуникация с хранилище: %{value}" diff --git a/config/locales/bs.yml b/config/locales/bs.yml index d65fc1099..fb8358d73 100644 --- a/config/locales/bs.yml +++ b/config/locales/bs.yml @@ -1161,9 +1161,8 @@ bs: label_member_management_selected_roles_only: Only these roles label_password_required: Confirm your password to continue label_total_spent_time: Overall spent time - notice_import_finished: All %{count} items have been imported. - notice_import_finished_with_errors: ! '%{count} out of %{total} items could not be - imported.' + notice_import_finished: "%{count} items have been imported" + notice_import_finished_with_errors: "%{count} out of %{total} items could not be imported" error_invalid_file_encoding: The file is not a valid %{encoding} encoded file error_invalid_csv_file_or_settings: The file is not a CSV file or does not match the settings below diff --git a/config/locales/ca.yml b/config/locales/ca.yml index 8ab7b0f4b..6fee1831b 100644 --- a/config/locales/ca.yml +++ b/config/locales/ca.yml @@ -1144,7 +1144,7 @@ ca: label_member_management_selected_roles_only: "Només aquests rols" label_password_required: "Confirmi la seva contrasenya per continuar" label_total_spent_time: "Temps total invertit" - notice_import_finished: "Els %{count} element/s han sigut importats." + notice_import_finished: "%{count} element/s han sigut importats" notice_import_finished_with_errors: "%{count} de %{total} elements no s'ha pogut importar" error_invalid_file_encoding: "El fitxer no utilitza una codificació valida (%{encoding})" error_invalid_csv_file_or_settings: "El fitxer no es un CSV o no coincideix amb la configuració" diff --git a/config/locales/cs.yml b/config/locales/cs.yml index c09b6d013..52dcfba94 100644 --- a/config/locales/cs.yml +++ b/config/locales/cs.yml @@ -1149,9 +1149,8 @@ cs: label_member_management_selected_roles_only: Pouze tyto role label_password_required: Pro pokračování potvrďte vaše heslo label_total_spent_time: Celkem strávený čas - notice_import_finished: Všech %{count} položek bylo naimportováno. - notice_import_finished_with_errors: ! '%{count} z %{total} položek nemohlo být - naimportováno.' + notice_import_finished: "%{count} položek bylo naimportováno" + notice_import_finished_with_errors: "%{count} z %{total} položek nemohlo být naimportováno" error_invalid_file_encoding: Soubor není platným souborem s kódováním %{encoding} error_invalid_csv_file_or_settings: Soubor není CSV soubor nebo neodpovídá níže uvedenému nastavení diff --git a/config/locales/da.yml b/config/locales/da.yml index 77756968f..bfe3d9f92 100644 --- a/config/locales/da.yml +++ b/config/locales/da.yml @@ -1165,9 +1165,8 @@ da: label_member_management_selected_roles_only: Only these roles label_password_required: Confirm your password to continue label_total_spent_time: Overordnet forbrug af tid - notice_import_finished: All %{count} items have been imported. - notice_import_finished_with_errors: ! '%{count} out of %{total} items could not be - imported.' + notice_import_finished: "%{count} items have been imported" + notice_import_finished_with_errors: "%{count} out of %{total} items could not be imported" error_invalid_file_encoding: The file is not a valid %{encoding} encoded file error_invalid_csv_file_or_settings: The file is not a CSV file or does not match the settings below diff --git a/config/locales/de.yml b/config/locales/de.yml index 59ce6e6a8..cc542b91a 100644 --- a/config/locales/de.yml +++ b/config/locales/de.yml @@ -1167,8 +1167,8 @@ de: label_member_management_all_roles: Alle Rollen label_member_management_selected_roles_only: Nur diese Rollen label_total_spent_time: Aufgewendete Zeit aller Projekte anzeigen - notice_import_finished: Alle %{count} Einträge wurden importiert. - notice_import_finished_with_errors: ! '%{count} von %{total} Einträgen konnten nicht importiert werden.' + notice_import_finished: "%{count} Einträge wurden importiert" + notice_import_finished_with_errors: "%{count} von %{total} Einträgen konnten nicht importiert werden" error_invalid_file_encoding: Die Datei ist keine gültige %{encoding} kodierte Datei error_invalid_csv_file_or_settings: Die Datei ist keine CSV-Datei oder entspricht nicht den Einstellungen unten error_can_not_read_import_file: Beim Einlesen der Datei ist ein Fehler aufgetreten diff --git a/config/locales/el.yml b/config/locales/el.yml index 63c6a774a..98cfb588b 100644 --- a/config/locales/el.yml +++ b/config/locales/el.yml @@ -1148,9 +1148,8 @@ el: label_member_management_selected_roles_only: Only these roles label_password_required: Confirm your password to continue label_total_spent_time: Overall spent time - notice_import_finished: All %{count} items have been imported. - notice_import_finished_with_errors: ! '%{count} out of %{total} items could not be - imported.' + notice_import_finished: "%{count} items have been imported" + notice_import_finished_with_errors: "%{count} out of %{total} items could not be imported" error_invalid_file_encoding: The file is not a valid %{encoding} encoded file error_invalid_csv_file_or_settings: The file is not a CSV file or does not match the settings below diff --git a/config/locales/en-GB.yml b/config/locales/en-GB.yml index 0617b2227..5c97dfa99 100644 --- a/config/locales/en-GB.yml +++ b/config/locales/en-GB.yml @@ -1153,9 +1153,8 @@ en-GB: label_member_management_selected_roles_only: Only these roles label_password_required: Confirm your password to continue label_total_spent_time: Overall spent time - notice_import_finished: All %{count} items have been imported. - notice_import_finished_with_errors: ! '%{count} out of %{total} items could not be - imported.' + notice_import_finished: "%{count} items have been imported" + notice_import_finished_with_errors: "%{count} out of %{total} items could not be imported" error_invalid_file_encoding: The file is not a valid %{encoding} encoded file error_invalid_csv_file_or_settings: The file is not a CSV file or does not match the settings below diff --git a/config/locales/en.yml b/config/locales/en.yml index 908aa119a..7c07adbe6 100644 --- a/config/locales/en.yml +++ b/config/locales/en.yml @@ -183,8 +183,8 @@ en: notice_account_deleted: "Your account has been permanently deleted." notice_user_successful_create: "User %{id} created." notice_new_password_must_be_different: The new password must be different from the current password - notice_import_finished: "All %{count} items have been imported." - notice_import_finished_with_errors: "%{count} out of %{total} items could not be imported." + notice_import_finished: "%{count} items have been imported" + notice_import_finished_with_errors: "%{count} out of %{total} items could not be imported" error_can_t_load_default_data: "Default configuration could not be loaded: %{value}" error_scm_not_found: "The entry or revision was not found in the repository." diff --git a/config/locales/es-PA.yml b/config/locales/es-PA.yml index e7072a7cd..da84fff59 100644 --- a/config/locales/es-PA.yml +++ b/config/locales/es-PA.yml @@ -1183,9 +1183,8 @@ es-PA: label_member_management_selected_roles_only: Sólo estos roles label_password_required: Confirme su contraseña para continuar label_total_spent_time: Tiempo total dedicado - notice_import_finished: Todos %{count} los elementos han sido importados. - notice_import_finished_with_errors: ! '%{count} de %{total} elementos no pudieron ser - importados.' + notice_import_finished: "%{count} elementos han sido importados" + notice_import_finished_with_errors: "%{count} de %{total} elementos no pudieron ser importados" error_invalid_file_encoding: El archivo no utiliza %{encoding} válida error_invalid_csv_file_or_settings: El archivo no es un archivo CSV o no coincide con la configuración diff --git a/config/locales/es.yml b/config/locales/es.yml index 6cef342f5..7a59cbefb 100644 --- a/config/locales/es.yml +++ b/config/locales/es.yml @@ -1181,9 +1181,8 @@ es: label_member_management_selected_roles_only: Sólo estos roles label_password_required: Confirme su contraseña para continuar label_total_spent_time: Tiempo total dedicado - notice_import_finished: Todos %{count} los elementos han sido importados. - notice_import_finished_with_errors: ! '%{count} de %{total} elementos no pudieron ser - importados.' + notice_import_finished: "%{count} elementos han sido importados" + notice_import_finished_with_errors: "%{count} de %{total} elementos no pudieron ser importados" error_invalid_file_encoding: El archivo no utiliza %{encoding} válida error_invalid_csv_file_or_settings: El archivo no es un archivo CSV o no coincide con la configuración diff --git a/config/locales/et.yml b/config/locales/et.yml index 510c9236c..5457f315b 100644 --- a/config/locales/et.yml +++ b/config/locales/et.yml @@ -1154,8 +1154,8 @@ et: label_member_management_selected_roles_only: "Ainult need rollid" label_password_required: "Jätkamiseks kinnita oma parool" label_total_spent_time: "Kokku kulutatud aeg" - notice_import_finished: "Kõik %{count} rida imporditud." - notice_import_finished_with_errors: ! '%{count} rida %{total}st ei õnnestunud importida.' + notice_import_finished: "%{count} rida imporditud" + notice_import_finished_with_errors: "%{count} rida %{total}st ei õnnestunud importida" error_invalid_file_encoding: "See fail ei ole õige %{encoding} kodeeringuga" error_invalid_csv_file_or_settings: "See fail kas ei ole CSV formaadis või ei klapi allolevate sätetega" error_can_not_read_import_file: "Importfaili sisselugemisel ilmnes viga" diff --git a/config/locales/eu.yml b/config/locales/eu.yml index ebece4218..ff8a45063 100644 --- a/config/locales/eu.yml +++ b/config/locales/eu.yml @@ -1149,9 +1149,8 @@ eu: label_member_management_selected_roles_only: Only these roles label_password_required: Confirm your password to continue label_total_spent_time: Igarotako denbora guztira - notice_import_finished: All %{count} items have been imported. - notice_import_finished_with_errors: ! '%{count} out of %{total} items could not be - imported.' + notice_import_finished: "%{count} items have been imported" + notice_import_finished_with_errors: "%{count} out of %{total} items could not be imported" error_invalid_file_encoding: The file is not a valid %{encoding} encoded file error_invalid_csv_file_or_settings: The file is not a CSV file or does not match the settings below diff --git a/config/locales/fa.yml b/config/locales/fa.yml index c9d527f67..2f55b05de 100644 --- a/config/locales/fa.yml +++ b/config/locales/fa.yml @@ -1149,9 +1149,8 @@ fa: label_member_management_selected_roles_only: Only these roles label_password_required: Confirm your password to continue label_total_spent_time: زمان صرف شده روی هم - notice_import_finished: All %{count} items have been imported. - notice_import_finished_with_errors: ! '%{count} out of %{total} items could not be - imported.' + notice_import_finished: "%{count} items have been imported" + notice_import_finished_with_errors: "%{count} out of %{total} items could not be imported" error_invalid_file_encoding: The file is not a valid %{encoding} encoded file error_invalid_csv_file_or_settings: The file is not a CSV file or does not match the settings below diff --git a/config/locales/fi.yml b/config/locales/fi.yml index c2449b0f1..9d0bb663f 100644 --- a/config/locales/fi.yml +++ b/config/locales/fi.yml @@ -1169,9 +1169,8 @@ fi: label_member_management_selected_roles_only: Only these roles label_password_required: Confirm your password to continue label_total_spent_time: Overall spent time - notice_import_finished: All %{count} items have been imported. - notice_import_finished_with_errors: ! '%{count} out of %{total} items could not be - imported.' + notice_import_finished: "%{count} items have been imported" + notice_import_finished_with_errors: "%{count} out of %{total} items could not be imported" error_invalid_file_encoding: The file is not a valid %{encoding} encoded file error_invalid_csv_file_or_settings: The file is not a CSV file or does not match the settings below diff --git a/config/locales/fr.yml b/config/locales/fr.yml index 49803506b..bf9670212 100644 --- a/config/locales/fr.yml +++ b/config/locales/fr.yml @@ -203,8 +203,8 @@ fr: notice_account_deleted: "Votre compte a été définitivement supprimé." notice_user_successful_create: "Utilisateur %{id} créé." notice_new_password_must_be_different: Votre nouveau mot de passe doit être différent de votre mot de passe actuel - notice_import_finished: "Les %{count} éléments ont été importé(s)." - notice_import_finished_with_errors: "%{count} élément(s) sur %{total} n'ont pas pu être importé(s)." + notice_import_finished: "%{count} éléments ont été importé(s)" + notice_import_finished_with_errors: "%{count} élément(s) sur %{total} n'ont pas pu être importé(s)" error_can_t_load_default_data: "Une erreur s'est produite lors du chargement du paramétrage : %{value}" error_scm_not_found: "L'entrée et/ou la révision demandée n'existe pas dans le dépôt." diff --git a/config/locales/gl.yml b/config/locales/gl.yml index d0069b243..5145cd26f 100644 --- a/config/locales/gl.yml +++ b/config/locales/gl.yml @@ -1156,9 +1156,8 @@ gl: label_member_management_selected_roles_only: Only these roles label_password_required: Confirm your password to continue label_total_spent_time: "Tempo total empregado" - notice_import_finished: All %{count} items have been imported. - notice_import_finished_with_errors: ! '%{count} out of %{total} items could not be - imported.' + notice_import_finished: "%{count} items have been imported" + notice_import_finished_with_errors: "%{count} out of %{total} items could not be imported" error_invalid_file_encoding: The file is not a valid %{encoding} encoded file error_invalid_csv_file_or_settings: The file is not a CSV file or does not match the settings below diff --git a/config/locales/he.yml b/config/locales/he.yml index b17742433..8fb49ddca 100644 --- a/config/locales/he.yml +++ b/config/locales/he.yml @@ -1153,9 +1153,8 @@ he: label_member_management_selected_roles_only: Only these roles label_password_required: Confirm your password to continue label_total_spent_time: זמן שהושקע סה"כ - notice_import_finished: All %{count} items have been imported. - notice_import_finished_with_errors: ! '%{count} out of %{total} items could not be - imported.' + notice_import_finished: "%{count} items have been imported" + notice_import_finished_with_errors: "%{count} out of %{total} items could not be imported" error_invalid_file_encoding: The file is not a valid %{encoding} encoded file error_invalid_csv_file_or_settings: The file is not a CSV file or does not match the settings below diff --git a/config/locales/hr.yml b/config/locales/hr.yml index 9e37b7a2e..754fa360e 100644 --- a/config/locales/hr.yml +++ b/config/locales/hr.yml @@ -1147,9 +1147,8 @@ hr: label_member_management_selected_roles_only: Only these roles label_password_required: Confirm your password to continue label_total_spent_time: Overall spent time - notice_import_finished: All %{count} items have been imported. - notice_import_finished_with_errors: ! '%{count} out of %{total} items could not be - imported.' + notice_import_finished: "%{count} items have been imported" + notice_import_finished_with_errors: "%{count} out of %{total} items could not be imported" error_invalid_file_encoding: The file is not a valid %{encoding} encoded file error_invalid_csv_file_or_settings: The file is not a CSV file or does not match the settings below diff --git a/config/locales/hu.yml b/config/locales/hu.yml index b8e9058f8..e165045c4 100644 --- a/config/locales/hu.yml +++ b/config/locales/hu.yml @@ -1167,9 +1167,8 @@ label_member_management_selected_roles_only: Only these roles label_password_required: Confirm your password to continue label_total_spent_time: Összes ráfordított idő - notice_import_finished: All %{count} items have been imported. - notice_import_finished_with_errors: ! '%{count} out of %{total} items could not be - imported.' + notice_import_finished: "%{count} items have been imported" + notice_import_finished_with_errors: "%{count} out of %{total} items could not be imported" error_invalid_file_encoding: The file is not a valid %{encoding} encoded file error_invalid_csv_file_or_settings: The file is not a CSV file or does not match the settings below diff --git a/config/locales/id.yml b/config/locales/id.yml index 750eb2e44..803ae6859 100644 --- a/config/locales/id.yml +++ b/config/locales/id.yml @@ -1152,9 +1152,8 @@ id: label_member_management_selected_roles_only: Only these roles label_password_required: Confirm your password to continue label_total_spent_time: Overall spent time - notice_import_finished: All %{count} items have been imported. - notice_import_finished_with_errors: ! '%{count} out of %{total} items could not be - imported.' + notice_import_finished: "%{count} items have been imported" + notice_import_finished_with_errors: "%{count} out of %{total} items could not be imported" error_invalid_file_encoding: The file is not a valid %{encoding} encoded file error_invalid_csv_file_or_settings: The file is not a CSV file or does not match the settings below diff --git a/config/locales/it.yml b/config/locales/it.yml index 57afce9f0..ed025e83a 100644 --- a/config/locales/it.yml +++ b/config/locales/it.yml @@ -1143,9 +1143,8 @@ it: label_member_management_selected_roles_only: Solo questi ruoli label_password_required: Confirm your password to continue label_total_spent_time: Totale tempo impiegato - notice_import_finished: All %{count} items have been imported. - notice_import_finished_with_errors: ! '%{count} out of %{total} items could not be - imported.' + notice_import_finished: "%{count} items have been imported" + notice_import_finished_with_errors: "%{count} out of %{total} items could not be imported" error_invalid_file_encoding: The file is not a valid %{encoding} encoded file error_invalid_csv_file_or_settings: The file is not a CSV file or does not match the settings below diff --git a/config/locales/ja.yml b/config/locales/ja.yml index 872c4624f..5c22249ee 100644 --- a/config/locales/ja.yml +++ b/config/locales/ja.yml @@ -1163,8 +1163,8 @@ ja: label_member_management_selected_roles_only: 次のロールのみ label_password_required: この操作を続行するにはパスワードを入力してください label_total_spent_time: 合計作業時間 - notice_import_finished: '%{count}件の項目をすべてインポートしました。' - notice_import_finished_with_errors: ! '全%{total}件中%{count}件の項目がインポートできませんでした。' + notice_import_finished: "%{count}件の項目をすべてインポートしました" + notice_import_finished_with_errors: "全%{total}件中%{count}件の項目がインポートできませんでした" error_invalid_file_encoding: このファイルのエンコーディングは正しい%{encoding}ではありません error_invalid_csv_file_or_settings: このファイルはCSVファイルではないか、以下の設定と一致していません error_can_not_read_import_file: インポート元のファイルを読み込み中にエラーが発生しました diff --git a/config/locales/ko.yml b/config/locales/ko.yml index 2fee6dc19..4f952b337 100644 --- a/config/locales/ko.yml +++ b/config/locales/ko.yml @@ -1191,8 +1191,8 @@ ko: label_member_management_selected_roles_only: 선택된 역할 만 label_password_required: 계속하려면 암호를 확인해야 합니다. label_total_spent_time: 총 소요시간 - notice_import_finished: 총 %{count} 건을 가져왔습니다. - notice_import_finished_with_errors: ! '총 %{total} 건 중 %{count} 건을 가져오지 못했습니다.' + notice_import_finished: "총 %{count} 건을 가져왔습니다" + notice_import_finished_with_errors: "총 %{total} 건 중 %{count} 건을 가져오지 못했습니다" error_invalid_file_encoding: 이 파일은 정상적인 %{encoding} 파일이 아닙니다. error_invalid_csv_file_or_settings: 이 파일은 CSV 파일이 아니거나 아래 조건에 맞지 않습니다. error_can_not_read_import_file: 가져오기 파일을 읽을 수 없습니다. diff --git a/config/locales/lt.yml b/config/locales/lt.yml index 2a8b0b5d2..c239ed286 100644 --- a/config/locales/lt.yml +++ b/config/locales/lt.yml @@ -187,9 +187,8 @@ lt: notice_account_deleted: "Jūsų paskyra panaikinta." notice_user_successful_create: "Vartotojas %{id} sukurtas." notice_new_password_must_be_different: Naujas slaptažodis turi skirtis nuo esamo slaptažodžio - notice_import_finished: "Visi %{count} įrašai hbuvo suimportuoti." - notice_import_finished_with_errors: "%{count} iš %{total} įrašų nepavyko suimportuoti." - + notice_import_finished: "%{count} įrašai hbuvo suimportuoti" + notice_import_finished_with_errors: "%{count} iš %{total} įrašų nepavyko suimportuoti" error_can_t_load_default_data: "Numatytoji konfigūracija negali būti užkrauta: %{value}" error_scm_not_found: "Saugykloje nebuvo rastas toks įrašas ar revizija" error_scm_command_failed: "Įvyko klaida jungiantis prie saugyklos: %{value}" diff --git a/config/locales/lv.yml b/config/locales/lv.yml index 81184dfac..117dfd556 100644 --- a/config/locales/lv.yml +++ b/config/locales/lv.yml @@ -1142,9 +1142,8 @@ lv: label_member_management_selected_roles_only: Only these roles label_password_required: Confirm your password to continue label_total_spent_time: Overall spent time - notice_import_finished: All %{count} items have been imported. - notice_import_finished_with_errors: ! '%{count} out of %{total} items could not be - imported.' + notice_import_finished: "%{count} items have been imported" + notice_import_finished_with_errors: "%{count} out of %{total} items could not be imported" error_invalid_file_encoding: The file is not a valid %{encoding} encoded file error_invalid_csv_file_or_settings: The file is not a CSV file or does not match the settings below diff --git a/config/locales/mk.yml b/config/locales/mk.yml index e7dc7ee3e..ce0d4abb3 100644 --- a/config/locales/mk.yml +++ b/config/locales/mk.yml @@ -1148,9 +1148,8 @@ mk: label_member_management_selected_roles_only: Only these roles label_password_required: Confirm your password to continue label_total_spent_time: Вкупно потрошено време - notice_import_finished: All %{count} items have been imported. - notice_import_finished_with_errors: ! '%{count} out of %{total} items could not be - imported.' + notice_import_finished: "%{count} items have been imported" + notice_import_finished_with_errors: "%{count} out of %{total} items could not be imported" error_invalid_file_encoding: The file is not a valid %{encoding} encoded file error_invalid_csv_file_or_settings: The file is not a CSV file or does not match the settings below diff --git a/config/locales/mn.yml b/config/locales/mn.yml index eb63b988f..a0789a51b 100644 --- a/config/locales/mn.yml +++ b/config/locales/mn.yml @@ -1149,9 +1149,8 @@ mn: label_member_management_selected_roles_only: Only these roles label_password_required: Confirm your password to continue label_total_spent_time: Overall spent time - notice_import_finished: All %{count} items have been imported. - notice_import_finished_with_errors: ! '%{count} out of %{total} items could not be - imported.' + notice_import_finished: "%{count} items have been imported" + notice_import_finished_with_errors: "%{count} out of %{total} items could not be imported" error_invalid_file_encoding: The file is not a valid %{encoding} encoded file error_invalid_csv_file_or_settings: The file is not a CSV file or does not match the settings below diff --git a/config/locales/nl.yml b/config/locales/nl.yml index 23630b28e..1e1676487 100644 --- a/config/locales/nl.yml +++ b/config/locales/nl.yml @@ -1127,9 +1127,8 @@ nl: label_member_management_selected_roles_only: Only these roles label_password_required: Confirm your password to continue label_total_spent_time: Totaal bestede tijd - notice_import_finished: All %{count} items have been imported. - notice_import_finished_with_errors: ! '%{count} out of %{total} items could not be - imported.' + notice_import_finished: "%{count} items have been imported" + notice_import_finished_with_errors: "%{count} out of %{total} items could not be imported" error_invalid_file_encoding: The file is not a valid %{encoding} encoded file error_invalid_csv_file_or_settings: The file is not a CSV file or does not match the settings below diff --git a/config/locales/no.yml b/config/locales/no.yml index ce5aef038..6616d37ee 100644 --- a/config/locales/no.yml +++ b/config/locales/no.yml @@ -1138,9 +1138,8 @@ label_member_management_selected_roles_only: Only these roles label_password_required: Confirm your password to continue label_total_spent_time: All tidsbruk - notice_import_finished: All %{count} items have been imported. - notice_import_finished_with_errors: ! '%{count} out of %{total} items could not be - imported.' + notice_import_finished: "%{count} items have been imported" + notice_import_finished_with_errors: "%{count} out of %{total} items could not be imported" error_invalid_file_encoding: The file is not a valid %{encoding} encoded file error_invalid_csv_file_or_settings: The file is not a CSV file or does not match the settings below diff --git a/config/locales/pl.yml b/config/locales/pl.yml index 0534b6bee..2b3701c82 100644 --- a/config/locales/pl.yml +++ b/config/locales/pl.yml @@ -1163,9 +1163,8 @@ pl: label_member_management_selected_roles_only: Tylko tymi rolami label_password_required: Potwierdź hasło aby kontynuować label_total_spent_time: Przepracowany czas - notice_import_finished: All %{count} items have been imported. - notice_import_finished_with_errors: ! '%{count} out of %{total} items could not be - imported.' + notice_import_finished: "%{count} items have been imported" + notice_import_finished_with_errors: "%{count} out of %{total} items could not be imported" error_invalid_file_encoding: The file is not a valid %{encoding} encoded file error_invalid_csv_file_or_settings: The file is not a CSV file or does not match the settings below diff --git a/config/locales/pt-BR.yml b/config/locales/pt-BR.yml index 28c5f2303..ee47c2119 100644 --- a/config/locales/pt-BR.yml +++ b/config/locales/pt-BR.yml @@ -1167,9 +1167,8 @@ pt-BR: label_member_management_selected_roles_only: Somente esses papéis label_password_required: Confirme sua senha para continuar label_total_spent_time: Tempo gasto geral - notice_import_finished: Tpdps %{count} itens foram importados. - notice_import_finished_with_errors: ! '%{count} fora de %{total} não puderam ser - importados.' + notice_import_finished: "%{count} itens foram importados" + notice_import_finished_with_errors: "%{count} fora de %{total} não puderam ser importados" error_invalid_file_encoding: O arquivo não é válido %{encoding} é a codificação do arquivo error_invalid_csv_file_or_settings: O arquivo não é um arquivo CSV ou não corresponde as definições abaixo diff --git a/config/locales/pt.yml b/config/locales/pt.yml index 6656b7944..6a3231f8e 100644 --- a/config/locales/pt.yml +++ b/config/locales/pt.yml @@ -1153,8 +1153,8 @@ pt: label_member_management_selected_roles_only: Apenas estas funções label_password_required: Confirme a sua palavra-chave para continuar label_total_spent_time: Total de tempo registado - notice_import_finished: Todos os %{count} registos foram importados. - notice_import_finished_with_errors: ! '%{count} de %{total} registos não poderam ser importados.' + notice_import_finished: "%{count} registos foram importados" + notice_import_finished_with_errors: "%{count} de %{total} registos não poderam ser importados" error_invalid_file_encoding: 'O ficheiro não possui a codificação correcta: {encoding}' error_invalid_csv_file_or_settings: O ficheiro não é um ficheiro CSV ou não respeita as definições abaixo error_can_not_read_import_file: Ocorreu um erro ao ler o ficheiro a importar diff --git a/config/locales/ro.yml b/config/locales/ro.yml index 03e937afa..f4791ee9b 100644 --- a/config/locales/ro.yml +++ b/config/locales/ro.yml @@ -1143,9 +1143,8 @@ ro: label_member_management_selected_roles_only: Only these roles label_password_required: Confirm your password to continue label_total_spent_time: Overall spent time - notice_import_finished: All %{count} items have been imported. - notice_import_finished_with_errors: ! '%{count} out of %{total} items could not be - imported.' + notice_import_finished: "%{count} items have been imported" + notice_import_finished_with_errors: "%{count} out of %{total} items could not be imported" error_invalid_file_encoding: The file is not a valid %{encoding} encoded file error_invalid_csv_file_or_settings: The file is not a CSV file or does not match the settings below diff --git a/config/locales/ru.yml b/config/locales/ru.yml index 363d1804c..4d2481f9c 100644 --- a/config/locales/ru.yml +++ b/config/locales/ru.yml @@ -1251,8 +1251,8 @@ ru: label_member_management_selected_roles_only: Только эти роли label_password_required: Для продолжения введите свой пароль label_total_spent_time: Всего затрачено времени - notice_import_finished: Все %{count} элемент(а, ов) были импортированы. - notice_import_finished_with_errors: ! '%{count} из %{total} элемент(а, ов) не могут быть импортированы.' + notice_import_finished: "%{count} элемент(а, ов) были импортированы" + notice_import_finished_with_errors: "%{count} из %{total} элемент(а, ов) не могут быть импортированы" error_invalid_file_encoding: Кодировка файла не соответствует выбранной %{encoding} error_invalid_csv_file_or_settings: Файл не является файлом CSV или не соответствует представленным настройкам error_can_not_read_import_file: Во время чтения файла для импорта произошла ошибка diff --git a/config/locales/sk.yml b/config/locales/sk.yml index 276c8ff2c..efdf8ad53 100644 --- a/config/locales/sk.yml +++ b/config/locales/sk.yml @@ -1138,9 +1138,8 @@ sk: label_member_management_selected_roles_only: Only these roles label_password_required: Confirm your password to continue label_total_spent_time: Celkový strávený čas - notice_import_finished: All %{count} items have been imported. - notice_import_finished_with_errors: ! '%{count} out of %{total} items could not be - imported.' + notice_import_finished: "%{count} items have been imported" + notice_import_finished_with_errors: "%{count} out of %{total} items could not be imported" error_invalid_file_encoding: The file is not a valid %{encoding} encoded file error_invalid_csv_file_or_settings: The file is not a CSV file or does not match the settings below diff --git a/config/locales/sl.yml b/config/locales/sl.yml index d8f493a55..2121c2e02 100644 --- a/config/locales/sl.yml +++ b/config/locales/sl.yml @@ -1148,9 +1148,8 @@ sl: label_member_management_selected_roles_only: Only these roles label_password_required: Confirm your password to continue label_total_spent_time: Skupni porabljeni čas - notice_import_finished: All %{count} items have been imported. - notice_import_finished_with_errors: ! '%{count} out of %{total} items could not be - imported.' + notice_import_finished: "%{count} items have been imported" + notice_import_finished_with_errors: "%{count} out of %{total} items could not be imported" error_invalid_file_encoding: The file is not a valid %{encoding} encoded file error_invalid_csv_file_or_settings: The file is not a CSV file or does not match the settings below diff --git a/config/locales/sq.yml b/config/locales/sq.yml index 658183886..058cc0402 100644 --- a/config/locales/sq.yml +++ b/config/locales/sq.yml @@ -1144,9 +1144,8 @@ sq: label_member_management_selected_roles_only: Only these roles label_password_required: Confirm your password to continue label_total_spent_time: Overall spent time - notice_import_finished: All %{count} items have been imported. - notice_import_finished_with_errors: ! '%{count} out of %{total} items could not be - imported.' + notice_import_finished: "%{count} items have been imported" + notice_import_finished_with_errors: "%{count} out of %{total} items could not be imported" error_invalid_file_encoding: The file is not a valid %{encoding} encoded file error_invalid_csv_file_or_settings: The file is not a CSV file or does not match the settings below diff --git a/config/locales/sr-YU.yml b/config/locales/sr-YU.yml index 0ae915f25..8298da415 100644 --- a/config/locales/sr-YU.yml +++ b/config/locales/sr-YU.yml @@ -1150,9 +1150,8 @@ sr-YU: label_member_management_selected_roles_only: Only these roles label_password_required: Confirm your password to continue label_total_spent_time: Celokupno utrošeno vreme - notice_import_finished: All %{count} items have been imported. - notice_import_finished_with_errors: ! '%{count} out of %{total} items could not be - imported.' + notice_import_finished: "%{count} items have been imported" + notice_import_finished_with_errors: "%{count} out of %{total} items could not be imported" error_invalid_file_encoding: The file is not a valid %{encoding} encoded file error_invalid_csv_file_or_settings: The file is not a CSV file or does not match the settings below diff --git a/config/locales/sr.yml b/config/locales/sr.yml index 5c27ec2be..4ce0c2ff1 100644 --- a/config/locales/sr.yml +++ b/config/locales/sr.yml @@ -1149,9 +1149,8 @@ sr: label_member_management_selected_roles_only: Only these roles label_password_required: Confirm your password to continue label_total_spent_time: Целокупно утрошено време - notice_import_finished: All %{count} items have been imported. - notice_import_finished_with_errors: ! '%{count} out of %{total} items could not be - imported.' + notice_import_finished: "%{count} items have been imported" + notice_import_finished_with_errors: "%{count} out of %{total} items could not be imported" error_invalid_file_encoding: The file is not a valid %{encoding} encoded file error_invalid_csv_file_or_settings: The file is not a CSV file or does not match the settings below diff --git a/config/locales/sv.yml b/config/locales/sv.yml index 059852400..b97e342aa 100644 --- a/config/locales/sv.yml +++ b/config/locales/sv.yml @@ -1181,9 +1181,8 @@ sv: label_member_management_selected_roles_only: Only these roles label_password_required: Confirm your password to continue label_total_spent_time: Total tid spenderad - notice_import_finished: All %{count} items have been imported. - notice_import_finished_with_errors: ! '%{count} out of %{total} items could not be - imported.' + notice_import_finished: "%{count} items have been imported" + notice_import_finished_with_errors: "%{count} out of %{total} items could not be imported" error_invalid_file_encoding: The file is not a valid %{encoding} encoded file error_invalid_csv_file_or_settings: The file is not a CSV file or does not match the settings below diff --git a/config/locales/th.yml b/config/locales/th.yml index c25b780bf..a2c841564 100644 --- a/config/locales/th.yml +++ b/config/locales/th.yml @@ -1145,9 +1145,8 @@ th: label_member_management_selected_roles_only: Only these roles label_password_required: Confirm your password to continue label_total_spent_time: Overall spent time - notice_import_finished: All %{count} items have been imported. - notice_import_finished_with_errors: ! '%{count} out of %{total} items could not be - imported.' + notice_import_finished: "%{count} items have been imported" + notice_import_finished_with_errors: "%{count} out of %{total} items could not be imported" error_invalid_file_encoding: The file is not a valid %{encoding} encoded file error_invalid_csv_file_or_settings: The file is not a CSV file or does not match the settings below diff --git a/config/locales/tr.yml b/config/locales/tr.yml index 7eb5f05e8..6f33aaba7 100644 --- a/config/locales/tr.yml +++ b/config/locales/tr.yml @@ -1157,8 +1157,8 @@ tr: label_member_management_selected_roles_only: Sadece bu roller label_password_required: Devam etmek için şifrenizi doğrulayın label_total_spent_time: Toplam harcanan zaman - notice_import_finished: "%{count} kayıt içeri aktarıldı." - notice_import_finished_with_errors: ! '%{total} kayıttan %{count} tanesi aktarılamadı.' + notice_import_finished: "%{count} kayıt içeri aktarıldı" + notice_import_finished_with_errors: "%{total} kayıttan %{count} tanesi aktarılamadı" error_invalid_file_encoding: Dosyanın karakter kodlaması geçerli bir %{encoding} kodlaması değil. error_invalid_csv_file_or_settings: Dosya CSV dosyası değil veya aşağıdaki ayarlara uymuyor error_can_not_read_import_file: İçeri aktarılacak dosyayı okurken bir hata oluştu diff --git a/config/locales/uk.yml b/config/locales/uk.yml index 8ea60d4a9..2fb2a0471 100644 --- a/config/locales/uk.yml +++ b/config/locales/uk.yml @@ -1143,9 +1143,8 @@ uk: label_member_management_selected_roles_only: Only these roles label_password_required: Confirm your password to continue label_total_spent_time: Overall spent time - notice_import_finished: All %{count} items have been imported. - notice_import_finished_with_errors: ! '%{count} out of %{total} items could not be - imported.' + notice_import_finished: "%{count} items have been imported" + notice_import_finished_with_errors: "%{count} out of %{total} items could not be imported" error_invalid_file_encoding: The file is not a valid %{encoding} encoded file error_invalid_csv_file_or_settings: The file is not a CSV file or does not match the settings below diff --git a/config/locales/vi.yml b/config/locales/vi.yml index 73405c154..754ac72ec 100644 --- a/config/locales/vi.yml +++ b/config/locales/vi.yml @@ -1201,9 +1201,8 @@ vi: label_member_management_selected_roles_only: Only these roles label_password_required: Confirm your password to continue label_total_spent_time: Tổng thời gian sử dụng - notice_import_finished: All %{count} items have been imported. - notice_import_finished_with_errors: ! '%{count} out of %{total} items could not be - imported.' + notice_import_finished: "%{count} items have been imported" + notice_import_finished_with_errors: "%{count} out of %{total} items could not be imported" error_invalid_file_encoding: The file is not a valid %{encoding} encoded file error_invalid_csv_file_or_settings: The file is not a CSV file or does not match the settings below diff --git a/config/locales/zh-TW.yml b/config/locales/zh-TW.yml index dc004144e..98ad59315 100644 --- a/config/locales/zh-TW.yml +++ b/config/locales/zh-TW.yml @@ -267,8 +267,8 @@ notice_account_deleted: "您的帳戶已被永久刪除。" notice_user_successful_create: "已建立用戶 %{id}。" notice_new_password_must_be_different: 新舊密碼必須相異 - notice_import_finished: "已成功匯入所有的項目共 %{count} 個。" - notice_import_finished_with_errors: "無法匯入 %{count} 個項目 (全部共 %{total} 個)。" + notice_import_finished: "已成功匯入所有的項目共 %{count} 個" + notice_import_finished_with_errors: "無法匯入 %{count} 個項目 (全部共 %{total} 個)" error_can_t_load_default_data: "無法載入預設組態: %{value}" error_scm_not_found: "在儲存機制中找不到這個項目或修訂版。" diff --git a/config/locales/zh.yml b/config/locales/zh.yml index 983730734..8e52b575b 100644 --- a/config/locales/zh.yml +++ b/config/locales/zh.yml @@ -1145,7 +1145,7 @@ zh: label_member_management_selected_roles_only: 只限下列角色 label_password_required: 确认您的密码后继续 label_total_spent_time: 总体耗时 - notice_import_finished: 成功导入 %{count} 个项目. + notice_import_finished: 成功导入 %{count} 个项目 notice_import_finished_with_errors: 有 %{count} 个项目无法导入(共计 %{total} 个) error_invalid_file_encoding: 这不是一个有效的 %{encoding} 编码文件 error_invalid_csv_file_or_settings: 这不是一个CSV文件或者不符合以下设置 From 91f91f24dee469d8bd4afc307abf200cac80fe41 Mon Sep 17 00:00:00 2001 From: Jean-Philippe Lang Date: Sat, 18 Jun 2016 10:51:11 +0000 Subject: [PATCH 0080/1117] Adds a link to the list of imported issues. git-svn-id: http://svn.redmine.org/redmine/trunk@15564 e93f8b46-1217-0410-a6f0-8f06a7374b81 --- app/views/imports/show.html.erb | 2 ++ 1 file changed, 2 insertions(+) diff --git a/app/views/imports/show.html.erb b/app/views/imports/show.html.erb index 3a0d67611..19c874c91 100644 --- a/app/views/imports/show.html.erb +++ b/app/views/imports/show.html.erb @@ -8,6 +8,8 @@
  • <%= link_to_issue issue %>
  • <% end %> + +

    <%= link_to l(:label_issue_view_all), issues_path(:set_filter => 1, :status_id => '*', :issue_id => @import.saved_objects.map(&:id).join(',')) %>

    <% end %> <% if @import.unsaved_items.count > 0 %> From e528a56d4b27938a57816f51854b273f0a12bff7 Mon Sep 17 00:00:00 2001 From: Jean-Philippe Lang Date: Sun, 19 Jun 2016 06:53:14 +0000 Subject: [PATCH 0081/1117] Adds missing taskpaper language to the drop down (#14937, #23106). git-svn-id: http://svn.redmine.org/redmine/trunk@15567 e93f8b46-1217-0410-a6f0-8f06a7374b81 --- public/javascripts/jstoolbar/jstoolbar-textile.min.js | 2 +- public/javascripts/jstoolbar/jstoolbar.js | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/public/javascripts/jstoolbar/jstoolbar-textile.min.js b/public/javascripts/jstoolbar/jstoolbar-textile.min.js index c49013c66..5120750c8 100644 --- a/public/javascripts/jstoolbar/jstoolbar-textile.min.js +++ b/public/javascripts/jstoolbar/jstoolbar-textile.min.js @@ -1 +1 @@ -function jsToolBar(e){if(document.createElement&&e&&("undefined"!=typeof document.selection||"undefined"!=typeof e.setSelectionRange)){if(this.textarea=e,this.editor=document.createElement("div"),this.editor.className="jstEditor",this.textarea.parentNode.insertBefore(this.editor,this.textarea),this.editor.appendChild(this.textarea),this.toolbar=document.createElement("div"),this.toolbar.className="jstElements",this.editor.parentNode.insertBefore(this.toolbar,this.editor),this.editor.addEventListener&&navigator.appVersion.match(/\bMSIE\b/)){this.handle=document.createElement("div"),this.handle.className="jstHandle";var t=this.resizeDragStart,n=this;this.handle.addEventListener("mousedown",function(e){t.call(n,e)},!1),window.addEventListener("unload",function(){n.handle.parentNode.removeChild(n.handle);delete n.handle},!1),this.editor.parentNode.insertBefore(this.handle,this.editor.nextSibling)}this.context=null,this.toolNodes={}}}function jsButton(e,t,n,o){"undefined"==typeof jsToolBar.strings?this.title=e||null:this.title=jsToolBar.strings[e]||e||null,this.fn=t||function(){},this.scope=n||null,this.className=o||null}function jsSpace(e){this.id=e||null,this.width=null}function jsCombo(e,t,n,o,i){this.title=e||null,this.options=t||null,this.scope=n||null,this.fn=o||function(){},this.className=i||null}jsButton.prototype.draw=function(){if(!this.scope)return null;var e=document.createElement("button");e.setAttribute("type","button"),e.tabIndex=200,this.className&&(e.className=this.className),e.title=this.title;var t=document.createElement("span");if(t.appendChild(document.createTextNode(this.title)),e.appendChild(t),void 0!=this.icon&&(e.style.backgroundImage="url("+this.icon+")"),"function"==typeof this.fn){var n=this;e.onclick=function(){try{n.fn.apply(n.scope,arguments)}catch(e){}return!1}}return e},jsSpace.prototype.draw=function(){var e=document.createElement("span");return this.id&&(e.id=this.id),e.appendChild(document.createTextNode(String.fromCharCode(160))),e.className="jstSpacer",this.width&&(e.style.marginRight=this.width+"px"),e},jsCombo.prototype.draw=function(){if(!this.scope||!this.options)return null;var e=document.createElement("select");this.className&&(e.className=className),e.title=this.title;for(var t in this.options){var n=document.createElement("option");n.value=t,n.appendChild(document.createTextNode(this.options[t])),e.appendChild(n)}var o=this;return e.onchange=function(){try{o.fn.call(o.scope,this.value)}catch(e){alert(e)}return!1},e},jsToolBar.prototype={base_url:"",mode:"wiki",elements:{},help_link:"",getMode:function(){return this.mode},setMode:function(e){this.mode=e||"wiki"},switchMode:function(e){e=e||"wiki",this.draw(e)},setHelpLink:function(e){this.help_link=e},button:function(e){var t=this.elements[e];if("function"!=typeof t.fn[this.mode])return null;var n=new jsButton(t.title,t.fn[this.mode],this,"jstb_"+e);return void 0!=t.icon&&(n.icon=t.icon),n},space:function(e){var t=new jsSpace(e);return void 0!==this.elements[e].width&&(t.width=this.elements[e].width),t},combo:function(e){var t=this.elements[e],n=t[this.mode].list.length;if("function"!=typeof t[this.mode].fn||0==n)return null;for(var o={},i=0;n>i;i++){var s=t[this.mode].list[i];o[s]=t.options[s]}return new jsCombo(t.title,o,this,t[this.mode].fn)},draw:function(e){for(this.setMode(e);this.toolbar.hasChildNodes();)this.toolbar.removeChild(this.toolbar.firstChild);this.toolNodes={};var t,n,o;for(var i in this.elements){t=this.elements[i];var s=void 0==t.type||""==t.type||void 0!=t.disabled&&t.disabled||void 0!=t.context&&null!=t.context&&t.context!=this.context;s||"function"!=typeof this[t.type]||(n=this[t.type](i),n&&(o=n.draw()),o&&(this.toolNodes[i]=o,this.toolbar.appendChild(o)))}},singleTag:function(e,t){e=e||null,t=t||e,e&&t&&this.encloseSelection(e,t)},encloseLineSelection:function(e,t,n){this.textarea.focus(),e=e||"",t=t||"";var o,i,s,l,a,r;if("undefined"!=typeof document.selection?s=document.selection.createRange().text:"undefined"!=typeof this.textarea.setSelectionRange&&(o=this.textarea.selectionStart,i=this.textarea.selectionEnd,l=this.textarea.scrollTop,o=this.textarea.value.substring(0,o).replace(/[^\r\n]*$/g,"").length,i=this.textarea.value.length-this.textarea.value.substring(i,this.textarea.value.length).replace(/^[^\r\n]*/,"").length,s=this.textarea.value.substring(o,i)),s.match(/ $/)&&(s=s.substring(0,s.length-1),t+=" "),r="function"==typeof n?s?n.call(this,s):n(""):s?s:"",a=e+r+t,"undefined"!=typeof document.selection){document.selection.createRange().text=a;var c=this.textarea.createTextRange();c.collapse(!1),c.move("character",-t.length),c.select()}else"undefined"!=typeof this.textarea.setSelectionRange&&(this.textarea.value=this.textarea.value.substring(0,o)+a+this.textarea.value.substring(i),s?this.textarea.setSelectionRange(o+a.length,o+a.length):this.textarea.setSelectionRange(o+e.length,o+e.length),this.textarea.scrollTop=l)},encloseSelection:function(e,t,n){this.textarea.focus(),e=e||"",t=t||"";var o,i,s,l,a,r;if("undefined"!=typeof document.selection?s=document.selection.createRange().text:"undefined"!=typeof this.textarea.setSelectionRange&&(o=this.textarea.selectionStart,i=this.textarea.selectionEnd,l=this.textarea.scrollTop,s=this.textarea.value.substring(o,i)),s.match(/ $/)&&(s=s.substring(0,s.length-1),t+=" "),r="function"==typeof n?s?n.call(this,s):n(""):s?s:"",a=e+r+t,"undefined"!=typeof document.selection){document.selection.createRange().text=a;var c=this.textarea.createTextRange();c.collapse(!1),c.move("character",-t.length),c.select()}else"undefined"!=typeof this.textarea.setSelectionRange&&(this.textarea.value=this.textarea.value.substring(0,o)+a+this.textarea.value.substring(i),s?this.textarea.setSelectionRange(o+a.length,o+a.length):this.textarea.setSelectionRange(o+e.length,o+e.length),this.textarea.scrollTop=l)},stripBaseURL:function(e){if(""!=this.base_url){var t=e.indexOf(this.base_url);0==t&&(e=e.substr(this.base_url.length))}return e}},jsToolBar.prototype.resizeSetStartH=function(){this.dragStartH=this.textarea.offsetHeight+0},jsToolBar.prototype.resizeDragStart=function(e){var t=this;this.dragStartY=e.clientY,this.resizeSetStartH(),document.addEventListener("mousemove",this.dragMoveHdlr=function(e){t.resizeDragMove(e)},!1),document.addEventListener("mouseup",this.dragStopHdlr=function(e){t.resizeDragStop(e)},!1)},jsToolBar.prototype.resizeDragMove=function(e){this.textarea.style.height=this.dragStartH+e.clientY-this.dragStartY+"px"},jsToolBar.prototype.resizeDragStop=function(e){document.removeEventListener("mousemove",this.dragMoveHdlr,!1),document.removeEventListener("mouseup",this.dragStopHdlr,!1)},jsToolBar.prototype.precodeMenu=function(e){for(var t=["c","clojure","cpp","css","delphi","diff","erb","go","groovy","haml","html","java","javascript","json","lua","php","python","ruby","sass","sql","text","xml","yaml"],n=$("
      "),o=0;o").text(t[o]).appendTo(n).mousedown(function(){e($(this).text())});return $("body").append(n),n.menu().width(150).position({my:"left top",at:"left bottom",of:this.toolNodes.precode}),$(document).on("mousedown",function(){n.remove()}),!1},jsToolBar.prototype.elements.strong={type:"button",title:"Strong",fn:{wiki:function(){this.singleTag("*")}}},jsToolBar.prototype.elements.em={type:"button",title:"Italic",fn:{wiki:function(){this.singleTag("_")}}},jsToolBar.prototype.elements.ins={type:"button",title:"Underline",fn:{wiki:function(){this.singleTag("+")}}},jsToolBar.prototype.elements.del={type:"button",title:"Deleted",fn:{wiki:function(){this.singleTag("-")}}},jsToolBar.prototype.elements.code={type:"button",title:"Code",fn:{wiki:function(){this.singleTag("@")}}},jsToolBar.prototype.elements.space1={type:"space"},jsToolBar.prototype.elements.h1={type:"button",title:"Heading 1",fn:{wiki:function(){this.encloseLineSelection("h1. ","",function(e){return e=e.replace(/^h\d+\.\s+/,"")})}}},jsToolBar.prototype.elements.h2={type:"button",title:"Heading 2",fn:{wiki:function(){this.encloseLineSelection("h2. ","",function(e){return e=e.replace(/^h\d+\.\s+/,"")})}}},jsToolBar.prototype.elements.h3={type:"button",title:"Heading 3",fn:{wiki:function(){this.encloseLineSelection("h3. ","",function(e){return e=e.replace(/^h\d+\.\s+/,"")})}}},jsToolBar.prototype.elements.space2={type:"space"},jsToolBar.prototype.elements.ul={type:"button",title:"Unordered list",fn:{wiki:function(){this.encloseLineSelection("","",function(e){return e=e.replace(/\r/g,""),e.replace(/(\n|^)[#-]?\s*/g,"$1* ")})}}},jsToolBar.prototype.elements.ol={type:"button",title:"Ordered list",fn:{wiki:function(){this.encloseLineSelection("","",function(e){return e=e.replace(/\r/g,""),e.replace(/(\n|^)[*-]?\s*/g,"$1# ")})}}},jsToolBar.prototype.elements.space3={type:"space"},jsToolBar.prototype.elements.bq={type:"button",title:"Quote",fn:{wiki:function(){this.encloseLineSelection("","",function(e){return e=e.replace(/\r/g,""),e.replace(/(\n|^) *([^\n]*)/g,"$1> $2")})}}},jsToolBar.prototype.elements.unbq={type:"button",title:"Unquote",fn:{wiki:function(){this.encloseLineSelection("","",function(e){return e=e.replace(/\r/g,""),e.replace(/(\n|^) *[>]? *([^\n]*)/g,"$1$2")})}}},jsToolBar.prototype.elements.pre={type:"button",title:"Preformatted text",fn:{wiki:function(){this.encloseLineSelection("
      \n","\n
      ")}}},jsToolBar.prototype.elements.precode={type:"button",title:"Highlighted code",fn:{wiki:function(){var e=this;this.precodeMenu(function(t){e.encloseLineSelection('
      \n',"\n
      \n")})}}},jsToolBar.prototype.elements.space4={type:"space"},jsToolBar.prototype.elements.link={type:"button",title:"Wiki link",fn:{wiki:function(){this.encloseSelection("[[","]]")}}},jsToolBar.prototype.elements.img={type:"button",title:"Image",fn:{wiki:function(){this.encloseSelection("!","!")}}},jsToolBar.prototype.elements.space5={type:"space"},jsToolBar.prototype.elements.help={type:"button",title:"Help",fn:{wiki:function(){window.open(this.help_link,"","resizable=yes, location=no, width=300, height=640, menubar=no, status=no, scrollbars=yes")}}}; +function jsToolBar(e){if(document.createElement&&e&&("undefined"!=typeof document.selection||"undefined"!=typeof e.setSelectionRange)){if(this.textarea=e,this.editor=document.createElement("div"),this.editor.className="jstEditor",this.textarea.parentNode.insertBefore(this.editor,this.textarea),this.editor.appendChild(this.textarea),this.toolbar=document.createElement("div"),this.toolbar.className="jstElements",this.editor.parentNode.insertBefore(this.toolbar,this.editor),this.editor.addEventListener&&navigator.appVersion.match(/\bMSIE\b/)){this.handle=document.createElement("div"),this.handle.className="jstHandle";var t=this.resizeDragStart,n=this;this.handle.addEventListener("mousedown",function(e){t.call(n,e)},!1),window.addEventListener("unload",function(){n.handle.parentNode.removeChild(n.handle);delete n.handle},!1),this.editor.parentNode.insertBefore(this.handle,this.editor.nextSibling)}this.context=null,this.toolNodes={}}}function jsButton(e,t,n,o){"undefined"==typeof jsToolBar.strings?this.title=e||null:this.title=jsToolBar.strings[e]||e||null,this.fn=t||function(){},this.scope=n||null,this.className=o||null}function jsSpace(e){this.id=e||null,this.width=null}function jsCombo(e,t,n,o,i){this.title=e||null,this.options=t||null,this.scope=n||null,this.fn=o||function(){},this.className=i||null}jsButton.prototype.draw=function(){if(!this.scope)return null;var e=document.createElement("button");e.setAttribute("type","button"),e.tabIndex=200,this.className&&(e.className=this.className),e.title=this.title;var t=document.createElement("span");if(t.appendChild(document.createTextNode(this.title)),e.appendChild(t),void 0!=this.icon&&(e.style.backgroundImage="url("+this.icon+")"),"function"==typeof this.fn){var n=this;e.onclick=function(){try{n.fn.apply(n.scope,arguments)}catch(e){}return!1}}return e},jsSpace.prototype.draw=function(){var e=document.createElement("span");return this.id&&(e.id=this.id),e.appendChild(document.createTextNode(String.fromCharCode(160))),e.className="jstSpacer",this.width&&(e.style.marginRight=this.width+"px"),e},jsCombo.prototype.draw=function(){if(!this.scope||!this.options)return null;var e=document.createElement("select");this.className&&(e.className=className),e.title=this.title;for(var t in this.options){var n=document.createElement("option");n.value=t,n.appendChild(document.createTextNode(this.options[t])),e.appendChild(n)}var o=this;return e.onchange=function(){try{o.fn.call(o.scope,this.value)}catch(e){alert(e)}return!1},e},jsToolBar.prototype={base_url:"",mode:"wiki",elements:{},help_link:"",getMode:function(){return this.mode},setMode:function(e){this.mode=e||"wiki"},switchMode:function(e){e=e||"wiki",this.draw(e)},setHelpLink:function(e){this.help_link=e},button:function(e){var t=this.elements[e];if("function"!=typeof t.fn[this.mode])return null;var n=new jsButton(t.title,t.fn[this.mode],this,"jstb_"+e);return void 0!=t.icon&&(n.icon=t.icon),n},space:function(e){var t=new jsSpace(e);return void 0!==this.elements[e].width&&(t.width=this.elements[e].width),t},combo:function(e){var t=this.elements[e],n=t[this.mode].list.length;if("function"!=typeof t[this.mode].fn||0==n)return null;for(var o={},i=0;n>i;i++){var s=t[this.mode].list[i];o[s]=t.options[s]}return new jsCombo(t.title,o,this,t[this.mode].fn)},draw:function(e){for(this.setMode(e);this.toolbar.hasChildNodes();)this.toolbar.removeChild(this.toolbar.firstChild);this.toolNodes={};var t,n,o;for(var i in this.elements){t=this.elements[i];var s=void 0==t.type||""==t.type||void 0!=t.disabled&&t.disabled||void 0!=t.context&&null!=t.context&&t.context!=this.context;s||"function"!=typeof this[t.type]||(n=this[t.type](i),n&&(o=n.draw()),o&&(this.toolNodes[i]=o,this.toolbar.appendChild(o)))}},singleTag:function(e,t){e=e||null,t=t||e,e&&t&&this.encloseSelection(e,t)},encloseLineSelection:function(e,t,n){this.textarea.focus(),e=e||"",t=t||"";var o,i,s,l,a,r;if("undefined"!=typeof document.selection?s=document.selection.createRange().text:"undefined"!=typeof this.textarea.setSelectionRange&&(o=this.textarea.selectionStart,i=this.textarea.selectionEnd,l=this.textarea.scrollTop,o=this.textarea.value.substring(0,o).replace(/[^\r\n]*$/g,"").length,i=this.textarea.value.length-this.textarea.value.substring(i,this.textarea.value.length).replace(/^[^\r\n]*/,"").length,s=this.textarea.value.substring(o,i)),s.match(/ $/)&&(s=s.substring(0,s.length-1),t+=" "),r="function"==typeof n?s?n.call(this,s):n(""):s?s:"",a=e+r+t,"undefined"!=typeof document.selection){document.selection.createRange().text=a;var c=this.textarea.createTextRange();c.collapse(!1),c.move("character",-t.length),c.select()}else"undefined"!=typeof this.textarea.setSelectionRange&&(this.textarea.value=this.textarea.value.substring(0,o)+a+this.textarea.value.substring(i),s?this.textarea.setSelectionRange(o+a.length,o+a.length):this.textarea.setSelectionRange(o+e.length,o+e.length),this.textarea.scrollTop=l)},encloseSelection:function(e,t,n){this.textarea.focus(),e=e||"",t=t||"";var o,i,s,l,a,r;if("undefined"!=typeof document.selection?s=document.selection.createRange().text:"undefined"!=typeof this.textarea.setSelectionRange&&(o=this.textarea.selectionStart,i=this.textarea.selectionEnd,l=this.textarea.scrollTop,s=this.textarea.value.substring(o,i)),s.match(/ $/)&&(s=s.substring(0,s.length-1),t+=" "),r="function"==typeof n?s?n.call(this,s):n(""):s?s:"",a=e+r+t,"undefined"!=typeof document.selection){document.selection.createRange().text=a;var c=this.textarea.createTextRange();c.collapse(!1),c.move("character",-t.length),c.select()}else"undefined"!=typeof this.textarea.setSelectionRange&&(this.textarea.value=this.textarea.value.substring(0,o)+a+this.textarea.value.substring(i),s?this.textarea.setSelectionRange(o+a.length,o+a.length):this.textarea.setSelectionRange(o+e.length,o+e.length),this.textarea.scrollTop=l)},stripBaseURL:function(e){if(""!=this.base_url){var t=e.indexOf(this.base_url);0==t&&(e=e.substr(this.base_url.length))}return e}},jsToolBar.prototype.resizeSetStartH=function(){this.dragStartH=this.textarea.offsetHeight+0},jsToolBar.prototype.resizeDragStart=function(e){var t=this;this.dragStartY=e.clientY,this.resizeSetStartH(),document.addEventListener("mousemove",this.dragMoveHdlr=function(e){t.resizeDragMove(e)},!1),document.addEventListener("mouseup",this.dragStopHdlr=function(e){t.resizeDragStop(e)},!1)},jsToolBar.prototype.resizeDragMove=function(e){this.textarea.style.height=this.dragStartH+e.clientY-this.dragStartY+"px"},jsToolBar.prototype.resizeDragStop=function(e){document.removeEventListener("mousemove",this.dragMoveHdlr,!1),document.removeEventListener("mouseup",this.dragStopHdlr,!1)},jsToolBar.prototype.precodeMenu=function(e){for(var t=["c","clojure","cpp","css","delphi","diff","erb","go","groovy","haml","html","java","javascript","json","lua","php","python","ruby","sass","sql","taskpaper","text","xml","yaml"],n=$("
        "),o=0;o").text(t[o]).appendTo(n).mousedown(function(){e($(this).text())});return $("body").append(n),n.menu().width(150).position({my:"left top",at:"left bottom",of:this.toolNodes.precode}),$(document).on("mousedown",function(){n.remove()}),!1},jsToolBar.prototype.elements.strong={type:"button",title:"Strong",fn:{wiki:function(){this.singleTag("*")}}},jsToolBar.prototype.elements.em={type:"button",title:"Italic",fn:{wiki:function(){this.singleTag("_")}}},jsToolBar.prototype.elements.ins={type:"button",title:"Underline",fn:{wiki:function(){this.singleTag("+")}}},jsToolBar.prototype.elements.del={type:"button",title:"Deleted",fn:{wiki:function(){this.singleTag("-")}}},jsToolBar.prototype.elements.code={type:"button",title:"Code",fn:{wiki:function(){this.singleTag("@")}}},jsToolBar.prototype.elements.space1={type:"space"},jsToolBar.prototype.elements.h1={type:"button",title:"Heading 1",fn:{wiki:function(){this.encloseLineSelection("h1. ","",function(e){return e=e.replace(/^h\d+\.\s+/,"")})}}},jsToolBar.prototype.elements.h2={type:"button",title:"Heading 2",fn:{wiki:function(){this.encloseLineSelection("h2. ","",function(e){return e=e.replace(/^h\d+\.\s+/,"")})}}},jsToolBar.prototype.elements.h3={type:"button",title:"Heading 3",fn:{wiki:function(){this.encloseLineSelection("h3. ","",function(e){return e=e.replace(/^h\d+\.\s+/,"")})}}},jsToolBar.prototype.elements.space2={type:"space"},jsToolBar.prototype.elements.ul={type:"button",title:"Unordered list",fn:{wiki:function(){this.encloseLineSelection("","",function(e){return e=e.replace(/\r/g,""),e.replace(/(\n|^)[#-]?\s*/g,"$1* ")})}}},jsToolBar.prototype.elements.ol={type:"button",title:"Ordered list",fn:{wiki:function(){this.encloseLineSelection("","",function(e){return e=e.replace(/\r/g,""),e.replace(/(\n|^)[*-]?\s*/g,"$1# ")})}}},jsToolBar.prototype.elements.space3={type:"space"},jsToolBar.prototype.elements.bq={type:"button",title:"Quote",fn:{wiki:function(){this.encloseLineSelection("","",function(e){return e=e.replace(/\r/g,""),e.replace(/(\n|^) *([^\n]*)/g,"$1> $2")})}}},jsToolBar.prototype.elements.unbq={type:"button",title:"Unquote",fn:{wiki:function(){this.encloseLineSelection("","",function(e){return e=e.replace(/\r/g,""),e.replace(/(\n|^) *[>]? *([^\n]*)/g,"$1$2")})}}},jsToolBar.prototype.elements.pre={type:"button",title:"Preformatted text",fn:{wiki:function(){this.encloseLineSelection("
        \n","\n
        ")}}},jsToolBar.prototype.elements.precode={type:"button",title:"Highlighted code",fn:{wiki:function(){var e=this;this.precodeMenu(function(t){e.encloseLineSelection('
        \n',"\n
        \n")})}}},jsToolBar.prototype.elements.space4={type:"space"},jsToolBar.prototype.elements.link={type:"button",title:"Wiki link",fn:{wiki:function(){this.encloseSelection("[[","]]")}}},jsToolBar.prototype.elements.img={type:"button",title:"Image",fn:{wiki:function(){this.encloseSelection("!","!")}}},jsToolBar.prototype.elements.space5={type:"space"},jsToolBar.prototype.elements.help={type:"button",title:"Help",fn:{wiki:function(){window.open(this.help_link,"","resizable=yes, location=no, width=300, height=640, menubar=no, status=no, scrollbars=yes")}}}; diff --git a/public/javascripts/jstoolbar/jstoolbar.js b/public/javascripts/jstoolbar/jstoolbar.js index ba1646c9a..a7b4afa4f 100644 --- a/public/javascripts/jstoolbar/jstoolbar.js +++ b/public/javascripts/jstoolbar/jstoolbar.js @@ -375,7 +375,7 @@ jsToolBar.prototype.resizeDragStop = function(event) { /* Code highlighting menu */ jsToolBar.prototype.precodeMenu = function(fn){ - var codeRayLanguages = ["c", "clojure", "cpp", "css", "delphi", "diff", "erb", "go", "groovy", "haml", "html", "java", "javascript", "json", "lua", "php", "python", "ruby", "sass", "sql", "text", "xml", "yaml"]; + var codeRayLanguages = ["c", "clojure", "cpp", "css", "delphi", "diff", "erb", "go", "groovy", "haml", "html", "java", "javascript", "json", "lua", "php", "python", "ruby", "sass", "sql", "taskpaper", "text", "xml", "yaml"]; var menu = $("
          "); for (var i = 0; i < codeRayLanguages.length; i++) { $("
        • ").text(codeRayLanguages[i]).appendTo(menu).mousedown(function(){ From 140eb72cc169201e5afdb070e4b279b1afae7ccb Mon Sep 17 00:00:00 2001 From: Jean-Philippe Lang Date: Sun, 19 Jun 2016 07:04:44 +0000 Subject: [PATCH 0082/1117] Update CodeRay to v1.1.1 (#23107). git-svn-id: http://svn.redmine.org/redmine/trunk@15569 e93f8b46-1217-0410-a6f0-8f06a7374b81 --- Gemfile | 2 +- public/stylesheets/application.css | 36 ++++++++++++++++-------------- 2 files changed, 20 insertions(+), 18 deletions(-) diff --git a/Gemfile b/Gemfile index f359e5597..2ddfd9208 100644 --- a/Gemfile +++ b/Gemfile @@ -6,7 +6,7 @@ end gem "rails", "4.2.6" gem "jquery-rails", "~> 3.1.4" -gem "coderay", "~> 1.1.0" +gem "coderay", "~> 1.1.1" gem "builder", ">= 3.0.4" gem "request_store", "1.0.5" gem "mime-types", (RUBY_VERSION >= "2.0" ? "~> 3.0" : "~> 2.99") diff --git a/public/stylesheets/application.css b/public/stylesheets/application.css index 04194dee0..1bda7f0ff 100644 --- a/public/stylesheets/application.css +++ b/public/stylesheets/application.css @@ -1279,13 +1279,13 @@ color: #555; text-shadow: 1px 1px 0 #fff; .syntaxhl .char { color:#D20 } .syntaxhl .char .content { color:#D20 } .syntaxhl .char .delimiter { color:#710 } -.syntaxhl .class { color:#258; font-weight:bold } +.syntaxhl .class { color:#B06; font-weight:bold } .syntaxhl .class-variable { color:#369 } .syntaxhl .color { color:#0A0 } -.syntaxhl .comment { color:#385 } -.syntaxhl .comment .char { color:#385 } -.syntaxhl .comment .delimiter { color:#385 } -.syntaxhl .constant { color:#258; font-weight:bold } +.syntaxhl .comment { color:#777 } +.syntaxhl .comment .char { color:#444 } +.syntaxhl .comment .delimiter { color:#444 } +.syntaxhl .constant { color:#036; font-weight:bold } .syntaxhl .decorator { color:#B0B } .syntaxhl .definition { color:#099; font-weight:bold } .syntaxhl .delimiter { color:black } @@ -1297,23 +1297,24 @@ color: #555; text-shadow: 1px 1px 0 #fff; .syntaxhl .error { color:#F00; background-color:#FAA } .syntaxhl .escape { color:#666 } .syntaxhl .exception { color:#C00; font-weight:bold } -.syntaxhl .float { color:#06D } +.syntaxhl .float { color:#60E } .syntaxhl .function { color:#06B; font-weight:bold } -.syntaxhl .function .delimiter { color:#024; font-weight:bold } +.syntaxhl .function .delimiter { color:#059 } +.syntaxhl .function .content { color:#037 } .syntaxhl .global-variable { color:#d70 } .syntaxhl .hex { color:#02b } -.syntaxhl .id { color:#33D; font-weight:bold } +.syntaxhl .id { color:#33D; font-weight:bold } .syntaxhl .include { color:#B44; font-weight:bold } .syntaxhl .inline { background-color: hsla(0,0%,0%,0.07); color: black } .syntaxhl .inline-delimiter { font-weight: bold; color: #666 } .syntaxhl .instance-variable { color:#33B } -.syntaxhl .integer { color:#06D } +.syntaxhl .integer { color:#00D } .syntaxhl .imaginary { color:#f00 } .syntaxhl .important { color:#D00 } .syntaxhl .key { color: #606 } .syntaxhl .key .char { color: #60f } .syntaxhl .key .delimiter { color: #404 } -.syntaxhl .keyword { color:#939; font-weight:bold } +.syntaxhl .keyword { color:#080; font-weight:bold } .syntaxhl .label { color:#970; font-weight:bold } .syntaxhl .local-variable { color:#950 } .syntaxhl .map .content { color:#808 } @@ -1335,13 +1336,14 @@ color: #555; text-shadow: 1px 1px 0 #fff; .syntaxhl .shell { background-color:hsla(120,100%,50%,0.06); } .syntaxhl .shell .content { color:#2B2 } .syntaxhl .shell .delimiter { color:#161 } -.syntaxhl .string .char { color: #46a } -.syntaxhl .string .content { color: #46a } -.syntaxhl .string .delimiter { color: #46a } -.syntaxhl .string .modifier { color: #46a } -.syntaxhl .symbol { color:#d33 } -.syntaxhl .symbol .content { color:#d33 } -.syntaxhl .symbol .delimiter { color:#d33 } +.syntaxhl .string { background-color:hsla(0,100%,50%,0.05); } +.syntaxhl .string .char { color: #b0b } +.syntaxhl .string .content { color: #D20 } +.syntaxhl .string .delimiter { color: #710 } +.syntaxhl .string .modifier { color: #E40 } +.syntaxhl .symbol { color:#A60 } +.syntaxhl .symbol .content { color:#A60 } +.syntaxhl .symbol .delimiter { color:#740 } .syntaxhl .tag { color:#070; font-weight:bold } .syntaxhl .type { color:#339; font-weight:bold } .syntaxhl .value { color: #088 } From c03b84bc12511d8da09c5977f162b9f5167852bb Mon Sep 17 00:00:00 2001 From: Jean-Philippe Lang Date: Sun, 19 Jun 2016 08:58:12 +0000 Subject: [PATCH 0083/1117] Render sidebar wiki h3 as regular sidebar h3 (#21263). git-svn-id: http://svn.redmine.org/redmine/trunk@15571 e93f8b46-1217-0410-a6f0-8f06a7374b81 --- public/stylesheets/application.css | 1 - 1 file changed, 1 deletion(-) diff --git a/public/stylesheets/application.css b/public/stylesheets/application.css index 1bda7f0ff..598939cd0 100644 --- a/public/stylesheets/application.css +++ b/public/stylesheets/application.css @@ -103,7 +103,6 @@ pre, code {font-family: Consolas, Menlo, "Liberation Mono", Courier, monospace;} #sidebar .contextual { margin-right: 1em; } #sidebar ul, ul.flat {margin: 0; padding: 0;} #sidebar ul li, ul.flat li {list-style-type:none;margin: 0px 2px 0px 0px; padding: 0px 0px 0px 0px;} -#sidebar div.wiki h3 {font-size:13px; margin-top:0; color:#555;} #sidebar div.wiki ul {margin:inherit; padding-left:40px;} #sidebar div.wiki ul li {list-style-type:inherit;} From 4114791a7a652c192e5ed9128bb1204941b1b700 Mon Sep 17 00:00:00 2001 From: Jean-Philippe Lang Date: Sun, 19 Jun 2016 10:47:36 +0000 Subject: [PATCH 0084/1117] Change Japanese translation for text_git_repository_note (#23108). Patch by Go MAEDA. git-svn-id: http://svn.redmine.org/redmine/trunk@15573 e93f8b46-1217-0410-a6f0-8f06a7374b81 --- config/locales/ja.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/config/locales/ja.yml b/config/locales/ja.yml index 5c22249ee..6390e3496 100644 --- a/config/locales/ja.yml +++ b/config/locales/ja.yml @@ -939,7 +939,7 @@ ja: text_warn_on_leaving_unsaved: このページから移動すると、保存されていないデータが失われます。 text_scm_path_encoding_note: "デフォルト: UTF-8" text_mercurial_repository_note: "ローカルリポジトリ (例: /hgrepo, c:\\hgrepo)" - text_git_repository_note: "Bare、かつ、ローカルリポジトリ (例: /gitrepo, c:\\gitrepo)" + text_git_repository_note: "ローカルのベアリポジトリ (例: /gitrepo, c:\\gitrepo)" text_scm_command: コマンド text_scm_command_version: バージョン text_scm_config: バージョン管理システムのコマンドをconfig/configuration.ymlで設定できます。設定後、Redmineを再起動してください。 From 00b518c51f1e1a2ed904bb345fcbf618cd03e939 Mon Sep 17 00:00:00 2001 From: Jean-Philippe Lang Date: Sun, 19 Jun 2016 11:49:57 +0000 Subject: [PATCH 0085/1117] CHANGELOG for 3.3.0. git-svn-id: http://svn.redmine.org/redmine/trunk@15575 e93f8b46-1217-0410-a6f0-8f06a7374b81 --- doc/CHANGELOG | 112 ++++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 112 insertions(+) diff --git a/doc/CHANGELOG b/doc/CHANGELOG index 24af2b7ff..1c646d748 100644 --- a/doc/CHANGELOG +++ b/doc/CHANGELOG @@ -4,6 +4,118 @@ Redmine - project management software Copyright (C) 2006-2016 Jean-Philippe Lang http://www.redmine.org/ +== 2016-06-19 v3.3.0 + +* Defect #5880: Only consider open subtasks when computing the priority of a parent issue +* Defect #8628: "Related to" reference may yield circular dependency error message +* Defect #12893: Copying an issue does not copy parent task id +* Defect #13654: Can't set parent issue when issue relations among child issues are present +* Defect #15777: Watched issues count on "My page" is shown for all issues instead of only open ones +* Defect #17580: After copying a task, setting the parent as the orignal task's parent triggers an error +* Defect #19924: Adding subtask takes very long +* Defect #20882: % done: progress bar blocked at 80 in the issue list +* Defect #21037: Issue show : bullet points not aligned if sub-task is in a different project +* Defect #21433: "version-completed" class is never set when version has no due date +* Defect #21674: The LDAP connection test does not check the credentials +* Defect #21695: Warning "Can't mass-assign protected attributes for IssueRelation: issue_to_id" +* Defect #21742: Received text attachments doesn't hold the original encoding on Ruby >= 2.1 +* Defect #21855: Gravatar get images over http instead https +* Defect #21856: I18n backend does not support original i18n Pluralization +* Defect #21861: typo: s/creditentials/credentials/ +* Defect #22059: Issue percentage selector extends screen border +* Defect #22115: Text in the "removed" part of a wiki diff is double-escaped +* Defect #22123: Totals cannot be removed completely if some columns are set in the global settings +* Defect #22135: Semi colon is spelled semicolon +* Defect #22405: SQL server: non ASCII filter does not work +* Defect #22493: Test code bug in application_helper_test +* Defect #22745: Rest API for Custom Fields does not return keys for key/value types +* Defect #23044: Typo in Azerbaijani general_lang_name +* Defect #23054: Clearing time entry custom fields while bulk editing results in values set to __none__ +* Defect #23067: Custom field List Link values to URL breaks on entries with spaces +* Feature #285: Tracker role-based permissioning +* Feature #1725: Delete button on comments +* Feature #4266: Display changeset comment on repository diff view. +* Feature #4806: Filter the issue list by issue ids +* Feature #5536: Simplify Wiki Page creation ("Add Page" link) +* Feature #5754: Allow addition of watchers via bulk edit context menu +* Feature #6204: Make the "New issue" menu item optional +* Feature #7017: Add watchers from To and Cc fields in issue replies +* Feature #7839: Limit trackers for new issue to certain roles +* Feature #12456: Add units in history for estimated time +* Feature #12909: Drag'n'drop order configuration for statuses, trackers, roles... +* Feature #13718: Accept dots in JSONP callback +* Feature #14462: Previous/next links may be lost after editing the issue +* Feature #14574: "I don't want to be notified of changes that I make myself" as Default for all User +* Feature #14830: REST API : Add support for attaching file to Wiki pages +* Feature #14937: Code highlighting toolbar button +* Feature #15880: Consistent, global button/menu to add new content +* Feature #20985: Include private_notes property in xml/json Journals output +* Feature #21125: Removing attachment after rollback transaction +* Feature #21421: Security Notifications when security related things are changed +* Feature #21500: Add the "Hide my email address" option on the registration form +* Feature #21757: Add Total spent hours and Estimated hours to the REST API response +* Feature #22018: Add id and class for easier styling of query filters +* Feature #22058: Show image attachments and repo entries instead of downloading them +* Feature #22147: Change "Related issues" label for generic grouped query filters +* Feature #22381: Require password reset on initial setup for default admin account +* Feature #22383: Support of default Active Record (I18n) transliteration paths +* Feature #22482: Respond with "No preview available" instead of sending the file when no preview is available +* Feature #22951: Make Tracker and Status map-able for CSV import +* Feature #22987: Ruby 2.3 support +* Feature #23020: Default assigned_to when receiving emails +* Feature #23107: Update CodeRay to v1.1.1. +* Patch #3551: Additional case of USER_FORMAT, #{lastname}#{firstname} without any sperator +* Patch #6277: REST API for Search +* Patch #14680: Change Simplified Chinese translation for version 'field_effective_date' +* Patch #14828: Patch to add support for deleting attachments via API +* Patch #19468: Replace jQuery UI Datepicker with native browser date fields when available +* Patch #20632: Tab left/right buttons for project menu +* Patch #21256: Use CSS instead of image_tag() to show icons for better theming support +* Patch #21282: Remove left position from gantt issue tooltip +* Patch #21434: Additional CSS class for version status +* Patch #21474: Adding issue css classes to subtasks and relations tr +* Patch #21497: Tooltip on progress bar +* Patch #21541: Russian translation improvement +* Patch #21582: Performance in User#roles_for_project +* Patch #21583: Use association instead of a manual JOIN in Project#rolled_up_trackers +* Patch #21587: Additional view hook for body_top +* Patch #21611: Do not collect ids of subtree in Query#project_statement +* Patch #21628: Correct Turkish translation +* Patch #21632: Updated Estonian translation +* Patch #21663: Wrap textilizable with DIV containing wiki class +* Patch #21678: Add missing wiki container for news comments +* Patch #21685: Change Spanish Panama thousand delimiters and separator +* Patch #21738: Add .sql to mime-types +* Patch #21747: Catalan translation +* Patch #21776: Add status, assigned_to and done_ratio classes to issue subtasks +* Patch #21805: Improve accessibility for icon-only links +* Patch #21931: Simplified Chinese translation for 3.3 (some fixes) +* Patch #21942: Fix Czech translation of field_time_entries_visibility +* Patch #21944: Bugfix: Hide custom field link values from being shown when value is empty +* Patch #21947: Improve page header title for deeply nested project structures (+ improved XSS resilience) +* Patch #21963: German translations change +* Patch #21985: Increase space between menu items +* Patch #21991: Japanese wiki_syntax_detailed_textile.html translation improvement +* Patch #22078: Incorrect French translation of :setting_issue_group_assignment +* Patch #22126: Update for Lithuanian translation +* Patch #22138: fix Korean translation typo +* Patch #22277: Add id to issue query forms to ease styling within themes +* Patch #22309: Add styles for blockquote in email notifications +* Patch #22315: Change English translation for field_effective_date: "Date" to "Due date" +* Patch #22320: Respect user's timezone when comparing / parsing Dates +* Patch #22345: Trackers that have parent_issue_id in their disabled_core_fields should not be selectable for new child issues +* Patch #22376: Change Japanese translation for label_issue_watchers +* Patch #22401: Notify the user of missing attachments +* Patch #22496: Add text wrap for multiple value list custom fields +* Patch #22506: Updated Korean locale data +* Patch #22693: Add styles for pre in email notifications +* Patch #22724: Change Japanese translation for "last name" and "first name" +* Patch #22756: Edit versions links on the roadmap +* Patch #23021: fix Russian "setting_thumbnails_enabled" misspelling +* Patch #23065: Fix confusing Japanese translation for permission_manage_related_issues +* Patch #23083: Allow filtering for system-shared versions in version custom fields in the global issues view +* Patch #23108: Change Japanese translation for text_git_repository_note + == 2016-06-05 v3.2.3 * Defect #22808: Malformed SQL query with SQLServer when grouping and sorting by fixed version From 5f6cc72b015df69c455394355ad4478034055256 Mon Sep 17 00:00:00 2001 From: Jean-Philippe Lang Date: Sun, 19 Jun 2016 12:05:34 +0000 Subject: [PATCH 0086/1117] Reverts r15573 (#23108, #23109). git-svn-id: http://svn.redmine.org/redmine/trunk@15577 e93f8b46-1217-0410-a6f0-8f06a7374b81 --- config/locales/ja.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/config/locales/ja.yml b/config/locales/ja.yml index 6390e3496..5c22249ee 100644 --- a/config/locales/ja.yml +++ b/config/locales/ja.yml @@ -939,7 +939,7 @@ ja: text_warn_on_leaving_unsaved: このページから移動すると、保存されていないデータが失われます。 text_scm_path_encoding_note: "デフォルト: UTF-8" text_mercurial_repository_note: "ローカルリポジトリ (例: /hgrepo, c:\\hgrepo)" - text_git_repository_note: "ローカルのベアリポジトリ (例: /gitrepo, c:\\gitrepo)" + text_git_repository_note: "Bare、かつ、ローカルリポジトリ (例: /gitrepo, c:\\gitrepo)" text_scm_command: コマンド text_scm_command_version: バージョン text_scm_config: バージョン管理システムのコマンドをconfig/configuration.ymlで設定できます。設定後、Redmineを再起動してください。 From 3f20ab690d08af503a06a55e93d605bd6a12a84c Mon Sep 17 00:00:00 2001 From: Jean-Philippe Lang Date: Sun, 19 Jun 2016 12:08:03 +0000 Subject: [PATCH 0087/1117] Removes #23108 from CHANGELOG (#23108, #23109). git-svn-id: http://svn.redmine.org/redmine/trunk@15579 e93f8b46-1217-0410-a6f0-8f06a7374b81 --- doc/CHANGELOG | 1 - 1 file changed, 1 deletion(-) diff --git a/doc/CHANGELOG b/doc/CHANGELOG index 1c646d748..7ad4178f5 100644 --- a/doc/CHANGELOG +++ b/doc/CHANGELOG @@ -114,7 +114,6 @@ http://www.redmine.org/ * Patch #23021: fix Russian "setting_thumbnails_enabled" misspelling * Patch #23065: Fix confusing Japanese translation for permission_manage_related_issues * Patch #23083: Allow filtering for system-shared versions in version custom fields in the global issues view -* Patch #23108: Change Japanese translation for text_git_repository_note == 2016-06-05 v3.2.3 From 1b10649783e2884fde72501bf86a78b68f24ea57 Mon Sep 17 00:00:00 2001 From: Jean-Philippe Lang Date: Mon, 20 Jun 2016 19:03:53 +0000 Subject: [PATCH 0088/1117] Sort messages by ids to avoid the left join. The query was really slow with PostgreSQL and a few thousands messages, and last_message_id column was storing the highest id anyway. git-svn-id: http://svn.redmine.org/redmine/trunk@15582 e93f8b46-1217-0410-a6f0-8f06a7374b81 --- app/controllers/boards_controller.rb | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-) diff --git a/app/controllers/boards_controller.rb b/app/controllers/boards_controller.rb index 9ab80f4f9..df2567fab 100644 --- a/app/controllers/boards_controller.rb +++ b/app/controllers/boards_controller.rb @@ -37,15 +37,14 @@ class BoardsController < ApplicationController respond_to do |format| format.html { sort_init 'updated_on', 'desc' - sort_update 'created_on' => "#{Message.table_name}.created_on", + sort_update 'created_on' => "#{Message.table_name}.id", 'replies' => "#{Message.table_name}.replies_count", - 'updated_on' => "COALESCE(last_replies_messages.created_on, #{Message.table_name}.created_on)" + 'updated_on' => "COALESCE(#{Message.table_name}.last_reply_id, #{Message.table_name}.id)" @topic_count = @board.topics.count @topic_pages = Paginator.new @topic_count, per_page_option, params['page'] @topics = @board.topics. - reorder("#{Message.table_name}.sticky DESC"). - joins("LEFT OUTER JOIN #{Message.table_name} last_replies_messages ON last_replies_messages.id = #{Message.table_name}.last_reply_id"). + reorder(:sticky => :desc). limit(@topic_pages.per_page). offset(@topic_pages.offset). order(sort_clause). @@ -56,7 +55,7 @@ class BoardsController < ApplicationController } format.atom { @messages = @board.messages. - reorder('created_on DESC'). + reorder(:id => :desc). includes(:author, :board). limit(Setting.feeds_limit.to_i). to_a From 48a79bc0938c7f2f7b0d3f78761b14b1a0a51918 Mon Sep 17 00:00:00 2001 From: Jean-Philippe Lang Date: Tue, 28 Jun 2016 19:08:04 +0000 Subject: [PATCH 0089/1117] Add params to Redmine::Search::Fetcher#initialize optional parameter (#23153). Patch by okkez. git-svn-id: http://svn.redmine.org/redmine/trunk@15583 e93f8b46-1217-0410-a6f0-8f06a7374b81 --- app/controllers/search_controller.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app/controllers/search_controller.rb b/app/controllers/search_controller.rb index 2888a8889..cc1970ef1 100644 --- a/app/controllers/search_controller.rb +++ b/app/controllers/search_controller.rb @@ -68,7 +68,7 @@ class SearchController < ApplicationController fetcher = Redmine::Search::Fetcher.new( @question, User.current, @scope, projects_to_search, :all_words => @all_words, :titles_only => @titles_only, :attachments => @search_attachments, :open_issues => @open_issues, - :cache => params[:page].present? + :cache => params[:page].present?, :params => params ) if fetcher.tokens.present? From 48c1cbe69b63d712f0abdd56a43465558b49677d Mon Sep 17 00:00:00 2001 From: Jean-Philippe Lang Date: Tue, 28 Jun 2016 19:09:11 +0000 Subject: [PATCH 0090/1117] Add hook view_search_index_options_content_bottom (#23153). Patch by okkez. git-svn-id: http://svn.redmine.org/redmine/trunk@15584 e93f8b46-1217-0410-a6f0-8f06a7374b81 --- app/views/search/index.html.erb | 1 + 1 file changed, 1 insertion(+) diff --git a/app/views/search/index.html.erb b/app/views/search/index.html.erb index 6fceaeab2..53ec17a63 100644 --- a/app/views/search/index.html.erb +++ b/app/views/search/index.html.erb @@ -26,6 +26,7 @@

          + <%= call_hook(:view_search_index_options_content_bottom) %> <%= hidden_field_tag 'options', '', :id => 'show-options' %> From b6982e755b52b6b448001d4d55fdb71550af84a7 Mon Sep 17 00:00:00 2001 From: Jean-Philippe Lang Date: Tue, 28 Jun 2016 19:15:30 +0000 Subject: [PATCH 0091/1117] Adds CSS class for closed subprojects on project overview (#23152). git-svn-id: http://svn.redmine.org/redmine/trunk@15585 e93f8b46-1217-0410-a6f0-8f06a7374b81 --- app/views/projects/show.html.erb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app/views/projects/show.html.erb b/app/views/projects/show.html.erb index 3e384530c..b68a5ac26 100644 --- a/app/views/projects/show.html.erb +++ b/app/views/projects/show.html.erb @@ -95,7 +95,7 @@ <% if @subprojects.any? %>

          <%=l(:label_subproject_plural)%>

          - <%= @subprojects.collect{|p| link_to p, project_path(p)}.join(", ").html_safe %> + <%= @subprojects.collect{|p| link_to p, project_path(p), :class => p.css_classes}.join(", ").html_safe %>
          <% end %> From 83777f727a4291e63962470070b9a1bba9e42f27 Mon Sep 17 00:00:00 2001 From: Jean-Philippe Lang Date: Tue, 28 Jun 2016 20:31:08 +0000 Subject: [PATCH 0092/1117] Assignable users should not include users that cannot view the tracker (#23172). git-svn-id: http://svn.redmine.org/redmine/trunk@15586 e93f8b46-1217-0410-a6f0-8f06a7374b81 --- app/controllers/context_menus_controller.rb | 12 ++---------- app/models/issue.rb | 2 +- app/models/project.rb | 15 +++++++++++++-- app/models/role.rb | 7 +++++++ test/unit/issue_test.rb | 13 +++++++++++++ 5 files changed, 36 insertions(+), 13 deletions(-) diff --git a/app/controllers/context_menus_controller.rb b/app/controllers/context_menus_controller.rb index 66ec35085..dc8e72609 100644 --- a/app/controllers/context_menus_controller.rb +++ b/app/controllers/context_menus_controller.rb @@ -35,16 +35,8 @@ class ContextMenusController < ApplicationController :add_watchers => User.current.allowed_to?(:add_issue_watchers, @projects), :delete => @issues.all?(&:deletable?) } - if @project - if @issue - @assignables = @issue.assignable_users - else - @assignables = @project.assignable_users - end - else - #when multiple projects, we only keep the intersection of each set - @assignables = @projects.map(&:assignable_users).reduce(:&) - end + + @assignables = @issues.map(&:assignable_users).reduce(:&) @trackers = @projects.map {|p| Issue.allowed_target_trackers(p) }.reduce(:&) @versions = @projects.map {|p| p.shared_versions.open}.reduce(:&) diff --git a/app/models/issue.rb b/app/models/issue.rb index 9cf29532a..5b6ae3041 100644 --- a/app/models/issue.rb +++ b/app/models/issue.rb @@ -854,7 +854,7 @@ class Issue < ActiveRecord::Base # Users the issue can be assigned to def assignable_users - users = project.assignable_users.to_a + users = project.assignable_users(tracker).to_a users << author if author && author.active? users << assigned_to if assigned_to users.uniq.sort diff --git a/app/models/project.rb b/app/models/project.rb index b6bc13dde..c48c54855 100644 --- a/app/models/project.rb +++ b/app/models/project.rb @@ -512,16 +512,27 @@ class Project < ActiveRecord::Base end # Return a Principal scope of users/groups issues can be assigned to - def assignable_users + def assignable_users(tracker=nil) + return @assignable_users[tracker] if @assignable_users && @assignable_users[tracker] + types = ['User'] types << 'Group' if Setting.issue_group_assignment? - @assignable_users ||= Principal. + scope = Principal. active. joins(:members => :roles). where(:type => types, :members => {:project_id => id}, :roles => {:assignable => true}). uniq. sorted + + if tracker + # Rejects users that cannot the view the tracker + roles = Role.where(:assignable => true).select {|role| role.permissions_tracker?(:view_issues, tracker)} + scope = scope.where(:roles => {:id => roles.map(&:id)}) + end + + @assignable_users ||= {} + @assignable_users[tracker] = scope end # Returns the mail addresses of users that should be always notified on project events diff --git a/app/models/role.rb b/app/models/role.rb index 89538aa4d..86fe73070 100644 --- a/app/models/role.rb +++ b/app/models/role.rb @@ -222,6 +222,13 @@ class Role < ActiveRecord::Base permissions_all_trackers[permission.to_s].to_s != '0' end + # Returns true if permission is given for the tracker + # (explicitly or for all trackers) + def permissions_tracker?(permission, tracker) + permissions_all_trackers?(permission) || + permissions_tracker_ids?(permission, tracker.try(:id)) + end + # Sets the trackers that are allowed for a permission. # tracker_ids can be an array of tracker ids or :all for # no restrictions. diff --git a/test/unit/issue_test.rb b/test/unit/issue_test.rb index 3b7391a3c..f27fd1d1e 100644 --- a/test/unit/issue_test.rb +++ b/test/unit/issue_test.rb @@ -2292,6 +2292,19 @@ class IssueTest < ActiveSupport::TestCase end end + def test_assignable_users_should_not_include_users_that_cannot_view_the_tracker + user = User.find(3) + role = Role.find(2) + role.set_permission_trackers :view_issues, [1, 3] + role.save! + + issue1 = Issue.new(:project_id => 1, :tracker_id => 1) + issue2 = Issue.new(:project_id => 1, :tracker_id => 2) + + assert_include user, issue1.assignable_users + assert_not_include user, issue2.assignable_users + end + def test_create_should_send_email_notification ActionMailer::Base.deliveries.clear issue = Issue.new(:project_id => 1, :tracker_id => 1, From 690a6b79285278e23b3d7f69161581575c7f169f Mon Sep 17 00:00:00 2001 From: Jean-Philippe Lang Date: Wed, 29 Jun 2016 15:29:57 +0000 Subject: [PATCH 0093/1117] Make the issue id from email notifications linkable to issue page (#23180). Patch by Marius BALTEANU. git-svn-id: http://svn.redmine.org/redmine/trunk@15587 e93f8b46-1217-0410-a6f0-8f06a7374b81 --- app/views/mailer/issue_add.html.erb | 2 +- app/views/mailer/issue_edit.html.erb | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/app/views/mailer/issue_add.html.erb b/app/views/mailer/issue_add.html.erb index 99fd08d14..14292be96 100644 --- a/app/views/mailer/issue_add.html.erb +++ b/app/views/mailer/issue_add.html.erb @@ -1,3 +1,3 @@ -<%= l(:text_issue_added, :id => "##{@issue.id}", :author => h(@issue.author)) %> +<%= l(:text_issue_added, :id => link_to("##{@issue.id}", @issue_url), :author => h(@issue.author)).html_safe %>
          <%= render :partial => 'issue', :formats => [:html], :locals => { :issue => @issue, :users => @users, :issue_url => @issue_url } %> diff --git a/app/views/mailer/issue_edit.html.erb b/app/views/mailer/issue_edit.html.erb index e3b6f5c6c..b68843fba 100644 --- a/app/views/mailer/issue_edit.html.erb +++ b/app/views/mailer/issue_edit.html.erb @@ -1,7 +1,7 @@ <% if @journal.private_notes? %> (<%= l(:field_private_notes) %>) <% end %> -<%= l(:text_issue_updated, :id => "##{@issue.id}", :author => h(@journal.user)) %> +<%= l(:text_issue_updated, :id => link_to("##{@issue.id}", @issue_url), :author => h(@journal.user)).html_safe %>
            <% details_to_strings(@journal_details, false, :only_path => false).each do |string| %> From a4e843842fd040a1ea3071cfc8303b809de80bce Mon Sep 17 00:00:00 2001 From: Jean-Philippe Lang Date: Wed, 29 Jun 2016 15:33:07 +0000 Subject: [PATCH 0094/1117] Adds an assertion for this (#23180). git-svn-id: http://svn.redmine.org/redmine/trunk@15588 e93f8b46-1217-0410-a6f0-8f06a7374b81 --- test/unit/mailer_test.rb | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/test/unit/mailer_test.rb b/test/unit/mailer_test.rb index f875d3cbd..8f9763288 100644 --- a/test/unit/mailer_test.rb +++ b/test/unit/mailer_test.rb @@ -45,6 +45,10 @@ class MailerTest < ActiveSupport::TestCase assert_not_nil mail assert_select_email do + # link to the main ticket on issue id + assert_select 'a[href=?]', + 'https://mydomain.foo/issues/2#change-3', + :text => '#2' # link to the main ticket assert_select 'a[href=?]', 'https://mydomain.foo/issues/2#change-3', From 06818eb3b58898fda6baf3d3c3c457c27ab154ec Mon Sep 17 00:00:00 2001 From: Jean-Philippe Lang Date: Wed, 29 Jun 2016 15:44:05 +0000 Subject: [PATCH 0095/1117] Add the new pagination style in the activity page (#23192). Patch by Marius BALTEANU. git-svn-id: http://svn.redmine.org/redmine/trunk@15589 e93f8b46-1217-0410-a6f0-8f06a7374b81 --- app/views/activities/index.html.erb | 12 ++++++++---- 1 file changed, 8 insertions(+), 4 deletions(-) diff --git a/app/views/activities/index.html.erb b/app/views/activities/index.html.erb index c191ccba5..a135f97ff 100644 --- a/app/views/activities/index.html.erb +++ b/app/views/activities/index.html.erb @@ -21,18 +21,22 @@ <%= content_tag('p', l(:label_no_data), :class => 'nodata') if @events_by_day.empty? %> -
            + +
              +
            -
            + +
            + +
          +   <% other_formats_links do |f| %> <%= f.link_to 'Atom', :url => params.merge(:from => nil, :key => User.current.rss_key) %> From 4bf74a536f72aa4f3d49cc875c16ccab472dbfa2 Mon Sep 17 00:00:00 2001 From: Jean-Philippe Lang Date: Wed, 29 Jun 2016 15:45:10 +0000 Subject: [PATCH 0096/1117] Adds missing class and removes space between previous/next links (#23192). git-svn-id: http://svn.redmine.org/redmine/trunk@15590 e93f8b46-1217-0410-a6f0-8f06a7374b81 --- app/views/activities/index.html.erb | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/app/views/activities/index.html.erb b/app/views/activities/index.html.erb index a135f97ff..f1a25e664 100644 --- a/app/views/activities/index.html.erb +++ b/app/views/activities/index.html.erb @@ -23,13 +23,12 @@
            - -
          - - - - - - - - -<% if Setting.openid? %> - - - - -<% end %> - - - - - - - - -
          <%= text_field_tag 'username', params[:username], :tabindex => '1' %>
          <%= password_field_tag 'password', nil, :tabindex => '2' %>
          <%= text_field_tag "openid_url", nil, :tabindex => '3' %>
          - <% if Setting.autologin? %> - - <% end %> -
          - <% if Setting.lost_password? %> - <%= link_to l(:label_password_lost), lost_password_path %> - <% end %> - - -
          -<% end %> + <%= form_tag(signin_path, onsubmit: 'return keepAnchorOnSignIn(this);') do %> + <%= back_url_hidden_field_tag %> + + + <%= text_field_tag 'username', params[:username], :tabindex => '1' %> + + + <%= password_field_tag 'password', nil, :tabindex => '2' %> + + <% if Setting.openid? %> + + <%= text_field_tag "openid_url", nil, :tabindex => '3' %> + <% end %> + + <% if Setting.autologin? %> + + <% end %> + + + <% end %>
          + <%= call_hook :view_account_login_bottom %> <% if params[:username].present? %> diff --git a/public/stylesheets/application.css b/public/stylesheets/application.css index 40ca4a4d8..caab43f6b 100644 --- a/public/stylesheets/application.css +++ b/public/stylesheets/application.css @@ -116,18 +116,20 @@ html>body #content { min-height: 600px; } #footer {clear: both; border-top: 1px solid #bbb; font-size: 0.9em; color: #aaa; padding: 5px; text-align:center; background:#fff;} -#login-form table {margin-top:5em; padding:1em; margin-left: auto; margin-right: auto; border: 2px solid #FDBF3B; background-color:#FFEBC1; } -#login-form table td {padding: 6px;} -#login-form label {font-weight: bold;} -#login-form input#username, #login-form input#password { width: 300px; } +#login-form {margin:5em auto 2em auto; padding:20px; width:340px; border:1px solid #FDBF3B; background-color:#FFEBC1; border-radius:4px; box-sizing: border-box;} +#login-form label {display:block; margin-bottom:5px;} +#login-form input[type=text], #login-form input[type=password] {border:1px solid #ccc; border-radius:3px; margin-bottom:15px; padding:7px; display:block; width:100%; box-sizing: border-box;} +#login-form label {font-weight:bold;} +#login-form label[for=autologin] {font-weight:normal;} +#login-form a.lost_password {float:right; font-weight:normal;} +#login-form input#openid_url {background:#fff url(../images/openid-bg.gif) no-repeat 4px 50%; padding-left:24px !important;} +#login-form input#login-submit {margin-top:15px; padding:7px; display:block; width:100%; box-sizing: border-box;} div.modal { border-radius:5px; background:#fff; z-index:50; padding:4px;} div.modal h3.title {display:none;} div.modal p.buttons {text-align:right; margin-bottom:0;} div.modal .box p {margin: 0.3em 0;} -input#openid_url { background: url(../images/openid-bg.gif) no-repeat; background-color: #fff; background-position: 0 50%; padding-left: 18px; } - .clear:after{ content: "."; display: block; height: 0; clear: both; visibility: hidden; } .mobile-show {display: none;} diff --git a/public/stylesheets/responsive.css b/public/stylesheets/responsive.css index 6997d6257..473b3368f 100644 --- a/public/stylesheets/responsive.css +++ b/public/stylesheets/responsive.css @@ -791,5 +791,7 @@ .pagination ul.pages li.current, .pagination ul.pages li.previous, .pagination ul.pages li.next {display:inline-block; width:32%; overflow:hidden;} + + #login-form {width:100%; margin-top:2em;} } From 1310f0afa9f731ea7f7678f9e7c6320ef841f26b Mon Sep 17 00:00:00 2001 From: Jean-Philippe Lang Date: Thu, 30 Jun 2016 20:07:48 +0000 Subject: [PATCH 0102/1117] Slight change to pagination style. git-svn-id: http://svn.redmine.org/redmine/trunk@15596 e93f8b46-1217-0410-a6f0-8f06a7374b81 --- public/stylesheets/application.css | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/public/stylesheets/application.css b/public/stylesheets/application.css index caab43f6b..68e550160 100644 --- a/public/stylesheets/application.css +++ b/public/stylesheets/application.css @@ -354,9 +354,6 @@ span.search_for_watchers a, span.add_attachment a {padding-left:16px; background word-wrap: break-word; border-radius: 3px; } -.pagination .per-page span.selected { - font-weight: bold; -} div.square { border: 1px solid #999; @@ -544,7 +541,7 @@ span.pagination {margin-left:3px; color:#888;} .pagination ul.pages li { display: inline-block; padding: 0; - border: 1px solid #ccc; + border: 1px solid #ddd; margin-left: -1px; line-height: 2em; margin-bottom: 1em; @@ -569,13 +566,16 @@ span.pagination {margin-left:3px; color:#888;} border-color: #628DB6; } .pagination ul.pages li.page:hover { - background-color: #EEE; + background-color: #ddd; } .pagination ul.pages li.page a:hover, .pagination ul.pages li.page a:active { - color: inherit; + color: #169; text-decoration: inherit; } +.pagination .per-page span.selected { + font-weight: bold; +} span.pagination>span {white-space:nowrap;} #search-form fieldset p {margin:0.2em 0;} From aadddc9427b4f5709432701162fad36ac9022e28 Mon Sep 17 00:00:00 2001 From: Jean-Philippe Lang Date: Thu, 30 Jun 2016 20:14:49 +0000 Subject: [PATCH 0103/1117] Don't render an empty li tag (#23192). git-svn-id: http://svn.redmine.org/redmine/trunk@15597 e93f8b46-1217-0410-a6f0-8f06a7374b81 --- app/views/activities/index.html.erb | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/app/views/activities/index.html.erb b/app/views/activities/index.html.erb index f1a25e664..748e60fd1 100644 --- a/app/views/activities/index.html.erb +++ b/app/views/activities/index.html.erb @@ -28,11 +28,11 @@ params.merge(:from => @date_to - @days - 1), :title => l(:label_date_from_to, :start => format_date(@date_to - 2*@days), :end => format_date(@date_to - @days - 1)), :accesskey => accesskey(:previous)) %> - <% unless @date_to >= User.current.today %> From c84f7243f52d966affd7487b43514ba870f45c2a Mon Sep 17 00:00:00 2001 From: Jean-Philippe Lang Date: Thu, 30 Jun 2016 20:17:19 +0000 Subject: [PATCH 0104/1117] Removed #link_to_content_update. git-svn-id: http://svn.redmine.org/redmine/trunk@15598 e93f8b46-1217-0410-a6f0-8f06a7374b81 --- app/helpers/application_helper.rb | 4 ---- app/helpers/calendars_helper.rb | 2 +- app/helpers/gantt_helper.rb | 4 ++-- app/helpers/sort_helper.rb | 2 +- app/views/activities/index.html.erb | 4 ++-- app/views/gantts/show.html.erb | 4 ++-- 6 files changed, 8 insertions(+), 12 deletions(-) diff --git a/app/helpers/application_helper.rb b/app/helpers/application_helper.rb index 288f734f2..aade3cc4d 100644 --- a/app/helpers/application_helper.rb +++ b/app/helpers/application_helper.rb @@ -1365,8 +1365,4 @@ module ApplicationHelper extend helper return self end - - def link_to_content_update(text, url_params = {}, html_options = {}) - link_to(text, url_params, html_options) - end end diff --git a/app/helpers/calendars_helper.rb b/app/helpers/calendars_helper.rb index cf624d2a8..cb1327625 100644 --- a/app/helpers/calendars_helper.rb +++ b/app/helpers/calendars_helper.rb @@ -53,6 +53,6 @@ module CalendarsHelper end def link_to_month(link_name, year, month, options={}) - link_to_content_update(h(link_name), params.merge(:year => year, :month => month), options) + link_to(link_name, params.merge(:year => year, :month => month), options) end end diff --git a/app/helpers/gantt_helper.rb b/app/helpers/gantt_helper.rb index 77d3b8364..3c68cadae 100644 --- a/app/helpers/gantt_helper.rb +++ b/app/helpers/gantt_helper.rb @@ -23,7 +23,7 @@ module GanttHelper case in_or_out when :in if gantt.zoom < 4 - link_to_content_update l(:text_zoom_in), + link_to l(:text_zoom_in), params.merge(gantt.params.merge(:zoom => (gantt.zoom + 1))), :class => 'icon icon-zoom-in' else @@ -32,7 +32,7 @@ module GanttHelper when :out if gantt.zoom > 1 - link_to_content_update l(:text_zoom_out), + link_to l(:text_zoom_out), params.merge(gantt.params.merge(:zoom => (gantt.zoom - 1))), :class => 'icon icon-zoom-out' else diff --git a/app/helpers/sort_helper.rb b/app/helpers/sort_helper.rb index d6ac8bd22..8c17f115d 100644 --- a/app/helpers/sort_helper.rb +++ b/app/helpers/sort_helper.rb @@ -223,7 +223,7 @@ module SortHelper # Add project_id to url_options url_options = url_options.merge(:project_id => params[:project_id]) if params.has_key?(:project_id) - link_to_content_update(h(caption), url_options, :class => css) + link_to(caption, url_options, :class => css) end # Returns a table header tag with a sort link for the named column diff --git a/app/views/activities/index.html.erb b/app/views/activities/index.html.erb index 748e60fd1..d3a780f0c 100644 --- a/app/views/activities/index.html.erb +++ b/app/views/activities/index.html.erb @@ -24,12 +24,12 @@
            <% unless @date_to >= User.current.today %>
          From 1c44b16023f5583a496563506ad4c4f7e5ccfbd2 Mon Sep 17 00:00:00 2001 From: Jean-Philippe Lang Date: Wed, 4 Jan 2017 20:55:38 +0000 Subject: [PATCH 0497/1117] Validate length of custom field regexp (#24283). Patch by Go MAEDA. git-svn-id: http://svn.redmine.org/redmine/trunk@16134 e93f8b46-1217-0410-a6f0-8f06a7374b81 --- app/models/custom_field.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app/models/custom_field.rb b/app/models/custom_field.rb index 400ee56b5..717df95e8 100644 --- a/app/models/custom_field.rb +++ b/app/models/custom_field.rb @@ -32,7 +32,7 @@ class CustomField < ActiveRecord::Base validates_presence_of :name, :field_format validates_uniqueness_of :name, :scope => :type validates_length_of :name, :maximum => 30 - validates_length_of :regexp, maximum: 30 + validates_length_of :regexp, maximum: 255 validates_inclusion_of :field_format, :in => Proc.new { Redmine::FieldFormat.available_formats } validate :validate_custom_field attr_protected :id From 84732abd0ad79403c20b978e827e6e3dceae3286 Mon Sep 17 00:00:00 2001 From: Jean-Philippe Lang Date: Wed, 4 Jan 2017 21:13:28 +0000 Subject: [PATCH 0498/1117] Missing "next" pagination link when looking at yesterday's activity (#18399). MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Patch by Felix Schäfer. git-svn-id: http://svn.redmine.org/redmine/trunk@16137 e93f8b46-1217-0410-a6f0-8f06a7374b81 --- app/views/activities/index.html.erb | 2 +- test/functional/activities_controller_test.rb | 18 ++++++++++++++++++ 2 files changed, 19 insertions(+), 1 deletion(-) diff --git a/app/views/activities/index.html.erb b/app/views/activities/index.html.erb index f86390ab3..c3026fb63 100644 --- a/app/views/activities/index.html.erb +++ b/app/views/activities/index.html.erb @@ -28,7 +28,7 @@ {:params => request.query_parameters.merge(:from => @date_to - @days - 1)}, :title => l(:label_date_from_to, :start => format_date(@date_to - 2*@days), :end => format_date(@date_to - @days - 1)), :accesskey => accesskey(:previous)) %> - <% unless @date_to >= User.current.today %><% unless @date_to > User.current.today %>
          From c7f03c00a92289f743298cf9bd0b4a13b0ac3fae Mon Sep 17 00:00:00 2001 From: Jean-Philippe Lang Date: Mon, 16 Jan 2017 18:12:49 +0000 Subject: [PATCH 0561/1117] Use exists? instead of count (#24839). Patch by Vincent Robert and Go MAEDA. git-svn-id: http://svn.redmine.org/redmine/trunk@16211 e93f8b46-1217-0410-a6f0-8f06a7374b81 --- app/models/repository/git.rb | 2 +- app/views/trackers/index.html.erb | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/app/models/repository/git.rb b/app/models/repository/git.rb index 26e0d393d..195c87800 100644 --- a/app/models/repository/git.rb +++ b/app/models/repository/git.rb @@ -143,7 +143,7 @@ class Repository::Git < Repository return if prev_db_heads.sort == repo_heads.sort h["db_consistent"] ||= {} - if changesets.count == 0 + if ! changesets.exists? h["db_consistent"]["ordering"] = 1 merge_extra_info(h) self.save diff --git a/app/views/trackers/index.html.erb b/app/views/trackers/index.html.erb index 5f40cf0ee..7ee6387fd 100644 --- a/app/views/trackers/index.html.erb +++ b/app/views/trackers/index.html.erb @@ -16,7 +16,7 @@ "> <%= link_to tracker.name, edit_tracker_path(tracker) %> - <% unless tracker.workflow_rules.count > 0 %> + <% unless tracker.workflow_rules.exists? %> <%= l(:text_tracker_no_workflow) %> (<%= link_to l(:button_edit), workflows_edit_path(:tracker_id => tracker) %>) From 6d8d0e29d2abe6ae2c6ecfa0ee44338726fa55c6 Mon Sep 17 00:00:00 2001 From: Toshi MARUYAMA Date: Tue, 17 Jan 2017 04:45:56 +0000 Subject: [PATCH 0562/1117] Traditional Chinese translation for 3.2-stable updated by ChunChang Lo (#24824) git-svn-id: http://svn.redmine.org/redmine/trunk@16212 e93f8b46-1217-0410-a6f0-8f06a7374b81 --- config/locales/zh-TW.yml | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/config/locales/zh-TW.yml b/config/locales/zh-TW.yml index dfb8bb17b..1d1ae41c4 100644 --- a/config/locales/zh-TW.yml +++ b/config/locales/zh-TW.yml @@ -302,6 +302,7 @@ error_no_tracker_allowed_for_new_issue_in_project: "此專案沒有您可用來建立新議題的追蹤標籤" error_no_projects_with_tracker_allowed_for_new_issue: "此追蹤標籤沒有您可用來建立新議題的專案" error_move_of_child_not_possible: "子任務 %{child} 無法被搬移至新的專案: %{errors}" + error_cannot_reassign_time_entries_to_an_issue_about_to_be_deleted: "無法將耗用工時重新分配給即將被刪除的問題" mail_subject_lost_password: 您的 Redmine 網站密碼 mail_body_lost_password: '欲變更您的 Redmine 網站密碼, 請點選以下鏈結:' @@ -1289,7 +1290,5 @@ description_date_from: 輸入起始日期 description_date_to: 輸入結束日期 text_repository_identifier_info: '僅允許使用小寫英文字母 (a-z), 阿拉伯數字, 虛線與底線。
          一旦儲存之後, 代碼便無法再次被更改。' - error_cannot_reassign_time_entries_to_an_issue_about_to_be_deleted: Spent time cannot - be reassigned to an issue that is about to be deleted setting_timelog_required_fields: Required fields for time logs label_attribute_of_object: '%{object_name}''s %{name}' From dfe2a91684ea514bd25152f078090554868256fc Mon Sep 17 00:00:00 2001 From: Toshi MARUYAMA Date: Tue, 17 Jan 2017 04:46:07 +0000 Subject: [PATCH 0563/1117] Traditional Chinese translation for trunk updated by ChunChang Lo (#24824) git-svn-id: http://svn.redmine.org/redmine/trunk@16213 e93f8b46-1217-0410-a6f0-8f06a7374b81 --- config/locales/zh-TW.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/config/locales/zh-TW.yml b/config/locales/zh-TW.yml index 1d1ae41c4..a2b6d7e0b 100644 --- a/config/locales/zh-TW.yml +++ b/config/locales/zh-TW.yml @@ -538,6 +538,7 @@ setting_attachment_extensions_denied: 禁止使用的副檔名 setting_new_item_menu_tab: 建立新物件的專案功能分頁 setting_commit_logs_formatting: 套用文字格式至認可訊息 + setting_timelog_required_fields: 工時記錄必填欄位 permission_add_project: 建立專案 permission_add_subprojects: 建立子專案 @@ -1290,5 +1291,4 @@ description_date_from: 輸入起始日期 description_date_to: 輸入結束日期 text_repository_identifier_info: '僅允許使用小寫英文字母 (a-z), 阿拉伯數字, 虛線與底線。
          一旦儲存之後, 代碼便無法再次被更改。' - setting_timelog_required_fields: Required fields for time logs label_attribute_of_object: '%{object_name}''s %{name}' From 82afdc7f78581d7c209926c0cce2eaee10915c4d Mon Sep 17 00:00:00 2001 From: Jean-Philippe Lang Date: Tue, 17 Jan 2017 19:41:35 +0000 Subject: [PATCH 0564/1117] Moves sort joins for issues to IssueQuery. git-svn-id: http://svn.redmine.org/redmine/trunk@16216 e93f8b46-1217-0410-a6f0-8f06a7374b81 --- app/models/issue_query.rb | 12 ++++++++++++ app/models/query.rb | 3 --- 2 files changed, 12 insertions(+), 3 deletions(-) diff --git a/app/models/issue_query.rb b/app/models/issue_query.rb index 3e2e7a64d..61750557a 100644 --- a/app/models/issue_query.rb +++ b/app/models/issue_query.rb @@ -505,4 +505,16 @@ class IssueQuery < Query IssueRelation::TYPES.keys.each do |relation_type| alias_method "sql_for_#{relation_type}_field".to_sym, :sql_for_relations end + + def joins_for_order_statement(order_options) + joins = [super] + + if order_options + if order_options.include?('authors') + joins << "LEFT OUTER JOIN #{User.table_name} authors ON authors.id = #{queried_table_name}.author_id" + end + end + + joins.any? ? joins.join(' ') : nil + end end diff --git a/app/models/query.rb b/app/models/query.rb index 7a70af620..dc3947400 100644 --- a/app/models/query.rb +++ b/app/models/query.rb @@ -1297,9 +1297,6 @@ class Query < ActiveRecord::Base joins = [] if order_options - if order_options.include?('authors') - joins << "LEFT OUTER JOIN #{User.table_name} authors ON authors.id = #{queried_table_name}.author_id" - end order_options.scan(/cf_\d+/).uniq.each do |name| column = available_columns.detect {|c| c.name.to_s == name} join = column && column.custom_field.join_for_order_statement From 4a5ebfb778455ce0e0a989942714511a7f97f756 Mon Sep 17 00:00:00 2001 From: Jean-Philippe Lang Date: Tue, 17 Jan 2017 21:29:22 +0000 Subject: [PATCH 0565/1117] Fixed that Query#has_column? returns false with default columns. git-svn-id: http://svn.redmine.org/redmine/trunk@16217 e93f8b46-1217-0410-a6f0-8f06a7374b81 --- app/models/query.rb | 3 ++- test/unit/query_test.rb | 8 ++++++++ 2 files changed, 10 insertions(+), 1 deletion(-) diff --git a/app/models/query.rb b/app/models/query.rb index dc3947400..aba3dc854 100644 --- a/app/models/query.rb +++ b/app/models/query.rb @@ -679,7 +679,8 @@ class Query < ActiveRecord::Base end def has_column?(column) - column_names && column_names.include?(column.is_a?(QueryColumn) ? column.name : column) + name = column.is_a?(QueryColumn) ? column.name : column + columns.detect {|c| c.name == name} end def has_custom_field_column? diff --git a/test/unit/query_test.rb b/test/unit/query_test.rb index 6b555b94a..e6761c211 100644 --- a/test/unit/query_test.rb +++ b/test/unit/query_test.rb @@ -1170,6 +1170,14 @@ class QueryTest < ActiveSupport::TestCase assert !q.has_column?(category_column) end + def test_has_column_should_return_true_for_default_column + with_settings :issue_list_default_columns => %w(tracker subject) do + q = IssueQuery.new + assert q.has_column?(:tracker) + assert !q.has_column?(:category) + end + end + def test_inline_and_block_columns q = IssueQuery.new q.column_names = ['subject', 'description', 'tracker'] From 3c0c16901c1ae4794f8543ca6f3404a98ff2d82d Mon Sep 17 00:00:00 2001 From: Toshi MARUYAMA Date: Wed, 18 Jan 2017 03:50:05 +0000 Subject: [PATCH 0566/1117] regenerate translation for label_user_mail_option_only_(assigned|owner) in all languages (#24177) git-svn-id: http://svn.redmine.org/redmine/trunk@16218 e93f8b46-1217-0410-a6f0-8f06a7374b81 --- config/locales/ar.yml | 4 ++-- config/locales/az.yml | 4 ++-- config/locales/bg.yml | 4 ++-- config/locales/bs.yml | 4 ++-- config/locales/ca.yml | 4 ++-- config/locales/cs.yml | 4 ++-- config/locales/da.yml | 4 ++-- config/locales/de.yml | 4 ++-- config/locales/el.yml | 4 ++-- config/locales/en-GB.yml | 4 ++-- config/locales/es-PA.yml | 4 ++-- config/locales/es.yml | 4 ++-- config/locales/et.yml | 4 ++-- config/locales/eu.yml | 4 ++-- config/locales/fa.yml | 4 ++-- config/locales/fi.yml | 4 ++-- config/locales/fr.yml | 4 ++-- config/locales/gl.yml | 4 ++-- config/locales/he.yml | 4 ++-- config/locales/hr.yml | 4 ++-- config/locales/hu.yml | 4 ++-- config/locales/id.yml | 4 ++-- config/locales/it.yml | 4 ++-- config/locales/ko.yml | 4 ++-- config/locales/lt.yml | 4 ++-- config/locales/lv.yml | 4 ++-- config/locales/mk.yml | 4 ++-- config/locales/mn.yml | 4 ++-- config/locales/nl.yml | 4 ++-- config/locales/no.yml | 4 ++-- config/locales/pl.yml | 4 ++-- config/locales/pt-BR.yml | 4 ++-- config/locales/pt.yml | 4 ++-- config/locales/ro.yml | 4 ++-- config/locales/ru.yml | 4 ++-- config/locales/sk.yml | 4 ++-- config/locales/sl.yml | 4 ++-- config/locales/sq.yml | 4 ++-- config/locales/sr-YU.yml | 4 ++-- config/locales/sr.yml | 4 ++-- config/locales/sv.yml | 4 ++-- config/locales/th.yml | 4 ++-- config/locales/tr.yml | 4 ++-- config/locales/uk.yml | 4 ++-- config/locales/vi.yml | 4 ++-- config/locales/zh-TW.yml | 4 ++-- config/locales/zh.yml | 4 ++-- 47 files changed, 94 insertions(+), 94 deletions(-) diff --git a/config/locales/ar.yml b/config/locales/ar.yml index 4af8ade64..675cae722 100644 --- a/config/locales/ar.yml +++ b/config/locales/ar.yml @@ -757,8 +757,6 @@ ar: label_user_mail_option_selected: "الخيارات المظللة فقط" label_user_mail_option_none: "لم يتم تحديد اي خيارات" label_user_mail_option_only_my_events: "السماح لي فقط بمشاهدة الاحداث الخاصة" - label_user_mail_option_only_assigned: "فقط الخيارات التي تم تعيينها" - label_user_mail_option_only_owner: "فقط للخيارات التي املكها" label_user_mail_no_self_notified: "لا تريد إعلامك بالتغيرات التي تجريها بنفسك" label_registration_activation_by_email: حساب التنشيط عبر البريد الإلكتروني label_registration_manual_activation: تنشيط الحساب اليدوي @@ -1224,3 +1222,5 @@ ar: be reassigned to an issue that is about to be deleted setting_timelog_required_fields: Required fields for time logs label_attribute_of_object: '%{object_name}''s %{name}' + label_user_mail_option_only_assigned: Only for things I watch or I am assigned to + label_user_mail_option_only_owner: Only for things I watch or I am the owner of diff --git a/config/locales/az.yml b/config/locales/az.yml index 3d145dcb6..f6cf19853 100644 --- a/config/locales/az.yml +++ b/config/locales/az.yml @@ -686,9 +686,7 @@ az: label_user_mail_no_self_notified: "Tərəfimdən edilən dəyişikliklər haqqında məni xəbərdar etməmək" label_user_mail_option_all: "Mənim layihələrimdəki bütün hadisələr haqqında" label_user_mail_option_selected: "Yalnız seçilən layihədəki bütün hadisələr haqqında..." - label_user_mail_option_only_owner: Yalnız sahibi olduğum obyektlər üçün label_user_mail_option_only_my_events: Yalnız izlədiyim və ya iştirak etdiyim obyektlər üçün - label_user_mail_option_only_assigned: Yalnız mənə təyin edilən obyektlər üçün label_user_new: Yeni istifadəçi label_user_plural: İstifadəçilər label_version: Variant @@ -1319,3 +1317,5 @@ az: be reassigned to an issue that is about to be deleted setting_timelog_required_fields: Required fields for time logs label_attribute_of_object: '%{object_name}''s %{name}' + label_user_mail_option_only_assigned: Only for things I watch or I am assigned to + label_user_mail_option_only_owner: Only for things I watch or I am the owner of diff --git a/config/locales/bg.yml b/config/locales/bg.yml index 9aee36476..b899628ba 100644 --- a/config/locales/bg.yml +++ b/config/locales/bg.yml @@ -865,8 +865,6 @@ bg: label_user_mail_option_selected: "За всички събития само в избраните проекти..." label_user_mail_option_none: "Само за наблюдавани или в които участвам (автор или назначени на мен)" label_user_mail_option_only_my_events: Само за неща, в които съм включен/а - label_user_mail_option_only_assigned: Само за неща, назначени на мен - label_user_mail_option_only_owner: Само за неща, на които аз съм собственик label_user_mail_no_self_notified: "Не искам известия за извършени от мен промени" label_registration_activation_by_email: активиране на профила по email label_registration_manual_activation: ръчно активиране @@ -1210,3 +1208,5 @@ bg: be reassigned to an issue that is about to be deleted setting_timelog_required_fields: Required fields for time logs label_attribute_of_object: '%{object_name}''s %{name}' + label_user_mail_option_only_assigned: Only for things I watch or I am assigned to + label_user_mail_option_only_owner: Only for things I watch or I am the owner of diff --git a/config/locales/bs.yml b/config/locales/bs.yml index a3f0eb4e0..df25b8f97 100644 --- a/config/locales/bs.yml +++ b/config/locales/bs.yml @@ -922,10 +922,8 @@ bs: project_module_calendar: Calendar button_edit_associated_wikipage: "Edit associated Wiki page: %{page_title}" field_text: Text field - label_user_mail_option_only_owner: Only for things I am the owner of setting_default_notification_option: Default notification option label_user_mail_option_only_my_events: Only for things I watch or I'm involved in - label_user_mail_option_only_assigned: Only for things I am assigned to label_user_mail_option_none: No events field_member_of_group: Assignee's group field_assigned_to_role: Assignee's role @@ -1237,3 +1235,5 @@ bs: be reassigned to an issue that is about to be deleted setting_timelog_required_fields: Required fields for time logs label_attribute_of_object: '%{object_name}''s %{name}' + label_user_mail_option_only_assigned: Only for things I watch or I am assigned to + label_user_mail_option_only_owner: Only for things I watch or I am the owner of diff --git a/config/locales/ca.yml b/config/locales/ca.yml index be863d678..39b9cc649 100644 --- a/config/locales/ca.yml +++ b/config/locales/ca.yml @@ -912,10 +912,8 @@ ca: button_edit_associated_wikipage: "Editar pàgines Wiki asociades: %{page_title}" field_text: "Camp de text" - label_user_mail_option_only_owner: "Només pels objectes creats per mi" setting_default_notification_option: "Opció de notificació per defecte" label_user_mail_option_only_my_events: "Només pels objectes on estic en vigilància o involucrat" - label_user_mail_option_only_assigned: "Només pels objectes on estic assignat" label_user_mail_option_none: "Sense notificacions" field_member_of_group: "Assignat al grup" field_assigned_to_role: "Assignat al rol" @@ -1214,3 +1212,5 @@ ca: be reassigned to an issue that is about to be deleted setting_timelog_required_fields: Required fields for time logs label_attribute_of_object: '%{object_name}''s %{name}' + label_user_mail_option_only_assigned: Only for things I watch or I am assigned to + label_user_mail_option_only_owner: Only for things I watch or I am the owner of diff --git a/config/locales/cs.yml b/config/locales/cs.yml index bdda73cf7..66b05643d 100644 --- a/config/locales/cs.yml +++ b/config/locales/cs.yml @@ -735,8 +735,6 @@ cs: label_user_mail_option_selected: "Pro všechny události vybraných projektů..." label_user_mail_option_none: "Žádné události" label_user_mail_option_only_my_events: "Jen pro věci, co sleduji nebo jsem v nich zapojen" - label_user_mail_option_only_assigned: "Jen pro věci, ke kterým sem přiřazen" - label_user_mail_option_only_owner: "Jen pro věci, které vlastním" label_user_mail_no_self_notified: "Nezasílat informace o mnou vytvořených změnách" label_registration_activation_by_email: aktivace účtu emailem label_registration_manual_activation: manuální aktivace účtu @@ -1223,3 +1221,5 @@ cs: be reassigned to an issue that is about to be deleted setting_timelog_required_fields: Required fields for time logs label_attribute_of_object: '%{object_name}''s %{name}' + label_user_mail_option_only_assigned: Only for things I watch or I am assigned to + label_user_mail_option_only_owner: Only for things I watch or I am the owner of diff --git a/config/locales/da.yml b/config/locales/da.yml index ac2165961..17369e570 100644 --- a/config/locales/da.yml +++ b/config/locales/da.yml @@ -925,10 +925,8 @@ da: project_module_calendar: Kalender button_edit_associated_wikipage: "Redigér tilknyttet Wiki side: %{page_title}" field_text: Tekstfelt - label_user_mail_option_only_owner: Kun for ting jeg er ejer af setting_default_notification_option: Standardpåmindelsesmulighed label_user_mail_option_only_my_events: Kun for ting jeg overvåger eller er involveret i - label_user_mail_option_only_assigned: Kun for ting jeg er tildelt label_user_mail_option_none: Ingen hændelser field_member_of_group: Medlem af gruppe field_assigned_to_role: Medlem af rolle @@ -1241,3 +1239,5 @@ da: be reassigned to an issue that is about to be deleted setting_timelog_required_fields: Required fields for time logs label_attribute_of_object: '%{object_name}''s %{name}' + label_user_mail_option_only_assigned: Only for things I watch or I am assigned to + label_user_mail_option_only_owner: Only for things I watch or I am the owner of diff --git a/config/locales/de.yml b/config/locales/de.yml index 6f2923e9d..d370662d7 100644 --- a/config/locales/de.yml +++ b/config/locales/de.yml @@ -782,9 +782,7 @@ de: label_user_mail_no_self_notified: "Ich möchte nicht über Änderungen benachrichtigt werden, die ich selbst durchführe." label_user_mail_option_all: "Für alle Ereignisse in all meinen Projekten" label_user_mail_option_none: Keine Ereignisse - label_user_mail_option_only_assigned: Nur für Aufgaben für die ich zuständig bin label_user_mail_option_only_my_events: Nur für Aufgaben die ich beobachte oder an welchen ich mitarbeite - label_user_mail_option_only_owner: Nur für Aufgaben die ich angelegt habe label_user_mail_option_selected: "Für alle Ereignisse in den ausgewählten Projekten" label_user_new: Neuer Benutzer label_user_plural: Benutzer @@ -1226,3 +1224,5 @@ de: be reassigned to an issue that is about to be deleted setting_timelog_required_fields: Required fields for time logs label_attribute_of_object: '%{object_name}''s %{name}' + label_user_mail_option_only_assigned: Only for things I watch or I am assigned to + label_user_mail_option_only_owner: Only for things I watch or I am the owner of diff --git a/config/locales/el.yml b/config/locales/el.yml index 76b85805f..ad7dcc297 100644 --- a/config/locales/el.yml +++ b/config/locales/el.yml @@ -909,10 +909,8 @@ el: project_module_calendar: Calendar button_edit_associated_wikipage: "Edit associated Wiki page: %{page_title}" field_text: Text field - label_user_mail_option_only_owner: Only for things I am the owner of setting_default_notification_option: Default notification option label_user_mail_option_only_my_events: Only for things I watch or I'm involved in - label_user_mail_option_only_assigned: Only for things I am assigned to label_user_mail_option_none: No events field_member_of_group: Assignee's group field_assigned_to_role: Assignee's role @@ -1224,3 +1222,5 @@ el: be reassigned to an issue that is about to be deleted setting_timelog_required_fields: Required fields for time logs label_attribute_of_object: '%{object_name}''s %{name}' + label_user_mail_option_only_assigned: Only for things I watch or I am assigned to + label_user_mail_option_only_owner: Only for things I watch or I am the owner of diff --git a/config/locales/en-GB.yml b/config/locales/en-GB.yml index b87b00a71..89b2ea533 100644 --- a/config/locales/en-GB.yml +++ b/config/locales/en-GB.yml @@ -743,8 +743,6 @@ en-GB: label_user_mail_option_selected: "For any event on the selected projects only..." label_user_mail_option_none: "No events" label_user_mail_option_only_my_events: "Only for things I watch or I'm involved in" - label_user_mail_option_only_assigned: "Only for things I am assigned to" - label_user_mail_option_only_owner: "Only for things I am the owner of" label_user_mail_no_self_notified: "I don't want to be notified of changes that I make myself" label_registration_activation_by_email: account activation by email label_registration_manual_activation: manual account activation @@ -1226,3 +1224,5 @@ en-GB: be reassigned to an issue that is about to be deleted setting_timelog_required_fields: Required fields for time logs label_attribute_of_object: '%{object_name}''s %{name}' + label_user_mail_option_only_assigned: Only for things I watch or I am assigned to + label_user_mail_option_only_owner: Only for things I watch or I am the owner of diff --git a/config/locales/es-PA.yml b/config/locales/es-PA.yml index bf65c6121..94cb64e3b 100644 --- a/config/locales/es-PA.yml +++ b/config/locales/es-PA.yml @@ -950,10 +950,8 @@ es-PA: project_module_calendar: Calendario button_edit_associated_wikipage: "Editar paginas Wiki asociadas: %{page_title}" field_text: Campo de texto - label_user_mail_option_only_owner: Solo para objetos que soy propietario setting_default_notification_option: Opcion de notificacion por defecto label_user_mail_option_only_my_events: Solo para objetos que soy seguidor o estoy involucrado - label_user_mail_option_only_assigned: Solo para objetos que estoy asignado label_user_mail_option_none: Sin eventos field_member_of_group: Asignado al grupo field_assigned_to_role: Asignado al perfil @@ -1254,3 +1252,5 @@ es-PA: be reassigned to an issue that is about to be deleted setting_timelog_required_fields: Required fields for time logs label_attribute_of_object: '%{object_name}''s %{name}' + label_user_mail_option_only_assigned: Only for things I watch or I am assigned to + label_user_mail_option_only_owner: Only for things I watch or I am the owner of diff --git a/config/locales/es.yml b/config/locales/es.yml index a3c50708f..64b0de477 100644 --- a/config/locales/es.yml +++ b/config/locales/es.yml @@ -948,10 +948,8 @@ es: project_module_calendar: Calendario button_edit_associated_wikipage: "Editar paginas Wiki asociadas: %{page_title}" field_text: Campo de texto - label_user_mail_option_only_owner: Solo para objetos que soy propietario setting_default_notification_option: Opción de notificación por defecto label_user_mail_option_only_my_events: Solo para objetos que soy seguidor o estoy involucrado - label_user_mail_option_only_assigned: Solo para objetos que estoy asignado label_user_mail_option_none: Sin eventos field_member_of_group: Asignado al grupo field_assigned_to_role: Asignado al perfil @@ -1252,3 +1250,5 @@ es: be reassigned to an issue that is about to be deleted setting_timelog_required_fields: Required fields for time logs label_attribute_of_object: '%{object_name}''s %{name}' + label_user_mail_option_only_assigned: Only for things I watch or I am assigned to + label_user_mail_option_only_owner: Only for things I watch or I am the owner of diff --git a/config/locales/et.yml b/config/locales/et.yml index dcc9e6c2b..ebce370ec 100644 --- a/config/locales/et.yml +++ b/config/locales/et.yml @@ -788,8 +788,6 @@ et: label_user_mail_option_selected: "Kõigist tegevustest ainult valitud projektides..." label_user_mail_option_none: "Teavitusi ei saadeta" label_user_mail_option_only_my_events: "Ainult mu jälgitavatest või minuga seotud tegevustest" - label_user_mail_option_only_assigned: "Ainult minu teha olevate asjade kohta" - label_user_mail_option_only_owner: "Ainult mu oma asjade kohta" label_user_mail_no_self_notified: "Ära teavita mind mu enda tehtud muudatustest" label_registration_activation_by_email: "e-kirjaga" label_registration_manual_activation: "käsitsi" @@ -1229,3 +1227,5 @@ et: be reassigned to an issue that is about to be deleted setting_timelog_required_fields: Required fields for time logs label_attribute_of_object: '%{object_name}''s %{name}' + label_user_mail_option_only_assigned: Only for things I watch or I am assigned to + label_user_mail_option_only_owner: Only for things I watch or I am the owner of diff --git a/config/locales/eu.yml b/config/locales/eu.yml index f3105ec96..2e4425aa2 100644 --- a/config/locales/eu.yml +++ b/config/locales/eu.yml @@ -910,10 +910,8 @@ eu: project_module_calendar: Egutegia button_edit_associated_wikipage: "Esleitutako wiki orria editatu: %{page_title}" field_text: Testu eremua - label_user_mail_option_only_owner: "Jabea naizen gauzetarako barrarik" setting_default_notification_option: "Lehenetsitako ohartarazpen aukera" label_user_mail_option_only_my_events: "Behatzen ditudan edo partaide naizen gauzetarako bakarrik" - label_user_mail_option_only_assigned: "Niri esleitutako gauzentzat bakarrik" label_user_mail_option_none: "Gertakaririk ez" field_member_of_group: "Esleituta duenaren taldea" field_assigned_to_role: "Esleituta duenaren rola" @@ -1225,3 +1223,5 @@ eu: be reassigned to an issue that is about to be deleted setting_timelog_required_fields: Required fields for time logs label_attribute_of_object: '%{object_name}''s %{name}' + label_user_mail_option_only_assigned: Only for things I watch or I am assigned to + label_user_mail_option_only_owner: Only for things I watch or I am the owner of diff --git a/config/locales/fa.yml b/config/locales/fa.yml index 6e26adbd0..36ae3370f 100644 --- a/config/locales/fa.yml +++ b/config/locales/fa.yml @@ -729,8 +729,6 @@ fa: label_user_mail_option_selected: "برای هر خبر تنها در پروژه‌های گزینش شده..." label_user_mail_option_none: "هیچ خبری" label_user_mail_option_only_my_events: "تنها برای چیزهایی که دیده‌بان هستم یا در آن‌ها درگیر هستم" - label_user_mail_option_only_assigned: "تنها برای چیزهایی که به من واگذار شده" - label_user_mail_option_only_owner: "تنها برای چیزهایی که من دارنده آن‌ها هستم" label_user_mail_no_self_notified: "نمی‌خواهم از تغییراتی که خودم می‌دهم آگاه شوم" label_registration_activation_by_email: فعالسازی حساب با ایمیل label_registration_manual_activation: فعالسازی حساب دستی @@ -1225,3 +1223,5 @@ fa: be reassigned to an issue that is about to be deleted setting_timelog_required_fields: Required fields for time logs label_attribute_of_object: '%{object_name}''s %{name}' + label_user_mail_option_only_assigned: Only for things I watch or I am assigned to + label_user_mail_option_only_owner: Only for things I watch or I am the owner of diff --git a/config/locales/fi.yml b/config/locales/fi.yml index 7f3a26f46..113c3ce2f 100644 --- a/config/locales/fi.yml +++ b/config/locales/fi.yml @@ -930,10 +930,8 @@ fi: project_module_calendar: Calendar button_edit_associated_wikipage: "Edit associated Wiki page: %{page_title}" field_text: Text field - label_user_mail_option_only_owner: Only for things I am the owner of setting_default_notification_option: Default notification option label_user_mail_option_only_my_events: Only for things I watch or I'm involved in - label_user_mail_option_only_assigned: Only for things I am assigned to label_user_mail_option_none: No events field_member_of_group: Assignee's group field_assigned_to_role: Assignee's role @@ -1245,3 +1243,5 @@ fi: be reassigned to an issue that is about to be deleted setting_timelog_required_fields: Required fields for time logs label_attribute_of_object: '%{object_name}''s %{name}' + label_user_mail_option_only_assigned: Only for things I watch or I am assigned to + label_user_mail_option_only_owner: Only for things I watch or I am the owner of diff --git a/config/locales/fr.yml b/config/locales/fr.yml index 610dc156b..031ecc472 100644 --- a/config/locales/fr.yml +++ b/config/locales/fr.yml @@ -876,8 +876,6 @@ fr: label_user_mail_option_selected: "Pour tous les événements des projets sélectionnés..." label_user_mail_option_none: Aucune notification label_user_mail_option_only_my_events: Seulement pour ce que je surveille - label_user_mail_option_only_assigned: Seulement pour ce qui m'est assigné - label_user_mail_option_only_owner: Seulement pour ce que j'ai créé label_user_mail_no_self_notified: "Je ne veux pas être notifié des changements que j'effectue" label_registration_activation_by_email: activation du compte par email label_registration_manual_activation: activation manuelle du compte @@ -1226,3 +1224,5 @@ fr: mail_body_security_notification_notify_disabled: Les notifications ont été désactivées pour l'adresse %{value} field_remote_ip: Adresse IP label_no_preview: No preview available + label_user_mail_option_only_assigned: Only for things I watch or I am assigned to + label_user_mail_option_only_owner: Only for things I watch or I am the owner of diff --git a/config/locales/gl.yml b/config/locales/gl.yml index e4a9424e0..b59a9d7bf 100644 --- a/config/locales/gl.yml +++ b/config/locales/gl.yml @@ -923,10 +923,8 @@ gl: project_module_calendar: "Calendario" button_edit_associated_wikipage: "Editar a páxina do wiki asociada: %{page_title}" field_text: "Campo de texto" - label_user_mail_option_only_owner: "Só para as cousas das que son o propietario" setting_default_notification_option: "Opción de notificación predeterminada" label_user_mail_option_only_my_events: "Só para as cousas que sigo ou nas que estou involucrado" - label_user_mail_option_only_assigned: "Só para cousas que teño asignadas" label_user_mail_option_none: "Non hai eventos." field_member_of_group: "Grupo do asignado" field_assigned_to_role: "Rol do asignado" @@ -1232,3 +1230,5 @@ gl: be reassigned to an issue that is about to be deleted setting_timelog_required_fields: Required fields for time logs label_attribute_of_object: '%{object_name}''s %{name}' + label_user_mail_option_only_assigned: Only for things I watch or I am assigned to + label_user_mail_option_only_owner: Only for things I watch or I am the owner of diff --git a/config/locales/he.yml b/config/locales/he.yml index 3ce28c5df..47f8648e9 100644 --- a/config/locales/he.yml +++ b/config/locales/he.yml @@ -726,8 +726,6 @@ he: label_user_mail_option_all: "לכל אירוע בכל הפרויקטים שלי" label_user_mail_option_selected: "לכל אירוע בפרויקטים שבחרתי בלבד..." label_user_mail_option_only_my_events: עבור דברים שאני צופה או מעורב בהם בלבד - label_user_mail_option_only_assigned: עבור דברים שאני אחראי עליהם בלבד - label_user_mail_option_only_owner: עבור דברים שאני הבעלים שלהם בלבד label_user_mail_no_self_notified: "אני לא רוצה שיודיעו לי על שינויים שאני מבצע" label_registration_activation_by_email: הפעל חשבון באמצעות דוא"ל label_registration_manual_activation: הפעלת חשבון ידנית @@ -1229,3 +1227,5 @@ he: be reassigned to an issue that is about to be deleted setting_timelog_required_fields: Required fields for time logs label_attribute_of_object: '%{object_name}''s %{name}' + label_user_mail_option_only_assigned: Only for things I watch or I am assigned to + label_user_mail_option_only_owner: Only for things I watch or I am the owner of diff --git a/config/locales/hr.yml b/config/locales/hr.yml index b93bfdff7..16dc46d0b 100644 --- a/config/locales/hr.yml +++ b/config/locales/hr.yml @@ -908,10 +908,8 @@ hr: project_module_calendar: Calendar button_edit_associated_wikipage: "Edit associated Wiki page: %{page_title}" field_text: Text field - label_user_mail_option_only_owner: Only for things I am the owner of setting_default_notification_option: Default notification option label_user_mail_option_only_my_events: Only for things I watch or I'm involved in - label_user_mail_option_only_assigned: Only for things I am assigned to label_user_mail_option_none: No events field_member_of_group: Assignee's group field_assigned_to_role: Assignee's role @@ -1223,3 +1221,5 @@ hr: be reassigned to an issue that is about to be deleted setting_timelog_required_fields: Required fields for time logs label_attribute_of_object: '%{object_name}''s %{name}' + label_user_mail_option_only_assigned: Only for things I watch or I am assigned to + label_user_mail_option_only_owner: Only for things I watch or I am the owner of diff --git a/config/locales/hu.yml b/config/locales/hu.yml index 14b23ceda..d7ac75b6c 100644 --- a/config/locales/hu.yml +++ b/config/locales/hu.yml @@ -928,10 +928,8 @@ project_module_calendar: Naptár button_edit_associated_wikipage: "Hozzárendelt Wiki oldal szerkesztése: %{page_title}" field_text: Szöveg mező - label_user_mail_option_only_owner: Csak arról, aminek én vagyok a tulajdonosa setting_default_notification_option: Alapértelmezett értesítési beállítások label_user_mail_option_only_my_events: Csak az általam megfigyelt dolgokról vagy amiben részt veszek - label_user_mail_option_only_assigned: Csak a hozzámrendelt dolgokról label_user_mail_option_none: Semilyen eseményről field_member_of_group: Hozzárendelt csoport field_assigned_to_role: Hozzárendelt szerepkör @@ -1243,3 +1241,5 @@ be reassigned to an issue that is about to be deleted setting_timelog_required_fields: Required fields for time logs label_attribute_of_object: '%{object_name}''s %{name}' + label_user_mail_option_only_assigned: Only for things I watch or I am assigned to + label_user_mail_option_only_owner: Only for things I watch or I am the owner of diff --git a/config/locales/id.yml b/config/locales/id.yml index 26e57d87a..2c0da61a7 100644 --- a/config/locales/id.yml +++ b/config/locales/id.yml @@ -913,10 +913,8 @@ id: project_module_calendar: Calendar button_edit_associated_wikipage: "Edit associated Wiki page: %{page_title}" field_text: Text field - label_user_mail_option_only_owner: Only for things I am the owner of setting_default_notification_option: Default notification option label_user_mail_option_only_my_events: Only for things I watch or I'm involved in - label_user_mail_option_only_assigned: Only for things I am assigned to label_user_mail_option_none: No events field_member_of_group: Assignee's group field_assigned_to_role: Assignee's role @@ -1228,3 +1226,5 @@ id: be reassigned to an issue that is about to be deleted setting_timelog_required_fields: Required fields for time logs label_attribute_of_object: '%{object_name}''s %{name}' + label_user_mail_option_only_assigned: Only for things I watch or I am assigned to + label_user_mail_option_only_owner: Only for things I watch or I am the owner of diff --git a/config/locales/it.yml b/config/locales/it.yml index 8bfe89b60..8d4482a40 100644 --- a/config/locales/it.yml +++ b/config/locales/it.yml @@ -909,10 +909,8 @@ it: project_module_calendar: Calendario button_edit_associated_wikipage: "Modifica la pagina wiki associata: %{page_title}" field_text: Campo di testo - label_user_mail_option_only_owner: Solo se io sono il proprietario setting_default_notification_option: Opzione di notifica predefinita label_user_mail_option_only_my_events: Solo se sono un osservatore o sono coinvolto - label_user_mail_option_only_assigned: Solo quando mi assegnano attività label_user_mail_option_none: Nessun evento field_member_of_group: Gruppo dell'assegnatario field_assigned_to_role: Ruolo dell'assegnatario @@ -1219,3 +1217,5 @@ it: be reassigned to an issue that is about to be deleted setting_timelog_required_fields: Required fields for time logs label_attribute_of_object: '%{object_name}''s %{name}' + label_user_mail_option_only_assigned: Only for things I watch or I am assigned to + label_user_mail_option_only_owner: Only for things I watch or I am the owner of diff --git a/config/locales/ko.yml b/config/locales/ko.yml index 356c4adea..59033a095 100644 --- a/config/locales/ko.yml +++ b/config/locales/ko.yml @@ -957,10 +957,8 @@ ko: project_module_calendar: 달력 button_edit_associated_wikipage: "연관된 위키 페이지 %{page_title} 수정" field_text: 텍스트 영역 - label_user_mail_option_only_owner: 내가 저자인 사항만 setting_default_notification_option: 기본 알림 옵션 label_user_mail_option_only_my_events: 내가 지켜보거나 속해있는 사항만 - label_user_mail_option_only_assigned: 나에게 할당된 사항만 label_user_mail_option_none: 알림 없음 field_member_of_group: 할당된 사람의 그룹 field_assigned_to_role: 할당된 사람의 역할 @@ -1263,3 +1261,5 @@ ko: be reassigned to an issue that is about to be deleted setting_timelog_required_fields: Required fields for time logs label_attribute_of_object: '%{object_name}''s %{name}' + label_user_mail_option_only_assigned: Only for things I watch or I am assigned to + label_user_mail_option_only_owner: Only for things I watch or I am the owner of diff --git a/config/locales/lt.yml b/config/locales/lt.yml index d7510e3ff..9c2ffe8f6 100644 --- a/config/locales/lt.yml +++ b/config/locales/lt.yml @@ -854,8 +854,6 @@ lt: label_user_mail_option_selected: "Bet kokiam įvykiui tiktai pasirinktuose projektuose ..." label_user_mail_option_none: "Jokių įvykių" label_user_mail_option_only_my_events: "Tiktai dalykai, kuriuos stebiu arba esu įtrauktas" - label_user_mail_option_only_assigned: "Tiktai dalykai, kuriems esu priskirtas" - label_user_mail_option_only_owner: "Tiktai dalykai, kurių šeimininkas esu aš" label_user_mail_no_self_notified: "Nenoriu būti informuotas apie pakeitimus, kuriuos pats atlieku" label_registration_activation_by_email: paskyros aktyvacija per e-paštą label_registration_manual_activation: rankinė paskyros aktyvacija @@ -1213,3 +1211,5 @@ lt: be reassigned to an issue that is about to be deleted setting_timelog_required_fields: Required fields for time logs label_attribute_of_object: '%{object_name}''s %{name}' + label_user_mail_option_only_assigned: Only for things I watch or I am assigned to + label_user_mail_option_only_owner: Only for things I watch or I am the owner of diff --git a/config/locales/lv.yml b/config/locales/lv.yml index 9f07c80ce..55e47b2a3 100644 --- a/config/locales/lv.yml +++ b/config/locales/lv.yml @@ -903,10 +903,8 @@ lv: project_module_calendar: Calendar button_edit_associated_wikipage: "Edit associated Wiki page: %{page_title}" field_text: Text field - label_user_mail_option_only_owner: Tikai par uzdevumiem, ko esmu izveidojis setting_default_notification_option: Default notification option label_user_mail_option_only_my_events: Tikai par uzdevumiem, kurus novēroju vai kuros esmu iesaistījies - label_user_mail_option_only_assigned: Tikai par uzdevumiem, kas ir piešķirti man label_user_mail_option_none: Ne par ko field_member_of_group: Assignee's group field_assigned_to_role: Assignee's role @@ -1218,3 +1216,5 @@ lv: be reassigned to an issue that is about to be deleted setting_timelog_required_fields: Required fields for time logs label_attribute_of_object: '%{object_name}''s %{name}' + label_user_mail_option_only_assigned: Only for things I watch or I am assigned to + label_user_mail_option_only_owner: Only for things I watch or I am the owner of diff --git a/config/locales/mk.yml b/config/locales/mk.yml index d22312091..a905a5b53 100644 --- a/config/locales/mk.yml +++ b/config/locales/mk.yml @@ -908,10 +908,8 @@ mk: button_edit_associated_wikipage: "Edit associated Wiki page: %{page_title}" field_text: Text field - label_user_mail_option_only_owner: Only for things I am the owner of setting_default_notification_option: Default notification option label_user_mail_option_only_my_events: Only for things I watch or I'm involved in - label_user_mail_option_only_assigned: Only for things I am assigned to label_user_mail_option_none: No events field_member_of_group: Assignee's group field_assigned_to_role: Assignee's role @@ -1224,3 +1222,5 @@ mk: be reassigned to an issue that is about to be deleted setting_timelog_required_fields: Required fields for time logs label_attribute_of_object: '%{object_name}''s %{name}' + label_user_mail_option_only_assigned: Only for things I watch or I am assigned to + label_user_mail_option_only_owner: Only for things I watch or I am the owner of diff --git a/config/locales/mn.yml b/config/locales/mn.yml index 7dc56b269..cb06c17c3 100644 --- a/config/locales/mn.yml +++ b/config/locales/mn.yml @@ -910,10 +910,8 @@ mn: project_module_calendar: Calendar button_edit_associated_wikipage: "Edit associated Wiki page: %{page_title}" field_text: Text field - label_user_mail_option_only_owner: Only for things I am the owner of setting_default_notification_option: Default notification option label_user_mail_option_only_my_events: Only for things I watch or I'm involved in - label_user_mail_option_only_assigned: Only for things I am assigned to label_user_mail_option_none: No events field_member_of_group: Assignee's group field_assigned_to_role: Assignee's role @@ -1225,3 +1223,5 @@ mn: be reassigned to an issue that is about to be deleted setting_timelog_required_fields: Required fields for time logs label_attribute_of_object: '%{object_name}''s %{name}' + label_user_mail_option_only_assigned: Only for things I watch or I am assigned to + label_user_mail_option_only_owner: Only for things I watch or I am the owner of diff --git a/config/locales/nl.yml b/config/locales/nl.yml index 619513039..3b8195d06 100644 --- a/config/locales/nl.yml +++ b/config/locales/nl.yml @@ -891,10 +891,8 @@ nl: project_module_calendar: Kalender button_edit_associated_wikipage: "Bijbehorende wikipagina bewerken: %{page_title}" field_text: Tekstveld - label_user_mail_option_only_owner: Alleen voor activiteiten waarvan ik de auteur ben setting_default_notification_option: Standaardinstelling voor mededelingen label_user_mail_option_only_my_events: Alleen voor activiteiten die ik volg of waarbij ik betrokken ben - label_user_mail_option_only_assigned: Alleen voor activiteiten die aan mij zijn toegewezen label_user_mail_option_none: Bij geen enkele activiteit field_member_of_group: Groep van toegewezen persoon field_assigned_to_role: Rol van toegewezen persoon @@ -1199,3 +1197,5 @@ nl: be reassigned to an issue that is about to be deleted setting_timelog_required_fields: Required fields for time logs label_attribute_of_object: '%{object_name}''s %{name}' + label_user_mail_option_only_assigned: Only for things I watch or I am assigned to + label_user_mail_option_only_owner: Only for things I watch or I am the owner of diff --git a/config/locales/no.yml b/config/locales/no.yml index e524a5c7c..c8ead7cad 100644 --- a/config/locales/no.yml +++ b/config/locales/no.yml @@ -896,10 +896,8 @@ project_module_calendar: Kalender button_edit_associated_wikipage: "Rediger tilhørende Wiki-side: %{page_title}" field_text: Tekstfelt - label_user_mail_option_only_owner: Kun for ting jeg eier setting_default_notification_option: Standardvalg for varslinger label_user_mail_option_only_my_events: Kun for ting jeg overvåker eller er involvert i - label_user_mail_option_only_assigned: Kun for ting jeg er tildelt label_user_mail_option_none: Ingen hendelser field_member_of_group: Den tildeltes gruppe field_assigned_to_role: Den tildeltes rolle @@ -1214,3 +1212,5 @@ be reassigned to an issue that is about to be deleted setting_timelog_required_fields: Required fields for time logs label_attribute_of_object: '%{object_name}''s %{name}' + label_user_mail_option_only_assigned: Only for things I watch or I am assigned to + label_user_mail_option_only_owner: Only for things I watch or I am the owner of diff --git a/config/locales/pl.yml b/config/locales/pl.yml index d25b30624..7ed2cbe41 100644 --- a/config/locales/pl.yml +++ b/config/locales/pl.yml @@ -928,10 +928,8 @@ pl: project_module_calendar: Kalendarz button_edit_associated_wikipage: "Edytuj powiązaną stronę Wiki: %{page_title}" field_text: Text field - label_user_mail_option_only_owner: Tylko to, czego jestem właścicielem (autorem) setting_default_notification_option: Domyślna opcja powiadomień label_user_mail_option_only_my_events: "Tylko to, co obserwuję lub w czym biorę udział" - label_user_mail_option_only_assigned: "Tylko to, do czego jestem przypisany" label_user_mail_option_none: "Brak powiadomień" field_member_of_group: Grupa osoby przypisanej field_assigned_to_role: Rola osoby przypisanej @@ -1239,3 +1237,5 @@ pl: be reassigned to an issue that is about to be deleted setting_timelog_required_fields: Required fields for time logs label_attribute_of_object: '%{object_name}''s %{name}' + label_user_mail_option_only_assigned: Only for things I watch or I am assigned to + label_user_mail_option_only_owner: Only for things I watch or I am the owner of diff --git a/config/locales/pt-BR.yml b/config/locales/pt-BR.yml index c5cca959a..ab4427da5 100644 --- a/config/locales/pt-BR.yml +++ b/config/locales/pt-BR.yml @@ -931,10 +931,8 @@ pt-BR: project_module_calendar: Calendário button_edit_associated_wikipage: "Editar página wiki relacionada: %{page_title}" field_text: Campo de texto - label_user_mail_option_only_owner: Somente para as coisas que eu criei setting_default_notification_option: Opção padrão de notificação label_user_mail_option_only_my_events: Somente para as coisas que eu esteja observando ou esteja envolvido - label_user_mail_option_only_assigned: Somente para as coisas que estejam atribuídas a mim label_user_mail_option_none: Sem eventos field_member_of_group: Responsável pelo grupo field_assigned_to_role: Papel do responsável @@ -1242,3 +1240,5 @@ pt-BR: be reassigned to an issue that is about to be deleted setting_timelog_required_fields: Required fields for time logs label_attribute_of_object: '%{object_name}''s %{name}' + label_user_mail_option_only_assigned: Only for things I watch or I am assigned to + label_user_mail_option_only_owner: Only for things I watch or I am the owner of diff --git a/config/locales/pt.yml b/config/locales/pt.yml index 17678b282..95b93d536 100644 --- a/config/locales/pt.yml +++ b/config/locales/pt.yml @@ -916,10 +916,8 @@ pt: project_module_calendar: Calendário button_edit_associated_wikipage: "Editar página Wiki associada: %{page_title}" field_text: Campo de texto - label_user_mail_option_only_owner: Apenas para tarefas das quais sou proprietário setting_default_notification_option: Opção predefinida de notificação label_user_mail_option_only_my_events: Apenas para tarefas que observo ou em que estou envolvido - label_user_mail_option_only_assigned: Apenas para tarefas que me foram atribuídas label_user_mail_option_none: Sem eventos field_member_of_group: Grupo do titular field_assigned_to_role: Função do titular @@ -1227,3 +1225,5 @@ pt: be reassigned to an issue that is about to be deleted setting_timelog_required_fields: Required fields for time logs label_attribute_of_object: '%{object_name}''s %{name}' + label_user_mail_option_only_assigned: Only for things I watch or I am assigned to + label_user_mail_option_only_owner: Only for things I watch or I am the owner of diff --git a/config/locales/ro.yml b/config/locales/ro.yml index dfd8bca97..5f31605b1 100644 --- a/config/locales/ro.yml +++ b/config/locales/ro.yml @@ -904,10 +904,8 @@ ro: project_module_calendar: Calendar button_edit_associated_wikipage: "Edit associated Wiki page: %{page_title}" field_text: Text field - label_user_mail_option_only_owner: Only for things I am the owner of setting_default_notification_option: Default notification option label_user_mail_option_only_my_events: Only for things I watch or I'm involved in - label_user_mail_option_only_assigned: Only for things I am assigned to label_user_mail_option_none: No events field_member_of_group: Assignee's group field_assigned_to_role: Assignee's role @@ -1219,3 +1217,5 @@ ro: be reassigned to an issue that is about to be deleted setting_timelog_required_fields: Required fields for time logs label_attribute_of_object: '%{object_name}''s %{name}' + label_user_mail_option_only_assigned: Only for things I watch or I am assigned to + label_user_mail_option_only_owner: Only for things I watch or I am the owner of diff --git a/config/locales/ru.yml b/config/locales/ru.yml index c8ee413b0..789752f21 100644 --- a/config/locales/ru.yml +++ b/config/locales/ru.yml @@ -696,9 +696,7 @@ ru: label_user_mail_no_self_notified: "Не извещать об изменениях, которые я сделал сам" label_user_mail_option_all: "О всех событиях во всех моих проектах" label_user_mail_option_selected: "О всех событиях только в выбранном проекте..." - label_user_mail_option_only_owner: Только для объектов, для которых я являюсь владельцем label_user_mail_option_only_my_events: Только для объектов, которые я отслеживаю или в которых участвую - label_user_mail_option_only_assigned: Только для объектов, которые назначены мне label_user_new: Новый пользователь label_user_plural: Пользователи label_version: Версия @@ -1326,3 +1324,5 @@ ru: be reassigned to an issue that is about to be deleted setting_timelog_required_fields: Required fields for time logs label_attribute_of_object: '%{object_name}''s %{name}' + label_user_mail_option_only_assigned: Only for things I watch or I am assigned to + label_user_mail_option_only_owner: Only for things I watch or I am the owner of diff --git a/config/locales/sk.yml b/config/locales/sk.yml index 43286d20d..b42c52ab9 100644 --- a/config/locales/sk.yml +++ b/config/locales/sk.yml @@ -904,10 +904,8 @@ sk: project_module_calendar: Kalendár button_edit_associated_wikipage: "Upraviť súvisiacu wikistránku: %{page_title}" field_text: Textové pole - label_user_mail_option_only_owner: "Len pre veci, ktorých som vlastníkom" setting_default_notification_option: Predvolené nastavenie upozornení label_user_mail_option_only_my_events: Len pre veci, ktoré sledujem, alebo v ktorých som zapojený - label_user_mail_option_only_assigned: "Len pre veci, ktoré mi boli priradené" label_user_mail_option_none: "Žiadne udalosti" field_member_of_group: "Skupina priradeného používateľa" field_assigned_to_role: "Rola priradeného používateľa" @@ -1214,3 +1212,5 @@ sk: be reassigned to an issue that is about to be deleted setting_timelog_required_fields: Required fields for time logs label_attribute_of_object: '%{object_name}''s %{name}' + label_user_mail_option_only_assigned: Only for things I watch or I am assigned to + label_user_mail_option_only_owner: Only for things I watch or I am the owner of diff --git a/config/locales/sl.yml b/config/locales/sl.yml index d6ee6b8a5..bb2de9153 100644 --- a/config/locales/sl.yml +++ b/config/locales/sl.yml @@ -906,10 +906,8 @@ sl: project_module_calendar: Koledear button_edit_associated_wikipage: "Uredi povezano Wiki stran: %{page_title}" field_text: Besedilno polje - label_user_mail_option_only_owner: Samo za stvari katerih lastnik sem setting_default_notification_option: Privzeta možnost obveščanja label_user_mail_option_only_my_events: Samo za stvari, ki jih opazujem ali sem v njih vpleten - label_user_mail_option_only_assigned: Samo za stvari, ki smo mi dodeljene label_user_mail_option_none: Noben dogodek field_member_of_group: Pooblaščenčeva skupina field_assigned_to_role: Pooblaščenčeva vloga @@ -1224,3 +1222,5 @@ sl: be reassigned to an issue that is about to be deleted setting_timelog_required_fields: Required fields for time logs label_attribute_of_object: '%{object_name}''s %{name}' + label_user_mail_option_only_assigned: Only for things I watch or I am assigned to + label_user_mail_option_only_owner: Only for things I watch or I am the owner of diff --git a/config/locales/sq.yml b/config/locales/sq.yml index cdc89415d..fab0ab350 100644 --- a/config/locales/sq.yml +++ b/config/locales/sq.yml @@ -769,8 +769,6 @@ sq: label_user_mail_option_selected: "For any event on the selected projects only..." label_user_mail_option_none: "No events" label_user_mail_option_only_my_events: "Only for things I watch or I'm involved in" - label_user_mail_option_only_assigned: "Only for things I am assigned to" - label_user_mail_option_only_owner: "Only for things I am the owner of" label_user_mail_no_self_notified: "I don't want to be notified of changes that I make myself" label_registration_activation_by_email: account activation by email label_registration_manual_activation: manual account activation @@ -1220,3 +1218,5 @@ sq: be reassigned to an issue that is about to be deleted setting_timelog_required_fields: Required fields for time logs label_attribute_of_object: '%{object_name}''s %{name}' + label_user_mail_option_only_assigned: Only for things I watch or I am assigned to + label_user_mail_option_only_owner: Only for things I watch or I am the owner of diff --git a/config/locales/sr-YU.yml b/config/locales/sr-YU.yml index e2f931aae..ce43598f5 100644 --- a/config/locales/sr-YU.yml +++ b/config/locales/sr-YU.yml @@ -911,10 +911,8 @@ sr-YU: project_module_calendar: Kalendar button_edit_associated_wikipage: "Edit associated Wiki page: %{page_title}" field_text: Text field - label_user_mail_option_only_owner: Samo za stvari koje posedujem setting_default_notification_option: Podrazumevana opcija za notifikaciju label_user_mail_option_only_my_events: Za dogadjaje koje pratim ili sam u njih uključen - label_user_mail_option_only_assigned: Za dogadjaje koji su mi dodeljeni lično label_user_mail_option_none: Bez obaveštenja field_member_of_group: Assignee's group field_assigned_to_role: Assignee's role @@ -1226,3 +1224,5 @@ sr-YU: be reassigned to an issue that is about to be deleted setting_timelog_required_fields: Required fields for time logs label_attribute_of_object: '%{object_name}''s %{name}' + label_user_mail_option_only_assigned: Only for things I watch or I am assigned to + label_user_mail_option_only_owner: Only for things I watch or I am the owner of diff --git a/config/locales/sr.yml b/config/locales/sr.yml index 015703e2e..95303c69f 100644 --- a/config/locales/sr.yml +++ b/config/locales/sr.yml @@ -910,10 +910,8 @@ sr: button_edit_associated_wikipage: "Edit associated Wiki page: %{page_title}" field_text: Text field - label_user_mail_option_only_owner: Only for things I am the owner of setting_default_notification_option: Default notification option label_user_mail_option_only_my_events: Only for things I watch or I'm involved in - label_user_mail_option_only_assigned: Only for things I am assigned to label_user_mail_option_none: No events field_member_of_group: Assignee's group field_assigned_to_role: Assignee's role @@ -1225,3 +1223,5 @@ sr: be reassigned to an issue that is about to be deleted setting_timelog_required_fields: Required fields for time logs label_attribute_of_object: '%{object_name}''s %{name}' + label_user_mail_option_only_assigned: Only for things I watch or I am assigned to + label_user_mail_option_only_owner: Only for things I watch or I am the owner of diff --git a/config/locales/sv.yml b/config/locales/sv.yml index 9e13f430f..2cf6402fe 100644 --- a/config/locales/sv.yml +++ b/config/locales/sv.yml @@ -846,8 +846,6 @@ sv: label_user_mail_option_selected: "För alla händelser i markerade projekt..." label_user_mail_option_none: "Inga händelser" label_user_mail_option_only_my_events: "Endast för saker jag bevakar eller är inblandad i" - label_user_mail_option_only_assigned: "Endast för saker jag är tilldelad" - label_user_mail_option_only_owner: "Endast för saker jag äger" label_user_mail_no_self_notified: "Jag vill inte bli underrättad om ändringar som jag har gjort" label_registration_activation_by_email: kontoaktivering med mail label_registration_manual_activation: manuell kontoaktivering @@ -1257,3 +1255,5 @@ sv: be reassigned to an issue that is about to be deleted setting_timelog_required_fields: Required fields for time logs label_attribute_of_object: '%{object_name}''s %{name}' + label_user_mail_option_only_assigned: Only for things I watch or I am assigned to + label_user_mail_option_only_owner: Only for things I watch or I am the owner of diff --git a/config/locales/th.yml b/config/locales/th.yml index 78eb9836c..b3190d752 100644 --- a/config/locales/th.yml +++ b/config/locales/th.yml @@ -906,10 +906,8 @@ th: project_module_calendar: Calendar button_edit_associated_wikipage: "Edit associated Wiki page: %{page_title}" field_text: Text field - label_user_mail_option_only_owner: Only for things I am the owner of setting_default_notification_option: Default notification option label_user_mail_option_only_my_events: Only for things I watch or I'm involved in - label_user_mail_option_only_assigned: Only for things I am assigned to label_user_mail_option_none: No events field_member_of_group: Assignee's group field_assigned_to_role: Assignee's role @@ -1221,3 +1219,5 @@ th: be reassigned to an issue that is about to be deleted setting_timelog_required_fields: Required fields for time logs label_attribute_of_object: '%{object_name}''s %{name}' + label_user_mail_option_only_assigned: Only for things I watch or I am assigned to + label_user_mail_option_only_owner: Only for things I watch or I am the owner of diff --git a/config/locales/tr.yml b/config/locales/tr.yml index 29fdc621c..ffd11240d 100644 --- a/config/locales/tr.yml +++ b/config/locales/tr.yml @@ -920,10 +920,8 @@ tr: project_module_calendar: Takvim button_edit_associated_wikipage: "İlişkilendirilmiş Wiki sayfasını düzenle: %{page_title}" field_text: Metin alanı - label_user_mail_option_only_owner: Sadece sahibi olduğum şeyler için setting_default_notification_option: Varsayılan bildirim seçeneği label_user_mail_option_only_my_events: Sadece takip ettiğim ya da içinde olduğum şeyler için - label_user_mail_option_only_assigned: Sadece bana atanan şeyler için label_user_mail_option_none: Hiç bir şey için field_member_of_group: Atananın grubu field_assigned_to_role: Atananın rolü @@ -1232,3 +1230,5 @@ tr: be reassigned to an issue that is about to be deleted setting_timelog_required_fields: Required fields for time logs label_attribute_of_object: '%{object_name}''s %{name}' + label_user_mail_option_only_assigned: Only for things I watch or I am assigned to + label_user_mail_option_only_owner: Only for things I watch or I am the owner of diff --git a/config/locales/uk.yml b/config/locales/uk.yml index 3aab2fd02..68e0e7fc4 100644 --- a/config/locales/uk.yml +++ b/config/locales/uk.yml @@ -906,10 +906,8 @@ uk: project_module_calendar: Calendar button_edit_associated_wikipage: "Edit associated Wiki page: %{page_title}" field_text: Text field - label_user_mail_option_only_owner: Only for things I am the owner of setting_default_notification_option: Default notification option label_user_mail_option_only_my_events: Only for things I watch or I'm involved in - label_user_mail_option_only_assigned: Only for things I am assigned to label_user_mail_option_none: No events field_member_of_group: Assignee's group field_assigned_to_role: Assignee's role @@ -1219,3 +1217,5 @@ uk: be reassigned to an issue that is about to be deleted setting_timelog_required_fields: Required fields for time logs label_attribute_of_object: '%{object_name}''s %{name}' + label_user_mail_option_only_assigned: Only for things I watch or I am assigned to + label_user_mail_option_only_owner: Only for things I watch or I am the owner of diff --git a/config/locales/vi.yml b/config/locales/vi.yml index 189bf2480..18af4b2fb 100644 --- a/config/locales/vi.yml +++ b/config/locales/vi.yml @@ -961,10 +961,8 @@ vi: button_edit_associated_wikipage: "Chỉnh sửa trang Wiki liên quan: %{page_title}" text_are_you_sure_with_children: Xóa vấn đề và tất cả vấn đề con? field_text: Trường văn bản - label_user_mail_option_only_owner: Chỉ những thứ tôi sở hữu setting_default_notification_option: Tuỳ chọn thông báo mặc định label_user_mail_option_only_my_events: Chỉ những thứ tôi theo dõi hoặc liên quan - label_user_mail_option_only_assigned: Chỉ những thứ tôi được phân công label_user_mail_option_none: Không có sự kiện field_member_of_group: Nhóm thụ hưởng field_assigned_to_role: Quyền thụ hưởng @@ -1277,3 +1275,5 @@ vi: be reassigned to an issue that is about to be deleted setting_timelog_required_fields: Required fields for time logs label_attribute_of_object: '%{object_name}''s %{name}' + label_user_mail_option_only_assigned: Only for things I watch or I am assigned to + label_user_mail_option_only_owner: Only for things I watch or I am the owner of diff --git a/config/locales/zh-TW.yml b/config/locales/zh-TW.yml index a2b6d7e0b..d5ac03538 100644 --- a/config/locales/zh-TW.yml +++ b/config/locales/zh-TW.yml @@ -949,8 +949,6 @@ label_user_mail_option_selected: "只提醒我所選擇專案中的事件..." label_user_mail_option_none: "取消提醒" label_user_mail_option_only_my_events: "只提醒我觀察中或參與中的事物" - label_user_mail_option_only_assigned: "只提醒我被分派的事物" - label_user_mail_option_only_owner: "只提醒我作為擁有者的事物" label_user_mail_no_self_notified: "不提醒我自己所做的變更" label_registration_activation_by_email: 透過電子郵件啟用帳戶 label_registration_manual_activation: 手動啟用帳戶 @@ -1292,3 +1290,5 @@ description_date_to: 輸入結束日期 text_repository_identifier_info: '僅允許使用小寫英文字母 (a-z), 阿拉伯數字, 虛線與底線。
          一旦儲存之後, 代碼便無法再次被更改。' label_attribute_of_object: '%{object_name}''s %{name}' + label_user_mail_option_only_assigned: Only for things I watch or I am assigned to + label_user_mail_option_only_owner: Only for things I watch or I am the owner of diff --git a/config/locales/zh.yml b/config/locales/zh.yml index c779f79b3..1e7dff5fa 100644 --- a/config/locales/zh.yml +++ b/config/locales/zh.yml @@ -734,8 +734,6 @@ zh: label_user_mail_option_selected: "收取选中项目的所有通知..." label_user_mail_option_none: "不收取任何通知" label_user_mail_option_only_my_events: "只收取我跟踪或参与的项目的通知" - label_user_mail_option_only_assigned: "只收取指派给我的" - label_user_mail_option_only_owner: 只收取由我创建的 label_user_mail_no_self_notified: "不要发送对我自己提交的修改的通知" label_registration_activation_by_email: 通过邮件认证激活帐号 label_registration_manual_activation: 手动激活帐号 @@ -1217,3 +1215,5 @@ zh: be reassigned to an issue that is about to be deleted setting_timelog_required_fields: Required fields for time logs label_attribute_of_object: '%{object_name}''s %{name}' + label_user_mail_option_only_assigned: Only for things I watch or I am assigned to + label_user_mail_option_only_owner: Only for things I watch or I am the owner of From d10ab869a7433c0e7c6f8ddbc56e23ec2098c97c Mon Sep 17 00:00:00 2001 From: Jean-Philippe Lang Date: Wed, 18 Jan 2017 12:51:41 +0000 Subject: [PATCH 0567/1117] Handle csv columns selection in query to preload appropriate associations (#24865). git-svn-id: http://svn.redmine.org/redmine/trunk@16219 e93f8b46-1217-0410-a6f0-8f06a7374b81 --- app/helpers/queries_helper.rb | 14 +++----------- app/models/query.rb | 3 +++ app/views/issues/index.html.erb | 6 +++--- app/views/timelog/index.html.erb | 4 ++-- test/functional/issues_controller_test.rb | 10 +++++----- test/functional/timelog_controller_test.rb | 7 ++++--- 6 files changed, 20 insertions(+), 24 deletions(-) diff --git a/app/helpers/queries_helper.rb b/app/helpers/queries_helper.rb index c1c46f483..458fb70fd 100644 --- a/app/helpers/queries_helper.rb +++ b/app/helpers/queries_helper.rb @@ -231,13 +231,7 @@ module QueriesHelper end def query_to_csv(items, query, options={}) - options ||= {} - columns = (options[:columns] == 'all' ? query.available_inline_columns : query.inline_columns) - query.available_block_columns.each do |column| - if options[column.name].present? - columns << column - end - end + columns = query.columns Redmine::Export::CSV.generate do |csv| # csv header fields @@ -310,10 +304,8 @@ module QueriesHelper else tags << hidden_field_tag("f[]", "", :id => nil) end - if query.column_names.present? - query.column_names.each do |name| - tags << hidden_field_tag("c[]", name, :id => nil) - end + query.columns.each do |column| + tags << hidden_field_tag("c[]", column.name, :id => nil) end if query.totalable_names.present? query.totalable_names.each do |name| diff --git a/app/models/query.rb b/app/models/query.rb index aba3dc854..7c85d7164 100644 --- a/app/models/query.rb +++ b/app/models/query.rb @@ -670,6 +670,9 @@ class Query < ActiveRecord::Base if names names = names.select {|n| n.is_a?(Symbol) || !n.blank? } names = names.collect {|n| n.is_a?(Symbol) ? n : n.to_sym } + if names.delete(:all_inline) + names = available_inline_columns.map(&:name) | names + end # Set column_names to nil if default columns if names == default_columns_names names = nil diff --git a/app/views/issues/index.html.erb b/app/views/issues/index.html.erb index a9f321c3d..3d456aad1 100644 --- a/app/views/issues/index.html.erb +++ b/app/views/issues/index.html.erb @@ -32,11 +32,11 @@ <%= query_as_hidden_field_tags(@query) %> <%= hidden_field_tag 'sort', @sort_criteria.to_param, :id => nil %>

          -
          - +
          +

          - +

          <% if @issue_count > Setting.issues_export_limit.to_i %>

          diff --git a/app/views/timelog/index.html.erb b/app/views/timelog/index.html.erb index f70f7b8b6..b863ee40f 100644 --- a/app/views/timelog/index.html.erb +++ b/app/views/timelog/index.html.erb @@ -27,8 +27,8 @@ <%= form_tag(_time_entries_path(@project, nil, :format => 'csv'), :method => :get, :id => 'csv-export-form') do %> <%= query_as_hidden_field_tags @query %>

          -
          - +
          +

          <%= submit_tag l(:button_export), :name => nil, :onclick => "hideModal(this);" %> diff --git a/test/functional/issues_controller_test.rb b/test/functional/issues_controller_test.rb index e01b69f47..2e9a11c42 100644 --- a/test/functional/issues_controller_test.rb +++ b/test/functional/issues_controller_test.rb @@ -481,7 +481,7 @@ class IssuesControllerTest < Redmine::ControllerTest Issue.generate!(:description => 'test_index_csv_with_description') with_settings :default_language => 'en' do - get :index, :format => 'csv', :csv => {:description => '1'} + get :index, :format => 'csv', :c => [:tracker, :description] assert_response :success end @@ -503,7 +503,7 @@ class IssuesControllerTest < Redmine::ControllerTest end def test_index_csv_with_all_columns - get :index, :format => 'csv', :csv => {:columns => 'all'} + get :index, :format => 'csv', :c => ['all_inline'] assert_response :success assert_equal 'text/csv; header=present', @response.content_type @@ -518,7 +518,7 @@ class IssuesControllerTest < Redmine::ControllerTest issue.custom_field_values = {1 => ['MySQL', 'Oracle']} issue.save! - get :index, :format => 'csv', :csv => {:columns => 'all'} + get :index, :format => 'csv', :c => ['tracker', "cf_1"] assert_response :success lines = @response.body.chomp.split("\n") assert lines.detect {|line| line.include?('"MySQL, Oracle"')} @@ -529,14 +529,14 @@ class IssuesControllerTest < Redmine::ControllerTest issue = Issue.generate!(:project_id => 1, :tracker_id => 1, :custom_field_values => {field.id => '185.6'}) with_settings :default_language => 'fr' do - get :index, :format => 'csv', :csv => {:columns => 'all'} + get :index, :format => 'csv', :c => ['id', 'tracker', "cf_#{field.id}"] assert_response :success issue_line = response.body.chomp.split("\n").map {|line| line.split(';')}.detect {|line| line[0]==issue.id.to_s} assert_include '185,60', issue_line end with_settings :default_language => 'en' do - get :index, :format => 'csv', :csv => {:columns => 'all'} + get :index, :format => 'csv', :c => ['id', 'tracker', "cf_#{field.id}"] assert_response :success issue_line = response.body.chomp.split("\n").map {|line| line.split(',')}.detect {|line| line[0]==issue.id.to_s} assert_include '185.60', issue_line diff --git a/test/functional/timelog_controller_test.rb b/test/functional/timelog_controller_test.rb index 594fb1e19..baad0c95d 100644 --- a/test/functional/timelog_controller_test.rb +++ b/test/functional/timelog_controller_test.rb @@ -985,9 +985,10 @@ class TimelogControllerTest < Redmine::ControllerTest assert_select 'input[name=?][value=?]', 'op[spent_on]', '>=' assert_select 'input[name=?][value=?]', 'v[spent_on][]', '2007-04-01' # columns - assert_select 'input[name=?][value=?]', 'c[]', 'spent_on' - assert_select 'input[name=?][value=?]', 'c[]', 'user' - assert_select 'input[name=?]', 'c[]', 2 + assert_select 'input[name=?][type=hidden][value=?]', 'c[]', 'spent_on' + assert_select 'input[name=?][type=hidden][value=?]', 'c[]', 'user' + assert_select 'input[name=?][type=hidden]', 'c[]', 2 + assert_select 'input[name=?][value=?]', 'c[]', 'all_inline' end end end From 2c70d9e9886ebbd0924cd543f399788da9df21ca Mon Sep 17 00:00:00 2001 From: Jean-Philippe Lang Date: Wed, 18 Jan 2017 12:52:42 +0000 Subject: [PATCH 0568/1117] Set inverse on custom_values association. git-svn-id: http://svn.redmine.org/redmine/trunk@16220 e93f8b46-1217-0410-a6f0-8f06a7374b81 --- lib/plugins/acts_as_customizable/lib/acts_as_customizable.rb | 1 + 1 file changed, 1 insertion(+) diff --git a/lib/plugins/acts_as_customizable/lib/acts_as_customizable.rb b/lib/plugins/acts_as_customizable/lib/acts_as_customizable.rb index fb5edf0fc..5d92ab688 100644 --- a/lib/plugins/acts_as_customizable/lib/acts_as_customizable.rb +++ b/lib/plugins/acts_as_customizable/lib/acts_as_customizable.rb @@ -29,6 +29,7 @@ module Redmine self.customizable_options = options has_many :custom_values, lambda {includes(:custom_field).order("#{CustomField.table_name}.position")}, :as => :customized, + :inverse_of => :customized, :dependent => :delete_all, :validate => false From aa354e62751670a1c2c6752cdfe9b8d6fb6c0bae Mon Sep 17 00:00:00 2001 From: Jean-Philippe Lang Date: Wed, 18 Jan 2017 12:54:22 +0000 Subject: [PATCH 0569/1117] Don't join all associations by default (#24865). git-svn-id: http://svn.redmine.org/redmine/trunk@16221 e93f8b46-1217-0410-a6f0-8f06a7374b81 --- app/controllers/issues_controller.rb | 5 ++--- app/models/issue_query.rb | 21 ++++++++++++++++++--- 2 files changed, 20 insertions(+), 6 deletions(-) diff --git a/app/controllers/issues_controller.rb b/app/controllers/issues_controller.rb index 3311d3e30..1b6a82aa4 100644 --- a/app/controllers/issues_controller.rb +++ b/app/controllers/issues_controller.rb @@ -66,8 +66,7 @@ class IssuesController < ApplicationController @issue_count = @query.issue_count @issue_pages = Paginator.new @issue_count, @limit, params['page'] @offset ||= @issue_pages.offset - @issues = @query.issues(:include => [:assigned_to, :tracker, :priority, :category, :fixed_version], - :order => sort_clause, + @issues = @query.issues(:order => sort_clause, :offset => @offset, :limit => @limit) @issue_count_by_group = @query.issue_count_by_group @@ -402,7 +401,7 @@ class IssuesController < ApplicationController sort_init(@query.sort_criteria.empty? ? [['id', 'desc']] : @query.sort_criteria) sort_update(@query.sortable_columns, 'issues_index_sort') limit = 500 - issue_ids = @query.issue_ids(:order => sort_clause, :limit => (limit + 1), :include => [:assigned_to, :tracker, :priority, :category, :fixed_version]) + issue_ids = @query.issue_ids(:order => sort_clause, :limit => (limit + 1)) if (idx = issue_ids.index(@issue.id)) && idx < limit if issue_ids.size < 500 @issue_position = idx + 1 diff --git a/app/models/issue_query.rb b/app/models/issue_query.rb index 61750557a..9613b2ae2 100644 --- a/app/models/issue_query.rb +++ b/app/models/issue_query.rb @@ -273,9 +273,9 @@ class IssueQuery < Query limit(options[:limit]). offset(options[:offset]) - scope = scope.preload(:custom_values) - if has_column?(:author) - scope = scope.preload(:author) + scope = scope.preload([:tracker, :priority, :author, :assigned_to, :fixed_version, :category] & columns.map(&:name)) + if has_custom_field_column? + scope = scope.preload(:custom_values) end issues = scope.to_a @@ -513,6 +513,21 @@ class IssueQuery < Query if order_options.include?('authors') joins << "LEFT OUTER JOIN #{User.table_name} authors ON authors.id = #{queried_table_name}.author_id" end + if order_options.include?('users') + joins << "LEFT OUTER JOIN #{User.table_name} ON #{User.table_name}.id = #{queried_table_name}.assigned_to_id" + end + if order_options.include?('fixed_version') + joins << "LEFT OUTER JOIN #{Version.table_name} ON #{Version.table_name}.id = #{queried_table_name}.fixed_version_id" + end + if order_options.include?('category') + joins << "LEFT OUTER JOIN #{IssueCategory.table_name} ON #{IssueCategory.table_name}.id = #{queried_table_name}.category_id" + end + if order_options.include?('tracker') + joins << "LEFT OUTER JOIN #{Tracker.table_name} ON #{Tracker.table_name}.id = #{queried_table_name}.tracker_id" + end + if order_options.include?('enumeration') + joins << "LEFT OUTER JOIN #{IssuePriority.table_name} ON #{IssuePriority.table_name}.id = #{queried_table_name}.priority_id" + end end joins.any? ? joins.join(' ') : nil From 1d9e6ebc38fff469c71043cd8eb42dbfd54ddd7d Mon Sep 17 00:00:00 2001 From: Jean-Philippe Lang Date: Wed, 18 Jan 2017 13:08:00 +0000 Subject: [PATCH 0570/1117] Test failure (#24865). git-svn-id: http://svn.redmine.org/redmine/trunk@16222 e93f8b46-1217-0410-a6f0-8f06a7374b81 --- test/unit/helpers/queries_helper_test.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/test/unit/helpers/queries_helper_test.rb b/test/unit/helpers/queries_helper_test.rb index c57315242..6b10d5053 100644 --- a/test/unit/helpers/queries_helper_test.rb +++ b/test/unit/helpers/queries_helper_test.rb @@ -89,7 +89,7 @@ class QueriesHelperTest < Redmine::HelperTest ] with_locale 'fr' do - csv = query_to_csv(issues, IssueQuery.new, :columns => 'all') + csv = query_to_csv(issues, IssueQuery.new(:column_names => ['id', "cf_#{f.id}"])) assert_include "Oui", csv assert_include "Non", csv end From 3a21dc6912ab6f0426dc5a59c68c571447bf9bef Mon Sep 17 00:00:00 2001 From: Jean-Philippe Lang Date: Wed, 18 Jan 2017 13:17:39 +0000 Subject: [PATCH 0571/1117] Fixed #joins_for_order_statement (#24865). git-svn-id: http://svn.redmine.org/redmine/trunk@16223 e93f8b46-1217-0410-a6f0-8f06a7374b81 --- app/models/issue_query.rb | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/app/models/issue_query.rb b/app/models/issue_query.rb index 9613b2ae2..588a1931d 100644 --- a/app/models/issue_query.rb +++ b/app/models/issue_query.rb @@ -516,16 +516,16 @@ class IssueQuery < Query if order_options.include?('users') joins << "LEFT OUTER JOIN #{User.table_name} ON #{User.table_name}.id = #{queried_table_name}.assigned_to_id" end - if order_options.include?('fixed_version') + if order_options.include?('versions') joins << "LEFT OUTER JOIN #{Version.table_name} ON #{Version.table_name}.id = #{queried_table_name}.fixed_version_id" end - if order_options.include?('category') + if order_options.include?('issue_categories') joins << "LEFT OUTER JOIN #{IssueCategory.table_name} ON #{IssueCategory.table_name}.id = #{queried_table_name}.category_id" end - if order_options.include?('tracker') + if order_options.include?('trackers') joins << "LEFT OUTER JOIN #{Tracker.table_name} ON #{Tracker.table_name}.id = #{queried_table_name}.tracker_id" end - if order_options.include?('enumeration') + if order_options.include?('enumerations') joins << "LEFT OUTER JOIN #{IssuePriority.table_name} ON #{IssuePriority.table_name}.id = #{queried_table_name}.priority_id" end end From 6fabc106964a6e33eb5f0cf779856a6b24451692 Mon Sep 17 00:00:00 2001 From: Jean-Philippe Lang Date: Wed, 18 Jan 2017 14:49:57 +0000 Subject: [PATCH 0572/1117] Add warning when loosing data from custom fields when bulk editing issues (#22600). git-svn-id: http://svn.redmine.org/redmine/trunk@16224 e93f8b46-1217-0410-a6f0-8f06a7374b81 --- app/controllers/issues_controller.rb | 19 +++++++++++++++++++ app/models/custom_field_value.rb | 8 ++++++++ app/views/issues/bulk_edit.html.erb | 7 +++++++ config/locales/en.yml | 1 + config/locales/fr.yml | 1 + test/functional/issues_controller_test.rb | 17 +++++++++++++++++ 6 files changed, 53 insertions(+) diff --git a/app/controllers/issues_controller.rb b/app/controllers/issues_controller.rb index 1b6a82aa4..0f66f27fb 100644 --- a/app/controllers/issues_controller.rb +++ b/app/controllers/issues_controller.rb @@ -213,6 +213,16 @@ class IssuesController < ApplicationController edited_issues = Issue.where(:id => @issues.map(&:id)).to_a + @values_by_custom_field = {} + edited_issues.each do |issue| + issue.custom_field_values.each do |c| + if c.value_present? + @values_by_custom_field[c.custom_field] ||= [] + @values_by_custom_field[c.custom_field] << issue.id + end + end + end + @allowed_projects = Issue.allowed_target_projects if params[:issue] @target_project = @allowed_projects.detect {|p| p.id.to_s == params[:issue][:project_id].to_s} @@ -244,6 +254,15 @@ class IssuesController < ApplicationController end end + edited_issues.each do |issue| + issue.custom_field_values.each do |c| + if c.value_present? && @values_by_custom_field[c.custom_field] + @values_by_custom_field[c.custom_field].delete(issue.id) + end + end + end + @values_by_custom_field.delete_if {|k,v| v.blank?} + @custom_fields = edited_issues.map{|i|i.editable_custom_fields}.reduce(:&).select {|field| field.format.bulk_edit_supported} @assignables = target_projects.map(&:assignable_users).reduce(:&) @versions = target_projects.map {|p| p.shared_versions.open}.reduce(:&) diff --git a/app/models/custom_field_value.rb b/app/models/custom_field_value.rb index 38cffc0e6..eea09b289 100644 --- a/app/models/custom_field_value.rb +++ b/app/models/custom_field_value.rb @@ -52,6 +52,14 @@ class CustomFieldValue @value = custom_field.set_custom_field_value(self, v) end + def value_present? + if value.is_a?(Array) + value.any?(&:present?) + else + value.present? + end + end + def validate_value custom_field.validate_custom_value(self).each do |message| customized.errors.add(:base, custom_field.name + ' ' + message) diff --git a/app/views/issues/bulk_edit.html.erb b/app/views/issues/bulk_edit.html.erb index 29b4881c7..23817f875 100644 --- a/app/views/issues/bulk_edit.html.erb +++ b/app/views/issues/bulk_edit.html.erb @@ -186,6 +186,13 @@

          +<% if @values_by_custom_field.present? %> +
          + <%= l(:warning_fields_cleared_on_bulk_edit) %>:
          + <%= safe_join(@values_by_custom_field.map {|field, ids| content_tag "span", "#{field.name} (#{ids.size})"}, ', ') %> +
          +<% end %> +

          <% if @copy %> <%= hidden_field_tag 'copy', '1' %> diff --git a/config/locales/en.yml b/config/locales/en.yml index b643ae577..7ba059947 100644 --- a/config/locales/en.yml +++ b/config/locales/en.yml @@ -219,6 +219,7 @@ en: error_no_projects_with_tracker_allowed_for_new_issue: "There are no projects with trackers for which you can create an issue" error_move_of_child_not_possible: "Subtask %{child} could not be moved to the new project: %{errors}" error_cannot_reassign_time_entries_to_an_issue_about_to_be_deleted: "Spent time cannot be reassigned to an issue that is about to be deleted" + warning_fields_cleared_on_bulk_edit: "Changes will result in the automatic deletion of values from one or more fields on the selected objects" mail_subject_lost_password: "Your %{value} password" mail_body_lost_password: 'To change your password, click on the following link:' diff --git a/config/locales/fr.yml b/config/locales/fr.yml index 031ecc472..73aabc0a9 100644 --- a/config/locales/fr.yml +++ b/config/locales/fr.yml @@ -239,6 +239,7 @@ fr: error_no_projects_with_tracker_allowed_for_new_issue: "Aucun projet ne dispose d'un tracker sur lequel vous pouvez créer une demande" error_move_of_child_not_possible: "La sous-tâche %{child} n'a pas pu être déplacée dans le nouveau projet : %{errors}" error_cannot_reassign_time_entries_to_an_issue_about_to_be_deleted: "Le temps passé ne peut pas être réaffecté à une demande qui va être supprimée" + warning_fields_cleared_on_bulk_edit: "Les changements apportés entraîneront la suppression automatique des valeurs d'un ou plusieurs champs sur les objets sélectionnés" mail_subject_lost_password: "Votre mot de passe %{value}" mail_body_lost_password: 'Pour changer votre mot de passe, cliquez sur le lien suivant :' diff --git a/test/functional/issues_controller_test.rb b/test/functional/issues_controller_test.rb index 2e9a11c42..4e8d88668 100644 --- a/test/functional/issues_controller_test.rb +++ b/test/functional/issues_controller_test.rb @@ -4067,6 +4067,23 @@ class IssuesControllerTest < Redmine::ControllerTest assert_select 'input[name=?]', "issue[custom_field_values][#{field2.id}]" end + def test_bulk_edit_should_warn_about_custom_field_values_about_to_be_cleared + CustomField.delete_all + + cleared = IssueCustomField.generate!(:name => 'Cleared', :tracker_ids => [2], :is_for_all => true) + CustomValue.create!(:customized => Issue.find(2), :custom_field => cleared, :value => 'foo') + + not_cleared = IssueCustomField.generate!(:name => 'Not cleared', :tracker_ids => [2, 3], :is_for_all => true) + CustomValue.create!(:customized => Issue.find(2), :custom_field => not_cleared, :value => 'bar') + @request.session[:user_id] = 2 + + get :bulk_edit, :ids => [1, 2], :issue => {:tracker_id => 3} + assert_response :success + assert_select '.warning', :text => /automatic deletion of values/ + assert_select '.warning span', :text => 'Cleared (1)' + assert_select '.warning span', :text => /Not cleared/, :count => 0 + end + def test_bulk_update @request.session[:user_id] = 2 # update issues priority From 3ad4dc4140756bd698be36604bdbec6641da2029 Mon Sep 17 00:00:00 2001 From: Jean-Philippe Lang Date: Wed, 18 Jan 2017 14:52:37 +0000 Subject: [PATCH 0573/1117] Adds :warning_fields_cleared_on_bulk_edit string to locales (#22600). git-svn-id: http://svn.redmine.org/redmine/trunk@16225 e93f8b46-1217-0410-a6f0-8f06a7374b81 --- config/locales/ar.yml | 2 ++ config/locales/az.yml | 2 ++ config/locales/bg.yml | 2 ++ config/locales/bs.yml | 2 ++ config/locales/ca.yml | 2 ++ config/locales/cs.yml | 2 ++ config/locales/da.yml | 2 ++ config/locales/de.yml | 2 ++ config/locales/el.yml | 2 ++ config/locales/en-GB.yml | 2 ++ config/locales/es-PA.yml | 2 ++ config/locales/es.yml | 2 ++ config/locales/et.yml | 2 ++ config/locales/eu.yml | 2 ++ config/locales/fa.yml | 2 ++ config/locales/fi.yml | 2 ++ config/locales/gl.yml | 2 ++ config/locales/he.yml | 2 ++ config/locales/hr.yml | 2 ++ config/locales/hu.yml | 2 ++ config/locales/id.yml | 2 ++ config/locales/it.yml | 2 ++ config/locales/ja.yml | 2 ++ config/locales/ko.yml | 2 ++ config/locales/lt.yml | 2 ++ config/locales/lv.yml | 2 ++ config/locales/mk.yml | 2 ++ config/locales/mn.yml | 2 ++ config/locales/nl.yml | 2 ++ config/locales/no.yml | 2 ++ config/locales/pl.yml | 2 ++ config/locales/pt-BR.yml | 2 ++ config/locales/pt.yml | 2 ++ config/locales/ro.yml | 2 ++ config/locales/ru.yml | 2 ++ config/locales/sk.yml | 2 ++ config/locales/sl.yml | 2 ++ config/locales/sq.yml | 2 ++ config/locales/sr-YU.yml | 2 ++ config/locales/sr.yml | 2 ++ config/locales/sv.yml | 2 ++ config/locales/th.yml | 2 ++ config/locales/tr.yml | 2 ++ config/locales/uk.yml | 2 ++ config/locales/vi.yml | 2 ++ config/locales/zh-TW.yml | 2 ++ config/locales/zh.yml | 2 ++ 47 files changed, 94 insertions(+) diff --git a/config/locales/ar.yml b/config/locales/ar.yml index 675cae722..9b022a365 100644 --- a/config/locales/ar.yml +++ b/config/locales/ar.yml @@ -1224,3 +1224,5 @@ ar: label_attribute_of_object: '%{object_name}''s %{name}' label_user_mail_option_only_assigned: Only for things I watch or I am assigned to label_user_mail_option_only_owner: Only for things I watch or I am the owner of + warning_fields_cleared_on_bulk_edit: Changes will result in the automatic deletion + of values from one or more fields on the selected objects diff --git a/config/locales/az.yml b/config/locales/az.yml index f6cf19853..2b8d2c28b 100644 --- a/config/locales/az.yml +++ b/config/locales/az.yml @@ -1319,3 +1319,5 @@ az: label_attribute_of_object: '%{object_name}''s %{name}' label_user_mail_option_only_assigned: Only for things I watch or I am assigned to label_user_mail_option_only_owner: Only for things I watch or I am the owner of + warning_fields_cleared_on_bulk_edit: Changes will result in the automatic deletion + of values from one or more fields on the selected objects diff --git a/config/locales/bg.yml b/config/locales/bg.yml index b899628ba..7cd5951a4 100644 --- a/config/locales/bg.yml +++ b/config/locales/bg.yml @@ -1210,3 +1210,5 @@ bg: label_attribute_of_object: '%{object_name}''s %{name}' label_user_mail_option_only_assigned: Only for things I watch or I am assigned to label_user_mail_option_only_owner: Only for things I watch or I am the owner of + warning_fields_cleared_on_bulk_edit: Changes will result in the automatic deletion + of values from one or more fields on the selected objects diff --git a/config/locales/bs.yml b/config/locales/bs.yml index df25b8f97..7f02ad537 100644 --- a/config/locales/bs.yml +++ b/config/locales/bs.yml @@ -1237,3 +1237,5 @@ bs: label_attribute_of_object: '%{object_name}''s %{name}' label_user_mail_option_only_assigned: Only for things I watch or I am assigned to label_user_mail_option_only_owner: Only for things I watch or I am the owner of + warning_fields_cleared_on_bulk_edit: Changes will result in the automatic deletion + of values from one or more fields on the selected objects diff --git a/config/locales/ca.yml b/config/locales/ca.yml index 39b9cc649..46d70b92e 100644 --- a/config/locales/ca.yml +++ b/config/locales/ca.yml @@ -1214,3 +1214,5 @@ ca: label_attribute_of_object: '%{object_name}''s %{name}' label_user_mail_option_only_assigned: Only for things I watch or I am assigned to label_user_mail_option_only_owner: Only for things I watch or I am the owner of + warning_fields_cleared_on_bulk_edit: Changes will result in the automatic deletion + of values from one or more fields on the selected objects diff --git a/config/locales/cs.yml b/config/locales/cs.yml index 66b05643d..2d8adac64 100644 --- a/config/locales/cs.yml +++ b/config/locales/cs.yml @@ -1223,3 +1223,5 @@ cs: label_attribute_of_object: '%{object_name}''s %{name}' label_user_mail_option_only_assigned: Only for things I watch or I am assigned to label_user_mail_option_only_owner: Only for things I watch or I am the owner of + warning_fields_cleared_on_bulk_edit: Changes will result in the automatic deletion + of values from one or more fields on the selected objects diff --git a/config/locales/da.yml b/config/locales/da.yml index 17369e570..1fa3715bc 100644 --- a/config/locales/da.yml +++ b/config/locales/da.yml @@ -1241,3 +1241,5 @@ da: label_attribute_of_object: '%{object_name}''s %{name}' label_user_mail_option_only_assigned: Only for things I watch or I am assigned to label_user_mail_option_only_owner: Only for things I watch or I am the owner of + warning_fields_cleared_on_bulk_edit: Changes will result in the automatic deletion + of values from one or more fields on the selected objects diff --git a/config/locales/de.yml b/config/locales/de.yml index d370662d7..810419577 100644 --- a/config/locales/de.yml +++ b/config/locales/de.yml @@ -1226,3 +1226,5 @@ de: label_attribute_of_object: '%{object_name}''s %{name}' label_user_mail_option_only_assigned: Only for things I watch or I am assigned to label_user_mail_option_only_owner: Only for things I watch or I am the owner of + warning_fields_cleared_on_bulk_edit: Changes will result in the automatic deletion + of values from one or more fields on the selected objects diff --git a/config/locales/el.yml b/config/locales/el.yml index ad7dcc297..0c58158fd 100644 --- a/config/locales/el.yml +++ b/config/locales/el.yml @@ -1224,3 +1224,5 @@ el: label_attribute_of_object: '%{object_name}''s %{name}' label_user_mail_option_only_assigned: Only for things I watch or I am assigned to label_user_mail_option_only_owner: Only for things I watch or I am the owner of + warning_fields_cleared_on_bulk_edit: Changes will result in the automatic deletion + of values from one or more fields on the selected objects diff --git a/config/locales/en-GB.yml b/config/locales/en-GB.yml index 89b2ea533..dd3c6d89e 100644 --- a/config/locales/en-GB.yml +++ b/config/locales/en-GB.yml @@ -1226,3 +1226,5 @@ en-GB: label_attribute_of_object: '%{object_name}''s %{name}' label_user_mail_option_only_assigned: Only for things I watch or I am assigned to label_user_mail_option_only_owner: Only for things I watch or I am the owner of + warning_fields_cleared_on_bulk_edit: Changes will result in the automatic deletion + of values from one or more fields on the selected objects diff --git a/config/locales/es-PA.yml b/config/locales/es-PA.yml index 94cb64e3b..48bba89c3 100644 --- a/config/locales/es-PA.yml +++ b/config/locales/es-PA.yml @@ -1254,3 +1254,5 @@ es-PA: label_attribute_of_object: '%{object_name}''s %{name}' label_user_mail_option_only_assigned: Only for things I watch or I am assigned to label_user_mail_option_only_owner: Only for things I watch or I am the owner of + warning_fields_cleared_on_bulk_edit: Changes will result in the automatic deletion + of values from one or more fields on the selected objects diff --git a/config/locales/es.yml b/config/locales/es.yml index 64b0de477..c94910d19 100644 --- a/config/locales/es.yml +++ b/config/locales/es.yml @@ -1252,3 +1252,5 @@ es: label_attribute_of_object: '%{object_name}''s %{name}' label_user_mail_option_only_assigned: Only for things I watch or I am assigned to label_user_mail_option_only_owner: Only for things I watch or I am the owner of + warning_fields_cleared_on_bulk_edit: Changes will result in the automatic deletion + of values from one or more fields on the selected objects diff --git a/config/locales/et.yml b/config/locales/et.yml index ebce370ec..5dd059faa 100644 --- a/config/locales/et.yml +++ b/config/locales/et.yml @@ -1229,3 +1229,5 @@ et: label_attribute_of_object: '%{object_name}''s %{name}' label_user_mail_option_only_assigned: Only for things I watch or I am assigned to label_user_mail_option_only_owner: Only for things I watch or I am the owner of + warning_fields_cleared_on_bulk_edit: Changes will result in the automatic deletion + of values from one or more fields on the selected objects diff --git a/config/locales/eu.yml b/config/locales/eu.yml index 2e4425aa2..75d6b6e05 100644 --- a/config/locales/eu.yml +++ b/config/locales/eu.yml @@ -1225,3 +1225,5 @@ eu: label_attribute_of_object: '%{object_name}''s %{name}' label_user_mail_option_only_assigned: Only for things I watch or I am assigned to label_user_mail_option_only_owner: Only for things I watch or I am the owner of + warning_fields_cleared_on_bulk_edit: Changes will result in the automatic deletion + of values from one or more fields on the selected objects diff --git a/config/locales/fa.yml b/config/locales/fa.yml index 36ae3370f..7ca72911d 100644 --- a/config/locales/fa.yml +++ b/config/locales/fa.yml @@ -1225,3 +1225,5 @@ fa: label_attribute_of_object: '%{object_name}''s %{name}' label_user_mail_option_only_assigned: Only for things I watch or I am assigned to label_user_mail_option_only_owner: Only for things I watch or I am the owner of + warning_fields_cleared_on_bulk_edit: Changes will result in the automatic deletion + of values from one or more fields on the selected objects diff --git a/config/locales/fi.yml b/config/locales/fi.yml index 113c3ce2f..e3d21c376 100644 --- a/config/locales/fi.yml +++ b/config/locales/fi.yml @@ -1245,3 +1245,5 @@ fi: label_attribute_of_object: '%{object_name}''s %{name}' label_user_mail_option_only_assigned: Only for things I watch or I am assigned to label_user_mail_option_only_owner: Only for things I watch or I am the owner of + warning_fields_cleared_on_bulk_edit: Changes will result in the automatic deletion + of values from one or more fields on the selected objects diff --git a/config/locales/gl.yml b/config/locales/gl.yml index b59a9d7bf..00d730991 100644 --- a/config/locales/gl.yml +++ b/config/locales/gl.yml @@ -1232,3 +1232,5 @@ gl: label_attribute_of_object: '%{object_name}''s %{name}' label_user_mail_option_only_assigned: Only for things I watch or I am assigned to label_user_mail_option_only_owner: Only for things I watch or I am the owner of + warning_fields_cleared_on_bulk_edit: Changes will result in the automatic deletion + of values from one or more fields on the selected objects diff --git a/config/locales/he.yml b/config/locales/he.yml index 47f8648e9..94d975e20 100644 --- a/config/locales/he.yml +++ b/config/locales/he.yml @@ -1229,3 +1229,5 @@ he: label_attribute_of_object: '%{object_name}''s %{name}' label_user_mail_option_only_assigned: Only for things I watch or I am assigned to label_user_mail_option_only_owner: Only for things I watch or I am the owner of + warning_fields_cleared_on_bulk_edit: Changes will result in the automatic deletion + of values from one or more fields on the selected objects diff --git a/config/locales/hr.yml b/config/locales/hr.yml index 16dc46d0b..c923a7007 100644 --- a/config/locales/hr.yml +++ b/config/locales/hr.yml @@ -1223,3 +1223,5 @@ hr: label_attribute_of_object: '%{object_name}''s %{name}' label_user_mail_option_only_assigned: Only for things I watch or I am assigned to label_user_mail_option_only_owner: Only for things I watch or I am the owner of + warning_fields_cleared_on_bulk_edit: Changes will result in the automatic deletion + of values from one or more fields on the selected objects diff --git a/config/locales/hu.yml b/config/locales/hu.yml index d7ac75b6c..70f6453b9 100644 --- a/config/locales/hu.yml +++ b/config/locales/hu.yml @@ -1243,3 +1243,5 @@ label_attribute_of_object: '%{object_name}''s %{name}' label_user_mail_option_only_assigned: Only for things I watch or I am assigned to label_user_mail_option_only_owner: Only for things I watch or I am the owner of + warning_fields_cleared_on_bulk_edit: Changes will result in the automatic deletion + of values from one or more fields on the selected objects diff --git a/config/locales/id.yml b/config/locales/id.yml index 2c0da61a7..2c709054c 100644 --- a/config/locales/id.yml +++ b/config/locales/id.yml @@ -1228,3 +1228,5 @@ id: label_attribute_of_object: '%{object_name}''s %{name}' label_user_mail_option_only_assigned: Only for things I watch or I am assigned to label_user_mail_option_only_owner: Only for things I watch or I am the owner of + warning_fields_cleared_on_bulk_edit: Changes will result in the automatic deletion + of values from one or more fields on the selected objects diff --git a/config/locales/it.yml b/config/locales/it.yml index 8d4482a40..445d75cae 100644 --- a/config/locales/it.yml +++ b/config/locales/it.yml @@ -1219,3 +1219,5 @@ it: label_attribute_of_object: '%{object_name}''s %{name}' label_user_mail_option_only_assigned: Only for things I watch or I am assigned to label_user_mail_option_only_owner: Only for things I watch or I am the owner of + warning_fields_cleared_on_bulk_edit: Changes will result in the automatic deletion + of values from one or more fields on the selected objects diff --git a/config/locales/ja.yml b/config/locales/ja.yml index e5ad4dccf..3a9867a9f 100644 --- a/config/locales/ja.yml +++ b/config/locales/ja.yml @@ -1234,3 +1234,5 @@ ja: be reassigned to an issue that is about to be deleted setting_timelog_required_fields: Required fields for time logs label_attribute_of_object: '%{object_name}''s %{name}' + warning_fields_cleared_on_bulk_edit: Changes will result in the automatic deletion + of values from one or more fields on the selected objects diff --git a/config/locales/ko.yml b/config/locales/ko.yml index 59033a095..3832ec23d 100644 --- a/config/locales/ko.yml +++ b/config/locales/ko.yml @@ -1263,3 +1263,5 @@ ko: label_attribute_of_object: '%{object_name}''s %{name}' label_user_mail_option_only_assigned: Only for things I watch or I am assigned to label_user_mail_option_only_owner: Only for things I watch or I am the owner of + warning_fields_cleared_on_bulk_edit: Changes will result in the automatic deletion + of values from one or more fields on the selected objects diff --git a/config/locales/lt.yml b/config/locales/lt.yml index 9c2ffe8f6..3fc7fbe9d 100644 --- a/config/locales/lt.yml +++ b/config/locales/lt.yml @@ -1213,3 +1213,5 @@ lt: label_attribute_of_object: '%{object_name}''s %{name}' label_user_mail_option_only_assigned: Only for things I watch or I am assigned to label_user_mail_option_only_owner: Only for things I watch or I am the owner of + warning_fields_cleared_on_bulk_edit: Changes will result in the automatic deletion + of values from one or more fields on the selected objects diff --git a/config/locales/lv.yml b/config/locales/lv.yml index 55e47b2a3..1f22bccfb 100644 --- a/config/locales/lv.yml +++ b/config/locales/lv.yml @@ -1218,3 +1218,5 @@ lv: label_attribute_of_object: '%{object_name}''s %{name}' label_user_mail_option_only_assigned: Only for things I watch or I am assigned to label_user_mail_option_only_owner: Only for things I watch or I am the owner of + warning_fields_cleared_on_bulk_edit: Changes will result in the automatic deletion + of values from one or more fields on the selected objects diff --git a/config/locales/mk.yml b/config/locales/mk.yml index a905a5b53..626d6a370 100644 --- a/config/locales/mk.yml +++ b/config/locales/mk.yml @@ -1224,3 +1224,5 @@ mk: label_attribute_of_object: '%{object_name}''s %{name}' label_user_mail_option_only_assigned: Only for things I watch or I am assigned to label_user_mail_option_only_owner: Only for things I watch or I am the owner of + warning_fields_cleared_on_bulk_edit: Changes will result in the automatic deletion + of values from one or more fields on the selected objects diff --git a/config/locales/mn.yml b/config/locales/mn.yml index cb06c17c3..f97997807 100644 --- a/config/locales/mn.yml +++ b/config/locales/mn.yml @@ -1225,3 +1225,5 @@ mn: label_attribute_of_object: '%{object_name}''s %{name}' label_user_mail_option_only_assigned: Only for things I watch or I am assigned to label_user_mail_option_only_owner: Only for things I watch or I am the owner of + warning_fields_cleared_on_bulk_edit: Changes will result in the automatic deletion + of values from one or more fields on the selected objects diff --git a/config/locales/nl.yml b/config/locales/nl.yml index 3b8195d06..b1b4c18e4 100644 --- a/config/locales/nl.yml +++ b/config/locales/nl.yml @@ -1199,3 +1199,5 @@ nl: label_attribute_of_object: '%{object_name}''s %{name}' label_user_mail_option_only_assigned: Only for things I watch or I am assigned to label_user_mail_option_only_owner: Only for things I watch or I am the owner of + warning_fields_cleared_on_bulk_edit: Changes will result in the automatic deletion + of values from one or more fields on the selected objects diff --git a/config/locales/no.yml b/config/locales/no.yml index c8ead7cad..57d8f188d 100644 --- a/config/locales/no.yml +++ b/config/locales/no.yml @@ -1214,3 +1214,5 @@ label_attribute_of_object: '%{object_name}''s %{name}' label_user_mail_option_only_assigned: Only for things I watch or I am assigned to label_user_mail_option_only_owner: Only for things I watch or I am the owner of + warning_fields_cleared_on_bulk_edit: Changes will result in the automatic deletion + of values from one or more fields on the selected objects diff --git a/config/locales/pl.yml b/config/locales/pl.yml index 7ed2cbe41..dbce6b566 100644 --- a/config/locales/pl.yml +++ b/config/locales/pl.yml @@ -1239,3 +1239,5 @@ pl: label_attribute_of_object: '%{object_name}''s %{name}' label_user_mail_option_only_assigned: Only for things I watch or I am assigned to label_user_mail_option_only_owner: Only for things I watch or I am the owner of + warning_fields_cleared_on_bulk_edit: Changes will result in the automatic deletion + of values from one or more fields on the selected objects diff --git a/config/locales/pt-BR.yml b/config/locales/pt-BR.yml index ab4427da5..bdcbcd697 100644 --- a/config/locales/pt-BR.yml +++ b/config/locales/pt-BR.yml @@ -1242,3 +1242,5 @@ pt-BR: label_attribute_of_object: '%{object_name}''s %{name}' label_user_mail_option_only_assigned: Only for things I watch or I am assigned to label_user_mail_option_only_owner: Only for things I watch or I am the owner of + warning_fields_cleared_on_bulk_edit: Changes will result in the automatic deletion + of values from one or more fields on the selected objects diff --git a/config/locales/pt.yml b/config/locales/pt.yml index 95b93d536..a408bb956 100644 --- a/config/locales/pt.yml +++ b/config/locales/pt.yml @@ -1227,3 +1227,5 @@ pt: label_attribute_of_object: '%{object_name}''s %{name}' label_user_mail_option_only_assigned: Only for things I watch or I am assigned to label_user_mail_option_only_owner: Only for things I watch or I am the owner of + warning_fields_cleared_on_bulk_edit: Changes will result in the automatic deletion + of values from one or more fields on the selected objects diff --git a/config/locales/ro.yml b/config/locales/ro.yml index 5f31605b1..029d341c5 100644 --- a/config/locales/ro.yml +++ b/config/locales/ro.yml @@ -1219,3 +1219,5 @@ ro: label_attribute_of_object: '%{object_name}''s %{name}' label_user_mail_option_only_assigned: Only for things I watch or I am assigned to label_user_mail_option_only_owner: Only for things I watch or I am the owner of + warning_fields_cleared_on_bulk_edit: Changes will result in the automatic deletion + of values from one or more fields on the selected objects diff --git a/config/locales/ru.yml b/config/locales/ru.yml index 789752f21..d095ef7d0 100644 --- a/config/locales/ru.yml +++ b/config/locales/ru.yml @@ -1326,3 +1326,5 @@ ru: label_attribute_of_object: '%{object_name}''s %{name}' label_user_mail_option_only_assigned: Only for things I watch or I am assigned to label_user_mail_option_only_owner: Only for things I watch or I am the owner of + warning_fields_cleared_on_bulk_edit: Changes will result in the automatic deletion + of values from one or more fields on the selected objects diff --git a/config/locales/sk.yml b/config/locales/sk.yml index b42c52ab9..b14c1d9bc 100644 --- a/config/locales/sk.yml +++ b/config/locales/sk.yml @@ -1214,3 +1214,5 @@ sk: label_attribute_of_object: '%{object_name}''s %{name}' label_user_mail_option_only_assigned: Only for things I watch or I am assigned to label_user_mail_option_only_owner: Only for things I watch or I am the owner of + warning_fields_cleared_on_bulk_edit: Changes will result in the automatic deletion + of values from one or more fields on the selected objects diff --git a/config/locales/sl.yml b/config/locales/sl.yml index bb2de9153..a05711410 100644 --- a/config/locales/sl.yml +++ b/config/locales/sl.yml @@ -1224,3 +1224,5 @@ sl: label_attribute_of_object: '%{object_name}''s %{name}' label_user_mail_option_only_assigned: Only for things I watch or I am assigned to label_user_mail_option_only_owner: Only for things I watch or I am the owner of + warning_fields_cleared_on_bulk_edit: Changes will result in the automatic deletion + of values from one or more fields on the selected objects diff --git a/config/locales/sq.yml b/config/locales/sq.yml index fab0ab350..e3e46a13f 100644 --- a/config/locales/sq.yml +++ b/config/locales/sq.yml @@ -1220,3 +1220,5 @@ sq: label_attribute_of_object: '%{object_name}''s %{name}' label_user_mail_option_only_assigned: Only for things I watch or I am assigned to label_user_mail_option_only_owner: Only for things I watch or I am the owner of + warning_fields_cleared_on_bulk_edit: Changes will result in the automatic deletion + of values from one or more fields on the selected objects diff --git a/config/locales/sr-YU.yml b/config/locales/sr-YU.yml index ce43598f5..6e07347a9 100644 --- a/config/locales/sr-YU.yml +++ b/config/locales/sr-YU.yml @@ -1226,3 +1226,5 @@ sr-YU: label_attribute_of_object: '%{object_name}''s %{name}' label_user_mail_option_only_assigned: Only for things I watch or I am assigned to label_user_mail_option_only_owner: Only for things I watch or I am the owner of + warning_fields_cleared_on_bulk_edit: Changes will result in the automatic deletion + of values from one or more fields on the selected objects diff --git a/config/locales/sr.yml b/config/locales/sr.yml index 95303c69f..6265c02c9 100644 --- a/config/locales/sr.yml +++ b/config/locales/sr.yml @@ -1225,3 +1225,5 @@ sr: label_attribute_of_object: '%{object_name}''s %{name}' label_user_mail_option_only_assigned: Only for things I watch or I am assigned to label_user_mail_option_only_owner: Only for things I watch or I am the owner of + warning_fields_cleared_on_bulk_edit: Changes will result in the automatic deletion + of values from one or more fields on the selected objects diff --git a/config/locales/sv.yml b/config/locales/sv.yml index 2cf6402fe..c0395d341 100644 --- a/config/locales/sv.yml +++ b/config/locales/sv.yml @@ -1257,3 +1257,5 @@ sv: label_attribute_of_object: '%{object_name}''s %{name}' label_user_mail_option_only_assigned: Only for things I watch or I am assigned to label_user_mail_option_only_owner: Only for things I watch or I am the owner of + warning_fields_cleared_on_bulk_edit: Changes will result in the automatic deletion + of values from one or more fields on the selected objects diff --git a/config/locales/th.yml b/config/locales/th.yml index b3190d752..0f8858569 100644 --- a/config/locales/th.yml +++ b/config/locales/th.yml @@ -1221,3 +1221,5 @@ th: label_attribute_of_object: '%{object_name}''s %{name}' label_user_mail_option_only_assigned: Only for things I watch or I am assigned to label_user_mail_option_only_owner: Only for things I watch or I am the owner of + warning_fields_cleared_on_bulk_edit: Changes will result in the automatic deletion + of values from one or more fields on the selected objects diff --git a/config/locales/tr.yml b/config/locales/tr.yml index ffd11240d..29b9b20a6 100644 --- a/config/locales/tr.yml +++ b/config/locales/tr.yml @@ -1232,3 +1232,5 @@ tr: label_attribute_of_object: '%{object_name}''s %{name}' label_user_mail_option_only_assigned: Only for things I watch or I am assigned to label_user_mail_option_only_owner: Only for things I watch or I am the owner of + warning_fields_cleared_on_bulk_edit: Changes will result in the automatic deletion + of values from one or more fields on the selected objects diff --git a/config/locales/uk.yml b/config/locales/uk.yml index 68e0e7fc4..c2152be61 100644 --- a/config/locales/uk.yml +++ b/config/locales/uk.yml @@ -1219,3 +1219,5 @@ uk: label_attribute_of_object: '%{object_name}''s %{name}' label_user_mail_option_only_assigned: Only for things I watch or I am assigned to label_user_mail_option_only_owner: Only for things I watch or I am the owner of + warning_fields_cleared_on_bulk_edit: Changes will result in the automatic deletion + of values from one or more fields on the selected objects diff --git a/config/locales/vi.yml b/config/locales/vi.yml index 18af4b2fb..3b4371cc5 100644 --- a/config/locales/vi.yml +++ b/config/locales/vi.yml @@ -1277,3 +1277,5 @@ vi: label_attribute_of_object: '%{object_name}''s %{name}' label_user_mail_option_only_assigned: Only for things I watch or I am assigned to label_user_mail_option_only_owner: Only for things I watch or I am the owner of + warning_fields_cleared_on_bulk_edit: Changes will result in the automatic deletion + of values from one or more fields on the selected objects diff --git a/config/locales/zh-TW.yml b/config/locales/zh-TW.yml index d5ac03538..92bd1720c 100644 --- a/config/locales/zh-TW.yml +++ b/config/locales/zh-TW.yml @@ -1292,3 +1292,5 @@ label_attribute_of_object: '%{object_name}''s %{name}' label_user_mail_option_only_assigned: Only for things I watch or I am assigned to label_user_mail_option_only_owner: Only for things I watch or I am the owner of + warning_fields_cleared_on_bulk_edit: Changes will result in the automatic deletion + of values from one or more fields on the selected objects diff --git a/config/locales/zh.yml b/config/locales/zh.yml index 1e7dff5fa..7abcf141e 100644 --- a/config/locales/zh.yml +++ b/config/locales/zh.yml @@ -1217,3 +1217,5 @@ zh: label_attribute_of_object: '%{object_name}''s %{name}' label_user_mail_option_only_assigned: Only for things I watch or I am assigned to label_user_mail_option_only_owner: Only for things I watch or I am the owner of + warning_fields_cleared_on_bulk_edit: Changes will result in the automatic deletion + of values from one or more fields on the selected objects From e8d7b36f1bec5ea5afab1cad4735e36787fc1640 Mon Sep 17 00:00:00 2001 From: Jean-Philippe Lang Date: Wed, 18 Jan 2017 14:57:14 +0000 Subject: [PATCH 0574/1117] Searching for issues with "updated = none" always returns zero results (#15226). Patch by Marius BALTEANU. git-svn-id: http://svn.redmine.org/redmine/trunk@16226 e93f8b46-1217-0410-a6f0-8f06a7374b81 --- app/models/issue_query.rb | 11 +++++++++++ test/unit/query_test.rb | 15 +++++++++++++++ 2 files changed, 26 insertions(+) diff --git a/app/models/issue_query.rb b/app/models/issue_query.rb index 588a1931d..53702b9ba 100644 --- a/app/models/issue_query.rb +++ b/app/models/issue_query.rb @@ -449,6 +449,17 @@ class IssueQuery < Query end end + def sql_for_updated_on_field(field, operator, value) + case operator + when "!*" + "#{Issue.table_name}.updated_on = #{Issue.table_name}.created_on" + when "*" + "#{Issue.table_name}.updated_on > #{Issue.table_name}.created_on" + else + sql_for_field("updated_on", operator, value, Issue.table_name, "updated_on") + end + end + def sql_for_issue_id_field(field, operator, value) if operator == "=" # accepts a comma separated list of ids diff --git a/test/unit/query_test.rb b/test/unit/query_test.rb index e6761c211..8b88b11cd 100644 --- a/test/unit/query_test.rb +++ b/test/unit/query_test.rb @@ -1900,4 +1900,19 @@ class QueryTest < ActiveSupport::TestCase assert_equal [1, 2, 3, 6, 7, 8, 9, 10, 11, 12], issues.map(&:id).sort end + def test_filter_updated_on_none_should_return_issues_with_updated_on_equal_with_created_on + query = IssueQuery.new(:name => '_', :project => Project.find(1)) + + query.filters = {'updated_on' => {:operator => '!*', :values => ['']}} + issues = find_issues_with_query(query) + assert_equal [3, 6, 7, 8, 9, 10, 14], issues.map(&:id).sort + end + + def test_filter_updated_on_any_should_return_issues_with_updated_on_greater_than_created_on + query = IssueQuery.new(:name => '_', :project => Project.find(1)) + + query.filters = {'updated_on' => {:operator => '*', :values => ['']}} + issues = find_issues_with_query(query) + assert_equal [1, 2, 5, 11, 12, 13], issues.map(&:id).sort + end end From df5dba5ddec5f61a2022abcd1789da4604b21055 Mon Sep 17 00:00:00 2001 From: Jean-Philippe Lang Date: Thu, 19 Jan 2017 18:32:06 +0000 Subject: [PATCH 0575/1117] Modify circular inclusion test to use page.id instead of page.title (#24869). Patch by Michael Esemplare. git-svn-id: http://svn.redmine.org/redmine/trunk@16227 e93f8b46-1217-0410-a6f0-8f06a7374b81 --- lib/redmine/wiki_formatting/macros.rb | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/lib/redmine/wiki_formatting/macros.rb b/lib/redmine/wiki_formatting/macros.rb index f8748373b..1ec6035f7 100644 --- a/lib/redmine/wiki_formatting/macros.rb +++ b/lib/redmine/wiki_formatting/macros.rb @@ -207,8 +207,8 @@ module Redmine page = Wiki.find_page(args.first.to_s, :project => @project) raise 'Page not found' if page.nil? || !User.current.allowed_to?(:view_wiki_pages, page.wiki.project) @included_wiki_pages ||= [] - raise 'Circular inclusion detected' if @included_wiki_pages.include?(page.title) - @included_wiki_pages << page.title + raise 'Circular inclusion detected' if @included_wiki_pages.include?(page.id) + @included_wiki_pages << page.id out = textilizable(page.content, :text, :attachments => page.attachments, :headings => false) @included_wiki_pages.pop out From 151a215ea45c1870842de49d0640b1557f712498 Mon Sep 17 00:00:00 2001 From: Jean-Philippe Lang Date: Thu, 19 Jan 2017 20:16:49 +0000 Subject: [PATCH 0576/1117] Adds updated_by and last_updated_by filters on issues (#17720). git-svn-id: http://svn.redmine.org/redmine/trunk@16228 e93f8b46-1217-0410-a6f0-8f06a7374b81 --- app/models/issue_query.rb | 29 +++++++++++++ app/models/journal.rb | 13 ++++-- app/models/project.rb | 9 ++-- app/models/query.rb | 2 +- config/locales/en.yml | 2 + config/locales/fr.yml | 2 + test/unit/query_test.rb | 87 +++++++++++++++++++++++++++++++++++++++ 7 files changed, 136 insertions(+), 8 deletions(-) diff --git a/app/models/issue_query.rb b/app/models/issue_query.rb index 53702b9ba..1b1477e3c 100644 --- a/app/models/issue_query.rb +++ b/app/models/issue_query.rb @@ -165,6 +165,14 @@ class IssueQuery < Query add_available_filter "issue_id", :type => :integer, :label => :label_issue + add_available_filter("updated_by", + :type => :list, :values => lambda { author_values } + ) + + add_available_filter("last_updated_by", + :type => :list, :values => lambda { author_values } + ) + Tracker.disabled_core_fields(trackers).each {|field| delete_available_filter field } @@ -341,6 +349,27 @@ class IssueQuery < Query raise StatementInvalid.new(e.message) end + def sql_for_updated_by_field(field, operator, value) + neg = (operator == '!' ? 'NOT' : '') + subquery = "SELECT 1 FROM #{Journal.table_name}" + + " WHERE #{Journal.table_name}.journalized_type='Issue' AND #{Journal.table_name}.journalized_id=#{Issue.table_name}.id" + + " AND (#{sql_for_field field, '=', value, Journal.table_name, 'user_id'})" + + " AND (#{Journal.visible_notes_condition(User.current, :skip_pre_condition => true)})" + + "#{neg} EXISTS (#{subquery})" + end + + def sql_for_last_updated_by_field(field, operator, value) + neg = (operator == '!' ? 'NOT' : '') + subquery = "SELECT 1 FROM #{Journal.table_name} sj" + + " WHERE sj.journalized_type='Issue' AND sj.journalized_id=#{Issue.table_name}.id AND (#{sql_for_field field, '=', value, 'sj', 'user_id'})" + + " AND sj.id = (SELECT MAX(#{Journal.table_name}.id) FROM #{Journal.table_name}" + + " WHERE #{Journal.table_name}.journalized_type='Issue' AND #{Journal.table_name}.journalized_id=#{Issue.table_name}.id" + + " AND (#{Journal.visible_notes_condition(User.current, :skip_pre_condition => true)}))" + + "#{neg} EXISTS (#{subquery})" + end + def sql_for_watcher_id_field(field, operator, value) db_table = Watcher.table_name "#{Issue.table_name}.id #{ operator == '=' ? 'IN' : 'NOT IN' } (SELECT #{db_table}.watchable_id FROM #{db_table} WHERE #{db_table}.watchable_type='Issue' AND " + diff --git a/app/models/journal.rb b/app/models/journal.rb index 447cbe4b5..7d1a6eb34 100644 --- a/app/models/journal.rb +++ b/app/models/journal.rb @@ -47,10 +47,11 @@ class Journal < ActiveRecord::Base scope :visible, lambda {|*args| user = args.shift || User.current - private_notes_condition = Project.allowed_to_condition(user, :view_private_notes, *args) + options = args.shift || {} + joins(:issue => :project). - where(Issue.visible_condition(user, *args)). - where("(#{Journal.table_name}.private_notes = ? OR #{Journal.table_name}.user_id = ? OR (#{private_notes_condition}))", false, user.id) + where(Issue.visible_condition(user, options)). + where(Journal.visible_notes_condition(user, :skip_pre_condition => true)) } safe_attributes 'notes', @@ -58,6 +59,12 @@ class Journal < ActiveRecord::Base safe_attributes 'private_notes', :if => lambda {|journal, user| user.allowed_to?(:set_notes_private, journal.project)} + # Returns a SQL condition to filter out journals with notes that are not visible to user + def self.visible_notes_condition(user=User.current, options={}) + private_notes_permission = Project.allowed_to_condition(user, :view_private_notes, options) + sanitize_sql_for_conditions(["(#{table_name}.private_notes = ? OR #{table_name}.user_id = ? OR (#{private_notes_permission}))", false, user.id]) + end + def initialize(*args) super if journalized diff --git a/app/models/project.rb b/app/models/project.rb index e5eb12c58..fb2ffc3a6 100644 --- a/app/models/project.rb +++ b/app/models/project.rb @@ -173,13 +173,14 @@ class Project < ActiveRecord::Base # Returns a SQL conditions string used to find all projects for which +user+ has the given +permission+ # # Valid options: - # * :project => limit the condition to project - # * :with_subprojects => limit the condition to project and its subprojects - # * :member => limit the condition to the user projects + # * :skip_pre_condition => true don't check that the module is enabled (eg. when the condition is already set elsewhere in the query) + # * :project => project limit the condition to project + # * :with_subprojects => true limit the condition to project and its subprojects + # * :member => true limit the condition to the user projects def self.allowed_to_condition(user, permission, options={}) perm = Redmine::AccessControl.permission(permission) base_statement = (perm && perm.read? ? "#{Project.table_name}.status <> #{Project::STATUS_ARCHIVED}" : "#{Project.table_name}.status = #{Project::STATUS_ACTIVE}") - if perm && perm.project_module + if !options[:skip_pre_condition] && perm && perm.project_module # If the permission belongs to a project module, make sure the module is enabled base_statement << " AND #{Project.table_name}.id IN (SELECT em.project_id FROM #{EnabledModule.table_name} em WHERE em.name='#{perm.project_module}')" end diff --git a/app/models/query.rb b/app/models/query.rb index 7c85d7164..4f183329a 100644 --- a/app/models/query.rb +++ b/app/models/query.rb @@ -802,7 +802,7 @@ class Query < ActiveRecord::Base operator = operator_for(field) # "me" value substitution - if %w(assigned_to_id author_id user_id watcher_id).include?(field) + if %w(assigned_to_id author_id user_id watcher_id updated_by last_updated_by).include?(field) if v.delete("me") if User.current.logged? v.push(User.current.id.to_s) diff --git a/config/locales/en.yml b/config/locales/en.yml index 7ba059947..24d73e65d 100644 --- a/config/locales/en.yml +++ b/config/locales/en.yml @@ -370,6 +370,8 @@ en: field_default_version: Default version field_remote_ip: IP address field_textarea_font: Font used for text areas + field_updated_by: Updated by + field_last_updated_by: Last updated by setting_app_title: Application title setting_app_subtitle: Application subtitle diff --git a/config/locales/fr.yml b/config/locales/fr.yml index 73aabc0a9..6136c7978 100644 --- a/config/locales/fr.yml +++ b/config/locales/fr.yml @@ -382,6 +382,8 @@ fr: field_total_estimated_hours: Temps estimé total field_default_version: Version par défaut field_textarea_font: Police utilisée pour les champs texte + field_updated_by: Mise à jour par + field_last_updated_by: Dernière mise à jour par setting_app_title: Titre de l'application setting_app_subtitle: Sous-titre de l'application diff --git a/test/unit/query_test.rb b/test/unit/query_test.rb index 8b88b11cd..81f62516d 100644 --- a/test/unit/query_test.rb +++ b/test/unit/query_test.rb @@ -719,6 +719,93 @@ class QueryTest < ActiveSupport::TestCase end end + def test_filter_updated_by + user = User.generate! + Journal.create!(:user_id => user.id, :journalized => Issue.find(2), :notes => 'Notes') + Journal.create!(:user_id => user.id, :journalized => Issue.find(3), :notes => 'Notes') + Journal.create!(:user_id => 2, :journalized => Issue.find(3), :notes => 'Notes') + + query = IssueQuery.new(:name => '_') + filter_name = "updated_by" + assert_include filter_name, query.available_filters.keys + + query.filters = {filter_name => {:operator => '=', :values => [user.id]}} + assert_equal [2, 3], find_issues_with_query(query).map(&:id).sort + + query.filters = {filter_name => {:operator => '!', :values => [user.id]}} + assert_equal (Issue.ids.sort - [2, 3]), find_issues_with_query(query).map(&:id).sort + end + + def test_filter_updated_by_should_ignore_private_notes_that_are_not_visible + user = User.generate! + Journal.create!(:user_id => user.id, :journalized => Issue.find(2), :notes => 'Notes', :private_notes => true) + Journal.create!(:user_id => user.id, :journalized => Issue.find(3), :notes => 'Notes') + + query = IssueQuery.new(:name => '_') + filter_name = "updated_by" + assert_include filter_name, query.available_filters.keys + + with_current_user User.anonymous do + query.filters = {filter_name => {:operator => '=', :values => [user.id]}} + assert_equal [3], find_issues_with_query(query).map(&:id).sort + end + end + + def test_filter_updated_by_me + user = User.generate! + Journal.create!(:user_id => user.id, :journalized => Issue.find(2), :notes => 'Notes') + + with_current_user user do + query = IssueQuery.new(:name => '_') + filter_name = "updated_by" + assert_include filter_name, query.available_filters.keys + + query.filters = {filter_name => {:operator => '=', :values => ['me']}} + assert_equal [2], find_issues_with_query(query).map(&:id).sort + end + end + + def test_filter_last_updated_by + user = User.generate! + Journal.create!(:user_id => user.id, :journalized => Issue.find(2), :notes => 'Notes') + Journal.create!(:user_id => user.id, :journalized => Issue.find(3), :notes => 'Notes') + Journal.create!(:user_id => 2, :journalized => Issue.find(3), :notes => 'Notes') + + query = IssueQuery.new(:name => '_') + filter_name = "last_updated_by" + assert_include filter_name, query.available_filters.keys + + query.filters = {filter_name => {:operator => '=', :values => [user.id]}} + assert_equal [2], find_issues_with_query(query).map(&:id).sort + end + + def test_filter_last_updated_by_should_ignore_private_notes_that_are_not_visible + user1 = User.generate! + user2 = User.generate! + Journal.create!(:user_id => user1.id, :journalized => Issue.find(2), :notes => 'Notes') + Journal.create!(:user_id => user2.id, :journalized => Issue.find(2), :notes => 'Notes', :private_notes => true) + + query = IssueQuery.new(:name => '_') + filter_name = "last_updated_by" + assert_include filter_name, query.available_filters.keys + + with_current_user User.anonymous do + query.filters = {filter_name => {:operator => '=', :values => [user1.id]}} + assert_equal [2], find_issues_with_query(query).map(&:id).sort + + query.filters = {filter_name => {:operator => '=', :values => [user2.id]}} + assert_equal [], find_issues_with_query(query).map(&:id).sort + end + + with_current_user User.find(2) do + query.filters = {filter_name => {:operator => '=', :values => [user1.id]}} + assert_equal [], find_issues_with_query(query).map(&:id).sort + + query.filters = {filter_name => {:operator => '=', :values => [user2.id]}} + assert_equal [2], find_issues_with_query(query).map(&:id).sort + end + end + def test_user_custom_field_filtered_on_me User.current = User.find(2) cf = IssueCustomField.create!(:field_format => 'user', :is_for_all => true, :is_filter => true, :name => 'User custom field', :tracker_ids => [1]) From 3471d8756b0381877c2afb38787600de2087cee1 Mon Sep 17 00:00:00 2001 From: Jean-Philippe Lang Date: Thu, 19 Jan 2017 20:22:51 +0000 Subject: [PATCH 0577/1117] Adds :field_updated_by and :field_last_updated_by strings to locales (#17720). git-svn-id: http://svn.redmine.org/redmine/trunk@16229 e93f8b46-1217-0410-a6f0-8f06a7374b81 --- config/locales/ar.yml | 2 ++ config/locales/az.yml | 2 ++ config/locales/bg.yml | 2 ++ config/locales/bs.yml | 2 ++ config/locales/ca.yml | 2 ++ config/locales/cs.yml | 2 ++ config/locales/da.yml | 2 ++ config/locales/de.yml | 2 ++ config/locales/el.yml | 2 ++ config/locales/en-GB.yml | 2 ++ config/locales/es-PA.yml | 2 ++ config/locales/es.yml | 2 ++ config/locales/et.yml | 2 ++ config/locales/eu.yml | 2 ++ config/locales/fa.yml | 2 ++ config/locales/fi.yml | 2 ++ config/locales/gl.yml | 2 ++ config/locales/he.yml | 2 ++ config/locales/hr.yml | 2 ++ config/locales/hu.yml | 2 ++ config/locales/id.yml | 2 ++ config/locales/it.yml | 2 ++ config/locales/ja.yml | 2 ++ config/locales/ko.yml | 2 ++ config/locales/lt.yml | 2 ++ config/locales/lv.yml | 2 ++ config/locales/mk.yml | 2 ++ config/locales/mn.yml | 2 ++ config/locales/nl.yml | 2 ++ config/locales/no.yml | 2 ++ config/locales/pl.yml | 2 ++ config/locales/pt-BR.yml | 2 ++ config/locales/pt.yml | 2 ++ config/locales/ro.yml | 2 ++ config/locales/ru.yml | 2 ++ config/locales/sk.yml | 2 ++ config/locales/sl.yml | 2 ++ config/locales/sq.yml | 2 ++ config/locales/sr-YU.yml | 2 ++ config/locales/sr.yml | 2 ++ config/locales/sv.yml | 2 ++ config/locales/th.yml | 2 ++ config/locales/tr.yml | 2 ++ config/locales/uk.yml | 2 ++ config/locales/vi.yml | 2 ++ config/locales/zh-TW.yml | 2 ++ config/locales/zh.yml | 2 ++ 47 files changed, 94 insertions(+) diff --git a/config/locales/ar.yml b/config/locales/ar.yml index 9b022a365..6715eb192 100644 --- a/config/locales/ar.yml +++ b/config/locales/ar.yml @@ -1226,3 +1226,5 @@ ar: label_user_mail_option_only_owner: Only for things I watch or I am the owner of warning_fields_cleared_on_bulk_edit: Changes will result in the automatic deletion of values from one or more fields on the selected objects + field_updated_by: Updated by + field_last_updated_by: Last updated by diff --git a/config/locales/az.yml b/config/locales/az.yml index 2b8d2c28b..cd0a4fd2b 100644 --- a/config/locales/az.yml +++ b/config/locales/az.yml @@ -1321,3 +1321,5 @@ az: label_user_mail_option_only_owner: Only for things I watch or I am the owner of warning_fields_cleared_on_bulk_edit: Changes will result in the automatic deletion of values from one or more fields on the selected objects + field_updated_by: Updated by + field_last_updated_by: Last updated by diff --git a/config/locales/bg.yml b/config/locales/bg.yml index 7cd5951a4..62092a366 100644 --- a/config/locales/bg.yml +++ b/config/locales/bg.yml @@ -1212,3 +1212,5 @@ bg: label_user_mail_option_only_owner: Only for things I watch or I am the owner of warning_fields_cleared_on_bulk_edit: Changes will result in the automatic deletion of values from one or more fields on the selected objects + field_updated_by: Updated by + field_last_updated_by: Last updated by diff --git a/config/locales/bs.yml b/config/locales/bs.yml index 7f02ad537..c45d43a65 100644 --- a/config/locales/bs.yml +++ b/config/locales/bs.yml @@ -1239,3 +1239,5 @@ bs: label_user_mail_option_only_owner: Only for things I watch or I am the owner of warning_fields_cleared_on_bulk_edit: Changes will result in the automatic deletion of values from one or more fields on the selected objects + field_updated_by: Updated by + field_last_updated_by: Last updated by diff --git a/config/locales/ca.yml b/config/locales/ca.yml index 46d70b92e..89c7ecf20 100644 --- a/config/locales/ca.yml +++ b/config/locales/ca.yml @@ -1216,3 +1216,5 @@ ca: label_user_mail_option_only_owner: Only for things I watch or I am the owner of warning_fields_cleared_on_bulk_edit: Changes will result in the automatic deletion of values from one or more fields on the selected objects + field_updated_by: Updated by + field_last_updated_by: Last updated by diff --git a/config/locales/cs.yml b/config/locales/cs.yml index 2d8adac64..e495f47c4 100644 --- a/config/locales/cs.yml +++ b/config/locales/cs.yml @@ -1225,3 +1225,5 @@ cs: label_user_mail_option_only_owner: Only for things I watch or I am the owner of warning_fields_cleared_on_bulk_edit: Changes will result in the automatic deletion of values from one or more fields on the selected objects + field_updated_by: Updated by + field_last_updated_by: Last updated by diff --git a/config/locales/da.yml b/config/locales/da.yml index 1fa3715bc..2d8274686 100644 --- a/config/locales/da.yml +++ b/config/locales/da.yml @@ -1243,3 +1243,5 @@ da: label_user_mail_option_only_owner: Only for things I watch or I am the owner of warning_fields_cleared_on_bulk_edit: Changes will result in the automatic deletion of values from one or more fields on the selected objects + field_updated_by: Updated by + field_last_updated_by: Last updated by diff --git a/config/locales/de.yml b/config/locales/de.yml index 810419577..22730ce20 100644 --- a/config/locales/de.yml +++ b/config/locales/de.yml @@ -1228,3 +1228,5 @@ de: label_user_mail_option_only_owner: Only for things I watch or I am the owner of warning_fields_cleared_on_bulk_edit: Changes will result in the automatic deletion of values from one or more fields on the selected objects + field_updated_by: Updated by + field_last_updated_by: Last updated by diff --git a/config/locales/el.yml b/config/locales/el.yml index 0c58158fd..f8e5ddfc9 100644 --- a/config/locales/el.yml +++ b/config/locales/el.yml @@ -1226,3 +1226,5 @@ el: label_user_mail_option_only_owner: Only for things I watch or I am the owner of warning_fields_cleared_on_bulk_edit: Changes will result in the automatic deletion of values from one or more fields on the selected objects + field_updated_by: Updated by + field_last_updated_by: Last updated by diff --git a/config/locales/en-GB.yml b/config/locales/en-GB.yml index dd3c6d89e..e41c53289 100644 --- a/config/locales/en-GB.yml +++ b/config/locales/en-GB.yml @@ -1228,3 +1228,5 @@ en-GB: label_user_mail_option_only_owner: Only for things I watch or I am the owner of warning_fields_cleared_on_bulk_edit: Changes will result in the automatic deletion of values from one or more fields on the selected objects + field_updated_by: Updated by + field_last_updated_by: Last updated by diff --git a/config/locales/es-PA.yml b/config/locales/es-PA.yml index 48bba89c3..6c92f53e0 100644 --- a/config/locales/es-PA.yml +++ b/config/locales/es-PA.yml @@ -1256,3 +1256,5 @@ es-PA: label_user_mail_option_only_owner: Only for things I watch or I am the owner of warning_fields_cleared_on_bulk_edit: Changes will result in the automatic deletion of values from one or more fields on the selected objects + field_updated_by: Updated by + field_last_updated_by: Last updated by diff --git a/config/locales/es.yml b/config/locales/es.yml index c94910d19..69ea40764 100644 --- a/config/locales/es.yml +++ b/config/locales/es.yml @@ -1254,3 +1254,5 @@ es: label_user_mail_option_only_owner: Only for things I watch or I am the owner of warning_fields_cleared_on_bulk_edit: Changes will result in the automatic deletion of values from one or more fields on the selected objects + field_updated_by: Updated by + field_last_updated_by: Last updated by diff --git a/config/locales/et.yml b/config/locales/et.yml index 5dd059faa..4465d9e73 100644 --- a/config/locales/et.yml +++ b/config/locales/et.yml @@ -1231,3 +1231,5 @@ et: label_user_mail_option_only_owner: Only for things I watch or I am the owner of warning_fields_cleared_on_bulk_edit: Changes will result in the automatic deletion of values from one or more fields on the selected objects + field_updated_by: Updated by + field_last_updated_by: Last updated by diff --git a/config/locales/eu.yml b/config/locales/eu.yml index 75d6b6e05..cb990bf74 100644 --- a/config/locales/eu.yml +++ b/config/locales/eu.yml @@ -1227,3 +1227,5 @@ eu: label_user_mail_option_only_owner: Only for things I watch or I am the owner of warning_fields_cleared_on_bulk_edit: Changes will result in the automatic deletion of values from one or more fields on the selected objects + field_updated_by: Updated by + field_last_updated_by: Last updated by diff --git a/config/locales/fa.yml b/config/locales/fa.yml index 7ca72911d..4b922ddf2 100644 --- a/config/locales/fa.yml +++ b/config/locales/fa.yml @@ -1227,3 +1227,5 @@ fa: label_user_mail_option_only_owner: Only for things I watch or I am the owner of warning_fields_cleared_on_bulk_edit: Changes will result in the automatic deletion of values from one or more fields on the selected objects + field_updated_by: Updated by + field_last_updated_by: Last updated by diff --git a/config/locales/fi.yml b/config/locales/fi.yml index e3d21c376..412e32d01 100644 --- a/config/locales/fi.yml +++ b/config/locales/fi.yml @@ -1247,3 +1247,5 @@ fi: label_user_mail_option_only_owner: Only for things I watch or I am the owner of warning_fields_cleared_on_bulk_edit: Changes will result in the automatic deletion of values from one or more fields on the selected objects + field_updated_by: Updated by + field_last_updated_by: Last updated by diff --git a/config/locales/gl.yml b/config/locales/gl.yml index 00d730991..4ad47a76c 100644 --- a/config/locales/gl.yml +++ b/config/locales/gl.yml @@ -1234,3 +1234,5 @@ gl: label_user_mail_option_only_owner: Only for things I watch or I am the owner of warning_fields_cleared_on_bulk_edit: Changes will result in the automatic deletion of values from one or more fields on the selected objects + field_updated_by: Updated by + field_last_updated_by: Last updated by diff --git a/config/locales/he.yml b/config/locales/he.yml index 94d975e20..ae0f90fa6 100644 --- a/config/locales/he.yml +++ b/config/locales/he.yml @@ -1231,3 +1231,5 @@ he: label_user_mail_option_only_owner: Only for things I watch or I am the owner of warning_fields_cleared_on_bulk_edit: Changes will result in the automatic deletion of values from one or more fields on the selected objects + field_updated_by: Updated by + field_last_updated_by: Last updated by diff --git a/config/locales/hr.yml b/config/locales/hr.yml index c923a7007..001a02dc2 100644 --- a/config/locales/hr.yml +++ b/config/locales/hr.yml @@ -1225,3 +1225,5 @@ hr: label_user_mail_option_only_owner: Only for things I watch or I am the owner of warning_fields_cleared_on_bulk_edit: Changes will result in the automatic deletion of values from one or more fields on the selected objects + field_updated_by: Updated by + field_last_updated_by: Last updated by diff --git a/config/locales/hu.yml b/config/locales/hu.yml index 70f6453b9..2bfdbd458 100644 --- a/config/locales/hu.yml +++ b/config/locales/hu.yml @@ -1245,3 +1245,5 @@ label_user_mail_option_only_owner: Only for things I watch or I am the owner of warning_fields_cleared_on_bulk_edit: Changes will result in the automatic deletion of values from one or more fields on the selected objects + field_updated_by: Updated by + field_last_updated_by: Last updated by diff --git a/config/locales/id.yml b/config/locales/id.yml index 2c709054c..6a4b02971 100644 --- a/config/locales/id.yml +++ b/config/locales/id.yml @@ -1230,3 +1230,5 @@ id: label_user_mail_option_only_owner: Only for things I watch or I am the owner of warning_fields_cleared_on_bulk_edit: Changes will result in the automatic deletion of values from one or more fields on the selected objects + field_updated_by: Updated by + field_last_updated_by: Last updated by diff --git a/config/locales/it.yml b/config/locales/it.yml index 445d75cae..79a3ab8ba 100644 --- a/config/locales/it.yml +++ b/config/locales/it.yml @@ -1221,3 +1221,5 @@ it: label_user_mail_option_only_owner: Only for things I watch or I am the owner of warning_fields_cleared_on_bulk_edit: Changes will result in the automatic deletion of values from one or more fields on the selected objects + field_updated_by: Updated by + field_last_updated_by: Last updated by diff --git a/config/locales/ja.yml b/config/locales/ja.yml index 3a9867a9f..f6c520b9f 100644 --- a/config/locales/ja.yml +++ b/config/locales/ja.yml @@ -1236,3 +1236,5 @@ ja: label_attribute_of_object: '%{object_name}''s %{name}' warning_fields_cleared_on_bulk_edit: Changes will result in the automatic deletion of values from one or more fields on the selected objects + field_updated_by: Updated by + field_last_updated_by: Last updated by diff --git a/config/locales/ko.yml b/config/locales/ko.yml index 3832ec23d..c87d2047f 100644 --- a/config/locales/ko.yml +++ b/config/locales/ko.yml @@ -1265,3 +1265,5 @@ ko: label_user_mail_option_only_owner: Only for things I watch or I am the owner of warning_fields_cleared_on_bulk_edit: Changes will result in the automatic deletion of values from one or more fields on the selected objects + field_updated_by: Updated by + field_last_updated_by: Last updated by diff --git a/config/locales/lt.yml b/config/locales/lt.yml index 3fc7fbe9d..5bac12b23 100644 --- a/config/locales/lt.yml +++ b/config/locales/lt.yml @@ -1215,3 +1215,5 @@ lt: label_user_mail_option_only_owner: Only for things I watch or I am the owner of warning_fields_cleared_on_bulk_edit: Changes will result in the automatic deletion of values from one or more fields on the selected objects + field_updated_by: Updated by + field_last_updated_by: Last updated by diff --git a/config/locales/lv.yml b/config/locales/lv.yml index 1f22bccfb..200231c3b 100644 --- a/config/locales/lv.yml +++ b/config/locales/lv.yml @@ -1220,3 +1220,5 @@ lv: label_user_mail_option_only_owner: Only for things I watch or I am the owner of warning_fields_cleared_on_bulk_edit: Changes will result in the automatic deletion of values from one or more fields on the selected objects + field_updated_by: Updated by + field_last_updated_by: Last updated by diff --git a/config/locales/mk.yml b/config/locales/mk.yml index 626d6a370..7899a9577 100644 --- a/config/locales/mk.yml +++ b/config/locales/mk.yml @@ -1226,3 +1226,5 @@ mk: label_user_mail_option_only_owner: Only for things I watch or I am the owner of warning_fields_cleared_on_bulk_edit: Changes will result in the automatic deletion of values from one or more fields on the selected objects + field_updated_by: Updated by + field_last_updated_by: Last updated by diff --git a/config/locales/mn.yml b/config/locales/mn.yml index f97997807..b9f7c0bfd 100644 --- a/config/locales/mn.yml +++ b/config/locales/mn.yml @@ -1227,3 +1227,5 @@ mn: label_user_mail_option_only_owner: Only for things I watch or I am the owner of warning_fields_cleared_on_bulk_edit: Changes will result in the automatic deletion of values from one or more fields on the selected objects + field_updated_by: Updated by + field_last_updated_by: Last updated by diff --git a/config/locales/nl.yml b/config/locales/nl.yml index b1b4c18e4..878807b82 100644 --- a/config/locales/nl.yml +++ b/config/locales/nl.yml @@ -1201,3 +1201,5 @@ nl: label_user_mail_option_only_owner: Only for things I watch or I am the owner of warning_fields_cleared_on_bulk_edit: Changes will result in the automatic deletion of values from one or more fields on the selected objects + field_updated_by: Updated by + field_last_updated_by: Last updated by diff --git a/config/locales/no.yml b/config/locales/no.yml index 57d8f188d..925a63d33 100644 --- a/config/locales/no.yml +++ b/config/locales/no.yml @@ -1216,3 +1216,5 @@ label_user_mail_option_only_owner: Only for things I watch or I am the owner of warning_fields_cleared_on_bulk_edit: Changes will result in the automatic deletion of values from one or more fields on the selected objects + field_updated_by: Updated by + field_last_updated_by: Last updated by diff --git a/config/locales/pl.yml b/config/locales/pl.yml index dbce6b566..5bc4a0512 100644 --- a/config/locales/pl.yml +++ b/config/locales/pl.yml @@ -1241,3 +1241,5 @@ pl: label_user_mail_option_only_owner: Only for things I watch or I am the owner of warning_fields_cleared_on_bulk_edit: Changes will result in the automatic deletion of values from one or more fields on the selected objects + field_updated_by: Updated by + field_last_updated_by: Last updated by diff --git a/config/locales/pt-BR.yml b/config/locales/pt-BR.yml index bdcbcd697..1ffc43089 100644 --- a/config/locales/pt-BR.yml +++ b/config/locales/pt-BR.yml @@ -1244,3 +1244,5 @@ pt-BR: label_user_mail_option_only_owner: Only for things I watch or I am the owner of warning_fields_cleared_on_bulk_edit: Changes will result in the automatic deletion of values from one or more fields on the selected objects + field_updated_by: Updated by + field_last_updated_by: Last updated by diff --git a/config/locales/pt.yml b/config/locales/pt.yml index a408bb956..49bd66ec1 100644 --- a/config/locales/pt.yml +++ b/config/locales/pt.yml @@ -1229,3 +1229,5 @@ pt: label_user_mail_option_only_owner: Only for things I watch or I am the owner of warning_fields_cleared_on_bulk_edit: Changes will result in the automatic deletion of values from one or more fields on the selected objects + field_updated_by: Updated by + field_last_updated_by: Last updated by diff --git a/config/locales/ro.yml b/config/locales/ro.yml index 029d341c5..c150c3a29 100644 --- a/config/locales/ro.yml +++ b/config/locales/ro.yml @@ -1221,3 +1221,5 @@ ro: label_user_mail_option_only_owner: Only for things I watch or I am the owner of warning_fields_cleared_on_bulk_edit: Changes will result in the automatic deletion of values from one or more fields on the selected objects + field_updated_by: Updated by + field_last_updated_by: Last updated by diff --git a/config/locales/ru.yml b/config/locales/ru.yml index d095ef7d0..f44ad9975 100644 --- a/config/locales/ru.yml +++ b/config/locales/ru.yml @@ -1328,3 +1328,5 @@ ru: label_user_mail_option_only_owner: Only for things I watch or I am the owner of warning_fields_cleared_on_bulk_edit: Changes will result in the automatic deletion of values from one or more fields on the selected objects + field_updated_by: Updated by + field_last_updated_by: Last updated by diff --git a/config/locales/sk.yml b/config/locales/sk.yml index b14c1d9bc..f2d42f1d6 100644 --- a/config/locales/sk.yml +++ b/config/locales/sk.yml @@ -1216,3 +1216,5 @@ sk: label_user_mail_option_only_owner: Only for things I watch or I am the owner of warning_fields_cleared_on_bulk_edit: Changes will result in the automatic deletion of values from one or more fields on the selected objects + field_updated_by: Updated by + field_last_updated_by: Last updated by diff --git a/config/locales/sl.yml b/config/locales/sl.yml index a05711410..ce39e3d85 100644 --- a/config/locales/sl.yml +++ b/config/locales/sl.yml @@ -1226,3 +1226,5 @@ sl: label_user_mail_option_only_owner: Only for things I watch or I am the owner of warning_fields_cleared_on_bulk_edit: Changes will result in the automatic deletion of values from one or more fields on the selected objects + field_updated_by: Updated by + field_last_updated_by: Last updated by diff --git a/config/locales/sq.yml b/config/locales/sq.yml index e3e46a13f..95814ee99 100644 --- a/config/locales/sq.yml +++ b/config/locales/sq.yml @@ -1222,3 +1222,5 @@ sq: label_user_mail_option_only_owner: Only for things I watch or I am the owner of warning_fields_cleared_on_bulk_edit: Changes will result in the automatic deletion of values from one or more fields on the selected objects + field_updated_by: Updated by + field_last_updated_by: Last updated by diff --git a/config/locales/sr-YU.yml b/config/locales/sr-YU.yml index 6e07347a9..b52d76c38 100644 --- a/config/locales/sr-YU.yml +++ b/config/locales/sr-YU.yml @@ -1228,3 +1228,5 @@ sr-YU: label_user_mail_option_only_owner: Only for things I watch or I am the owner of warning_fields_cleared_on_bulk_edit: Changes will result in the automatic deletion of values from one or more fields on the selected objects + field_updated_by: Updated by + field_last_updated_by: Last updated by diff --git a/config/locales/sr.yml b/config/locales/sr.yml index 6265c02c9..2887058cd 100644 --- a/config/locales/sr.yml +++ b/config/locales/sr.yml @@ -1227,3 +1227,5 @@ sr: label_user_mail_option_only_owner: Only for things I watch or I am the owner of warning_fields_cleared_on_bulk_edit: Changes will result in the automatic deletion of values from one or more fields on the selected objects + field_updated_by: Updated by + field_last_updated_by: Last updated by diff --git a/config/locales/sv.yml b/config/locales/sv.yml index c0395d341..995e45061 100644 --- a/config/locales/sv.yml +++ b/config/locales/sv.yml @@ -1259,3 +1259,5 @@ sv: label_user_mail_option_only_owner: Only for things I watch or I am the owner of warning_fields_cleared_on_bulk_edit: Changes will result in the automatic deletion of values from one or more fields on the selected objects + field_updated_by: Updated by + field_last_updated_by: Last updated by diff --git a/config/locales/th.yml b/config/locales/th.yml index 0f8858569..4e4406f85 100644 --- a/config/locales/th.yml +++ b/config/locales/th.yml @@ -1223,3 +1223,5 @@ th: label_user_mail_option_only_owner: Only for things I watch or I am the owner of warning_fields_cleared_on_bulk_edit: Changes will result in the automatic deletion of values from one or more fields on the selected objects + field_updated_by: Updated by + field_last_updated_by: Last updated by diff --git a/config/locales/tr.yml b/config/locales/tr.yml index 29b9b20a6..8af19b063 100644 --- a/config/locales/tr.yml +++ b/config/locales/tr.yml @@ -1234,3 +1234,5 @@ tr: label_user_mail_option_only_owner: Only for things I watch or I am the owner of warning_fields_cleared_on_bulk_edit: Changes will result in the automatic deletion of values from one or more fields on the selected objects + field_updated_by: Updated by + field_last_updated_by: Last updated by diff --git a/config/locales/uk.yml b/config/locales/uk.yml index c2152be61..87d393784 100644 --- a/config/locales/uk.yml +++ b/config/locales/uk.yml @@ -1221,3 +1221,5 @@ uk: label_user_mail_option_only_owner: Only for things I watch or I am the owner of warning_fields_cleared_on_bulk_edit: Changes will result in the automatic deletion of values from one or more fields on the selected objects + field_updated_by: Updated by + field_last_updated_by: Last updated by diff --git a/config/locales/vi.yml b/config/locales/vi.yml index 3b4371cc5..29b8a72c5 100644 --- a/config/locales/vi.yml +++ b/config/locales/vi.yml @@ -1279,3 +1279,5 @@ vi: label_user_mail_option_only_owner: Only for things I watch or I am the owner of warning_fields_cleared_on_bulk_edit: Changes will result in the automatic deletion of values from one or more fields on the selected objects + field_updated_by: Updated by + field_last_updated_by: Last updated by diff --git a/config/locales/zh-TW.yml b/config/locales/zh-TW.yml index 92bd1720c..0b6319c09 100644 --- a/config/locales/zh-TW.yml +++ b/config/locales/zh-TW.yml @@ -1294,3 +1294,5 @@ label_user_mail_option_only_owner: Only for things I watch or I am the owner of warning_fields_cleared_on_bulk_edit: Changes will result in the automatic deletion of values from one or more fields on the selected objects + field_updated_by: Updated by + field_last_updated_by: Last updated by diff --git a/config/locales/zh.yml b/config/locales/zh.yml index 7abcf141e..d2d897d23 100644 --- a/config/locales/zh.yml +++ b/config/locales/zh.yml @@ -1219,3 +1219,5 @@ zh: label_user_mail_option_only_owner: Only for things I watch or I am the owner of warning_fields_cleared_on_bulk_edit: Changes will result in the automatic deletion of values from one or more fields on the selected objects + field_updated_by: Updated by + field_last_updated_by: Last updated by From 4ac9dc3075a3daa7e52700899b52d23db01915ce Mon Sep 17 00:00:00 2001 From: Jean-Philippe Lang Date: Thu, 19 Jan 2017 20:34:12 +0000 Subject: [PATCH 0578/1117] Reset sort criteria when clearing filters. git-svn-id: http://svn.redmine.org/redmine/trunk@16230 e93f8b46-1217-0410-a6f0-8f06a7374b81 --- app/views/queries/_query_form.html.erb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app/views/queries/_query_form.html.erb b/app/views/queries/_query_form.html.erb index bf0b0c257..7cc01ed2f 100644 --- a/app/views/queries/_query_form.html.erb +++ b/app/views/queries/_query_form.html.erb @@ -43,7 +43,7 @@

          <%= link_to_function l(:button_apply), '$("#query_form").submit()', :class => 'icon icon-checked' %> - <%= link_to l(:button_clear), { :set_filter => 1, :project_id => @project }, :class => 'icon icon-reload' %> + <%= link_to l(:button_clear), { :set_filter => 1, :sort => '', :project_id => @project }, :class => 'icon icon-reload' %> <% if @query.new_record? %> <% if User.current.allowed_to?(:save_queries, @project, :global => true) %> <%= link_to_function l(:button_save), From 9d747d6811ed8716d2ff157e5fc3564946ae2ec5 Mon Sep 17 00:00:00 2001 From: Jean-Philippe Lang Date: Thu, 19 Jan 2017 23:22:26 +0000 Subject: [PATCH 0579/1117] Reset current user before helpers tests. git-svn-id: http://svn.redmine.org/redmine/trunk@16231 e93f8b46-1217-0410-a6f0-8f06a7374b81 --- test/test_helper.rb | 5 ++++- test/unit/helpers/activities_helper_test.rb | 1 + test/unit/helpers/issues_helper_test.rb | 1 - test/unit/helpers/projects_helper_test.rb | 1 - test/unit/helpers/sort_helper_test.rb | 1 + test/unit/helpers/timelog_helper_test.rb | 4 ---- test/unit/helpers/watchers_helper_test.rb | 1 - 7 files changed, 6 insertions(+), 8 deletions(-) diff --git a/test/test_helper.rb b/test/test_helper.rb index 1ab7e9e03..11bd52c83 100644 --- a/test/test_helper.rb +++ b/test/test_helper.rb @@ -278,7 +278,10 @@ module Redmine end class HelperTest < ActionView::TestCase - + def setup + super + User.current = nil + end end class ControllerTest < ActionController::TestCase diff --git a/test/unit/helpers/activities_helper_test.rb b/test/unit/helpers/activities_helper_test.rb index 2a31d14be..a7df3c6ac 100644 --- a/test/unit/helpers/activities_helper_test.rb +++ b/test/unit/helpers/activities_helper_test.rb @@ -38,6 +38,7 @@ class ActivitiesHelperTest < Redmine::HelperTest end def setup + super MockEvent.clear end diff --git a/test/unit/helpers/issues_helper_test.rb b/test/unit/helpers/issues_helper_test.rb index 514d8314e..d61847068 100644 --- a/test/unit/helpers/issues_helper_test.rb +++ b/test/unit/helpers/issues_helper_test.rb @@ -38,7 +38,6 @@ class IssuesHelperTest < Redmine::HelperTest def setup super set_language_if_valid('en') - User.current = nil end def test_issue_heading diff --git a/test/unit/helpers/projects_helper_test.rb b/test/unit/helpers/projects_helper_test.rb index c72efff80..2e874141d 100644 --- a/test/unit/helpers/projects_helper_test.rb +++ b/test/unit/helpers/projects_helper_test.rb @@ -36,7 +36,6 @@ class ProjectsHelperTest < Redmine::HelperTest def setup super set_language_if_valid('en') - User.current = nil end def test_link_to_version_within_project diff --git a/test/unit/helpers/sort_helper_test.rb b/test/unit/helpers/sort_helper_test.rb index 605fd99d7..3aedccaf7 100644 --- a/test/unit/helpers/sort_helper_test.rb +++ b/test/unit/helpers/sort_helper_test.rb @@ -23,6 +23,7 @@ class SortHelperTest < Redmine::HelperTest include ERB::Util def setup + super @session = nil @sort_param = nil end diff --git a/test/unit/helpers/timelog_helper_test.rb b/test/unit/helpers/timelog_helper_test.rb index cec1e2cb0..ad04b99f2 100644 --- a/test/unit/helpers/timelog_helper_test.rb +++ b/test/unit/helpers/timelog_helper_test.rb @@ -32,10 +32,6 @@ class TimelogHelperTest < Redmine::HelperTest :attachments, :enumerations - def setup - super - end - def test_activities_collection_for_select_options_should_return_array_of_activity_names_and_ids activities = activity_collection_for_select_options assert activities.include?(["Design", 9]) diff --git a/test/unit/helpers/watchers_helper_test.rb b/test/unit/helpers/watchers_helper_test.rb index 9e46f64b0..2dccfa172 100644 --- a/test/unit/helpers/watchers_helper_test.rb +++ b/test/unit/helpers/watchers_helper_test.rb @@ -27,7 +27,6 @@ class WatchersHelperTest < Redmine::HelperTest def setup super set_language_if_valid('en') - User.current = nil end test '#watcher_link with a non-watched object' do From 09f4a7d3f68c0da9eabe30c73cf97244a459e262 Mon Sep 17 00:00:00 2001 From: Jean-Philippe Lang Date: Thu, 19 Jan 2017 23:32:04 +0000 Subject: [PATCH 0580/1117] Reset locale to "en" before helpers tests. git-svn-id: http://svn.redmine.org/redmine/trunk@16232 e93f8b46-1217-0410-a6f0-8f06a7374b81 --- test/test_helper.rb | 3 +++ test/unit/helpers/activities_helper_test.rb | 1 - test/unit/helpers/application_helper_test.rb | 1 - test/unit/helpers/custom_fields_helper_test.rb | 1 - test/unit/helpers/groups_helper_test.rb | 1 - test/unit/helpers/issues_helper_test.rb | 6 ------ test/unit/helpers/members_helper_test.rb | 1 - test/unit/helpers/my_helper_test.rb | 1 - test/unit/helpers/projects_helper_test.rb | 6 ------ test/unit/helpers/queries_helper_test.rb | 1 - test/unit/helpers/search_helper_test.rb | 1 - test/unit/helpers/settings_helper_test.rb | 1 - test/unit/helpers/sort_helper_test.rb | 1 - test/unit/helpers/timelog_helper_test.rb | 1 - test/unit/helpers/watchers_helper_test.rb | 6 ------ 15 files changed, 3 insertions(+), 29 deletions(-) diff --git a/test/test_helper.rb b/test/test_helper.rb index 11bd52c83..20ef4b154 100644 --- a/test/test_helper.rb +++ b/test/test_helper.rb @@ -278,9 +278,12 @@ module Redmine end class HelperTest < ActionView::TestCase + include Redmine::I18n + def setup super User.current = nil + ::I18n.locale = 'en' end end diff --git a/test/unit/helpers/activities_helper_test.rb b/test/unit/helpers/activities_helper_test.rb index a7df3c6ac..6c6c0c84c 100644 --- a/test/unit/helpers/activities_helper_test.rb +++ b/test/unit/helpers/activities_helper_test.rb @@ -19,7 +19,6 @@ require File.expand_path('../../../test_helper', __FILE__) class ActivitiesHelperTest < Redmine::HelperTest include ActivitiesHelper - include Redmine::I18n class MockEvent attr_reader :event_datetime, :event_group, :name diff --git a/test/unit/helpers/application_helper_test.rb b/test/unit/helpers/application_helper_test.rb index 299488a2f..e6530e5c5 100644 --- a/test/unit/helpers/application_helper_test.rb +++ b/test/unit/helpers/application_helper_test.rb @@ -20,7 +20,6 @@ require File.expand_path('../../../test_helper', __FILE__) class ApplicationHelperTest < Redmine::HelperTest - include Redmine::I18n include ERB::Util include Rails.application.routes.url_helpers diff --git a/test/unit/helpers/custom_fields_helper_test.rb b/test/unit/helpers/custom_fields_helper_test.rb index 7e352a9aa..21a9a1212 100644 --- a/test/unit/helpers/custom_fields_helper_test.rb +++ b/test/unit/helpers/custom_fields_helper_test.rb @@ -20,7 +20,6 @@ require File.expand_path('../../../test_helper', __FILE__) class CustomFieldsHelperTest < Redmine::HelperTest include ApplicationHelper include CustomFieldsHelper - include Redmine::I18n include ERB::Util def test_format_boolean_value diff --git a/test/unit/helpers/groups_helper_test.rb b/test/unit/helpers/groups_helper_test.rb index 3f106287c..1f30dcfac 100644 --- a/test/unit/helpers/groups_helper_test.rb +++ b/test/unit/helpers/groups_helper_test.rb @@ -18,7 +18,6 @@ require File.expand_path('../../../test_helper', __FILE__) class GroupsHelperTest < Redmine::HelperTest - include Redmine::I18n include ERB::Util include GroupsHelper include Rails.application.routes.url_helpers diff --git a/test/unit/helpers/issues_helper_test.rb b/test/unit/helpers/issues_helper_test.rb index d61847068..e255d1ec4 100644 --- a/test/unit/helpers/issues_helper_test.rb +++ b/test/unit/helpers/issues_helper_test.rb @@ -18,7 +18,6 @@ require File.expand_path('../../../test_helper', __FILE__) class IssuesHelperTest < Redmine::HelperTest - include Redmine::I18n include IssuesHelper include CustomFieldsHelper include ERB::Util @@ -35,11 +34,6 @@ class IssuesHelperTest < Redmine::HelperTest :attachments, :versions - def setup - super - set_language_if_valid('en') - end - def test_issue_heading assert_equal "Bug #1", issue_heading(Issue.find(1)) end diff --git a/test/unit/helpers/members_helper_test.rb b/test/unit/helpers/members_helper_test.rb index 0cda5d67f..ad3e1cc15 100644 --- a/test/unit/helpers/members_helper_test.rb +++ b/test/unit/helpers/members_helper_test.rb @@ -18,7 +18,6 @@ require File.expand_path('../../../test_helper', __FILE__) class MembersHelperTest < Redmine::HelperTest - include Redmine::I18n include ERB::Util include MembersHelper include Rails.application.routes.url_helpers diff --git a/test/unit/helpers/my_helper_test.rb b/test/unit/helpers/my_helper_test.rb index 0448741d7..d79525dd0 100644 --- a/test/unit/helpers/my_helper_test.rb +++ b/test/unit/helpers/my_helper_test.rb @@ -18,7 +18,6 @@ require File.expand_path('../../../test_helper', __FILE__) class MyHelperTest < Redmine::HelperTest - include Redmine::I18n include ERB::Util include MyHelper diff --git a/test/unit/helpers/projects_helper_test.rb b/test/unit/helpers/projects_helper_test.rb index 2e874141d..fc6afe669 100644 --- a/test/unit/helpers/projects_helper_test.rb +++ b/test/unit/helpers/projects_helper_test.rb @@ -20,7 +20,6 @@ require File.expand_path('../../../test_helper', __FILE__) class ProjectsHelperTest < Redmine::HelperTest include ApplicationHelper include ProjectsHelper - include Redmine::I18n include ERB::Util include Rails.application.routes.url_helpers @@ -33,11 +32,6 @@ class ProjectsHelperTest < Redmine::HelperTest :groups_users, :enabled_modules - def setup - super - set_language_if_valid('en') - end - def test_link_to_version_within_project @project = Project.find(2) User.current = User.find(1) diff --git a/test/unit/helpers/queries_helper_test.rb b/test/unit/helpers/queries_helper_test.rb index 6b10d5053..12f00cea3 100644 --- a/test/unit/helpers/queries_helper_test.rb +++ b/test/unit/helpers/queries_helper_test.rb @@ -19,7 +19,6 @@ require File.expand_path('../../../test_helper', __FILE__) class QueriesHelperTest < Redmine::HelperTest include QueriesHelper - include Redmine::I18n fixtures :projects, :enabled_modules, :users, :members, :member_roles, :roles, :trackers, :issue_statuses, diff --git a/test/unit/helpers/search_helper_test.rb b/test/unit/helpers/search_helper_test.rb index 6e1b1ac17..888f4d35a 100644 --- a/test/unit/helpers/search_helper_test.rb +++ b/test/unit/helpers/search_helper_test.rb @@ -21,7 +21,6 @@ require File.expand_path('../../../test_helper', __FILE__) class SearchHelperTest < Redmine::HelperTest include SearchHelper - include Redmine::I18n include ERB::Util def test_highlight_single_token diff --git a/test/unit/helpers/settings_helper_test.rb b/test/unit/helpers/settings_helper_test.rb index 42dc7a579..10649d27d 100644 --- a/test/unit/helpers/settings_helper_test.rb +++ b/test/unit/helpers/settings_helper_test.rb @@ -19,7 +19,6 @@ require File.expand_path('../../../test_helper', __FILE__) class SettingsHelperTest < Redmine::HelperTest include SettingsHelper - include Redmine::I18n include ERB::Util def test_date_format_setting_options_should_include_human_readable_format diff --git a/test/unit/helpers/sort_helper_test.rb b/test/unit/helpers/sort_helper_test.rb index 3aedccaf7..33657dced 100644 --- a/test/unit/helpers/sort_helper_test.rb +++ b/test/unit/helpers/sort_helper_test.rb @@ -19,7 +19,6 @@ require File.expand_path('../../../test_helper', __FILE__) class SortHelperTest < Redmine::HelperTest include SortHelper - include Redmine::I18n include ERB::Util def setup diff --git a/test/unit/helpers/timelog_helper_test.rb b/test/unit/helpers/timelog_helper_test.rb index ad04b99f2..61b921935 100644 --- a/test/unit/helpers/timelog_helper_test.rb +++ b/test/unit/helpers/timelog_helper_test.rb @@ -19,7 +19,6 @@ require File.expand_path('../../../test_helper', __FILE__) class TimelogHelperTest < Redmine::HelperTest include TimelogHelper - include Redmine::I18n include ActionView::Helpers::TextHelper include ActionView::Helpers::DateHelper include ERB::Util diff --git a/test/unit/helpers/watchers_helper_test.rb b/test/unit/helpers/watchers_helper_test.rb index 2dccfa172..47c7d072f 100644 --- a/test/unit/helpers/watchers_helper_test.rb +++ b/test/unit/helpers/watchers_helper_test.rb @@ -19,16 +19,10 @@ require File.expand_path('../../../test_helper', __FILE__) class WatchersHelperTest < Redmine::HelperTest include WatchersHelper - include Redmine::I18n include Rails.application.routes.url_helpers fixtures :users, :issues - def setup - super - set_language_if_valid('en') - end - test '#watcher_link with a non-watched object' do expected = link_to( "Watch", From 0accce1c5d9d8c2bc68d19d3b0b325bad927ec8a Mon Sep 17 00:00:00 2001 From: Toshi MARUYAMA Date: Fri, 20 Jan 2017 02:43:39 +0000 Subject: [PATCH 0581/1117] =?UTF-8?q?Spanish=20label=5Fsearch=5Fopen=5Fiss?= =?UTF-8?q?ues=5Fonly:=20translation=20changed=20by=20Javier=20Men=C3=A9nd?= =?UTF-8?q?ez=20(#24572)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit git-svn-id: http://svn.redmine.org/redmine/trunk@16233 e93f8b46-1217-0410-a6f0-8f06a7374b81 --- config/locales/es.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/config/locales/es.yml b/config/locales/es.yml index 69ea40764..02e7f9925 100644 --- a/config/locales/es.yml +++ b/config/locales/es.yml @@ -1158,7 +1158,7 @@ es: label_search_attachments_yes: Buscar adjuntos por nombre de archivo y descripciones label_search_attachments_no: No buscar adjuntos label_search_attachments_only: Sólo Buscar adjuntos - label_search_open_issues_only: Sólo Abrir Peticiones + label_search_open_issues_only: Sólo Peticiones Abiertas field_address: Correo electrónico setting_max_additional_emails: Número Máximo de correos electrónicos adicionales label_email_address_plural: Correo Electrónicos From 18bf5a10a510dda858335ae0dcbab4f0aaaa86ac Mon Sep 17 00:00:00 2001 From: Toshi MARUYAMA Date: Fri, 20 Jan 2017 12:21:39 +0000 Subject: [PATCH 0582/1117] Japanese translation for 3.2-stable updated by Go MAEDA (#24751, #24886) git-svn-id: http://svn.redmine.org/redmine/trunk@16235 e93f8b46-1217-0410-a6f0-8f06a7374b81 --- config/locales/ja.yml | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/config/locales/ja.yml b/config/locales/ja.yml index f6c520b9f..03d227883 100644 --- a/config/locales/ja.yml +++ b/config/locales/ja.yml @@ -1230,8 +1230,7 @@ ja: setting_mail_handler_enable_regex_delimiters: Enable regular expressions error_move_of_child_not_possible: 'Subtask %{child} could not be moved to the new project: %{errors}' - error_cannot_reassign_time_entries_to_an_issue_about_to_be_deleted: Spent time cannot - be reassigned to an issue that is about to be deleted + error_cannot_reassign_time_entries_to_an_issue_about_to_be_deleted: 削除対象チケットへの作業時間の再割り当てはできません setting_timelog_required_fields: Required fields for time logs label_attribute_of_object: '%{object_name}''s %{name}' warning_fields_cleared_on_bulk_edit: Changes will result in the automatic deletion From 50af1b3416184d9bfaf592011181dc6b88f5790b Mon Sep 17 00:00:00 2001 From: Toshi MARUYAMA Date: Fri, 20 Jan 2017 12:36:27 +0000 Subject: [PATCH 0583/1117] Traditional Chinese translation updated and changed by ChunChang Lo (#24860) git-svn-id: http://svn.redmine.org/redmine/trunk@16236 e93f8b46-1217-0410-a6f0-8f06a7374b81 --- config/locales/zh-TW.yml | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/config/locales/zh-TW.yml b/config/locales/zh-TW.yml index 0b6319c09..80d17973a 100644 --- a/config/locales/zh-TW.yml +++ b/config/locales/zh-TW.yml @@ -1024,12 +1024,13 @@ label_readonly: 唯讀 label_required: 必填 label_hidden: 隱藏 - label_attribute_of_project: "專案是 %{name}" - label_attribute_of_issue: "議題是 %{name}" - label_attribute_of_author: "作者是 %{name}" - label_attribute_of_assigned_to: "被分派者是 %{name}" - label_attribute_of_user: "用戶是 %{name}" - label_attribute_of_fixed_version: "版本是 %{name}" + label_attribute_of_project: "專案的 %{name}" + label_attribute_of_issue: "議題的 %{name}" + label_attribute_of_author: "作者的 %{name}" + label_attribute_of_assigned_to: "被分派者的 %{name}" + label_attribute_of_user: "用戶的 %{name}" + label_attribute_of_fixed_version: "版本的 %{name}" + label_attribute_of_object: "%{object_name}的 %{name}" label_cross_project_descendants: 與子專案共用 label_cross_project_tree: 與專案樹共用 label_cross_project_hierarchy: 與專案階層架構共用 @@ -1289,7 +1290,6 @@ description_date_from: 輸入起始日期 description_date_to: 輸入結束日期 text_repository_identifier_info: '僅允許使用小寫英文字母 (a-z), 阿拉伯數字, 虛線與底線。
          一旦儲存之後, 代碼便無法再次被更改。' - label_attribute_of_object: '%{object_name}''s %{name}' label_user_mail_option_only_assigned: Only for things I watch or I am assigned to label_user_mail_option_only_owner: Only for things I watch or I am the owner of warning_fields_cleared_on_bulk_edit: Changes will result in the automatic deletion From ebf23491c8df5da4107087cfd97ac4d1a6bda60c Mon Sep 17 00:00:00 2001 From: Toshi MARUYAMA Date: Fri, 20 Jan 2017 20:32:20 +0000 Subject: [PATCH 0584/1117] Japanese translation of setting_text_formatting and setting_cache_formatted_text changed by Go MAEDA (#24750) git-svn-id: http://svn.redmine.org/redmine/trunk@16239 e93f8b46-1217-0410-a6f0-8f06a7374b81 --- config/locales/ja.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/config/locales/ja.yml b/config/locales/ja.yml index 03d227883..dd3516dc1 100644 --- a/config/locales/ja.yml +++ b/config/locales/ja.yml @@ -352,8 +352,8 @@ ja: setting_bcc_recipients: 宛先を非表示(bcc) setting_plain_text_mail: プレインテキスト形式(HTMLなし) setting_host_name: ホスト名とパス - setting_text_formatting: テキストの書式 - setting_cache_formatted_text: 書式化されたテキストをキャッシュする + setting_text_formatting: テキスト書式 + setting_cache_formatted_text: テキスト書式の変換結果をキャッシュ setting_wiki_compression: Wiki履歴を圧縮する setting_feeds_limit: Atomフィードの項目数の上限 setting_default_projects_public: デフォルトで新しいプロジェクトは公開にする From 83bc9d2315f55f9e9982654b874edc86353d631d Mon Sep 17 00:00:00 2001 From: Toshi MARUYAMA Date: Fri, 20 Jan 2017 20:32:31 +0000 Subject: [PATCH 0585/1117] Japanese translation for trunk updated by Go MAEDA (#24751) git-svn-id: http://svn.redmine.org/redmine/trunk@16240 e93f8b46-1217-0410-a6f0-8f06a7374b81 --- config/locales/ja.yml | 11 +++++------ 1 file changed, 5 insertions(+), 6 deletions(-) diff --git a/config/locales/ja.yml b/config/locales/ja.yml index dd3516dc1..d01e100b3 100644 --- a/config/locales/ja.yml +++ b/config/locales/ja.yml @@ -151,8 +151,8 @@ ja: circular_dependency: "この関係では、循環依存になります" cant_link_an_issue_with_a_descendant: "親子関係にあるチケット間での関連の設定はできません" earlier_than_minimum_start_date: "を%{date}より前にすることはできません。先行するチケットがあります" - not_a_regexp: "is not a valid regular expression" - open_issue_with_closed_parent: "An open issue cannot be attached to a closed parent task" + not_a_regexp: "は正しい正規表現ではありません" + open_issue_with_closed_parent: "完了したチケットに未完了の子チケットを追加することはできません" actionview_instancetag_blank_option: 選んでください @@ -1226,10 +1226,9 @@ ja: label_font_proportional: プロポーショナル setting_timespan_format: 時間の形式 label_table_of_contents: 目次 - setting_commit_logs_formatting: Apply text formatting to commit messages - setting_mail_handler_enable_regex_delimiters: Enable regular expressions - error_move_of_child_not_possible: 'Subtask %{child} could not be moved to the new - project: %{errors}' + setting_commit_logs_formatting: コミットメッセージにテキスト書式を適用 + setting_mail_handler_enable_regex_delimiters: 正規表現を使用 + error_move_of_child_not_possible: '子チケット %{child} を指定されたプロジェクトに移動できませんでした: %{errors}' error_cannot_reassign_time_entries_to_an_issue_about_to_be_deleted: 削除対象チケットへの作業時間の再割り当てはできません setting_timelog_required_fields: Required fields for time logs label_attribute_of_object: '%{object_name}''s %{name}' From 9c645719ee96b182a2fbe3f77129c1fdb4428791 Mon Sep 17 00:00:00 2001 From: Jean-Philippe Lang Date: Sat, 21 Jan 2017 09:08:40 +0000 Subject: [PATCH 0586/1117] Allow forward reference to parent when importing issues (#22701). git-svn-id: http://svn.redmine.org/redmine/trunk@16241 e93f8b46-1217-0410-a6f0-8f06a7374b81 --- app/models/import.rb | 22 +++++++++++++++++++++- app/models/issue_import.rb | 25 +++++++++++++++++++++---- test/fixtures/files/import_subtasks.csv | 5 +++++ test/unit/issue_import_test.rb | 13 +++++++++++++ 4 files changed, 60 insertions(+), 5 deletions(-) create mode 100644 test/fixtures/files/import_subtasks.csv diff --git a/app/models/import.rb b/app/models/import.rb index 22b90b6ac..b3aa914af 100644 --- a/app/models/import.rb +++ b/app/models/import.rb @@ -138,6 +138,24 @@ class Import < ActiveRecord::Base settings['mapping'] || {} end + # Adds a callback that will be called after the item at given position is imported + def add_callback(position, name, *args) + settings['callbacks'] ||= {} + settings['callbacks'][position.to_i] ||= [] + settings['callbacks'][position.to_i] << [name, args] + save! + end + + # Executes the callbacks for the given object + def do_callbacks(position, object) + if callbacks = (settings['callbacks'] || {}).delete(position) + callbacks.each do |name, args| + send "#{name}_callback", object, *args + end + save! + end + end + # Imports items and returns the position of the last processed item def run(options={}) max_items = options[:max_items] @@ -157,7 +175,7 @@ class Import < ActiveRecord::Base item = items.build item.position = position - if object = build_object(row) + if object = build_object(row, item) if object.save item.obj_id = object.id else @@ -167,6 +185,8 @@ class Import < ActiveRecord::Base item.save! imported += 1 + + do_callbacks(item.position, object) end current = position end diff --git a/app/models/issue_import.rb b/app/models/issue_import.rb index 4ecd4b517..83a104b37 100644 --- a/app/models/issue_import.rb +++ b/app/models/issue_import.rb @@ -74,7 +74,7 @@ class IssueImport < Import private - def build_object(row) + def build_object(row, item) issue = Issue.new issue.author = user issue.notify = false @@ -139,11 +139,15 @@ class IssueImport < Import end if parent_issue_id = row_value(row, 'parent_issue_id') if parent_issue_id =~ /\A(#)?(\d+)\z/ - parent_issue_id = $2 + parent_issue_id = $2.to_i if $1 attributes['parent_issue_id'] = parent_issue_id - elsif issue_id = items.where(:position => parent_issue_id).first.try(:obj_id) - attributes['parent_issue_id'] = issue_id + else + if parent_issue_id > item.position + add_callback(parent_issue_id, 'set_as_parent', item.position) + elsif issue_id = items.where(:position => parent_issue_id).first.try(:obj_id) + attributes['parent_issue_id'] = issue_id + end end else attributes['parent_issue_id'] = parent_issue_id @@ -183,4 +187,17 @@ class IssueImport < Import issue end + + # Callback that sets issue as the parent of a previously imported issue + def set_as_parent_callback(issue, child_position) + child_id = items.where(:position => child_position).first.try(:obj_id) + return unless child_id + + child = Issue.find_by_id(child_id) + return unless child + + child.parent_issue_id = issue.id + child.save! + issue.reload + end end diff --git a/test/fixtures/files/import_subtasks.csv b/test/fixtures/files/import_subtasks.csv new file mode 100644 index 000000000..1e789514e --- /dev/null +++ b/test/fixtures/files/import_subtasks.csv @@ -0,0 +1,5 @@ +row;tracker;subject;parent +1;bug;Root; +2;bug;Child 1;1 +3;bug;Grand-child;4 +4;bug;Child 2;1 diff --git a/test/unit/issue_import_test.rb b/test/unit/issue_import_test.rb index 9f238cafe..8a0d24366 100644 --- a/test/unit/issue_import_test.rb +++ b/test/unit/issue_import_test.rb @@ -115,6 +115,19 @@ class IssueImportTest < ActiveSupport::TestCase assert_equal 2, issues[2].parent_id end + def test_backward_and_forward_reference_to_parent_should_work + import = generate_import('import_subtasks.csv') + import.settings = { + 'separator' => ";", 'wrapper' => '"', 'encoding' => "UTF-8", + 'mapping' => {'project_id' => '1', 'tracker' => '1', 'subject' => '2', 'parent_issue_id' => '3'} + } + import.save! + + root, child1, grandchild, child2 = new_records(Issue, 4) { import.run } + assert_equal root, child1.parent + assert_equal child2, grandchild.parent + end + def test_assignee_should_be_set import = generate_import_with_mapping import.mapping.merge!('assigned_to' => '11') From 402d73914634e0e0a2ec06cc94e7b3ec13275546 Mon Sep 17 00:00:00 2001 From: Jean-Philippe Lang Date: Sat, 21 Jan 2017 09:37:18 +0000 Subject: [PATCH 0587/1117] Use EXISTS instead of IN subquery (#21608). MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Patch by Ondřej Ezr. git-svn-id: http://svn.redmine.org/redmine/trunk@16242 e93f8b46-1217-0410-a6f0-8f06a7374b81 --- app/models/project.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app/models/project.rb b/app/models/project.rb index fb2ffc3a6..a09ef781b 100644 --- a/app/models/project.rb +++ b/app/models/project.rb @@ -182,7 +182,7 @@ class Project < ActiveRecord::Base base_statement = (perm && perm.read? ? "#{Project.table_name}.status <> #{Project::STATUS_ARCHIVED}" : "#{Project.table_name}.status = #{Project::STATUS_ACTIVE}") if !options[:skip_pre_condition] && perm && perm.project_module # If the permission belongs to a project module, make sure the module is enabled - base_statement << " AND #{Project.table_name}.id IN (SELECT em.project_id FROM #{EnabledModule.table_name} em WHERE em.name='#{perm.project_module}')" + base_statement << " AND EXISTS (SELECT 1 AS one FROM #{EnabledModule.table_name} em WHERE em.project_id = #{Project.table_name}.id AND em.name='#{perm.project_module}')" end if project = options[:project] project_statement = project.project_condition(options[:with_subprojects]) From 4abc3179f588f03aba2e5c9d7a5fb29570dc2614 Mon Sep 17 00:00:00 2001 From: Jean-Philippe Lang Date: Sat, 21 Jan 2017 09:59:12 +0000 Subject: [PATCH 0588/1117] Filter parent task issues in auto complete by open/closed status depending on the subtask status (#24877). Patch by Marius BALTEANU. git-svn-id: http://svn.redmine.org/redmine/trunk@16243 e93f8b46-1217-0410-a6f0-8f06a7374b81 --- app/controllers/auto_completes_controller.rb | 9 ++++++++ app/views/issues/_attributes.html.erb | 2 +- .../auto_completes_controller_test.rb | 21 +++++++++++++++++++ 3 files changed, 31 insertions(+), 1 deletion(-) diff --git a/app/controllers/auto_completes_controller.rb b/app/controllers/auto_completes_controller.rb index 3fe572ab6..ab46465ac 100644 --- a/app/controllers/auto_completes_controller.rb +++ b/app/controllers/auto_completes_controller.rb @@ -21,11 +21,20 @@ class AutoCompletesController < ApplicationController def issues @issues = [] q = (params[:q] || params[:term]).to_s.strip + status = params[:status].to_s + issue_id = params[:issue_id].to_s if q.present? scope = Issue.cross_project_scope(@project, params[:scope]).visible + if status.present? + scope = scope.open(status == 'o') + end + if issue_id.present? + scope = scope.where("#{Issue.table_name}.id <> ?", issue_id.to_i) + end if q.match(/\A#?(\d+)\z/) @issues << scope.find_by_id($1.to_i) end + @issues += scope.where("LOWER(#{Issue.table_name}.subject) LIKE LOWER(?)", "%#{q}%").order("#{Issue.table_name}.id DESC").limit(10).to_a @issues.compact! end diff --git a/app/views/issues/_attributes.html.erb b/app/views/issues/_attributes.html.erb index 224960617..640a00e0b 100644 --- a/app/views/issues/_attributes.html.erb +++ b/app/views/issues/_attributes.html.erb @@ -47,7 +47,7 @@

          <% if @issue.safe_attribute? 'parent_issue_id' %>

          <%= f.text_field :parent_issue_id, :size => 10, :required => @issue.required_attribute?('parent_issue_id') %>

          -<%= javascript_tag "observeAutocompleteField('issue_parent_issue_id', '#{escape_javascript auto_complete_issues_path(:project_id => @issue.project, :scope => Setting.cross_project_subtasks)}')" %> +<%= javascript_tag "observeAutocompleteField('issue_parent_issue_id', '#{escape_javascript auto_complete_issues_path(:project_id => @issue.project, :scope => Setting.cross_project_subtasks, :status => @issue.closed? ? 'c' : 'o', :issue_id => @issue.id)}')" %> <% end %> <% if @issue.safe_attribute? 'start_date' %> diff --git a/test/functional/auto_completes_controller_test.rb b/test/functional/auto_completes_controller_test.rb index 5360eac9b..d02addc1a 100644 --- a/test/functional/auto_completes_controller_test.rb +++ b/test/functional/auto_completes_controller_test.rb @@ -81,4 +81,25 @@ class AutoCompletesControllerTest < Redmine::ControllerTest assert_equal 13, issue['value'] assert_equal 'Bug #13: Subproject issue two', issue['label'] end + + def test_auto_complete_with_status_o_should_return_open_issues_only + get :issues, :project_id => 'ecookbook', :q => 'issue', :status => 'o' + assert_response :success + assert_include "Issue due today", response.body + assert_not_include "closed", response.body + end + + def test_auto_complete_with_status_c_should_return_closed_issues_only + get :issues, :project_id => 'ecookbook', :q => 'issue', :status => 'c' + assert_response :success + assert_include "closed", response.body + assert_not_include "Issue due today", response.body + end + + def test_auto_complete_with_issue_id_should_not_return_that_issue + get :issues, :project_id => 'ecookbook', :q => 'issue', :issue_id => '12' + assert_response :success + assert_include "issue", response.body + assert_not_include "Bug #12: Closed issue on a locked version", response.body + end end From 30493d542188ee72ba9db30c0710a21b3b4ff9d5 Mon Sep 17 00:00:00 2001 From: Jean-Philippe Lang Date: Sat, 21 Jan 2017 10:01:44 +0000 Subject: [PATCH 0589/1117] Clean up SQL. git-svn-id: http://svn.redmine.org/redmine/trunk@16244 e93f8b46-1217-0410-a6f0-8f06a7374b81 --- app/controllers/auto_completes_controller.rb | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/app/controllers/auto_completes_controller.rb b/app/controllers/auto_completes_controller.rb index ab46465ac..c6de2dd72 100644 --- a/app/controllers/auto_completes_controller.rb +++ b/app/controllers/auto_completes_controller.rb @@ -29,13 +29,13 @@ class AutoCompletesController < ApplicationController scope = scope.open(status == 'o') end if issue_id.present? - scope = scope.where("#{Issue.table_name}.id <> ?", issue_id.to_i) + scope = scope.where.not(:id => issue_id.to_i) end if q.match(/\A#?(\d+)\z/) @issues << scope.find_by_id($1.to_i) end - @issues += scope.where("LOWER(#{Issue.table_name}.subject) LIKE LOWER(?)", "%#{q}%").order("#{Issue.table_name}.id DESC").limit(10).to_a + @issues += scope.where("LOWER(#{Issue.table_name}.subject) LIKE LOWER(?)", "%#{q}%").order(:id => :desc).limit(10).to_a @issues.compact! end render :layout => false From c283212f9fa6fb5ad328511a7230adf9b3ba8917 Mon Sep 17 00:00:00 2001 From: Jean-Philippe Lang Date: Sat, 21 Jan 2017 10:05:53 +0000 Subject: [PATCH 0590/1117] Adds a scope for issue auto complete. git-svn-id: http://svn.redmine.org/redmine/trunk@16245 e93f8b46-1217-0410-a6f0-8f06a7374b81 --- app/controllers/auto_completes_controller.rb | 2 +- app/models/issue.rb | 6 ++++++ 2 files changed, 7 insertions(+), 1 deletion(-) diff --git a/app/controllers/auto_completes_controller.rb b/app/controllers/auto_completes_controller.rb index c6de2dd72..b00deb330 100644 --- a/app/controllers/auto_completes_controller.rb +++ b/app/controllers/auto_completes_controller.rb @@ -35,7 +35,7 @@ class AutoCompletesController < ApplicationController @issues << scope.find_by_id($1.to_i) end - @issues += scope.where("LOWER(#{Issue.table_name}.subject) LIKE LOWER(?)", "%#{q}%").order(:id => :desc).limit(10).to_a + @issues += scope.like(q).order(:id => :desc).limit(10).to_a @issues.compact! end render :layout => false diff --git a/app/models/issue.rb b/app/models/issue.rb index b61c244ed..00e98995d 100644 --- a/app/models/issue.rb +++ b/app/models/issue.rb @@ -98,6 +98,12 @@ class Issue < ActiveRecord::Base ids.compact! ids.any? ? where(:assigned_to_id => ids) : none } + scope :like, lambda {|q| + q = q.to_s + if q.present? + where("LOWER(#{table_name}.subject) LIKE LOWER(?)", "%#{q}%") + end + } before_validation :clear_disabled_fields before_create :default_assign From 2ec53dd2952e67d1b6609fa8279e4b00d32ac339 Mon Sep 17 00:00:00 2001 From: Jean-Philippe Lang Date: Sat, 21 Jan 2017 10:09:13 +0000 Subject: [PATCH 0591/1117] Clean up SQL. git-svn-id: http://svn.redmine.org/redmine/trunk@16246 e93f8b46-1217-0410-a6f0-8f06a7374b81 --- app/models/issue.rb | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/app/models/issue.rb b/app/models/issue.rb index 00e98995d..40a12c0ca 100644 --- a/app/models/issue.rb +++ b/app/models/issue.rb @@ -79,13 +79,13 @@ class Issue < ActiveRecord::Base scope :open, lambda {|*args| is_closed = args.size > 0 ? !args.first : false joins(:status). - where("#{IssueStatus.table_name}.is_closed = ?", is_closed) + where(:issue_statuses => {:is_closed => is_closed}) } - scope :recently_updated, lambda { order("#{Issue.table_name}.updated_on DESC") } + scope :recently_updated, lambda { order(:updated_on => :desc) } scope :on_active_project, lambda { joins(:project). - where("#{Project.table_name}.status = ?", Project::STATUS_ACTIVE) + where(:projects => {:status => Project::STATUS_ACTIVE}) } scope :fixed_version, lambda {|versions| ids = [versions].flatten.compact.map {|v| v.is_a?(Version) ? v.id : v} From 8615dc0bcec56803836d8c906e4e83fbab76cf6d Mon Sep 17 00:00:00 2001 From: Jean-Philippe Lang Date: Sat, 21 Jan 2017 10:10:24 +0000 Subject: [PATCH 0592/1117] Use #none for empty scope. git-svn-id: http://svn.redmine.org/redmine/trunk@16247 e93f8b46-1217-0410-a6f0-8f06a7374b81 --- app/models/issue.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app/models/issue.rb b/app/models/issue.rb index 40a12c0ca..1877ca2c9 100644 --- a/app/models/issue.rb +++ b/app/models/issue.rb @@ -89,7 +89,7 @@ class Issue < ActiveRecord::Base } scope :fixed_version, lambda {|versions| ids = [versions].flatten.compact.map {|v| v.is_a?(Version) ? v.id : v} - ids.any? ? where(:fixed_version_id => ids) : where('1=0') + ids.any? ? where(:fixed_version_id => ids) : none } scope :assigned_to, lambda {|arg| arg = Array(arg).uniq From 1eee6b3a30dfa2e0b7c9aaa5db3da3b3c9965b19 Mon Sep 17 00:00:00 2001 From: Jean-Philippe Lang Date: Sat, 21 Jan 2017 10:37:36 +0000 Subject: [PATCH 0593/1117] Changed filter position (#17720). Patch by Go MAEDA. git-svn-id: http://svn.redmine.org/redmine/trunk@16248 e93f8b46-1217-0410-a6f0-8f06a7374b81 --- app/models/issue_query.rb | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/app/models/issue_query.rb b/app/models/issue_query.rb index 1b1477e3c..fd5c933c3 100644 --- a/app/models/issue_query.rb +++ b/app/models/issue_query.rb @@ -145,6 +145,14 @@ class IssueQuery < Query :type => :list, :values => [["<< #{l(:label_me)} >>", "me"]] end + add_available_filter("updated_by", + :type => :list, :values => lambda { author_values } + ) + + add_available_filter("last_updated_by", + :type => :list, :values => lambda { author_values } + ) + if project && !project.leaf? add_available_filter "subproject_id", :type => :list_subprojects, @@ -165,14 +173,6 @@ class IssueQuery < Query add_available_filter "issue_id", :type => :integer, :label => :label_issue - add_available_filter("updated_by", - :type => :list, :values => lambda { author_values } - ) - - add_available_filter("last_updated_by", - :type => :list, :values => lambda { author_values } - ) - Tracker.disabled_core_fields(trackers).each {|field| delete_available_filter field } From 9814dcf231b50bd1d8e712db8534051ff8a8c8c6 Mon Sep 17 00:00:00 2001 From: Jean-Philippe Lang Date: Wed, 25 Jan 2017 11:44:12 +0000 Subject: [PATCH 0594/1117] Use css pseudo-classes instead of cycle("odd", "even") (#15361). Patch by Marius BALTEANU. git-svn-id: http://svn.redmine.org/redmine/trunk@16249 e93f8b46-1217-0410-a6f0-8f06a7374b81 --- app/views/admin/info.html.erb | 2 +- app/views/admin/plugins.html.erb | 2 +- app/views/admin/projects.html.erb | 2 +- app/views/auth_sources/index.html.erb | 2 +- app/views/boards/index.html.erb | 2 +- app/views/boards/show.html.erb | 2 +- app/views/custom_fields/_index.html.erb | 4 ++-- app/views/email_addresses/_index.html.erb | 2 +- app/views/enumerations/index.html.erb | 3 +-- app/views/files/index.html.erb | 5 ++--- app/views/groups/_users.html.erb | 2 +- app/views/groups/index.html.erb | 2 +- app/views/issue_statuses/index.html.erb | 2 +- app/views/issues/_changesets.html.erb | 2 +- app/views/issues/_list.html.erb | 2 +- app/views/issues/_list_simple.html.erb | 2 +- app/views/principal_memberships/_index.html.erb | 4 ++-- app/views/projects/settings/_activities.html.erb | 2 +- app/views/projects/settings/_boards.html.erb | 2 +- app/views/projects/settings/_issue_categories.html.erb | 2 +- app/views/projects/settings/_members.html.erb | 4 ++-- app/views/projects/settings/_repositories.html.erb | 4 ++-- app/views/projects/settings/_versions.html.erb | 4 ++-- app/views/projects/show.html.erb | 2 +- app/views/queries/index.html.erb | 2 +- app/views/reports/_details.html.erb | 5 ++--- app/views/reports/_simple.html.erb | 5 ++--- app/views/repositories/_revisions.html.erb | 2 +- app/views/repositories/committers.html.erb | 2 +- app/views/roles/_form.html.erb | 2 +- app/views/roles/index.html.erb | 2 +- app/views/roles/permissions.html.erb | 2 +- app/views/timelog/_list.html.erb | 2 +- app/views/timelog/_report_criteria.html.erb | 2 +- app/views/trackers/fields.html.erb | 4 ++-- app/views/trackers/index.html.erb | 2 +- app/views/users/index.html.erb | 2 +- app/views/wiki/history.html.erb | 2 +- app/views/workflows/_form.html.erb | 2 +- app/views/workflows/index.html.erb | 2 +- app/views/workflows/permissions.html.erb | 4 ++-- public/javascripts/application.js | 4 ---- public/stylesheets/application.css | 9 ++++++--- 43 files changed, 57 insertions(+), 62 deletions(-) diff --git a/app/views/admin/info.html.erb b/app/views/admin/info.html.erb index 2be1d28fd..c56d14eb6 100644 --- a/app/views/admin/info.html.erb +++ b/app/views/admin/info.html.erb @@ -4,7 +4,7 @@ <% @checklist.each do |label, result| %> - + diff --git a/app/views/admin/plugins.html.erb b/app/views/admin/plugins.html.erb index 020dbc818..e04e06a7b 100644 --- a/app/views/admin/plugins.html.erb +++ b/app/views/admin/plugins.html.erb @@ -3,7 +3,7 @@ <% if @plugins.any? %>
          <%= label.is_a?(Symbol) ? l(label) : label %>
          <% @plugins.each do |plugin| %> - + <% project_tree(@projects, :init_level => true) do |project, level| %> - <%= project.css_classes %> <%= level > 0 ? "idnt idnt-#{level}" : nil %>"> + "> diff --git a/app/views/auth_sources/index.html.erb b/app/views/auth_sources/index.html.erb index ecde2bf95..7a0ffa59d 100644 --- a/app/views/auth_sources/index.html.erb +++ b/app/views/auth_sources/index.html.erb @@ -14,7 +14,7 @@ <% for source in @auth_sources %> - "> + diff --git a/app/views/boards/index.html.erb b/app/views/boards/index.html.erb index 29074130b..21280e1af 100644 --- a/app/views/boards/index.html.erb +++ b/app/views/boards/index.html.erb @@ -9,7 +9,7 @@ <% Board.board_tree(@boards) do |board, level| %> - + <% @topics.each do |topic| %> - + diff --git a/app/views/custom_fields/_index.html.erb b/app/views/custom_fields/_index.html.erb index dfc458cdc..04d4aa21d 100644 --- a/app/views/custom_fields/_index.html.erb +++ b/app/views/custom_fields/_index.html.erb @@ -12,7 +12,7 @@ <% (@custom_fields_by_type[tab[:name]] || []).sort.each do |custom_field| -%> <% back_url = custom_fields_path(:tab => tab[:name]) %> - "> + @@ -25,6 +25,6 @@ <%= delete_link custom_field_path(custom_field) %> - <% end; reset_cycle %> + <% end %>
          <%= plugin.name %> <%= content_tag('span', plugin.description, :class => 'description') unless plugin.description.blank? %> <%= content_tag('span', link_to(plugin.url, plugin.url), :class => 'url') unless plugin.url.blank? %> diff --git a/app/views/admin/projects.html.erb b/app/views/admin/projects.html.erb index 630e78607..077f87c27 100644 --- a/app/views/admin/projects.html.erb +++ b/app/views/admin/projects.html.erb @@ -27,7 +27,7 @@
          <%= link_to_project_settings(project, {}, :title => project.short_description) %> <%= checked_image project.is_public? %> <%= format_date(project.created_on) %>
          <%= link_to(source.name, :action => 'edit', :id => source)%> <%= source.auth_method_name %> <%= source.host %>
          <%= link_to board.name, project_board_path(board.project, board), :class => "board" %>
          <%=h board.description %> diff --git a/app/views/boards/show.html.erb b/app/views/boards/show.html.erb index 1f58acdc8..4a0a588e9 100644 --- a/app/views/boards/show.html.erb +++ b/app/views/boards/show.html.erb @@ -35,7 +35,7 @@
          <%= link_to topic.subject, board_message_path(@board, topic) %> <%= link_to_user(topic.author) %> <%= format_time(topic.created_on) %>
          <%= link_to custom_field.name, edit_custom_field_path(custom_field) %> <%= l(custom_field.format.label) %> <%= checked_image custom_field.is_required? %>
          diff --git a/app/views/email_addresses/_index.html.erb b/app/views/email_addresses/_index.html.erb index 644cd759b..2fcf0b496 100644 --- a/app/views/email_addresses/_index.html.erb +++ b/app/views/email_addresses/_index.html.erb @@ -1,7 +1,7 @@ <% if @addresses.present? %> <% @addresses.each do |address| %> - "> + <% enumerations.each do |enumeration| %> - + @@ -27,7 +27,6 @@ <% end %> -<% reset_cycle %> <% else %>

          <%= l(:label_no_data) %>

          <% end %> diff --git a/app/views/files/index.html.erb b/app/views/files/index.html.erb index decc7314e..50e7bd966 100644 --- a/app/views/files/index.html.erb +++ b/app/views/files/index.html.erb @@ -26,7 +26,7 @@ <% end -%> <% container.attachments.each do |file| %> - "> + <%= link_to_attachment file, :download => true, :title => file.description %> <%= format_time(file.created_on) %> <%= number_to_human_size(file.filesize) %> @@ -37,8 +37,7 @@ :data => {:confirm => l(:text_are_you_sure)}, :method => :delete) if delete_allowed %> - <% end - reset_cycle %> + <% end %> <% end %> diff --git a/app/views/groups/_users.html.erb b/app/views/groups/_users.html.erb index 391edf4d8..8c2ab7e4b 100644 --- a/app/views/groups/_users.html.erb +++ b/app/views/groups/_users.html.erb @@ -8,7 +8,7 @@ <% @group.users.sort.each do |user| %> - + <%= link_to_user user %> <%= delete_link group_user_path(@group, :user_id => user), :remote => true %> diff --git a/app/views/groups/index.html.erb b/app/views/groups/index.html.erb index a8886d0d8..7b77fec22 100644 --- a/app/views/groups/index.html.erb +++ b/app/views/groups/index.html.erb @@ -24,7 +24,7 @@ <% @groups.each do |group| %> - "> + "> <%= link_to group, edit_group_path(group) %> <%= (@user_count_by_group_id[group.id] || 0) unless group.builtin? %> <%= delete_link group unless group.builtin? %> diff --git a/app/views/issue_statuses/index.html.erb b/app/views/issue_statuses/index.html.erb index 8608402ca..f5e6538c2 100644 --- a/app/views/issue_statuses/index.html.erb +++ b/app/views/issue_statuses/index.html.erb @@ -16,7 +16,7 @@ <% for status in @issue_statuses %> - "> + <%= link_to status.name, edit_issue_status_path(status) %> <% if Issue.use_status_for_done_ratio? %> <%= status.default_done_ratio %> diff --git a/app/views/issues/_changesets.html.erb b/app/views/issues/_changesets.html.erb index 9e172c712..3bd775c06 100644 --- a/app/views/issues/_changesets.html.erb +++ b/app/views/issues/_changesets.html.erb @@ -1,5 +1,5 @@ <% changesets.each do |changeset| %> -
          +

          <%= link_to_revision(changeset, changeset.repository, :text => "#{l(:label_revision)} #{changeset.format_identifier}") %> <% if changeset.filechanges.any? && User.current.allowed_to?(:browse_repository, changeset.project) %> diff --git a/app/views/issues/_list.html.erb b/app/views/issues/_list.html.erb index 851fca1a3..7e34fca24 100644 --- a/app/views/issues/_list.html.erb +++ b/app/views/issues/_list.html.erb @@ -1,7 +1,7 @@ <%= form_tag({}, :data => {:cm_url => issues_context_menu_path}) do -%> <%= hidden_field_tag 'back_url', url_for(:params => request.query_parameters), :id => nil %>

          - +
          <% for issue in issues %> - + <% memberships.each do |membership| %> <% next if membership.new_record? %> - + @@ -31,7 +31,7 @@ <%= call_table_row_hook principal, membership %> - <% end; reset_cycle %> + <% end %>
          diff --git a/app/views/issues/_list_simple.html.erb b/app/views/issues/_list_simple.html.erb index 0d2850cd0..1e23b161b 100644 --- a/app/views/issues/_list_simple.html.erb +++ b/app/views/issues/_list_simple.html.erb @@ -9,7 +9,7 @@
          <%= check_box_tag("ids[]", issue.id, false, :style => 'display:none;', :id => nil) %> <%= link_to("#{issue.tracker} ##{issue.id}", issue_path(issue)) %> diff --git a/app/views/principal_memberships/_index.html.erb b/app/views/principal_memberships/_index.html.erb index 508e2e271..c55a19543 100644 --- a/app/views/principal_memberships/_index.html.erb +++ b/app/views/principal_memberships/_index.html.erb @@ -13,7 +13,7 @@
          <%= link_to_project membership.project %>
          <% else %> diff --git a/app/views/projects/settings/_activities.html.erb b/app/views/projects/settings/_activities.html.erb index db1a3c286..27a27de5d 100644 --- a/app/views/projects/settings/_activities.html.erb +++ b/app/views/projects/settings/_activities.html.erb @@ -12,7 +12,7 @@ <% @project.activities(true).each do |enumeration| %> <%= fields_for "enumerations[#{enumeration.id}]", enumeration do |ff| %> - + <%= ff.hidden_field :parent_id, :value => enumeration.id unless enumeration.project %> <%= enumeration %> diff --git a/app/views/projects/settings/_boards.html.erb b/app/views/projects/settings/_boards.html.erb index 99479e55a..bf0b786fd 100644 --- a/app/views/projects/settings/_boards.html.erb +++ b/app/views/projects/settings/_boards.html.erb @@ -8,7 +8,7 @@
          <%= l(:label_board) %>
          <%= render_boards_tree(@project.boards) do |board, level| %> -
          +
          <%= link_to board.name, project_board_path(@project, board) %>
          diff --git a/app/views/projects/settings/_issue_categories.html.erb b/app/views/projects/settings/_issue_categories.html.erb index d1e219ee6..3cd78e387 100644 --- a/app/views/projects/settings/_issue_categories.html.erb +++ b/app/views/projects/settings/_issue_categories.html.erb @@ -10,7 +10,7 @@ <% for category in @project.issue_categories %> <% unless category.new_record? %> - + <%= category.name %> <%= category.assigned_to.name if category.assigned_to %> diff --git a/app/views/projects/settings/_members.html.erb b/app/views/projects/settings/_members.html.erb index 4009e7b15..39f50c105 100644 --- a/app/views/projects/settings/_members.html.erb +++ b/app/views/projects/settings/_members.html.erb @@ -15,7 +15,7 @@ <% members.each do |member| %> <% next if member.new_record? %> - + <%= link_to_user member.principal %> <%= member.roles.sort.collect(&:to_s).join(', ') %> @@ -32,7 +32,7 @@ <%= call_hook(:view_projects_settings_members_table_row, { :project => @project, :member => member}) %> -<% end; reset_cycle %> +<% end %> <% else %> diff --git a/app/views/projects/settings/_repositories.html.erb b/app/views/projects/settings/_repositories.html.erb index 61a1bb24e..f460278a0 100644 --- a/app/views/projects/settings/_repositories.html.erb +++ b/app/views/projects/settings/_repositories.html.erb @@ -15,9 +15,9 @@ <% @project.repositories.sort.each do |repository| %> - + - <%= link_to repository.identifier, + <%= link_to repository.identifier, {:controller => 'repositories', :action => 'show',:id => @project, :repository_id => repository.identifier_param} if repository.identifier.present? %> <%= checked_image repository.is_default? %> diff --git a/app/views/projects/settings/_versions.html.erb b/app/views/projects/settings/_versions.html.erb index c88bd01a4..f402fff7e 100644 --- a/app/views/projects/settings/_versions.html.erb +++ b/app/views/projects/settings/_versions.html.erb @@ -25,7 +25,7 @@ <% @versions.sort.each do |version| %> - + <%= link_to_version version %> <%= format_date(version.effective_date) %> <%= version.description %> @@ -39,7 +39,7 @@ <% end %> -<% end; reset_cycle %> +<% end %> <% else %> diff --git a/app/views/projects/show.html.erb b/app/views/projects/show.html.erb index 87e398ee4..7de31023c 100644 --- a/app/views/projects/show.html.erb +++ b/app/views/projects/show.html.erb @@ -49,7 +49,7 @@ <% @trackers.each do |tracker| %> - "> + <%= link_to tracker.name, project_issues_path(@project, :set_filter => 1, :tracker_id => tracker.id) %> diff --git a/app/views/queries/index.html.erb b/app/views/queries/index.html.erb index b0dbc05be..c36c0ca1a 100644 --- a/app/views/queries/index.html.erb +++ b/app/views/queries/index.html.erb @@ -9,7 +9,7 @@ <% else %> <% @queries.each do |query| %> - + diff --git a/app/views/reports/_details.html.erb b/app/views/reports/_details.html.erb index ab7fe3620..998089caf 100644 --- a/app/views/reports/_details.html.erb +++ b/app/views/reports/_details.html.erb @@ -13,7 +13,7 @@ <% for row in rows %> -"> + <% for status in @statuses %> @@ -25,5 +25,4 @@ <% end %>
          <%= link_to query.name, :controller => 'issues', :action => 'index', :project_id => @project, :query_id => query %>
          <%= link_to row.name, aggregate_path(@project, field_name, row) %><%= aggregate_link data, { field_name => row.id, "status_id" => status.id }, aggregate_path(@project, field_name, row, :status_id => status.id) %>
          -<% end - reset_cycle %> +<% end %> diff --git a/app/views/reports/_simple.html.erb b/app/views/reports/_simple.html.erb index 9dca3554c..d6f51ad19 100644 --- a/app/views/reports/_simple.html.erb +++ b/app/views/reports/_simple.html.erb @@ -10,7 +10,7 @@ <% for row in rows %> -"> + <%= link_to row.name, aggregate_path(@project, field_name, row) %> <%= aggregate_link data, { field_name => row.id, "closed" => 0 }, aggregate_path(@project, field_name, row, :status_id => "o") %> <%= aggregate_link data, { field_name => row.id, "closed" => 1 }, aggregate_path(@project, field_name, row, :status_id => "c") %> @@ -19,5 +19,4 @@ <% end %> -<% end - reset_cycle %> +<% end %> diff --git a/app/views/repositories/_revisions.html.erb b/app/views/repositories/_revisions.html.erb index d1b9c4b04..1d13a1446 100644 --- a/app/views/repositories/_revisions.html.erb +++ b/app/views/repositories/_revisions.html.erb @@ -33,7 +33,7 @@ end %> <% show_diff = revisions.size > 1 %> <% line_num = 1 %> <% revisions.each do |changeset| %> - + <% id_style = (show_revision_graph ? "padding-left:#{(graph_space + 1) * 20}px" : nil) %> <%= content_tag(:td, :class => 'id', :style => id_style) do %> <%= link_to_revision(changeset, @repository) %> diff --git a/app/views/repositories/committers.html.erb b/app/views/repositories/committers.html.erb index b942e4b82..f23e10252 100644 --- a/app/views/repositories/committers.html.erb +++ b/app/views/repositories/committers.html.erb @@ -17,7 +17,7 @@ <% i = 0 -%> <% @committers.each do |committer, user_id| -%> - + <%= committer %> <%= hidden_field_tag "committers[#{i}][]", committer, :id => nil %> diff --git a/app/views/roles/_form.html.erb b/app/views/roles/_form.html.erb index 39acc34a4..5f095e7b2 100644 --- a/app/views/roles/_form.html.erb +++ b/app/views/roles/_form.html.erb @@ -91,7 +91,7 @@ <% end %> <% Tracker.sorted.all.each do |tracker| %> - "> + <%= tracker.name %> <% permissions.each do |permission| %> "><%= check_box_tag "role[permissions_tracker_ids][#{permission}][]", diff --git a/app/views/roles/index.html.erb b/app/views/roles/index.html.erb index 8f059648b..ab0bbe8da 100644 --- a/app/views/roles/index.html.erb +++ b/app/views/roles/index.html.erb @@ -12,7 +12,7 @@ <% for role in @roles %> - <%= role.builtin? ? "builtin" : "givable" %>"> + "> <%= content_tag(role.builtin? ? 'em' : 'span', link_to(role.name, edit_role_path(role))) %> <%= reorder_handle(role) unless role.builtin? %> diff --git a/app/views/roles/permissions.html.erb b/app/views/roles/permissions.html.erb index 50ddd8d2d..a4b14493d 100644 --- a/app/views/roles/permissions.html.erb +++ b/app/views/roles/permissions.html.erb @@ -34,7 +34,7 @@ <% end %> <% perms_by_module[mod].each do |permission| %> <% humanized_perm_name = l_or_humanize(permission.name, :prefix => 'permission_') %> - + <%= link_to_function('', "toggleCheckboxesBySelector('.permission-#{permission.name} input')", diff --git a/app/views/timelog/_list.html.erb b/app/views/timelog/_list.html.erb index 3721df274..0fb72aeb4 100644 --- a/app/views/timelog/_list.html.erb +++ b/app/views/timelog/_list.html.erb @@ -1,7 +1,7 @@ <%= form_tag({}, :data => {:cm_url => time_entries_context_menu_path}) do -%> <%= hidden_field_tag 'back_url', url_for(:params => request.query_parameters), :id => nil %>
          - +
          + <%= ("" * level).html_safe %> <%= ("" * (criterias.length - level - 1)).html_safe -%> diff --git a/app/views/trackers/fields.html.erb b/app/views/trackers/fields.html.erb index 09e5e4e46..8ba1c3ae4 100644 --- a/app/views/trackers/fields.html.erb +++ b/app/views/trackers/fields.html.erb @@ -25,7 +25,7 @@ <% Tracker::CORE_FIELDS.each do |field| %> - "> + <% field_name = l("field_#{field}".sub(/_id$/, '')) %> <% @custom_fields.each do |field| %> - "> + <% for tracker in @trackers %> - "> + <% for user in @users -%> - "> + diff --git a/app/views/wiki/history.html.erb b/app/views/wiki/history.html.erb index 136923460..e5e72b102 100644 --- a/app/views/wiki/history.html.erb +++ b/app/views/wiki/history.html.erb @@ -19,7 +19,7 @@ <% show_diff = @versions.size > 1 %> <% line_num = 1 %> <% @versions.each do |ver| %> -"> + diff --git a/app/views/workflows/_form.html.erb b/app/views/workflows/_form.html.erb index ccdee2385..ea706c50b 100644 --- a/app/views/workflows/_form.html.erb +++ b/app/views/workflows/_form.html.erb @@ -24,7 +24,7 @@ <% for old_status in [nil] + @statuses %> <% next if old_status.nil? && name != 'always' %> - "> + <% @trackers.each do |tracker| -%> - + <% @roles.each do |role| -%> <% count = @workflow_counts[[tracker.id, role.id]] || 0 %> diff --git a/app/views/workflows/permissions.html.erb b/app/views/workflows/permissions.html.erb index dadffe354..3a47560c9 100644 --- a/app/views/workflows/permissions.html.erb +++ b/app/views/workflows/permissions.html.erb @@ -60,7 +60,7 @@ <% @fields.each do |field, name| %> - "> + @@ -80,7 +80,7 @@ <% @custom_fields.each do |field| %> - "> + diff --git a/public/javascripts/application.js b/public/javascripts/application.js index 6ad6ac035..c99e35ab5 100644 --- a/public/javascripts/application.js +++ b/public/javascripts/application.js @@ -697,10 +697,6 @@ function beforeShowDatePicker(input, inst) { type: 'put', dataType: 'script', data: data, - success: function(data){ - sortable.children(":even").removeClass("even").addClass("odd"); - sortable.children(":odd").removeClass("odd").addClass("even"); - }, error: function(jqXHR, textStatus, errorThrown){ alert(jqXHR.status); sortable.sortable("cancel"); diff --git a/public/stylesheets/application.css b/public/stylesheets/application.css index 641dd01e7..d9afc8e83 100644 --- a/public/stylesheets/application.css +++ b/public/stylesheets/application.css @@ -320,6 +320,8 @@ table.permissions td.role {color:#999;font-size:90%;font-weight:normal !importan tr.wiki-page-version td.updated_on, tr.wiki-page-version td.author {text-align:center;} +div.mypage-box table.time-entries tr.time-entry { background-color: #fff; } +div.mypage-box table.time-entries tr.odd { background-color:#f6f7f8; } tr.time-entry { text-align: center; white-space: nowrap; } tr.time-entry td.issue, tr.time-entry td.comments, tr.time-entry td.subject, tr.time-entry td.activity { text-align: left; white-space: normal; } td.hours { text-align: right; font-weight: bold; padding-right: 0.5em; } @@ -333,7 +335,7 @@ table.plugins span.url { display: block; font-size: 0.9em; } table.list.enumerations {table-layout: fixed; margin-bottom: 2em;} -tr.group td { padding: 0.8em 0 0.5em 0.3em; border-bottom: 1px solid #ccc; text-align:left; } +tr.group td { padding: 0.8em 0 0.5em 0.3em; border-bottom: 1px solid #ccc; text-align:left; background-color: #fff;} tr.group span.name {font-weight:bold;} tr.group span.count {font-weight:bold; position:relative; top:-1px; color:#fff; font-size:10px; background:#9DB9D5; padding:0px 6px 1px 6px; border-radius:3px; margin-left:4px;} tr.group span.totals {color: #aaa; font-size: 80%;} @@ -346,8 +348,9 @@ table.list tbody tr:hover { background-color:#ffffdd; } table.list tbody tr.group:hover { background-color:inherit; } table td {padding:2px;} table p {margin:0;} -.odd {background-color:#f6f7f8;} -.even {background-color: #fff;} + +table.list tbody tr:nth-child(odd), table.list.odd-even tbody tr.odd, #issue-changesets div.changeset:nth-child(odd) { background-color:#f6f7f8; } +table.list tbody tr:nth-child(even), table.list.odd-even tbody tr.even, #issue-changesets div.changeset:nth-child(even) { background-color: #fff; } tr.builtin td.name {font-style:italic;} From 8d713ae6ca643db8ce548b143635dee361f36ffe Mon Sep 17 00:00:00 2001 From: Jean-Philippe Lang Date: Wed, 25 Jan 2017 11:45:16 +0000 Subject: [PATCH 0595/1117] Fixes row background for alternate theme (#15361). git-svn-id: http://svn.redmine.org/redmine/trunk@16250 e93f8b46-1217-0410-a6f0-8f06a7374b81 --- public/stylesheets/application.css | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/public/stylesheets/application.css b/public/stylesheets/application.css index d9afc8e83..dfe22a74c 100644 --- a/public/stylesheets/application.css +++ b/public/stylesheets/application.css @@ -349,8 +349,8 @@ table.list tbody tr.group:hover { background-color:inherit; } table td {padding:2px;} table p {margin:0;} -table.list tbody tr:nth-child(odd), table.list.odd-even tbody tr.odd, #issue-changesets div.changeset:nth-child(odd) { background-color:#f6f7f8; } -table.list tbody tr:nth-child(even), table.list.odd-even tbody tr.even, #issue-changesets div.changeset:nth-child(even) { background-color: #fff; } +table.list:not(.odd-even) tbody tr:nth-child(odd), .odd, #issue-changesets div.changeset:nth-child(odd) { background-color:#f6f7f8; } +table.list:not(.odd-even) tbody tr:nth-child(even), .even, #issue-changesets div.changeset:nth-child(even) { background-color: #fff; } tr.builtin td.name {font-style:italic;} From b40d66f39fa8a0425ce2a08d4cf4007d814b97fb Mon Sep 17 00:00:00 2001 From: Jean-Philippe Lang Date: Wed, 25 Jan 2017 14:55:36 +0000 Subject: [PATCH 0596/1117] Option for long text custom fields to be displayed under the description field (#21705). Based on patch by Marius BALTEANU. git-svn-id: http://svn.redmine.org/redmine/trunk@16251 e93f8b46-1217-0410-a6f0-8f06a7374b81 --- app/helpers/issues_helper.rb | 24 ++++- app/models/custom_field.rb | 7 +- .../custom_fields/formats/_text.html.erb | 3 + app/views/issues/_form_custom_fields.html.erb | 7 ++ app/views/issues/show.html.erb | 4 +- config/locales/en.yml | 1 + config/locales/fr.yml | 1 + lib/redmine/field_format.rb | 2 +- public/stylesheets/application.css | 4 +- .../custom_fields_controller_test.rb | 14 +++ test/functional/issues_controller_test.rb | 93 +++++++++++-------- 11 files changed, 116 insertions(+), 44 deletions(-) diff --git a/app/helpers/issues_helper.rb b/app/helpers/issues_helper.rb index 122c2ffca..29f469121 100644 --- a/app/helpers/issues_helper.rb +++ b/app/helpers/issues_helper.rb @@ -239,8 +239,8 @@ module IssuesHelper r.to_html end - def render_custom_fields_rows(issue) - values = issue.visible_custom_field_values + def render_half_width_custom_fields_rows(issue) + values = issue.visible_custom_field_values.reject {|value| value.custom_field.full_width_layout?} return if values.empty? half = (values.size / 2.0).ceil issue_fields_rows do |rows| @@ -252,6 +252,26 @@ module IssuesHelper end end + def render_full_width_custom_fields_rows(issue) + values = issue.visible_custom_field_values.select {|value| value.custom_field.full_width_layout?} + return if values.empty? + + s = '' + values.each_with_index do |value, i| + if value.custom_field.text_formatting == 'full' + attr_value = content_tag('div', show_value(value), class: 'wiki') + else + attr_value = show_value(value) + end + content = + content_tag('hr') + + content_tag('p', content_tag('strong', custom_field_name_tag(value.custom_field) )) + + content_tag('div', attr_value, class: 'value') + s << content_tag('div', content, class: "cf_#{value.custom_field.id} attribute") + end + s.html_safe + end + # Returns the path for updating the issue form # with project as the current project def update_issue_form_path(project, issue) diff --git a/app/models/custom_field.rb b/app/models/custom_field.rb index 717df95e8..72cf0ea7c 100644 --- a/app/models/custom_field.rb +++ b/app/models/custom_field.rb @@ -89,7 +89,8 @@ class CustomField < ActiveRecord::Base 'edit_tag_style', 'user_role', 'version_status', - 'extensions_allowed' + 'extensions_allowed', + 'full_width_layout' def format @format ||= Redmine::FieldFormat.find(field_format) @@ -186,6 +187,10 @@ class CustomField < ActiveRecord::Base format.totalable_supported end + def full_width_layout? + full_width_layout == '1' + end + # Returns a ORDER BY clause that can used to sort customized # objects by their value of the custom field. # Returns nil if the custom field can not be used for sorting. diff --git a/app/views/custom_fields/formats/_text.html.erb b/app/views/custom_fields/formats/_text.html.erb index e72dcab42..79ea7c5e6 100644 --- a/app/views/custom_fields/formats/_text.html.erb +++ b/app/views/custom_fields/formats/_text.html.erb @@ -1,3 +1,6 @@ <%= render :partial => 'custom_fields/formats/regexp', :locals => {:f => f, :custom_field => custom_field} %>

          <%= f.check_box :text_formatting, {:label => :setting_text_formatting}, 'full', '' %>

          +<% if @custom_field.class.name == "IssueCustomField" %> +

          <%= f.check_box :full_width_layout %>

          +<% end %>

          <%= f.text_area(:default_value, :rows => 5) %>

          diff --git a/app/views/issues/_form_custom_fields.html.erb b/app/views/issues/_form_custom_fields.html.erb index 2e12c00e8..13bedd546 100644 --- a/app/views/issues/_form_custom_fields.html.erb +++ b/app/views/issues/_form_custom_fields.html.erb @@ -1,4 +1,7 @@ <% custom_field_values = @issue.editable_custom_field_values %> +<% custom_field_values_full_width = custom_field_values.select { |value| value.custom_field.full_width_layout? } %> +<% custom_field_values -= custom_field_values_full_width %> + <% if custom_field_values.present? %>
          @@ -14,3 +17,7 @@
          <% end %> + +<% custom_field_values_full_width.each do |value| %> +

          <%= custom_field_tag_with_label :issue, value, :required => @issue.required_attribute?(value.custom_field_id) %>

          +<% end %> diff --git a/app/views/issues/show.html.erb b/app/views/issues/show.html.erb index b9e5111fa..9d767f0b1 100644 --- a/app/views/issues/show.html.erb +++ b/app/views/issues/show.html.erb @@ -66,7 +66,7 @@ end end end %> -<%= render_custom_fields_rows(@issue) %> +<%= render_half_width_custom_fields_rows(@issue) %> <%= call_hook(:view_issues_show_details_bottom, :issue => @issue) %> @@ -87,6 +87,8 @@ end %> <%= link_to_attachments @issue, :thumbnails => true %> <% end -%> +<%= render_full_width_custom_fields_rows(@issue) %> + <%= call_hook(:view_issues_show_description_bottom, :issue => @issue) %> <% if !@issue.leaf? || User.current.allowed_to?(:manage_subtasks, @project) %> diff --git a/config/locales/en.yml b/config/locales/en.yml index 24d73e65d..fb9b6bf1f 100644 --- a/config/locales/en.yml +++ b/config/locales/en.yml @@ -372,6 +372,7 @@ en: field_textarea_font: Font used for text areas field_updated_by: Updated by field_last_updated_by: Last updated by + field_full_width_layout: Full width layout setting_app_title: Application title setting_app_subtitle: Application subtitle diff --git a/config/locales/fr.yml b/config/locales/fr.yml index 6136c7978..b1e0239c7 100644 --- a/config/locales/fr.yml +++ b/config/locales/fr.yml @@ -384,6 +384,7 @@ fr: field_textarea_font: Police utilisée pour les champs texte field_updated_by: Mise à jour par field_last_updated_by: Dernière mise à jour par + field_full_width_layout: Afficher sur toute la largeur setting_app_title: Titre de l'application setting_app_subtitle: Sous-titre de l'application diff --git a/lib/redmine/field_format.rb b/lib/redmine/field_format.rb index fee2c978c..ea9d7169c 100644 --- a/lib/redmine/field_format.rb +++ b/lib/redmine/field_format.rb @@ -108,7 +108,7 @@ module Redmine CustomField.store_accessor :format_store, *args end - field_attributes :url_pattern + field_attributes :url_pattern, :full_width_layout def name self.class.format_name diff --git a/public/stylesheets/application.css b/public/stylesheets/application.css index dfe22a74c..d16c2cf16 100644 --- a/public/stylesheets/application.css +++ b/public/stylesheets/application.css @@ -463,8 +463,8 @@ div.issue div.subject h3 {margin: 0; margin-bottom: 0.1em;} div.issue span.private, div.journal span.private { position:relative; bottom: 2px; text-transform: uppercase; background: #d22; color: #fff; font-weight:bold; padding: 0px 2px 0px 2px; font-size: 60%; margin-right: 2px; border-radius: 2px;} div.issue .next-prev-links {color:#999;} div.issue .attributes {margin-top: 2em;} -div.issue .attribute {padding-left:180px; clear:left; min-height: 1.8em;} -div.issue .attribute .label {width: 170px; margin-left:-180px; font-weight:bold; float:left; overflow:hidden; text-overflow: ellipsis;} +div.issue .attributes .attribute {padding-left:180px; clear:left; min-height: 1.8em;} +div.issue .attributes .attribute .label {width: 170px; margin-left:-180px; font-weight:bold; float:left; overflow:hidden; text-overflow: ellipsis;} div.issue .attribute .value {overflow:hidden; text-overflow: ellipsis;} div.issue.overdue .due-date .value { color: #c22; } diff --git a/test/functional/custom_fields_controller_test.rb b/test/functional/custom_fields_controller_test.rb index f13e7d0f8..70fbb837e 100644 --- a/test/functional/custom_fields_controller_test.rb +++ b/test/functional/custom_fields_controller_test.rb @@ -126,6 +126,20 @@ class CustomFieldsControllerTest < Redmine::ControllerTest assert_select '[name=?]', 'custom_field[default_value]', 0 end + def test_setting_full_width_layout_shoul_be_present_only_for_long_text_issue_custom_field + get :new, :type => 'IssueCustomField', :custom_field => {:field_format => 'text'} + assert_response :success + assert_select '[name=?]', 'custom_field[full_width_layout]' + + get :new, :type => 'IssueCustomField', :custom_field => {:field_format => 'list'} + assert_response :success + assert_select '[name=?]', 'custom_field[full_width_layout]', 0 + + get :new, :type => 'TimeEntryCustomField', :custom_field => {:field_format => 'text'} + assert_response :success + assert_select '[name=?]', 'custom_field[full_width_layout]', 0 + end + def test_new_js xhr :get, :new, :type => 'IssueCustomField', :custom_field => {:field_format => 'list'}, :format => 'js' assert_response :success diff --git a/test/functional/issues_controller_test.rb b/test/functional/issues_controller_test.rb index 4e8d88668..455bf834a 100644 --- a/test/functional/issues_controller_test.rb +++ b/test/functional/issues_controller_test.rb @@ -561,8 +561,8 @@ class IssuesControllerTest < Redmine::ControllerTest str_big5 = "\xa4@\xa4\xeb".force_encoding('Big5') issue = Issue.generate!(:subject => str_utf8) - get :index, :project_id => 1, - :f => ['subject'], + get :index, :project_id => 1, + :f => ['subject'], :op => '=', :values => [str_utf8], :format => 'csv' assert_equal 'text/csv; header=present', @response.content_type @@ -580,8 +580,8 @@ class IssuesControllerTest < Redmine::ControllerTest str_utf8 = "\xe4\xbb\xa5\xe5\x86\x85".force_encoding('UTF-8') issue = Issue.generate!(:subject => str_utf8) - get :index, :project_id => 1, - :f => ['subject'], + get :index, :project_id => 1, + :f => ['subject'], :op => '=', :values => [str_utf8], :c => ['status', 'subject'], :format => 'csv', @@ -603,8 +603,8 @@ class IssuesControllerTest < Redmine::ControllerTest str1 = "test_index_csv_tw" issue = Issue.generate!(:subject => str1, :estimated_hours => '1234.5') - get :index, :project_id => 1, - :f => ['subject'], + get :index, :project_id => 1, + :f => ['subject'], :op => '=', :values => [str1], :c => ['estimated_hours', 'subject'], :format => 'csv', @@ -620,8 +620,8 @@ class IssuesControllerTest < Redmine::ControllerTest str1 = "test_index_csv_fr" issue = Issue.generate!(:subject => str1, :estimated_hours => '1234.5') - get :index, :project_id => 1, - :f => ['subject'], + get :index, :project_id => 1, + :f => ['subject'], :op => '=', :values => [str1], :c => ['estimated_hours', 'subject'], :format => 'csv', @@ -696,34 +696,34 @@ class IssuesControllerTest < Redmine::ControllerTest assert_response :success end end - + def test_index_sort_by_assigned_to get :index, :sort => 'assigned_to' assert_response :success - + assignees = issues_in_list.map(&:assigned_to).compact assert_equal assignees.sort, assignees assert_select 'table.issues.sort-by-assigned-to.sort-asc' end - + def test_index_sort_by_assigned_to_desc get :index, :sort => 'assigned_to:desc' assert_response :success - + assignees = issues_in_list.map(&:assigned_to).compact assert_equal assignees.sort.reverse, assignees assert_select 'table.issues.sort-by-assigned-to.sort-desc' end - + def test_index_group_by_assigned_to get :index, :group_by => 'assigned_to', :sort => 'priority' assert_response :success end - + def test_index_sort_by_author get :index, :sort => 'author', :c => ['author'] assert_response :success - + authors = issues_in_list.map(&:author) assert_equal authors.sort, authors end @@ -731,30 +731,30 @@ class IssuesControllerTest < Redmine::ControllerTest def test_index_sort_by_author_desc get :index, :sort => 'author:desc' assert_response :success - + authors = issues_in_list.map(&:author) assert_equal authors.sort.reverse, authors end - + def test_index_group_by_author get :index, :group_by => 'author', :sort => 'priority' assert_response :success end - + def test_index_sort_by_spent_hours get :index, :sort => 'spent_hours:desc' assert_response :success hours = issues_in_list.map(&:spent_hours) assert_equal hours.sort.reverse, hours end - + def test_index_sort_by_total_spent_hours get :index, :sort => 'total_spent_hours:desc' assert_response :success hours = issues_in_list.map(&:total_spent_hours) assert_equal hours.sort.reverse, hours end - + def test_index_sort_by_total_estimated_hours get :index, :sort => 'total_estimated_hours:desc' assert_response :success @@ -1093,7 +1093,7 @@ class IssuesControllerTest < Redmine::ControllerTest def test_index_should_not_include_new_issue_tab_for_project_without_trackers with_settings :new_item_menu_tab => '1' do Project.find(1).trackers.clear - + @request.session[:user_id] = 2 get :index, :project_id => 1 assert_select '#main-menu a.new-issue', 0 @@ -1105,7 +1105,7 @@ class IssuesControllerTest < Redmine::ControllerTest role = Role.find(1) role.remove_permission! :add_issues role.add_permission! :copy_issues - + @request.session[:user_id] = 2 get :index, :project_id => 1 assert_select '#main-menu a.new-issue', 0 @@ -1381,7 +1381,7 @@ class IssuesControllerTest < Redmine::ControllerTest def test_show_should_display_prev_next_links_with_query_and_sort_on_association @request.session[:issue_query] = {:filters => {'status_id' => {:values => [''], :operator => 'o'}}, :project_id => nil} - + %w(project tracker status priority author assigned_to category fixed_version).each do |assoc_sort| @request.session['issues_index_sort'] = assoc_sort @@ -1575,6 +1575,25 @@ class IssuesControllerTest < Redmine::ControllerTest assert_select ".cf_1 .value", :text => 'MySQL, Oracle' end + def test_show_with_full_width_layout_custom_field_should_show_field_under_description + field = IssueCustomField.create!(:name => 'Long text', :field_format => 'text', :full_width_layout => '1', + :tracker_ids => [1], :is_for_all => true) + issue = Issue.find(1) + issue.custom_field_values = {field.id => 'This is a long text'} + issue.save! + + get :show, :id => 1 + assert_response :success + + # long text custom field should not be render in the attributes div + assert_select "div.attributes div.attribute.cf_#{field.id} p strong", 0, :text => 'Long text' + assert_select "div.attributes div.attribute.cf_#{field.id} div.value", 0, :text => 'This is a long text' + + # long text custom field should be render under description field + assert_select "div.description ~ div.attribute.cf_#{field.id} p strong", :text => 'Long text' + assert_select "div.description ~ div.attribute.cf_#{field.id} div.value", :text => 'This is a long text' + end + def test_show_with_multi_user_custom_field field = IssueCustomField.create!(:name => 'Multi user', :field_format => 'user', :multiple => true, :tracker_ids => [1], :is_for_all => true) @@ -1628,7 +1647,7 @@ class IssuesControllerTest < Redmine::ControllerTest end def test_show_export_to_pdf - issue = Issue.find(3) + issue = Issue.find(3) assert issue.relations.select{|r| r.other_issue(issue).visible?}.present? get :show, :id => 3, :format => 'pdf' assert_response :success @@ -2076,7 +2095,7 @@ class IssuesControllerTest < Redmine::ControllerTest get :new, :project_id => 'invalid' assert_response 404 end - + def test_new_with_parent_id_should_only_propose_valid_trackers @request.session[:user_id] = 2 t = Tracker.find(3) @@ -2625,7 +2644,7 @@ class IssuesControllerTest < Redmine::ControllerTest :custom_field_values => {'2' => 'Value for field 2'}} end assert_redirected_to :controller => 'issues', :action => 'show', :id => Issue.last.id - + assert_equal 1, ActionMailer::Base.deliveries.size end end @@ -2899,7 +2918,7 @@ class IssuesControllerTest < Redmine::ControllerTest assert_select 'option[value="1"][selected=selected]', :text => 'eCookbook' assert_select 'option[value="2"]:not([selected])', :text => 'OnlineStore' end - assert_select 'input[name=?][value=?]', 'issue[subject]', orig.subject + assert_select 'input[name=?][value=?]', 'issue[subject]', orig.subject assert_select 'input[name=copy_from][value="1"]' end end @@ -3194,7 +3213,7 @@ class IssuesControllerTest < Redmine::ControllerTest def test_get_edit_should_display_the_time_entry_form_with_log_time_permission @request.session[:user_id] = 2 Role.find_by_name('Manager').update_attribute :permissions, [:view_issues, :edit_issues, :log_time] - + get :edit, :id => 1 assert_select 'input[name=?]', 'time_entry[hours]' end @@ -3202,7 +3221,7 @@ class IssuesControllerTest < Redmine::ControllerTest def test_get_edit_should_not_display_the_time_entry_form_without_log_time_permission @request.session[:user_id] = 2 Role.find_by_name('Manager').remove_permission! :log_time - + get :edit, :id => 1 assert_select 'input[name=?]', 'time_entry[hours]', 0 end @@ -3847,7 +3866,7 @@ class IssuesControllerTest < Redmine::ControllerTest assert_response :redirect assert_redirected_to :controller => 'issues', :action => 'show', :id => issue.id end - + def test_put_update_should_redirect_with_previous_and_next_issue_ids_params @request.session[:user_id] = 2 @@ -3901,17 +3920,17 @@ class IssuesControllerTest < Redmine::ControllerTest assert_select 'select[name=?]', 'issue[project_id]' assert_select 'input[name=?]', 'issue[parent_issue_id]' - + # Project specific custom field, date type field = CustomField.find(9) assert !field.is_for_all? assert_equal 'date', field.field_format assert_select 'input[name=?]', 'issue[custom_field_values][9]' - + # System wide custom field assert CustomField.find(1).is_for_all? assert_select 'select[name=?]', 'issue[custom_field_values][1]' - + # Be sure we don't display inactive IssuePriorities assert ! IssuePriority.find(15).active? assert_select 'select[name=?]', 'issue[priority_id]' do @@ -4115,7 +4134,7 @@ class IssuesControllerTest < Redmine::ControllerTest :issue => {:priority_id => '', :assigned_to_id => group.id, :custom_field_values => {'2' => ''}} - + assert_response 302 assert_equal [group, group], Issue.where(:id => [1, 2]).collect {|i| i.assigned_to} end @@ -4421,7 +4440,7 @@ class IssuesControllerTest < Redmine::ControllerTest assert_select 'option[value="2"]' end end - + def test_bulk_copy_to_another_project @request.session[:user_id] = 2 assert_difference 'Issue.count', 2 do @@ -4474,7 +4493,7 @@ class IssuesControllerTest < Redmine::ControllerTest :assigned_to_id => 2) ] assert_difference 'Issue.count', issues.size do - post :bulk_update, :ids => issues.map(&:id), :copy => '1', + post :bulk_update, :ids => issues.map(&:id), :copy => '1', :issue => { :project_id => '', :tracker_id => '', :assigned_to_id => '', :status_id => '', :start_date => '', :due_date => '' @@ -4506,7 +4525,7 @@ class IssuesControllerTest < Redmine::ControllerTest @request.session[:user_id] = 2 assert_difference 'Issue.count', 2 do assert_no_difference 'Project.find(1).issues.count' do - post :bulk_update, :ids => [1, 2], :copy => '1', + post :bulk_update, :ids => [1, 2], :copy => '1', :issue => { :project_id => '2', :tracker_id => '', :assigned_to_id => '2', :status_id => '1', :start_date => '2009-12-01', :due_date => '2009-12-31' From 8e4cb42f8e060ebd9d6f576eeea8c01260ddcee8 Mon Sep 17 00:00:00 2001 From: Jean-Philippe Lang Date: Wed, 25 Jan 2017 14:58:50 +0000 Subject: [PATCH 0597/1117] Raise the height of text custom fields. git-svn-id: http://svn.redmine.org/redmine/trunk@16252 e93f8b46-1217-0410-a6f0-8f06a7374b81 --- lib/redmine/field_format.rb | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/lib/redmine/field_format.rb b/lib/redmine/field_format.rb index ea9d7169c..54a42ce98 100644 --- a/lib/redmine/field_format.rb +++ b/lib/redmine/field_format.rb @@ -386,11 +386,11 @@ module Redmine end def edit_tag(view, tag_id, tag_name, custom_value, options={}) - view.text_area_tag(tag_name, custom_value.value, options.merge(:id => tag_id, :rows => 3)) + view.text_area_tag(tag_name, custom_value.value, options.merge(:id => tag_id, :rows => 8)) end def bulk_edit_tag(view, tag_id, tag_name, custom_field, objects, value, options={}) - view.text_area_tag(tag_name, value, options.merge(:id => tag_id, :rows => 3)) + + view.text_area_tag(tag_name, value, options.merge(:id => tag_id, :rows => 8)) + '
          '.html_safe + bulk_clear_tag(view, tag_id, tag_name, custom_field, value) end From 9cf1c5cfaeae0424d7477dcb78c6b0521fbb8036 Mon Sep 17 00:00:00 2001 From: Jean-Philippe Lang Date: Wed, 25 Jan 2017 15:11:21 +0000 Subject: [PATCH 0598/1117] Adjust rendering of custom fields in PDF (#21705). git-svn-id: http://svn.redmine.org/redmine/trunk@16253 e93f8b46-1217-0410-a6f0-8f06a7374b81 --- lib/redmine/export/pdf/issues_pdf_helper.rb | 19 +++++++++++++++---- 1 file changed, 15 insertions(+), 4 deletions(-) diff --git a/lib/redmine/export/pdf/issues_pdf_helper.rb b/lib/redmine/export/pdf/issues_pdf_helper.rb index 75f63d272..45434c345 100644 --- a/lib/redmine/export/pdf/issues_pdf_helper.rb +++ b/lib/redmine/export/pdf/issues_pdf_helper.rb @@ -67,9 +67,10 @@ module Redmine while right.size < rows right << nil end - - half = (issue.visible_custom_field_values.size / 2.0).ceil - issue.visible_custom_field_values.each_with_index do |custom_value, i| + + custom_field_values = issue.visible_custom_field_values.reject {|value| value.custom_field.full_width_layout?} + half = (custom_field_values.size / 2.0).ceil + custom_field_values.each_with_index do |custom_value, i| (i < half ? left : right) << [custom_value.custom_field.name, show_value(custom_value, false)] end @@ -128,7 +129,17 @@ module Redmine :inline_attachments => false ) pdf.RDMwriteFormattedCell(35+155, 5, '', '', text, issue.attachments, "LRB") - + + custom_field_values = issue.visible_custom_field_values.select {|value| value.custom_field.full_width_layout?} + custom_field_values.each do |value| + pdf.SetFontStyle('B',9) + pdf.RDMCell(35+155, 5, value.custom_field.name, "LRT", 1) + pdf.SetFontStyle('',9) + + text = show_value(value, false) + pdf.RDMwriteFormattedCell(35+155, 5, '', '', text, issue.attachments, "LRB") + end + unless issue.leaf? truncate_length = (!is_cjk? ? 90 : 65) pdf.SetFontStyle('B',9) From e18381f672a291d79efabb0db80c89636960cae3 Mon Sep 17 00:00:00 2001 From: Toshi MARUYAMA Date: Wed, 25 Jan 2017 15:36:35 +0000 Subject: [PATCH 0599/1117] Traditional Chinese translation updated by ChunChang Lo (#24892) git-svn-id: http://svn.redmine.org/redmine/trunk@16254 e93f8b46-1217-0410-a6f0-8f06a7374b81 --- config/locales/zh-TW.yml | 11 +++++------ 1 file changed, 5 insertions(+), 6 deletions(-) diff --git a/config/locales/zh-TW.yml b/config/locales/zh-TW.yml index 80d17973a..c1051ebe9 100644 --- a/config/locales/zh-TW.yml +++ b/config/locales/zh-TW.yml @@ -303,6 +303,7 @@ error_no_projects_with_tracker_allowed_for_new_issue: "此追蹤標籤沒有您可用來建立新議題的專案" error_move_of_child_not_possible: "子任務 %{child} 無法被搬移至新的專案: %{errors}" error_cannot_reassign_time_entries_to_an_issue_about_to_be_deleted: "無法將耗用工時重新分配給即將被刪除的問題" + warning_fields_cleared_on_bulk_edit: "選取物件的變更將導致一個或多個欄位之內容值被自動刪除" mail_subject_lost_password: 您的 Redmine 網站密碼 mail_body_lost_password: '欲變更您的 Redmine 網站密碼, 請點選以下鏈結:' @@ -453,6 +454,8 @@ field_default_version: 預設版本 field_remote_ip: IP 位址 field_textarea_font: 文字區域使用的字型 + field_updated_by: 更新者 + field_last_updated_by: 上次更新者 setting_app_title: 標題 setting_app_subtitle: 副標題 @@ -949,6 +952,8 @@ label_user_mail_option_selected: "只提醒我所選擇專案中的事件..." label_user_mail_option_none: "取消提醒" label_user_mail_option_only_my_events: "只提醒我觀察中或參與中的事物" + label_user_mail_option_only_assigned: "只提醒我觀察中或分派給我的事物" + label_user_mail_option_only_owner: "只提醒我觀察中或擁有者為我的事物" label_user_mail_no_self_notified: "不提醒我自己所做的變更" label_registration_activation_by_email: 透過電子郵件啟用帳戶 label_registration_manual_activation: 手動啟用帳戶 @@ -1290,9 +1295,3 @@ description_date_from: 輸入起始日期 description_date_to: 輸入結束日期 text_repository_identifier_info: '僅允許使用小寫英文字母 (a-z), 阿拉伯數字, 虛線與底線。
          一旦儲存之後, 代碼便無法再次被更改。' - label_user_mail_option_only_assigned: Only for things I watch or I am assigned to - label_user_mail_option_only_owner: Only for things I watch or I am the owner of - warning_fields_cleared_on_bulk_edit: Changes will result in the automatic deletion - of values from one or more fields on the selected objects - field_updated_by: Updated by - field_last_updated_by: Last updated by From 8de65f6b35d31fdaa2b267a1b41577bcbb55d195 Mon Sep 17 00:00:00 2001 From: Toshi MARUYAMA Date: Wed, 25 Jan 2017 15:37:15 +0000 Subject: [PATCH 0600/1117] generate i18n keys (#21705) git-svn-id: http://svn.redmine.org/redmine/trunk@16255 e93f8b46-1217-0410-a6f0-8f06a7374b81 --- config/locales/ar.yml | 1 + config/locales/az.yml | 1 + config/locales/bg.yml | 1 + config/locales/bs.yml | 1 + config/locales/ca.yml | 1 + config/locales/cs.yml | 1 + config/locales/da.yml | 1 + config/locales/de.yml | 1 + config/locales/el.yml | 1 + config/locales/en-GB.yml | 1 + config/locales/es-PA.yml | 1 + config/locales/es.yml | 1 + config/locales/et.yml | 1 + config/locales/eu.yml | 1 + config/locales/fa.yml | 1 + config/locales/fi.yml | 1 + config/locales/gl.yml | 1 + config/locales/he.yml | 1 + config/locales/hr.yml | 1 + config/locales/hu.yml | 1 + config/locales/id.yml | 1 + config/locales/it.yml | 1 + config/locales/ja.yml | 1 + config/locales/ko.yml | 1 + config/locales/lt.yml | 1 + config/locales/lv.yml | 1 + config/locales/mk.yml | 1 + config/locales/mn.yml | 1 + config/locales/nl.yml | 1 + config/locales/no.yml | 1 + config/locales/pl.yml | 1 + config/locales/pt-BR.yml | 1 + config/locales/pt.yml | 1 + config/locales/ro.yml | 1 + config/locales/ru.yml | 1 + config/locales/sk.yml | 1 + config/locales/sl.yml | 1 + config/locales/sq.yml | 1 + config/locales/sr-YU.yml | 1 + config/locales/sr.yml | 1 + config/locales/sv.yml | 1 + config/locales/th.yml | 1 + config/locales/tr.yml | 1 + config/locales/uk.yml | 1 + config/locales/vi.yml | 1 + config/locales/zh-TW.yml | 1 + config/locales/zh.yml | 1 + 47 files changed, 47 insertions(+) diff --git a/config/locales/ar.yml b/config/locales/ar.yml index 6715eb192..1691e0156 100644 --- a/config/locales/ar.yml +++ b/config/locales/ar.yml @@ -1228,3 +1228,4 @@ ar: of values from one or more fields on the selected objects field_updated_by: Updated by field_last_updated_by: Last updated by + field_full_width_layout: Full width layout diff --git a/config/locales/az.yml b/config/locales/az.yml index cd0a4fd2b..89cad5e70 100644 --- a/config/locales/az.yml +++ b/config/locales/az.yml @@ -1323,3 +1323,4 @@ az: of values from one or more fields on the selected objects field_updated_by: Updated by field_last_updated_by: Last updated by + field_full_width_layout: Full width layout diff --git a/config/locales/bg.yml b/config/locales/bg.yml index 62092a366..a5dac5cd4 100644 --- a/config/locales/bg.yml +++ b/config/locales/bg.yml @@ -1214,3 +1214,4 @@ bg: of values from one or more fields on the selected objects field_updated_by: Updated by field_last_updated_by: Last updated by + field_full_width_layout: Full width layout diff --git a/config/locales/bs.yml b/config/locales/bs.yml index c45d43a65..df2cee4b7 100644 --- a/config/locales/bs.yml +++ b/config/locales/bs.yml @@ -1241,3 +1241,4 @@ bs: of values from one or more fields on the selected objects field_updated_by: Updated by field_last_updated_by: Last updated by + field_full_width_layout: Full width layout diff --git a/config/locales/ca.yml b/config/locales/ca.yml index 89c7ecf20..3fa40dd8c 100644 --- a/config/locales/ca.yml +++ b/config/locales/ca.yml @@ -1218,3 +1218,4 @@ ca: of values from one or more fields on the selected objects field_updated_by: Updated by field_last_updated_by: Last updated by + field_full_width_layout: Full width layout diff --git a/config/locales/cs.yml b/config/locales/cs.yml index e495f47c4..46815428d 100644 --- a/config/locales/cs.yml +++ b/config/locales/cs.yml @@ -1227,3 +1227,4 @@ cs: of values from one or more fields on the selected objects field_updated_by: Updated by field_last_updated_by: Last updated by + field_full_width_layout: Full width layout diff --git a/config/locales/da.yml b/config/locales/da.yml index 2d8274686..5020adc34 100644 --- a/config/locales/da.yml +++ b/config/locales/da.yml @@ -1245,3 +1245,4 @@ da: of values from one or more fields on the selected objects field_updated_by: Updated by field_last_updated_by: Last updated by + field_full_width_layout: Full width layout diff --git a/config/locales/de.yml b/config/locales/de.yml index 22730ce20..283e9406f 100644 --- a/config/locales/de.yml +++ b/config/locales/de.yml @@ -1230,3 +1230,4 @@ de: of values from one or more fields on the selected objects field_updated_by: Updated by field_last_updated_by: Last updated by + field_full_width_layout: Full width layout diff --git a/config/locales/el.yml b/config/locales/el.yml index f8e5ddfc9..689ba6cee 100644 --- a/config/locales/el.yml +++ b/config/locales/el.yml @@ -1228,3 +1228,4 @@ el: of values from one or more fields on the selected objects field_updated_by: Updated by field_last_updated_by: Last updated by + field_full_width_layout: Full width layout diff --git a/config/locales/en-GB.yml b/config/locales/en-GB.yml index e41c53289..4bd828225 100644 --- a/config/locales/en-GB.yml +++ b/config/locales/en-GB.yml @@ -1230,3 +1230,4 @@ en-GB: of values from one or more fields on the selected objects field_updated_by: Updated by field_last_updated_by: Last updated by + field_full_width_layout: Full width layout diff --git a/config/locales/es-PA.yml b/config/locales/es-PA.yml index 6c92f53e0..7fcdf01d8 100644 --- a/config/locales/es-PA.yml +++ b/config/locales/es-PA.yml @@ -1258,3 +1258,4 @@ es-PA: of values from one or more fields on the selected objects field_updated_by: Updated by field_last_updated_by: Last updated by + field_full_width_layout: Full width layout diff --git a/config/locales/es.yml b/config/locales/es.yml index 02e7f9925..fb80781e1 100644 --- a/config/locales/es.yml +++ b/config/locales/es.yml @@ -1256,3 +1256,4 @@ es: of values from one or more fields on the selected objects field_updated_by: Updated by field_last_updated_by: Last updated by + field_full_width_layout: Full width layout diff --git a/config/locales/et.yml b/config/locales/et.yml index 4465d9e73..ea78d1eaf 100644 --- a/config/locales/et.yml +++ b/config/locales/et.yml @@ -1233,3 +1233,4 @@ et: of values from one or more fields on the selected objects field_updated_by: Updated by field_last_updated_by: Last updated by + field_full_width_layout: Full width layout diff --git a/config/locales/eu.yml b/config/locales/eu.yml index cb990bf74..3bc6a36c4 100644 --- a/config/locales/eu.yml +++ b/config/locales/eu.yml @@ -1229,3 +1229,4 @@ eu: of values from one or more fields on the selected objects field_updated_by: Updated by field_last_updated_by: Last updated by + field_full_width_layout: Full width layout diff --git a/config/locales/fa.yml b/config/locales/fa.yml index 4b922ddf2..baec1f9c8 100644 --- a/config/locales/fa.yml +++ b/config/locales/fa.yml @@ -1229,3 +1229,4 @@ fa: of values from one or more fields on the selected objects field_updated_by: Updated by field_last_updated_by: Last updated by + field_full_width_layout: Full width layout diff --git a/config/locales/fi.yml b/config/locales/fi.yml index 412e32d01..33516b84e 100644 --- a/config/locales/fi.yml +++ b/config/locales/fi.yml @@ -1249,3 +1249,4 @@ fi: of values from one or more fields on the selected objects field_updated_by: Updated by field_last_updated_by: Last updated by + field_full_width_layout: Full width layout diff --git a/config/locales/gl.yml b/config/locales/gl.yml index 4ad47a76c..a98e07c6f 100644 --- a/config/locales/gl.yml +++ b/config/locales/gl.yml @@ -1236,3 +1236,4 @@ gl: of values from one or more fields on the selected objects field_updated_by: Updated by field_last_updated_by: Last updated by + field_full_width_layout: Full width layout diff --git a/config/locales/he.yml b/config/locales/he.yml index ae0f90fa6..28d6550fb 100644 --- a/config/locales/he.yml +++ b/config/locales/he.yml @@ -1233,3 +1233,4 @@ he: of values from one or more fields on the selected objects field_updated_by: Updated by field_last_updated_by: Last updated by + field_full_width_layout: Full width layout diff --git a/config/locales/hr.yml b/config/locales/hr.yml index 001a02dc2..65e97b06e 100644 --- a/config/locales/hr.yml +++ b/config/locales/hr.yml @@ -1227,3 +1227,4 @@ hr: of values from one or more fields on the selected objects field_updated_by: Updated by field_last_updated_by: Last updated by + field_full_width_layout: Full width layout diff --git a/config/locales/hu.yml b/config/locales/hu.yml index 2bfdbd458..a55042486 100644 --- a/config/locales/hu.yml +++ b/config/locales/hu.yml @@ -1247,3 +1247,4 @@ of values from one or more fields on the selected objects field_updated_by: Updated by field_last_updated_by: Last updated by + field_full_width_layout: Full width layout diff --git a/config/locales/id.yml b/config/locales/id.yml index 6a4b02971..f8638cddb 100644 --- a/config/locales/id.yml +++ b/config/locales/id.yml @@ -1232,3 +1232,4 @@ id: of values from one or more fields on the selected objects field_updated_by: Updated by field_last_updated_by: Last updated by + field_full_width_layout: Full width layout diff --git a/config/locales/it.yml b/config/locales/it.yml index 79a3ab8ba..8917c66bb 100644 --- a/config/locales/it.yml +++ b/config/locales/it.yml @@ -1223,3 +1223,4 @@ it: of values from one or more fields on the selected objects field_updated_by: Updated by field_last_updated_by: Last updated by + field_full_width_layout: Full width layout diff --git a/config/locales/ja.yml b/config/locales/ja.yml index d01e100b3..af7bceba3 100644 --- a/config/locales/ja.yml +++ b/config/locales/ja.yml @@ -1236,3 +1236,4 @@ ja: of values from one or more fields on the selected objects field_updated_by: Updated by field_last_updated_by: Last updated by + field_full_width_layout: Full width layout diff --git a/config/locales/ko.yml b/config/locales/ko.yml index c87d2047f..da545895a 100644 --- a/config/locales/ko.yml +++ b/config/locales/ko.yml @@ -1267,3 +1267,4 @@ ko: of values from one or more fields on the selected objects field_updated_by: Updated by field_last_updated_by: Last updated by + field_full_width_layout: Full width layout diff --git a/config/locales/lt.yml b/config/locales/lt.yml index 5bac12b23..eab651081 100644 --- a/config/locales/lt.yml +++ b/config/locales/lt.yml @@ -1217,3 +1217,4 @@ lt: of values from one or more fields on the selected objects field_updated_by: Updated by field_last_updated_by: Last updated by + field_full_width_layout: Full width layout diff --git a/config/locales/lv.yml b/config/locales/lv.yml index 200231c3b..ed21dbadf 100644 --- a/config/locales/lv.yml +++ b/config/locales/lv.yml @@ -1222,3 +1222,4 @@ lv: of values from one or more fields on the selected objects field_updated_by: Updated by field_last_updated_by: Last updated by + field_full_width_layout: Full width layout diff --git a/config/locales/mk.yml b/config/locales/mk.yml index 7899a9577..d58cd12e3 100644 --- a/config/locales/mk.yml +++ b/config/locales/mk.yml @@ -1228,3 +1228,4 @@ mk: of values from one or more fields on the selected objects field_updated_by: Updated by field_last_updated_by: Last updated by + field_full_width_layout: Full width layout diff --git a/config/locales/mn.yml b/config/locales/mn.yml index b9f7c0bfd..5ea00fa53 100644 --- a/config/locales/mn.yml +++ b/config/locales/mn.yml @@ -1229,3 +1229,4 @@ mn: of values from one or more fields on the selected objects field_updated_by: Updated by field_last_updated_by: Last updated by + field_full_width_layout: Full width layout diff --git a/config/locales/nl.yml b/config/locales/nl.yml index 878807b82..7804fca9b 100644 --- a/config/locales/nl.yml +++ b/config/locales/nl.yml @@ -1203,3 +1203,4 @@ nl: of values from one or more fields on the selected objects field_updated_by: Updated by field_last_updated_by: Last updated by + field_full_width_layout: Full width layout diff --git a/config/locales/no.yml b/config/locales/no.yml index 925a63d33..2d66b473b 100644 --- a/config/locales/no.yml +++ b/config/locales/no.yml @@ -1218,3 +1218,4 @@ of values from one or more fields on the selected objects field_updated_by: Updated by field_last_updated_by: Last updated by + field_full_width_layout: Full width layout diff --git a/config/locales/pl.yml b/config/locales/pl.yml index 5bc4a0512..c1e905ecc 100644 --- a/config/locales/pl.yml +++ b/config/locales/pl.yml @@ -1243,3 +1243,4 @@ pl: of values from one or more fields on the selected objects field_updated_by: Updated by field_last_updated_by: Last updated by + field_full_width_layout: Full width layout diff --git a/config/locales/pt-BR.yml b/config/locales/pt-BR.yml index 1ffc43089..3a4135691 100644 --- a/config/locales/pt-BR.yml +++ b/config/locales/pt-BR.yml @@ -1246,3 +1246,4 @@ pt-BR: of values from one or more fields on the selected objects field_updated_by: Updated by field_last_updated_by: Last updated by + field_full_width_layout: Full width layout diff --git a/config/locales/pt.yml b/config/locales/pt.yml index 49bd66ec1..722fa537f 100644 --- a/config/locales/pt.yml +++ b/config/locales/pt.yml @@ -1231,3 +1231,4 @@ pt: of values from one or more fields on the selected objects field_updated_by: Updated by field_last_updated_by: Last updated by + field_full_width_layout: Full width layout diff --git a/config/locales/ro.yml b/config/locales/ro.yml index c150c3a29..6da0f641e 100644 --- a/config/locales/ro.yml +++ b/config/locales/ro.yml @@ -1223,3 +1223,4 @@ ro: of values from one or more fields on the selected objects field_updated_by: Updated by field_last_updated_by: Last updated by + field_full_width_layout: Full width layout diff --git a/config/locales/ru.yml b/config/locales/ru.yml index f44ad9975..a07174a33 100644 --- a/config/locales/ru.yml +++ b/config/locales/ru.yml @@ -1330,3 +1330,4 @@ ru: of values from one or more fields on the selected objects field_updated_by: Updated by field_last_updated_by: Last updated by + field_full_width_layout: Full width layout diff --git a/config/locales/sk.yml b/config/locales/sk.yml index f2d42f1d6..d7e5f5239 100644 --- a/config/locales/sk.yml +++ b/config/locales/sk.yml @@ -1218,3 +1218,4 @@ sk: of values from one or more fields on the selected objects field_updated_by: Updated by field_last_updated_by: Last updated by + field_full_width_layout: Full width layout diff --git a/config/locales/sl.yml b/config/locales/sl.yml index ce39e3d85..3d1fec6d5 100644 --- a/config/locales/sl.yml +++ b/config/locales/sl.yml @@ -1228,3 +1228,4 @@ sl: of values from one or more fields on the selected objects field_updated_by: Updated by field_last_updated_by: Last updated by + field_full_width_layout: Full width layout diff --git a/config/locales/sq.yml b/config/locales/sq.yml index 95814ee99..03ccfcd6e 100644 --- a/config/locales/sq.yml +++ b/config/locales/sq.yml @@ -1224,3 +1224,4 @@ sq: of values from one or more fields on the selected objects field_updated_by: Updated by field_last_updated_by: Last updated by + field_full_width_layout: Full width layout diff --git a/config/locales/sr-YU.yml b/config/locales/sr-YU.yml index b52d76c38..3454c005d 100644 --- a/config/locales/sr-YU.yml +++ b/config/locales/sr-YU.yml @@ -1230,3 +1230,4 @@ sr-YU: of values from one or more fields on the selected objects field_updated_by: Updated by field_last_updated_by: Last updated by + field_full_width_layout: Full width layout diff --git a/config/locales/sr.yml b/config/locales/sr.yml index 2887058cd..c319518ad 100644 --- a/config/locales/sr.yml +++ b/config/locales/sr.yml @@ -1229,3 +1229,4 @@ sr: of values from one or more fields on the selected objects field_updated_by: Updated by field_last_updated_by: Last updated by + field_full_width_layout: Full width layout diff --git a/config/locales/sv.yml b/config/locales/sv.yml index 995e45061..cee92ef69 100644 --- a/config/locales/sv.yml +++ b/config/locales/sv.yml @@ -1261,3 +1261,4 @@ sv: of values from one or more fields on the selected objects field_updated_by: Updated by field_last_updated_by: Last updated by + field_full_width_layout: Full width layout diff --git a/config/locales/th.yml b/config/locales/th.yml index 4e4406f85..9866c2017 100644 --- a/config/locales/th.yml +++ b/config/locales/th.yml @@ -1225,3 +1225,4 @@ th: of values from one or more fields on the selected objects field_updated_by: Updated by field_last_updated_by: Last updated by + field_full_width_layout: Full width layout diff --git a/config/locales/tr.yml b/config/locales/tr.yml index 8af19b063..2d3abfd36 100644 --- a/config/locales/tr.yml +++ b/config/locales/tr.yml @@ -1236,3 +1236,4 @@ tr: of values from one or more fields on the selected objects field_updated_by: Updated by field_last_updated_by: Last updated by + field_full_width_layout: Full width layout diff --git a/config/locales/uk.yml b/config/locales/uk.yml index 87d393784..f75e40a04 100644 --- a/config/locales/uk.yml +++ b/config/locales/uk.yml @@ -1223,3 +1223,4 @@ uk: of values from one or more fields on the selected objects field_updated_by: Updated by field_last_updated_by: Last updated by + field_full_width_layout: Full width layout diff --git a/config/locales/vi.yml b/config/locales/vi.yml index 29b8a72c5..4efe3e9ae 100644 --- a/config/locales/vi.yml +++ b/config/locales/vi.yml @@ -1281,3 +1281,4 @@ vi: of values from one or more fields on the selected objects field_updated_by: Updated by field_last_updated_by: Last updated by + field_full_width_layout: Full width layout diff --git a/config/locales/zh-TW.yml b/config/locales/zh-TW.yml index c1051ebe9..d39c6ed85 100644 --- a/config/locales/zh-TW.yml +++ b/config/locales/zh-TW.yml @@ -1295,3 +1295,4 @@ description_date_from: 輸入起始日期 description_date_to: 輸入結束日期 text_repository_identifier_info: '僅允許使用小寫英文字母 (a-z), 阿拉伯數字, 虛線與底線。
          一旦儲存之後, 代碼便無法再次被更改。' + field_full_width_layout: Full width layout diff --git a/config/locales/zh.yml b/config/locales/zh.yml index d2d897d23..eea4ad6ed 100644 --- a/config/locales/zh.yml +++ b/config/locales/zh.yml @@ -1221,3 +1221,4 @@ zh: of values from one or more fields on the selected objects field_updated_by: Updated by field_last_updated_by: Last updated by + field_full_width_layout: Full width layout From 0ac50cc8cc9c528f94ca40020c47dd4d108905d3 Mon Sep 17 00:00:00 2001 From: Jean-Philippe Lang Date: Wed, 25 Jan 2017 16:04:51 +0000 Subject: [PATCH 0601/1117] Use #html_safe first. git-svn-id: http://svn.redmine.org/redmine/trunk@16256 e93f8b46-1217-0410-a6f0-8f06a7374b81 --- app/helpers/issues_helper.rb | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/app/helpers/issues_helper.rb b/app/helpers/issues_helper.rb index 29f469121..a9e1ab1c0 100644 --- a/app/helpers/issues_helper.rb +++ b/app/helpers/issues_helper.rb @@ -256,7 +256,7 @@ module IssuesHelper values = issue.visible_custom_field_values.select {|value| value.custom_field.full_width_layout?} return if values.empty? - s = '' + s = ''.html_safe values.each_with_index do |value, i| if value.custom_field.text_formatting == 'full' attr_value = content_tag('div', show_value(value), class: 'wiki') @@ -269,7 +269,7 @@ module IssuesHelper content_tag('div', attr_value, class: 'value') s << content_tag('div', content, class: "cf_#{value.custom_field.id} attribute") end - s.html_safe + s end # Returns the path for updating the issue form From 37301d75b3feb8604345a5d0492055f6daa119da Mon Sep 17 00:00:00 2001 From: Jean-Philippe Lang Date: Wed, 25 Jan 2017 16:06:39 +0000 Subject: [PATCH 0602/1117] Omit blank fields as we do for the description (#21705). git-svn-id: http://svn.redmine.org/redmine/trunk@16257 e93f8b46-1217-0410-a6f0-8f06a7374b81 --- app/helpers/issues_helper.rb | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/app/helpers/issues_helper.rb b/app/helpers/issues_helper.rb index a9e1ab1c0..9bc3b3eaa 100644 --- a/app/helpers/issues_helper.rb +++ b/app/helpers/issues_helper.rb @@ -258,11 +258,13 @@ module IssuesHelper s = ''.html_safe values.each_with_index do |value, i| + attr_value = show_value(value) + next if attr_value.blank? + if value.custom_field.text_formatting == 'full' - attr_value = content_tag('div', show_value(value), class: 'wiki') - else - attr_value = show_value(value) + attr_value = content_tag('div', attr_value, class: 'wiki') end + content = content_tag('hr') + content_tag('p', content_tag('strong', custom_field_name_tag(value.custom_field) )) + From a869504a44d49cc444c11e64932c12761726fe14 Mon Sep 17 00:00:00 2001 From: Jean-Philippe Lang Date: Wed, 25 Jan 2017 16:08:26 +0000 Subject: [PATCH 0603/1117] Omit blank fields in PDF too (#21705). git-svn-id: http://svn.redmine.org/redmine/trunk@16258 e93f8b46-1217-0410-a6f0-8f06a7374b81 --- lib/redmine/export/pdf/issues_pdf_helper.rb | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/lib/redmine/export/pdf/issues_pdf_helper.rb b/lib/redmine/export/pdf/issues_pdf_helper.rb index 45434c345..eba06425f 100644 --- a/lib/redmine/export/pdf/issues_pdf_helper.rb +++ b/lib/redmine/export/pdf/issues_pdf_helper.rb @@ -132,11 +132,12 @@ module Redmine custom_field_values = issue.visible_custom_field_values.select {|value| value.custom_field.full_width_layout?} custom_field_values.each do |value| + text = show_value(value, false) + next if text.blank? + pdf.SetFontStyle('B',9) pdf.RDMCell(35+155, 5, value.custom_field.name, "LRT", 1) pdf.SetFontStyle('',9) - - text = show_value(value, false) pdf.RDMwriteFormattedCell(35+155, 5, '', '', text, issue.attachments, "LRB") end From 91a3611403a53597bc3c0ab7efada973d50c3311 Mon Sep 17 00:00:00 2001 From: Jean-Philippe Lang Date: Wed, 25 Jan 2017 16:11:29 +0000 Subject: [PATCH 0604/1117] Remove background on subtasks and relations introduced in r16249 (#15361). git-svn-id: http://svn.redmine.org/redmine/trunk@16259 e93f8b46-1217-0410-a6f0-8f06a7374b81 --- app/helpers/issues_helper.rb | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/app/helpers/issues_helper.rb b/app/helpers/issues_helper.rb index 9bc3b3eaa..bf692285b 100644 --- a/app/helpers/issues_helper.rb +++ b/app/helpers/issues_helper.rb @@ -90,7 +90,7 @@ module IssuesHelper end def render_descendants_tree(issue) - s = '
          diff --git a/app/views/timelog/_report_criteria.html.erb b/app/views/timelog/_report_criteria.html.erb index f4181172f..6af122ec4 100644 --- a/app/views/timelog/_report_criteria.html.erb +++ b/app/views/timelog/_report_criteria.html.erb @@ -1,7 +1,7 @@ <% @report.hours.collect {|h| h[criterias[level]].to_s}.uniq.each do |value| %> <% hours_for_value = select_hours(hours, criterias[level], value) -%> <% next if hours_for_value.empty? -%> -
          <%= format_criteria_value(@report.available_criteria[criterias[level]], value) %>
          <%= link_to_function('', "toggleCheckboxesBySelector('input.core-field-#{field}')", @@ -49,7 +49,7 @@
          <%= link_to_function('', "toggleCheckboxesBySelector('input.custom-field-#{field.id}')", :title => "#{l(:button_check_all)}/#{l(:button_uncheck_all)}", diff --git a/app/views/trackers/index.html.erb b/app/views/trackers/index.html.erb index 7ee6387fd..d5d463b09 100644 --- a/app/views/trackers/index.html.erb +++ b/app/views/trackers/index.html.erb @@ -13,7 +13,7 @@
          <%= link_to tracker.name, edit_tracker_path(tracker) %> <% unless tracker.workflow_rules.exists? %> diff --git a/app/views/users/index.html.erb b/app/views/users/index.html.erb index 60e42c603..3fc82b640 100644 --- a/app/views/users/index.html.erb +++ b/app/views/users/index.html.erb @@ -37,7 +37,7 @@
          <%= avatar(user, :size => "14") %><%= link_to user.login, edit_user_path(user) %> <%= user.firstname %> <%= user.lastname %>
          <%= link_to ver.version, :action => 'show', :id => @page.title, :project_id => @page.project, :version => ver.version %> <%= radio_button_tag('version', ver.version, (line_num==1), :id => "cb-#{line_num}", :onclick => "$('#cbto-#{line_num+1}').prop('checked', true);") if show_diff && (line_num < @versions.size) %> <%= radio_button_tag('version_from', ver.version, (line_num==2), :id => "cbto-#{line_num}") if show_diff && (line_num > 1) %>
          <%= link_to_function('', "toggleCheckboxesBySelector('table.transitions-#{name} input.old-status-#{old_status.try(:id) || 0}')", :title => "#{l(:button_check_all)}/#{l(:button_uncheck_all)}", diff --git a/app/views/workflows/index.html.erb b/app/views/workflows/index.html.erb index 1a0780532..66785a40c 100644 --- a/app/views/workflows/index.html.erb +++ b/app/views/workflows/index.html.erb @@ -17,7 +17,7 @@
          <%= tracker.name %>
          <%= name %> <%= content_tag('span', '*', :class => 'required') if field_required?(field) %>
          <%= field.name %> <%= content_tag('span', '*', :class => 'required') if field_required?(field) %>
          ' + s = '
          ' issue_list(issue.descendants.visible.preload(:status, :priority, :tracker, :assigned_to).sort_by(&:lft)) do |child, level| css = "issue issue-#{child.id} hascontextmenu #{child.css_classes}" css << " idnt idnt-#{level}" if level > 0 @@ -135,7 +135,7 @@ module IssuesHelper :class => css) end - content_tag('table', s, :class => 'list issues') + content_tag('table', s, :class => 'list issues odd-even') end def issue_estimated_hours_details(issue) From 2378ed0919331f5ddfbdb1660225f879133f0495 Mon Sep 17 00:00:00 2001 From: Jean-Philippe Lang Date: Wed, 25 Jan 2017 16:20:02 +0000 Subject: [PATCH 0605/1117] Use ids for testing inclusion. git-svn-id: http://svn.redmine.org/redmine/trunk@16260 e93f8b46-1217-0410-a6f0-8f06a7374b81 --- app/views/users/_groups.html.erb | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/app/views/users/_groups.html.erb b/app/views/users/_groups.html.erb index 52cc9da27..5429f9b31 100644 --- a/app/views/users/_groups.html.erb +++ b/app/views/users/_groups.html.erb @@ -1,8 +1,9 @@ <%= form_for(:user, :url => { :action => 'update' }, :html => {:method => :put}) do %>
          +<% user_group_ids = @user.group_ids %> <% Group.givable.sort.each do |group| %> -
          +
          <% end %> <%= hidden_field_tag 'user[group_ids][]', '' %>
          From 3d3192b187f565ce1dcb01836d0d460467032f35 Mon Sep 17 00:00:00 2001 From: Jean-Philippe Lang Date: Wed, 25 Jan 2017 16:23:22 +0000 Subject: [PATCH 0606/1117] Use ids for testing inclusion. git-svn-id: http://svn.redmine.org/redmine/trunk@16261 e93f8b46-1217-0410-a6f0-8f06a7374b81 --- app/views/custom_fields/_form.html.erb | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/app/views/custom_fields/_form.html.erb b/app/views/custom_fields/_form.html.erb index 485aeb3bb..94f417cfa 100644 --- a/app/views/custom_fields/_form.html.erb +++ b/app/views/custom_fields/_form.html.erb @@ -90,9 +90,10 @@ when "IssueCustomField" %> :data => {:enables => '.custom_field_role input'} %> <%= l(:label_visibility_roles) %>: + <% role_ids = @custom_field.role_ids %> <% Role.givable.sorted.each do |role| %> <% end %> @@ -100,10 +101,11 @@ when "IssueCustomField" %>
          <%=l(:label_tracker_plural)%> + <% tracker_ids = @custom_field.tracker_ids %> <% Tracker.sorted.each do |tracker| %> <%= check_box_tag "custom_field[tracker_ids][]", tracker.id, - (@custom_field.trackers.to_a.include? tracker), + tracker_ids.include?(tracker.id), :id => "custom_field_tracker_ids_#{tracker.id}" %>
          +
          diff --git a/public/stylesheets/application.css b/public/stylesheets/application.css index d16c2cf16..dc8c2b975 100644 --- a/public/stylesheets/application.css +++ b/public/stylesheets/application.css @@ -320,8 +320,6 @@ table.permissions td.role {color:#999;font-size:90%;font-weight:normal !importan tr.wiki-page-version td.updated_on, tr.wiki-page-version td.author {text-align:center;} -div.mypage-box table.time-entries tr.time-entry { background-color: #fff; } -div.mypage-box table.time-entries tr.odd { background-color:#f6f7f8; } tr.time-entry { text-align: center; white-space: nowrap; } tr.time-entry td.issue, tr.time-entry td.comments, tr.time-entry td.subject, tr.time-entry td.activity { text-align: left; white-space: normal; } td.hours { text-align: right; font-weight: bold; padding-right: 0.5em; } From 58487e57acef9f98079cd9f311522cb9b59888f4 Mon Sep 17 00:00:00 2001 From: Jean-Philippe Lang Date: Thu, 26 Jan 2017 18:12:30 +0000 Subject: [PATCH 0608/1117] Wrong text in log/delete.me (#24928). git-svn-id: http://svn.redmine.org/redmine/trunk@16263 e93f8b46-1217-0410-a6f0-8f06a7374b81 --- log/delete.me | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/log/delete.me b/log/delete.me index 18beddaa8..0c33cacf2 100644 --- a/log/delete.me +++ b/log/delete.me @@ -1 +1 @@ -default directory for uploaded files \ No newline at end of file +default directory for log files \ No newline at end of file From fa286638f2cc61770d4203ddf7dec79ca3a21f15 Mon Sep 17 00:00:00 2001 From: Toshi MARUYAMA Date: Fri, 27 Jan 2017 04:21:11 +0000 Subject: [PATCH 0609/1117] Gemfile: remove builder (#24924) Rails 4.2.7.1 has 'builder', '~> 3.1'. https://github.com/rails/rails/blob/v4.2.7.1/actionview/actionview.gemspec#L24 git-svn-id: http://svn.redmine.org/redmine/trunk@16264 e93f8b46-1217-0410-a6f0-8f06a7374b81 --- Gemfile | 1 - 1 file changed, 1 deletion(-) diff --git a/Gemfile b/Gemfile index 6b046ab0c..b539a769d 100644 --- a/Gemfile +++ b/Gemfile @@ -8,7 +8,6 @@ gem "rails", "4.2.7.1" gem "addressable", "2.4.0" if RUBY_VERSION < "2.0" gem "jquery-rails", "~> 3.1.4" gem "coderay", "~> 1.1.1" -gem "builder", ">= 3.0.4" gem "request_store", "1.0.5" gem "mime-types", (RUBY_VERSION >= "2.0" ? "~> 3.0" : "~> 2.99") gem "protected_attributes" From e8ffa8864787a29ade7b888541f38c2272550dbb Mon Sep 17 00:00:00 2001 From: Toshi MARUYAMA Date: Fri, 27 Jan 2017 04:27:40 +0000 Subject: [PATCH 0610/1117] svn propset svn:eol-style native log/delete.me (#24928) git-svn-id: http://svn.redmine.org/redmine/trunk@16265 e93f8b46-1217-0410-a6f0-8f06a7374b81 From f1a92c77ea0dfc9878571232c740186dfaec5fc0 Mon Sep 17 00:00:00 2001 From: Toshi MARUYAMA Date: Fri, 27 Jan 2017 04:37:14 +0000 Subject: [PATCH 0611/1117] add newline at end of log/delete.me (#24928) git-svn-id: http://svn.redmine.org/redmine/trunk@16266 e93f8b46-1217-0410-a6f0-8f06a7374b81 --- log/delete.me | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/log/delete.me b/log/delete.me index 0c33cacf2..310d5088e 100644 --- a/log/delete.me +++ b/log/delete.me @@ -1 +1 @@ -default directory for log files \ No newline at end of file +default directory for log files From f3b1c052bde9cfae00edbdee98672efe872a446e Mon Sep 17 00:00:00 2001 From: Toshi MARUYAMA Date: Fri, 27 Jan 2017 06:21:05 +0000 Subject: [PATCH 0612/1117] add GitHub pull request template git-svn-id: http://svn.redmine.org/redmine/trunk@16267 e93f8b46-1217-0410-a6f0-8f06a7374b81 --- .github/PULL_REQUEST_TEMPLATE.md | 8 ++++++++ 1 file changed, 8 insertions(+) create mode 100644 .github/PULL_REQUEST_TEMPLATE.md diff --git a/.github/PULL_REQUEST_TEMPLATE.md b/.github/PULL_REQUEST_TEMPLATE.md new file mode 100644 index 000000000..7894bca26 --- /dev/null +++ b/.github/PULL_REQUEST_TEMPLATE.md @@ -0,0 +1,8 @@ + +**Do not send a pull request to this GitHub repository**. + +For more detail, please see [official website] wiki [Contribute]. + +[official website]: http://www.redmine.org +[Contribute]: http://www.redmine.org/projects/redmine/wiki/Contribute + From 9b3e10a96e5cc2fd473e7a13aa13f890a2fc3e81 Mon Sep 17 00:00:00 2001 From: Jean-Philippe Lang Date: Fri, 27 Jan 2017 07:34:18 +0000 Subject: [PATCH 0613/1117] Fix avatar icons in activity view (#24935). git-svn-id: http://svn.redmine.org/redmine/trunk@16268 e93f8b46-1217-0410-a6f0-8f06a7374b81 --- public/stylesheets/application.css | 1 - 1 file changed, 1 deletion(-) diff --git a/public/stylesheets/application.css b/public/stylesheets/application.css index dc8c2b975..e9a763cbc 100644 --- a/public/stylesheets/application.css +++ b/public/stylesheets/application.css @@ -513,7 +513,6 @@ div#activity span.project:after, #search-results span.project:after { content: " div#activity dd span.description, #search-results dd span.description { display:block; color: #808080; } div#activity dt.grouped {margin-left:5em;} div#activity dd.grouped {margin-left:9em;} -div#activity dt { overflow: hidden; white-space: nowrap; text-overflow: ellipsis; height: 18px;} #search-results dd { margin-bottom: 1em; padding-left: 20px; margin-left:0px; } From 73f8380ef565bf035235f1c1af18a55dbfbc983c Mon Sep 17 00:00:00 2001 From: Jean-Philippe Lang Date: Fri, 27 Jan 2017 07:38:49 +0000 Subject: [PATCH 0614/1117] Activity icons should stay at the top of the line. git-svn-id: http://svn.redmine.org/redmine/trunk@16269 e93f8b46-1217-0410-a6f0-8f06a7374b81 --- public/stylesheets/application.css | 1 + 1 file changed, 1 insertion(+) diff --git a/public/stylesheets/application.css b/public/stylesheets/application.css index e9a763cbc..9cde8f7b3 100644 --- a/public/stylesheets/application.css +++ b/public/stylesheets/application.css @@ -513,6 +513,7 @@ div#activity span.project:after, #search-results span.project:after { content: " div#activity dd span.description, #search-results dd span.description { display:block; color: #808080; } div#activity dt.grouped {margin-left:5em;} div#activity dd.grouped {margin-left:9em;} +div#activity dt.icon {background-position: 0 0px !important;} #search-results dd { margin-bottom: 1em; padding-left: 20px; margin-left:0px; } From 78d1c87a9724e4ae051e32e13d84eea056ddacef Mon Sep 17 00:00:00 2001 From: Toshi MARUYAMA Date: Fri, 27 Jan 2017 11:56:51 +0000 Subject: [PATCH 0615/1117] add horizontal rule to GitHub pull request template git-svn-id: http://svn.redmine.org/redmine/trunk@16270 e93f8b46-1217-0410-a6f0-8f06a7374b81 --- .github/PULL_REQUEST_TEMPLATE.md | 2 ++ 1 file changed, 2 insertions(+) diff --git a/.github/PULL_REQUEST_TEMPLATE.md b/.github/PULL_REQUEST_TEMPLATE.md index 7894bca26..998308af4 100644 --- a/.github/PULL_REQUEST_TEMPLATE.md +++ b/.github/PULL_REQUEST_TEMPLATE.md @@ -1,4 +1,6 @@ +____________________________________________________________________ + **Do not send a pull request to this GitHub repository**. For more detail, please see [official website] wiki [Contribute]. From 3e2d20ad91657f315f73507d0d6232a1295a1f86 Mon Sep 17 00:00:00 2001 From: Toshi MARUYAMA Date: Sat, 28 Jan 2017 05:43:22 +0000 Subject: [PATCH 0616/1117] add more tests (#24616) git-svn-id: http://svn.redmine.org/redmine/trunk@16271 e93f8b46-1217-0410-a6f0-8f06a7374b81 --- test/unit/lib/redmine/codeset_util_test.rb | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) diff --git a/test/unit/lib/redmine/codeset_util_test.rb b/test/unit/lib/redmine/codeset_util_test.rb index 5c88e0f75..35ab0088d 100644 --- a/test/unit/lib/redmine/codeset_util_test.rb +++ b/test/unit/lib/redmine/codeset_util_test.rb @@ -85,4 +85,20 @@ class Redmine::CodesetUtilTest < ActiveSupport::TestCase assert_equal "test??test??", str end end + + test "#replace_invalid_utf8 should replace invalid utf8" do + s1 = "\xe3\x81\x93\xe3\x82\x93\xe3\x81\xab\xe3\x81\xa1\xE3\x81\xFF".force_encoding("UTF-8") + s2 = Redmine::CodesetUtil.replace_invalid_utf8(s1) + assert s2.valid_encoding? + assert_equal "UTF-8", s2.encoding.to_s + assert_equal "??????", s2 + end + + test "#to_utf8 should replace invalid non utf8" do + s1 = "\xa4\xb3\xa4\xf3\xa4\xcb\xa4\xc1\xa4".force_encoding("EUC-JP") + s2 = Redmine::CodesetUtil.to_utf8(s1, "EUC-JP") + assert s2.valid_encoding? + assert_equal "UTF-8", s2.encoding.to_s + assert_equal "\xe3\x81\x93\xe3\x82\x93\xe3\x81\xab\xe3\x81\xa1?".force_encoding("UTF-8"), s2 + end end From 281bc5c454411e72f6ce934de7cbf1ca5192d35e Mon Sep 17 00:00:00 2001 From: Toshi MARUYAMA Date: Sat, 28 Jan 2017 05:43:33 +0000 Subject: [PATCH 0617/1117] unify duplicate codes (#24616) git-svn-id: http://svn.redmine.org/redmine/trunk@16272 e93f8b46-1217-0410-a6f0-8f06a7374b81 --- lib/redmine/codeset_util.rb | 6 +----- 1 file changed, 1 insertion(+), 5 deletions(-) diff --git a/lib/redmine/codeset_util.rb b/lib/redmine/codeset_util.rb index bb1f972d4..bd4803b70 100644 --- a/lib/redmine/codeset_util.rb +++ b/lib/redmine/codeset_util.rb @@ -25,11 +25,7 @@ module Redmine str = str.encode("UTF-8", :invalid => :replace, :undef => :replace, :replace => '?') else - str.force_encoding("UTF-8") - if ! str.valid_encoding? - str = str.encode("US-ASCII", :invalid => :replace, - :undef => :replace, :replace => '?').encode("UTF-8") - end + str = replace_invalid_utf8(str) end str end From b2c0ea2c3e150f8ac666cd1ec0a81b943ee131c8 Mon Sep 17 00:00:00 2001 From: Toshi MARUYAMA Date: Sat, 28 Jan 2017 06:24:51 +0000 Subject: [PATCH 0618/1117] do not replace all invalid utf8 (#24616) git-svn-id: http://svn.redmine.org/redmine/trunk@16273 e93f8b46-1217-0410-a6f0-8f06a7374b81 --- lib/redmine/codeset_util.rb | 2 +- test/unit/lib/redmine/codeset_util_test.rb | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/lib/redmine/codeset_util.rb b/lib/redmine/codeset_util.rb index bd4803b70..4f056d54a 100644 --- a/lib/redmine/codeset_util.rb +++ b/lib/redmine/codeset_util.rb @@ -6,7 +6,7 @@ module Redmine return str if str.nil? str.force_encoding('UTF-8') if ! str.valid_encoding? - str = str.encode("US-ASCII", :invalid => :replace, + str = str.encode("UTF-16LE", :invalid => :replace, :undef => :replace, :replace => '?').encode("UTF-8") end str diff --git a/test/unit/lib/redmine/codeset_util_test.rb b/test/unit/lib/redmine/codeset_util_test.rb index 35ab0088d..dcfc08bce 100644 --- a/test/unit/lib/redmine/codeset_util_test.rb +++ b/test/unit/lib/redmine/codeset_util_test.rb @@ -91,7 +91,7 @@ class Redmine::CodesetUtilTest < ActiveSupport::TestCase s2 = Redmine::CodesetUtil.replace_invalid_utf8(s1) assert s2.valid_encoding? assert_equal "UTF-8", s2.encoding.to_s - assert_equal "??????", s2 + assert_equal "\xe3\x81\x93\xe3\x82\x93\xe3\x81\xab\xe3\x81\xa1??".force_encoding("UTF-8"), s2 end test "#to_utf8 should replace invalid non utf8" do From 3ac569c4d8c8b04a9cc33e3c2a05f8553d99827e Mon Sep 17 00:00:00 2001 From: Toshi MARUYAMA Date: Sat, 28 Jan 2017 06:25:03 +0000 Subject: [PATCH 0619/1117] =?UTF-8?q?additional=20test=20for=20mail=20by?= =?UTF-8?q?=20Pavel=20Rosick=C3=BD=20(#24616)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit git-svn-id: http://svn.redmine.org/redmine/trunk@16274 e93f8b46-1217-0410-a6f0-8f06a7374b81 --- test/fixtures/mail_handler/invalid_utf8.eml | 14 ++++++++++++++ test/unit/mail_handler_test.rb | 10 ++++++++++ 2 files changed, 24 insertions(+) create mode 100644 test/fixtures/mail_handler/invalid_utf8.eml diff --git a/test/fixtures/mail_handler/invalid_utf8.eml b/test/fixtures/mail_handler/invalid_utf8.eml new file mode 100644 index 000000000..048b28bef --- /dev/null +++ b/test/fixtures/mail_handler/invalid_utf8.eml @@ -0,0 +1,14 @@ +From: John Smith +To: "redmine@somenet.foo" +Subject: This is a test +Content-Type: multipart/alternative; + boundary="_c20d9cfa-d16a-43a3-a7e5-71da7877ab23_" + +--_c20d9cfa-d16a-43a3-a7e5-71da7877ab23_ +Content-Type: text/plain; charset="utf-8" +Content-Transfer-Encoding: quoted-printable + +=D0=97=D0=B4=D1=80=D0=B0=D0=B2=D1=81=D1=82=D0=B2=D1=83=D0=B9=D1=82=D0=B5=AA + +--_c20d9cfa-d16a-43a3-a7e5-71da7877ab23_-- + diff --git a/test/unit/mail_handler_test.rb b/test/unit/mail_handler_test.rb index 898ccc918..562359a38 100644 --- a/test/unit/mail_handler_test.rb +++ b/test/unit/mail_handler_test.rb @@ -538,6 +538,16 @@ class MailHandlerTest < ActiveSupport::TestCase assert_equal 'd8e8fca2dc0f896fd7cb4cb0031ba249', attachment.digest end + def test_invalid_utf8 + issue = submit_email( + 'invalid_utf8.eml', + :issue => {:project => 'ecookbook'} + ) + assert_kind_of Issue, issue + description = "\xD0\x97\xD0\xB4\xD1\x80\xD0\xB0\xD0\xB2\xD1\x81\xD1\x82\xD0\xB2\xD1\x83\xD0\xB9\xD1\x82\xD0\xB5?".force_encoding('UTF-8') + assert_equal description, issue.description + end + def test_gmail_with_attachment_ja issue = submit_email( 'gmail_with_attachment_ja.eml', From 40c14c0998aedf0ac77a656920ec19b88a094d0e Mon Sep 17 00:00:00 2001 From: Toshi MARUYAMA Date: Sat, 28 Jan 2017 06:29:26 +0000 Subject: [PATCH 0620/1117] svn propset svn:eol-style native test/fixtures/mail_handler/invalid_utf8.eml (#24616) git-svn-id: http://svn.redmine.org/redmine/trunk@16275 e93f8b46-1217-0410-a6f0-8f06a7374b81 From 9cdaa423a7876b3c234fda5c49c5fa54b9a3cef1 Mon Sep 17 00:00:00 2001 From: Toshi MARUYAMA Date: Sat, 28 Jan 2017 13:12:19 +0000 Subject: [PATCH 0621/1117] Bulgarian translation for 3.2-stable updated by Ivan Cenov (#24949, #24923) git-svn-id: http://svn.redmine.org/redmine/trunk@16277 e93f8b46-1217-0410-a6f0-8f06a7374b81 --- config/locales/bg.yml | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/config/locales/bg.yml b/config/locales/bg.yml index a5dac5cd4..5f0415c8f 100644 --- a/config/locales/bg.yml +++ b/config/locales/bg.yml @@ -220,6 +220,7 @@ bg: error_no_tracker_allowed_for_new_issue_in_project: Проектът няма тракери, за които да създавате задачи error_no_projects_with_tracker_allowed_for_new_issue: Няма проекти с тракери за които можете да създавате задачи error_move_of_child_not_possible: 'Подзадача %{child} не беше преместена в новия проект: %{errors}' + error_cannot_reassign_time_entries_to_an_issue_about_to_be_deleted: Употребеното време не може да бъде прехвърлено на задача, която ще бъде изтрита mail_subject_lost_password: "Вашата парола (%{value})" mail_body_lost_password: 'За да смените паролата си, използвайте следния линк:' @@ -1204,8 +1205,6 @@ bg: description_date_from: Въведете начална дата description_date_to: Въведете крайна дата text_repository_identifier_info: 'Позволени са малки букви (a-z), цифри, тирета и _.
          Промяна след създаването му не е възможна.' - error_cannot_reassign_time_entries_to_an_issue_about_to_be_deleted: Spent time cannot - be reassigned to an issue that is about to be deleted setting_timelog_required_fields: Required fields for time logs label_attribute_of_object: '%{object_name}''s %{name}' label_user_mail_option_only_assigned: Only for things I watch or I am assigned to From 6e13a75eca77cfd3c44c149a79a5092b2486056e Mon Sep 17 00:00:00 2001 From: Toshi MARUYAMA Date: Sat, 28 Jan 2017 14:44:09 +0000 Subject: [PATCH 0622/1117] Bulgarian translation for trunk updated by Ivan Cenov (#24923) git-svn-id: http://svn.redmine.org/redmine/trunk@16280 e93f8b46-1217-0410-a6f0-8f06a7374b81 --- config/locales/bg.yml | 17 ++++++++--------- 1 file changed, 8 insertions(+), 9 deletions(-) diff --git a/config/locales/bg.yml b/config/locales/bg.yml index 5f0415c8f..0d2583113 100644 --- a/config/locales/bg.yml +++ b/config/locales/bg.yml @@ -221,6 +221,7 @@ bg: error_no_projects_with_tracker_allowed_for_new_issue: Няма проекти с тракери за които можете да създавате задачи error_move_of_child_not_possible: 'Подзадача %{child} не беше преместена в новия проект: %{errors}' error_cannot_reassign_time_entries_to_an_issue_about_to_be_deleted: Употребеното време не може да бъде прехвърлено на задача, която ще бъде изтрита + warning_fields_cleared_on_bulk_edit: Промените ще предизвикат автоматично изтриване на стойности от едно или повече полета на избраните обекти mail_subject_lost_password: "Вашата парола (%{value})" mail_body_lost_password: 'За да смените паролата си, използвайте следния линк:' @@ -371,6 +372,9 @@ bg: field_default_version: Версия по подразбиране field_remote_ip: IP адрес field_textarea_font: Шрифт за текстови блокове + field_updated_by: Обновено от + field_last_updated_by: Последно обновено от + field_full_width_layout: Пълна широчина setting_app_title: Заглавие setting_app_subtitle: Описание @@ -456,6 +460,7 @@ bg: setting_attachment_extensions_denied: Разрешени типове на файлове setting_new_item_menu_tab: Меню-елемент за добавяне на нови обекти (+) setting_commit_logs_formatting: Прилагане на форматиране за съобщенията при поверяване + setting_timelog_required_fields: Задължителни полета за записи за изразходваното време permission_add_project: Създаване на проект permission_add_subprojects: Създаване на подпроекти @@ -866,6 +871,8 @@ bg: label_user_mail_option_selected: "За всички събития само в избраните проекти..." label_user_mail_option_none: "Само за наблюдавани или в които участвам (автор или назначени на мен)" label_user_mail_option_only_my_events: Само за неща, в които съм включен/а + label_user_mail_option_only_assigned: Само за неща, които наблюдавам или са назначени на мен + label_user_mail_option_only_owner: Само за неща, които наблюдавам или съм техен собственик label_user_mail_no_self_notified: "Не искам известия за извършени от мен промени" label_registration_activation_by_email: активиране на профила по email label_registration_manual_activation: ръчно активиране @@ -947,6 +954,7 @@ bg: label_attribute_of_assigned_to: Assignee's %{name} label_attribute_of_user: User's %{name} label_attribute_of_fixed_version: Target version's %{name} + label_attribute_of_object: "%{name} на %{object_name}" label_cross_project_descendants: С подпроекти label_cross_project_tree: С дърво на проектите label_cross_project_hierarchy: С проектна йерархия @@ -1205,12 +1213,3 @@ bg: description_date_from: Въведете начална дата description_date_to: Въведете крайна дата text_repository_identifier_info: 'Позволени са малки букви (a-z), цифри, тирета и _.
          Промяна след създаването му не е възможна.' - setting_timelog_required_fields: Required fields for time logs - label_attribute_of_object: '%{object_name}''s %{name}' - label_user_mail_option_only_assigned: Only for things I watch or I am assigned to - label_user_mail_option_only_owner: Only for things I watch or I am the owner of - warning_fields_cleared_on_bulk_edit: Changes will result in the automatic deletion - of values from one or more fields on the selected objects - field_updated_by: Updated by - field_last_updated_by: Last updated by - field_full_width_layout: Full width layout From 4bb82916d7414cfa7f6484c004e92960ccbfd07f Mon Sep 17 00:00:00 2001 From: Toshi MARUYAMA Date: Sun, 29 Jan 2017 05:06:32 +0000 Subject: [PATCH 0623/1117] Japanese translation updated by Go MAEDA (#24890) git-svn-id: http://svn.redmine.org/redmine/trunk@16281 e93f8b46-1217-0410-a6f0-8f06a7374b81 --- config/locales/ja.yml | 11 +++++------ 1 file changed, 5 insertions(+), 6 deletions(-) diff --git a/config/locales/ja.yml b/config/locales/ja.yml index af7bceba3..15a81a275 100644 --- a/config/locales/ja.yml +++ b/config/locales/ja.yml @@ -1230,10 +1230,9 @@ ja: setting_mail_handler_enable_regex_delimiters: 正規表現を使用 error_move_of_child_not_possible: '子チケット %{child} を指定されたプロジェクトに移動できませんでした: %{errors}' error_cannot_reassign_time_entries_to_an_issue_about_to_be_deleted: 削除対象チケットへの作業時間の再割り当てはできません - setting_timelog_required_fields: Required fields for time logs - label_attribute_of_object: '%{object_name}''s %{name}' - warning_fields_cleared_on_bulk_edit: Changes will result in the automatic deletion - of values from one or more fields on the selected objects - field_updated_by: Updated by - field_last_updated_by: Last updated by + setting_timelog_required_fields: 作業時間の必須入力フィールド + label_attribute_of_object: '%{object_name}の %{name}' + warning_fields_cleared_on_bulk_edit: この編集操作により次のフィールドの値がチケットから削除されます + field_updated_by: 更新者 + field_last_updated_by: 最終更新者 field_full_width_layout: Full width layout From 92068122ee3f47dc081bd48979a3745e6e24623e Mon Sep 17 00:00:00 2001 From: Toshi MARUYAMA Date: Sun, 29 Jan 2017 05:06:43 +0000 Subject: [PATCH 0624/1117] Japanese "items" translation changed by Go MAEDA (#24891) git-svn-id: http://svn.redmine.org/redmine/trunk@16282 e93f8b46-1217-0410-a6f0-8f06a7374b81 --- config/locales/ja.yml | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/config/locales/ja.yml b/config/locales/ja.yml index 15a81a275..5bf3b95b4 100644 --- a/config/locales/ja.yml +++ b/config/locales/ja.yml @@ -197,7 +197,7 @@ ja: notice_unable_delete_version: バージョンを削除できません notice_unable_delete_time_entry: 作業時間を削除できません notice_issue_done_ratios_updated: チケットの進捗率を更新しました。 - notice_gantt_chart_truncated: ガントチャートは、最大表示項目数(%{max})を超えたため切り捨てられました。 + notice_gantt_chart_truncated: ガントチャートは、最大表示件数(%{max})を超えたため切り捨てられました。 error_can_t_load_default_data: "デフォルト設定がロードできませんでした: %{value}" error_scm_not_found: リポジトリに、エントリ/リビジョンが存在しません。 @@ -355,7 +355,7 @@ ja: setting_text_formatting: テキスト書式 setting_cache_formatted_text: テキスト書式の変換結果をキャッシュ setting_wiki_compression: Wiki履歴を圧縮する - setting_feeds_limit: Atomフィードの項目数の上限 + setting_feeds_limit: Atomフィードの最大出力件数 setting_default_projects_public: デフォルトで新しいプロジェクトは公開にする setting_autofetch_changesets: コミットを自動取得する setting_sys_api_enabled: リポジトリ管理用のWebサービスを有効にする @@ -396,7 +396,7 @@ ja: setting_default_notification_option: デフォルトのメール通知オプション setting_commit_logtime_enabled: コミット時に作業時間を記録する setting_commit_logtime_activity_id: 作業時間の作業分類 - setting_gantt_items_limit: ガントチャート最大表示項目数 + setting_gantt_items_limit: ガントチャート最大表示件数 setting_default_projects_tracker_ids: 新規プロジェクトにおいてデフォルトで有効になるトラッカー permission_add_project: プロジェクトの追加 @@ -1165,8 +1165,8 @@ ja: label_member_management_selected_roles_only: 次のロールのみ label_password_required: この操作を続行するにはパスワードを入力してください label_total_spent_time: 合計作業時間 - notice_import_finished: "%{count}件の項目をすべてインポートしました" - notice_import_finished_with_errors: "全%{total}件中%{count}件の項目がインポートできませんでした" + notice_import_finished: "%{count}件のデータをすべてインポートしました" + notice_import_finished_with_errors: "全%{total}件中%{count}件のデータがインポートできませんでした" error_invalid_file_encoding: このファイルのエンコーディングは正しい%{encoding}ではありません error_invalid_csv_file_or_settings: このファイルはCSVファイルではないか、以下の設定と一致していません error_can_not_read_import_file: インポート元のファイルを読み込み中にエラーが発生しました From 19d2529faa25f34edeb29ddbfe18db7732bf287b Mon Sep 17 00:00:00 2001 From: Jean-Philippe Lang Date: Sun, 29 Jan 2017 07:49:38 +0000 Subject: [PATCH 0625/1117] Check permission of wiki pages before generating a link to it (#23793). Patch by Holger Just. git-svn-id: http://svn.redmine.org/redmine/trunk@16283 e93f8b46-1217-0410-a6f0-8f06a7374b81 --- app/helpers/application_helper.rb | 2 +- test/fixtures/wikis.yml | 5 +++++ test/unit/helpers/application_helper_test.rb | 4 ++++ 3 files changed, 10 insertions(+), 1 deletion(-) diff --git a/app/helpers/application_helper.rb b/app/helpers/application_helper.rb index 2a5acc477..d1f359fbc 100644 --- a/app/helpers/application_helper.rb +++ b/app/helpers/application_helper.rb @@ -726,7 +726,7 @@ module ApplicationHelper title ||= identifier if page.blank? end - if link_project && link_project.wiki + if link_project && link_project.wiki && User.current.allowed_to?(:view_wiki_pages, link_project) # extract anchor anchor = nil if page =~ /^(.+?)\#(.+)$/ diff --git a/test/fixtures/wikis.yml b/test/fixtures/wikis.yml index 7254fe687..56910cbbe 100644 --- a/test/fixtures/wikis.yml +++ b/test/fixtures/wikis.yml @@ -9,3 +9,8 @@ wikis_002: start_page: Start page project_id: 2 id: 2 +wikis_005: + status: 1 + start_page: Wiki + project_id: 5 + id: 5 diff --git a/test/unit/helpers/application_helper_test.rb b/test/unit/helpers/application_helper_test.rb index e6530e5c5..943f7a452 100644 --- a/test/unit/helpers/application_helper_test.rb +++ b/test/unit/helpers/application_helper_test.rb @@ -665,6 +665,7 @@ RAW end def test_wiki_links + User.current = User.find_by_login('jsmith') russian_eacape = CGI.escape(@russian_test) to_test = { '[[CookBook documentation]]' => @@ -746,6 +747,9 @@ RAW # project does not exist '[[unknowproject:Start]]' => '[[unknowproject:Start]]', '[[unknowproject:Start|Page title]]' => '[[unknowproject:Start|Page title]]', + # missing permission to view wiki in project + '[[private-child:]]' => '[[private-child:]]', + '[[private-child:Wiki]]' => '[[private-child:Wiki]]', } @project = Project.find(1) to_test.each { |text, result| assert_equal "

          #{result}

          ", textilizable(text) } From 868f83fe357ebecdcf466173c809038a3b093742 Mon Sep 17 00:00:00 2001 From: Jean-Philippe Lang Date: Sun, 29 Jan 2017 07:54:37 +0000 Subject: [PATCH 0626/1117] Only show issue details in time entry activity events if the issue is visible (#23803). Patch by Holger Just. git-svn-id: http://svn.redmine.org/redmine/trunk@16284 e93f8b46-1217-0410-a6f0-8f06a7374b81 --- app/models/time_entry.rb | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/app/models/time_entry.rb b/app/models/time_entry.rb index 09fcfa8a0..241ff2ffc 100644 --- a/app/models/time_entry.rb +++ b/app/models/time_entry.rb @@ -27,7 +27,11 @@ class TimeEntry < ActiveRecord::Base attr_protected :user_id, :tyear, :tmonth, :tweek acts_as_customizable - acts_as_event :title => Proc.new {|o| "#{l_hours(o.hours)} (#{(o.issue || o.project).event_title})"}, + acts_as_event :title => Proc.new { |o| + related = o.issue if o.issue && o.issue.visible? + related ||= o.project + "#{l_hours(o.hours)} (#{related.event_title})" + }, :url => Proc.new {|o| {:controller => 'timelog', :action => 'index', :project_id => o.project, :issue_id => o.issue}}, :author => :user, :group => :issue, From 34c5b51cf095ddff2f38c44920ecdf428a6fb0b8 Mon Sep 17 00:00:00 2001 From: Jean-Philippe Lang Date: Sun, 29 Jan 2017 08:03:26 +0000 Subject: [PATCH 0627/1117] Always send images user-uploaded images with Content-Disposition: attachment (#24199). Patch by Holger Just. git-svn-id: http://svn.redmine.org/redmine/trunk@16285 e93f8b46-1217-0410-a6f0-8f06a7374b81 --- app/controllers/attachments_controller.rb | 2 +- app/controllers/repositories_controller.rb | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/app/controllers/attachments_controller.rb b/app/controllers/attachments_controller.rb index ad0b1e4b8..441243542 100644 --- a/app/controllers/attachments_controller.rb +++ b/app/controllers/attachments_controller.rb @@ -219,7 +219,7 @@ class AttachmentsController < ApplicationController end def disposition(attachment) - if attachment.is_image? || attachment.is_pdf? + if attachment.is_pdf? 'inline' else 'attachment' diff --git a/app/controllers/repositories_controller.rb b/app/controllers/repositories_controller.rb index b073d8c5a..eeb2bced7 100644 --- a/app/controllers/repositories_controller.rb +++ b/app/controllers/repositories_controller.rb @@ -430,7 +430,7 @@ class RepositoriesController < ApplicationController end def disposition(path) - if Redmine::MimeType.is_type?('image', @path) || Redmine::MimeType.of(@path) == "application/pdf" + if Redmine::MimeType.of(@path) == "application/pdf" 'inline' else 'attachment' From 427a745184d1b1b38ac045f6e86295e3e2b1e60a Mon Sep 17 00:00:00 2001 From: Jean-Philippe Lang Date: Sun, 29 Jan 2017 08:53:41 +0000 Subject: [PATCH 0628/1117] Check that repository module is enabled (#24307). git-svn-id: http://svn.redmine.org/redmine/trunk@16286 e93f8b46-1217-0410-a6f0-8f06a7374b81 --- extra/svn/Redmine.pm | 5 +++- .../repository_subversion_test_pm.rb | 25 ++++++++++++++++++- 2 files changed, 28 insertions(+), 2 deletions(-) diff --git a/extra/svn/Redmine.pm b/extra/svn/Redmine.pm index c3e74d3ab..2652ceae1 100644 --- a/extra/svn/Redmine.pm +++ b/extra/svn/Redmine.pm @@ -244,6 +244,7 @@ sub RedmineDSN { WHERE users.login=? AND projects.identifier=? + AND EXISTS (SELECT 1 FROM enabled_modules em WHERE em.project_id = projects.id AND em.name = 'repository') AND users.type='User' AND users.status=1 AND ( @@ -390,7 +391,9 @@ sub is_public_project { my $dbh = connect_database($r); my $sth = $dbh->prepare( - "SELECT is_public FROM projects WHERE projects.identifier = ? AND projects.status <> 9;" + "SELECT is_public FROM projects + WHERE projects.identifier = ? AND projects.status <> 9 + AND EXISTS (SELECT 1 FROM enabled_modules em WHERE em.project_id = projects.id AND em.name = 'repository');" ); $sth->execute($project_id); diff --git a/test/extra/redmine_pm/repository_subversion_test_pm.rb b/test/extra/redmine_pm/repository_subversion_test_pm.rb index e031bba19..336619cf6 100644 --- a/test/extra/redmine_pm/repository_subversion_test_pm.rb +++ b/test/extra/redmine_pm/repository_subversion_test_pm.rb @@ -19,7 +19,7 @@ require File.expand_path('../test_case', __FILE__) require 'tmpdir' class RedminePmTest::RepositorySubversionTest < RedminePmTest::TestCase - fixtures :projects, :users, :members, :roles, :member_roles, :auth_sources + fixtures :projects, :users, :members, :roles, :member_roles, :auth_sources, :enabled_modules SVN_BIN = Redmine::Configuration['scm_subversion_command'] || "svn" @@ -38,6 +38,11 @@ class RedminePmTest::RepositorySubversionTest < RedminePmTest::TestCase assert_failure "ls", svn_url end + def test_anonymous_read_on_public_project_with_module_disabled_should_fail + Project.find(1).disable_module! :repository + assert_failure "ls", svn_url + end + def test_anonymous_read_on_private_repo_should_fail Project.find(1).update_attribute :is_public, false assert_failure "ls", svn_url @@ -128,6 +133,15 @@ class RedminePmTest::RepositorySubversionTest < RedminePmTest::TestCase end end + def test_member_read_on_private_repo_with_module_disabled_should_fail + Role.find(2).add_permission! :browse_repository + Project.find(1).update_attribute :is_public, false + Project.find(1).disable_module! :repository + with_credentials "dlopper", "foo" do + assert_failure "ls", svn_url + end + end + def test_member_commit_on_public_repo_with_permission_should_succeed Role.find(2).add_permission! :commit_access with_credentials "dlopper", "foo" do @@ -158,6 +172,15 @@ class RedminePmTest::RepositorySubversionTest < RedminePmTest::TestCase end end + def test_member_commit_on_private_repo_with_module_disabled_should_fail + Role.find(2).add_permission! :commit_access + Project.find(1).update_attribute :is_public, false + Project.find(1).disable_module! :repository + with_credentials "dlopper", "foo" do + assert_failure "mkdir --message Creating_a_directory", svn_url(random_filename) + end + end + def test_invalid_credentials_should_fail Project.find(1).update_attribute :is_public, false with_credentials "dlopper", "foo" do From 9e1723c537fee06503a65613398a0953b1dc0042 Mon Sep 17 00:00:00 2001 From: Jean-Philippe Lang Date: Sun, 29 Jan 2017 08:58:40 +0000 Subject: [PATCH 0629/1117] Redirect with token in session (#24416). git-svn-id: http://svn.redmine.org/redmine/trunk@16287 e93f8b46-1217-0410-a6f0-8f06a7374b81 --- app/controllers/account_controller.rb | 12 ++++++++++-- 1 file changed, 10 insertions(+), 2 deletions(-) diff --git a/app/controllers/account_controller.rb b/app/controllers/account_controller.rb index ece857a22..54a29fbf4 100644 --- a/app/controllers/account_controller.rb +++ b/app/controllers/account_controller.rb @@ -60,12 +60,20 @@ class AccountController < ApplicationController # Lets user choose a new password def lost_password (redirect_to(home_url); return) unless Setting.lost_password? - if params[:token] - @token = Token.find_token("recovery", params[:token].to_s) + if prt = (params[:token] || session[:password_recovery_token]) + @token = Token.find_token("recovery", prt.to_s) if @token.nil? || @token.expired? redirect_to home_url return end + + # redirect to remove the token query parameter from the URL and add it to the session + if request.query_parameters[:token].present? + session[:password_recovery_token] = @token.value + redirect_to lost_password_url + return + end + @user = @token.user unless @user && @user.active? redirect_to home_url From a1846a2d4a3695a5e5060b0e95732850d2267567 Mon Sep 17 00:00:00 2001 From: Jean-Philippe Lang Date: Sun, 29 Jan 2017 09:12:05 +0000 Subject: [PATCH 0630/1117] Fix tests for r16287 (#24416). git-svn-id: http://svn.redmine.org/redmine/trunk@16288 e93f8b46-1217-0410-a6f0-8f06a7374b81 --- test/functional/account_controller_test.rb | 13 ++++++++++++- 1 file changed, 12 insertions(+), 1 deletion(-) diff --git a/test/functional/account_controller_test.rb b/test/functional/account_controller_test.rb index 37a67d475..7bb6ab576 100644 --- a/test/functional/account_controller_test.rb +++ b/test/functional/account_controller_test.rb @@ -375,11 +375,22 @@ class AccountControllerTest < Redmine::ControllerTest end end - def test_get_lost_password_with_token_should_display_the_password_recovery_form + def test_get_lost_password_with_token_should_redirect_with_token_in_session user = User.find(2) token = Token.create!(:action => 'recovery', :user => user) get :lost_password, :token => token.value + assert_redirected_to '/account/lost_password' + + assert_equal token.value, request.session[:password_recovery_token] + end + + def test_get_lost_password_with_token_in_session_should_display_the_password_recovery_form + user = User.find(2) + token = Token.create!(:action => 'recovery', :user => user) + request.session[:password_recovery_token] = token.value + + get :lost_password assert_response :success assert_select 'input[type=hidden][name=token][value=?]', token.value From 0554e1f3cb3b47efe6da858113ec4acc0e8f3d3c Mon Sep 17 00:00:00 2001 From: Jean-Philippe Lang Date: Sun, 29 Jan 2017 09:14:14 +0000 Subject: [PATCH 0631/1117] Fix integration tests for r16287 (#24416). git-svn-id: http://svn.redmine.org/redmine/trunk@16289 e93f8b46-1217-0410-a6f0-8f06a7374b81 --- test/integration/account_test.rb | 3 +++ 1 file changed, 3 insertions(+) diff --git a/test/integration/account_test.rb b/test/integration/account_test.rb index b013ad43a..779f24998 100644 --- a/test/integration/account_test.rb +++ b/test/integration/account_test.rb @@ -115,6 +115,9 @@ class AccountTest < Redmine::IntegrationTest assert !token.expired? get "/account/lost_password", :token => token.value + assert_redirected_to '/account/lost_password' + + follow_redirect! assert_response :success assert_select 'input[type=hidden][name=token][value=?]', token.value assert_select 'input[name=new_password]' From cb985627e2a00519f1340a5230e1a36bbc8cbfb6 Mon Sep 17 00:00:00 2001 From: Jean-Philippe Lang Date: Sun, 29 Jan 2017 10:28:48 +0000 Subject: [PATCH 0632/1117] Show visible spent time link for users allowed to view time entries (#20661). Patch by Go MAEDA. git-svn-id: http://svn.redmine.org/redmine/trunk@16292 e93f8b46-1217-0410-a6f0-8f06a7374b81 --- app/controllers/issues_controller.rb | 5 +++++ app/views/issues/show.html.erb | 2 +- 2 files changed, 6 insertions(+), 1 deletion(-) diff --git a/app/controllers/issues_controller.rb b/app/controllers/issues_controller.rb index 0f66f27fb..efd221087 100644 --- a/app/controllers/issues_controller.rb +++ b/app/controllers/issues_controller.rb @@ -101,6 +101,11 @@ class IssuesController < ApplicationController @changesets.reverse! end + if User.current.allowed_to?(:view_time_entries, @project) + Issue.load_visible_spent_hours([@issue]) + Issue.load_visible_total_spent_hours([@issue]) + end + respond_to do |format| format.html { @allowed_statuses = @issue.new_statuses_allowed_to(User.current) diff --git a/app/views/issues/show.html.erb b/app/views/issues/show.html.erb index 9d767f0b1..e51124712 100644 --- a/app/views/issues/show.html.erb +++ b/app/views/issues/show.html.erb @@ -60,7 +60,7 @@ unless @issue.disabled_core_fields.include?('estimated_hours') rows.right l(:field_estimated_hours), issue_estimated_hours_details(@issue), :class => 'estimated-hours' end - if User.current.allowed_to_view_all_time_entries?(@project) + if User.current.allowed_to?(:view_time_entries, @project) if @issue.total_spent_hours > 0 rows.right l(:label_spent_time), issue_spent_hours_details(@issue), :class => 'spent-time' end From 56159412b34c1120e5247c119dec5e809084940d Mon Sep 17 00:00:00 2001 From: Jean-Philippe Lang Date: Sun, 29 Jan 2017 10:31:04 +0000 Subject: [PATCH 0633/1117] Issues API does not respect time_entries_visibility (#24875). Patch by Go MAEDA. git-svn-id: http://svn.redmine.org/redmine/trunk@16293 e93f8b46-1217-0410-a6f0-8f06a7374b81 --- test/integration/api_test/issues_test.rb | 33 ++++++++++++++++++++++++ 1 file changed, 33 insertions(+) diff --git a/test/integration/api_test/issues_test.rb b/test/integration/api_test/issues_test.rb index de0a2fd20..65bf3be5b 100644 --- a/test/integration/api_test/issues_test.rb +++ b/test/integration/api_test/issues_test.rb @@ -389,6 +389,23 @@ class Redmine::ApiTest::IssuesTest < Redmine::ApiTest::Base end end + test "GET /issues/:id.xml should contains visible spent_hours only" do + user = User.find_by_login('jsmith') + Role.find(1).update(:time_entries_visibility => 'own') + parent = Issue.find(3) + child = Issue.generate!(:parent_issue_id => parent.id) + TimeEntry.generate!(:user => user, :hours => 5.5, :issue_id => parent.id) + TimeEntry.generate!(:user => user, :hours => 2, :issue_id => child.id) + TimeEntry.generate!(:user => User.find(1), :hours => 100, :issue_id => child.id) + get '/issues/3.xml', {} , credentials(user.login) + + assert_equal 'application/xml', response.content_type + assert_select 'issue' do + assert_select 'spent_hours', '5.5' + assert_select 'total_spent_hours', '7.5' + end + end + test "GET /issues/:id.json should contains total_estimated_hours and total_spent_hours" do parent = Issue.find(3) parent.update_columns :estimated_hours => 2.0 @@ -422,6 +439,22 @@ class Redmine::ApiTest::IssuesTest < Redmine::ApiTest::Base assert_nil json['issue']['total_spent_hours'] end + test "GET /issues/:id.json should contains visible spent_hours only" do + user = User.find_by_login('jsmith') + Role.find(1).update(:time_entries_visibility => 'own') + parent = Issue.find(3) + child = Issue.generate!(:parent_issue_id => parent.id) + TimeEntry.generate!(:user => user, :hours => 5.5, :issue_id => parent.id) + TimeEntry.generate!(:user => user, :hours => 2, :issue_id => child.id) + TimeEntry.generate!(:user => User.find(1), :hours => 100, :issue_id => child.id) + get '/issues/3.json', {} , credentials(user.login) + + assert_equal 'application/json', response.content_type + json = ActiveSupport::JSON.decode(response.body) + assert_equal 5.5, json['issue']['spent_hours'] + assert_equal 7.5, json['issue']['total_spent_hours'] + end + test "POST /issues.xml should create an issue with the attributes" do payload = <<-XML From 1fefa970d609fff4391f7aaa4aff62c619d2b03b Mon Sep 17 00:00:00 2001 From: Jean-Philippe Lang Date: Sun, 29 Jan 2017 13:11:37 +0000 Subject: [PATCH 0634/1117] Disable description and columns when checking "Default columns" (#24907). git-svn-id: http://svn.redmine.org/redmine/trunk@16304 e93f8b46-1217-0410-a6f0-8f06a7374b81 --- app/views/queries/_form.html.erb | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/app/views/queries/_form.html.erb b/app/views/queries/_form.html.erb index 28a58272a..f424e103c 100644 --- a/app/views/queries/_form.html.erb +++ b/app/views/queries/_form.html.erb @@ -26,12 +26,12 @@
          <%= l(:label_options) %>

          <%= check_box_tag 'default_columns', 1, @query.has_default_columns?, :id => 'query_default_columns', - :onclick => 'if (this.checked) {$("#columns").hide();} else {$("#columns").show();}' %>

          + :data => {:disables => "#columns, .block_columns input"} %>

          <%= select 'query', 'group_by', @query.groupable_columns.collect {|c| [c.caption, c.name.to_s]}, :include_blank => true %>

          -

          +

          <%= available_block_columns_tags(@query) %>

          @@ -71,7 +71,7 @@ <% end %> <% unless params[:gantt] %> -<%= content_tag 'fieldset', :id => 'columns', :style => (query.has_default_columns? ? 'display:none;' : nil) do %> +<%= content_tag 'fieldset', :id => 'columns' do %> <%= l(:field_column_names) %> <%= render_query_columns_selection(query) %> <% end %> From df4564bbd429972f3c273852481f0fe43e1094c1 Mon Sep 17 00:00:00 2001 From: Jean-Philippe Lang Date: Mon, 30 Jan 2017 18:37:17 +0000 Subject: [PATCH 0635/1117] Show all members in user custom field filter on the cross project issue list (#24769). git-svn-id: http://svn.redmine.org/redmine/trunk@16310 e93f8b46-1217-0410-a6f0-8f06a7374b81 --- lib/redmine/field_format.rb | 10 ++++------ 1 file changed, 4 insertions(+), 6 deletions(-) diff --git a/lib/redmine/field_format.rb b/lib/redmine/field_format.rb index 54a42ce98..b502ec4f0 100644 --- a/lib/redmine/field_format.rb +++ b/lib/redmine/field_format.rb @@ -793,6 +793,8 @@ module Redmine end end scope.sorted + elsif object.nil? + Principal.member_of(Project.visible.to_a).sorted.select {|p| p.is_a?(User)} else [] end @@ -811,12 +813,8 @@ module Redmine end end - def query_filter_values(*args) - values = [] - if User.current.logged? - values << ["<< #{l(:label_me)} >>", "me"] - end - values + super + def query_filter_values(custom_field, query) + query.author_values end end From 65804c34f3d19791b77df01898e6af18048c06d9 Mon Sep 17 00:00:00 2001 From: Jean-Philippe Lang Date: Mon, 30 Jan 2017 19:37:38 +0000 Subject: [PATCH 0636/1117] Add support for @2x, @3x, etc. hires images (#24922). Patch by Jan Schulz-Hofen. git-svn-id: http://svn.redmine.org/redmine/trunk@16311 e93f8b46-1217-0410-a6f0-8f06a7374b81 --- app/helpers/application_helper.rb | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) diff --git a/app/helpers/application_helper.rb b/app/helpers/application_helper.rb index d1f359fbc..ced854693 100644 --- a/app/helpers/application_helper.rb +++ b/app/helpers/application_helper.rb @@ -636,7 +636,7 @@ module ApplicationHelper parse_sections(text, project, obj, attr, only_path, options) text = parse_non_pre_blocks(text, obj, macros) do |text| - [:parse_inline_attachments, :parse_wiki_links, :parse_redmine_links].each do |method_name| + [:parse_inline_attachments, :parse_hires_images, :parse_wiki_links, :parse_redmine_links].each do |method_name| send method_name, text, project, obj, attr, only_path, options end end @@ -681,6 +681,15 @@ module ApplicationHelper parsed end + # add srcset attribute to img tags if filename includes @2x, @3x, etc. + # to support hires displays + def parse_hires_images(text, project, obj, attr, only_path, options) + text.gsub!(/src="([^"]+@(\dx)\.(bmp|gif|jpg|jpe|jpeg|png))"/i) do |m| + filename, dpr = $1, $2 + m + " srcset=\"#{filename} #{dpr}\"" + end + end + def parse_inline_attachments(text, project, obj, attr, only_path, options) return if options[:inline_attachments] == false From 6ef7a0fc2dc34adf78415c8a2b5ecf86eaf21f3a Mon Sep 17 00:00:00 2001 From: Jean-Philippe Lang Date: Mon, 30 Jan 2017 19:37:55 +0000 Subject: [PATCH 0637/1117] Adds a test for #24922. git-svn-id: http://svn.redmine.org/redmine/trunk@16312 e93f8b46-1217-0410-a6f0-8f06a7374b81 --- test/unit/helpers/application_helper_test.rb | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/test/unit/helpers/application_helper_test.rb b/test/unit/helpers/application_helper_test.rb index 943f7a452..a0d88eb5d 100644 --- a/test/unit/helpers/application_helper_test.rb +++ b/test/unit/helpers/application_helper_test.rb @@ -169,6 +169,12 @@ RAW end end + def test_attached_images_with_hires_naming + attachment = Attachment.generate!(:filename => 'image@2x.png') + assert_equal %(

          ), + textilizable("!image@2x.png!", :attachments => [attachment]) + end + def test_attached_images_filename_extension set_tmp_attachments_directory a1 = Attachment.new( From 79d5d307056e495580af0de2a041851a33e4cb0c Mon Sep 17 00:00:00 2001 From: Jean-Philippe Lang Date: Mon, 30 Jan 2017 19:40:57 +0000 Subject: [PATCH 0638/1117] Hires (2x DPR) image support for Gravatars (#24927). Patch by Jan Schulz-Hofen. git-svn-id: http://svn.redmine.org/redmine/trunk@16313 e93f8b46-1217-0410-a6f0-8f06a7374b81 --- lib/plugins/gravatar/lib/gravatar.rb | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/lib/plugins/gravatar/lib/gravatar.rb b/lib/plugins/gravatar/lib/gravatar.rb index 93c45b25c..f614f0354 100644 --- a/lib/plugins/gravatar/lib/gravatar.rb +++ b/lib/plugins/gravatar/lib/gravatar.rb @@ -52,6 +52,10 @@ module GravatarHelper src = h(gravatar_url(email, options)) options = DEFAULT_OPTIONS.merge(options) [:class, :alt, :title].each { |opt| options[opt] = h(options[opt]) } + + # double the size for hires displays + options[:srcset] = "#{gravatar_url(email, options.merge(size: options[:size].to_i * 2))} 2x" + image_tag src, options end From 721843a5482a5754ef796471c14ed087f21fe740 Mon Sep 17 00:00:00 2001 From: Jean-Philippe Lang Date: Mon, 30 Jan 2017 19:41:31 +0000 Subject: [PATCH 0639/1117] Hires (2x DPR) image support for Thumbnails (#24927). Patch by Jan Schulz-Hofen. git-svn-id: http://svn.redmine.org/redmine/trunk@16314 e93f8b46-1217-0410-a6f0-8f06a7374b81 --- app/helpers/application_helper.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app/helpers/application_helper.rb b/app/helpers/application_helper.rb index ced854693..c432472bc 100644 --- a/app/helpers/application_helper.rb +++ b/app/helpers/application_helper.rb @@ -220,7 +220,7 @@ module ApplicationHelper end def thumbnail_tag(attachment) - link_to image_tag(thumbnail_path(attachment)), + link_to image_tag(thumbnail_path(attachment), :srcset => "#{thumbnail_path(attachment, :size => Setting.thumbnails_size.to_i * 2)} 2x"), named_attachment_path(attachment, attachment.filename), :title => attachment.filename end From ef3833b46584e90942038ba01a111f3fd71a9d41 Mon Sep 17 00:00:00 2001 From: Jean-Philippe Lang Date: Mon, 30 Jan 2017 19:42:04 +0000 Subject: [PATCH 0640/1117] Whitespace-only reorg of ApplicationHelper#thumbnail_tag (#24927). Patch by Jan Schulz-Hofen. git-svn-id: http://svn.redmine.org/redmine/trunk@16315 e93f8b46-1217-0410-a6f0-8f06a7374b81 --- app/helpers/application_helper.rb | 14 +++++++++++--- 1 file changed, 11 insertions(+), 3 deletions(-) diff --git a/app/helpers/application_helper.rb b/app/helpers/application_helper.rb index c432472bc..dd9ecb80e 100644 --- a/app/helpers/application_helper.rb +++ b/app/helpers/application_helper.rb @@ -220,9 +220,17 @@ module ApplicationHelper end def thumbnail_tag(attachment) - link_to image_tag(thumbnail_path(attachment), :srcset => "#{thumbnail_path(attachment, :size => Setting.thumbnails_size.to_i * 2)} 2x"), - named_attachment_path(attachment, attachment.filename), + link_to( + image_tag( + thumbnail_path(attachment), + :srcset => "#{thumbnail_path(attachment, :size => Setting.thumbnails_size.to_i * 2)} 2x" + ), + named_attachment_path( + attachment, + attachment.filename + ), :title => attachment.filename + ) end def toggle_link(name, id, options={}) @@ -335,7 +343,7 @@ module ApplicationHelper content_tag 'p', l(:label_no_data), :class => "nodata" end end - + # Returns an array of projects that are displayed in the quick-jump box def projects_for_jump_box(user=User.current) if user.logged? From be6199add30b888fb6706a9f7c0010750bda7460 Mon Sep 17 00:00:00 2001 From: Jean-Philippe Lang Date: Mon, 30 Jan 2017 19:42:36 +0000 Subject: [PATCH 0641/1117] Set thumbnail width on image tag to avoid too wide white boxes on Firefox (#24927). Patch by Jan Schulz-Hofen. git-svn-id: http://svn.redmine.org/redmine/trunk@16316 e93f8b46-1217-0410-a6f0-8f06a7374b81 --- app/helpers/application_helper.rb | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/app/helpers/application_helper.rb b/app/helpers/application_helper.rb index dd9ecb80e..908b35502 100644 --- a/app/helpers/application_helper.rb +++ b/app/helpers/application_helper.rb @@ -223,7 +223,8 @@ module ApplicationHelper link_to( image_tag( thumbnail_path(attachment), - :srcset => "#{thumbnail_path(attachment, :size => Setting.thumbnails_size.to_i * 2)} 2x" + :srcset => "#{thumbnail_path(attachment, :size => Setting.thumbnails_size.to_i * 2)} 2x", + :width => Setting.thumbnails_size ), named_attachment_path( attachment, From 252804f7da50f73ed7de9561c87c5a34140d2eab Mon Sep 17 00:00:00 2001 From: Jean-Philippe Lang Date: Mon, 30 Jan 2017 21:24:18 +0000 Subject: [PATCH 0642/1117] Redirect to the parent issue after adding a subtask. git-svn-id: http://svn.redmine.org/redmine/trunk@16317 e93f8b46-1217-0410-a6f0-8f06a7374b81 --- app/controllers/issues_controller.rb | 13 ++++++++----- app/helpers/issues_helper.rb | 2 +- app/views/issues/_form.html.erb | 1 + 3 files changed, 10 insertions(+), 6 deletions(-) diff --git a/app/controllers/issues_controller.rb b/app/controllers/issues_controller.rb index efd221087..ee24d53a1 100644 --- a/app/controllers/issues_controller.rb +++ b/app/controllers/issues_controller.rb @@ -578,15 +578,18 @@ class IssuesController < ApplicationController # Redirects user after a successful issue creation def redirect_after_create if params[:continue] - attrs = {:tracker_id => @issue.tracker, :parent_issue_id => @issue.parent_issue_id}.reject {|k,v| v.nil?} + url_params = {} + url_params[:issue] = {:tracker_id => @issue.tracker, :parent_issue_id => @issue.parent_issue_id}.reject {|k,v| v.nil?} + url_params[:back_url] = params[:back_url].presence + if params[:project_id] - redirect_to new_project_issue_path(@issue.project, :issue => attrs) + redirect_to new_project_issue_path(@issue.project, url_params) else - attrs.merge! :project_id => @issue.project_id - redirect_to new_issue_path(:issue => attrs) + url_params[:issue].merge! :project_id => @issue.project_id + redirect_to new_issue_path(url_params) end else - redirect_to issue_path(@issue) + redirect_back_or_default issue_path(@issue) end end end diff --git a/app/helpers/issues_helper.rb b/app/helpers/issues_helper.rb index bf692285b..f95338284 100644 --- a/app/helpers/issues_helper.rb +++ b/app/helpers/issues_helper.rb @@ -184,7 +184,7 @@ module IssuesHelper :parent_issue_id => issue } attrs[:tracker_id] = issue.tracker unless issue.tracker.disabled_core_fields.include?('parent_issue_id') - link_to(l(:button_add), new_project_issue_path(issue.project, :issue => attrs)) + link_to(l(:button_add), new_project_issue_path(issue.project, :issue => attrs, :back_url => issue_path(issue))) end def trackers_options_for_select(issue) diff --git a/app/views/issues/_form.html.erb b/app/views/issues/_form.html.erb index f11c71faf..011928db8 100644 --- a/app/views/issues/_form.html.erb +++ b/app/views/issues/_form.html.erb @@ -1,6 +1,7 @@ <%= labelled_fields_for :issue, @issue do |f| %> <%= call_hook(:view_issues_form_details_top, { :issue => @issue, :form => f }) %> <%= hidden_field_tag 'form_update_triggered_by', '' %> +<%= hidden_field_tag 'back_url', params[:back_url], :id => nil if params[:back_url].present? %> <% if @issue.safe_attribute? 'is_private' %>

          From 7cab59d220a15189165fc00e069297e5f6bbaf9e Mon Sep 17 00:00:00 2001 From: Jean-Philippe Lang Date: Mon, 30 Jan 2017 21:35:23 +0000 Subject: [PATCH 0643/1117] Reverts unwanted change (#24769). git-svn-id: http://svn.redmine.org/redmine/trunk@16318 e93f8b46-1217-0410-a6f0-8f06a7374b81 --- lib/redmine/field_format.rb | 2 -- 1 file changed, 2 deletions(-) diff --git a/lib/redmine/field_format.rb b/lib/redmine/field_format.rb index b502ec4f0..cfdab0e21 100644 --- a/lib/redmine/field_format.rb +++ b/lib/redmine/field_format.rb @@ -793,8 +793,6 @@ module Redmine end end scope.sorted - elsif object.nil? - Principal.member_of(Project.visible.to_a).sorted.select {|p| p.is_a?(User)} else [] end From 10ebed3b97b8990a721e666dccbb607d78dc38be Mon Sep 17 00:00:00 2001 From: Jean-Philippe Lang Date: Tue, 31 Jan 2017 17:54:46 +0000 Subject: [PATCH 0644/1117] Removes default order on Project#versions association. git-svn-id: http://svn.redmine.org/redmine/trunk@16319 e93f8b46-1217-0410-a6f0-8f06a7374b81 --- app/models/project.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app/models/project.rb b/app/models/project.rb index a09ef781b..967c82cb5 100644 --- a/app/models/project.rb +++ b/app/models/project.rb @@ -37,7 +37,7 @@ class Project < ActiveRecord::Base has_and_belongs_to_many :trackers, lambda {order(:position)} has_many :issues, :dependent => :destroy has_many :issue_changes, :through => :issues, :source => :journals - has_many :versions, lambda {order("#{Version.table_name}.effective_date DESC, #{Version.table_name}.name DESC")}, :dependent => :destroy + has_many :versions, :dependent => :destroy belongs_to :default_version, :class_name => 'Version' has_many :time_entries, :dependent => :destroy has_many :queries, :class_name => 'IssueQuery', :dependent => :delete_all From 1b911e51f9625082a5e61ca62a78db284383c1d2 Mon Sep 17 00:00:00 2001 From: Jean-Philippe Lang Date: Tue, 31 Jan 2017 18:15:32 +0000 Subject: [PATCH 0645/1117] Time entry queries should be copied and deleted too. git-svn-id: http://svn.redmine.org/redmine/trunk@16320 e93f8b46-1217-0410-a6f0-8f06a7374b81 --- app/models/project.rb | 6 +++--- test/fixtures/queries.yml | 20 ++++++++++++++++++++ test/unit/project_copy_test.rb | 31 +++++++++++++++++++++---------- 3 files changed, 44 insertions(+), 13 deletions(-) diff --git a/app/models/project.rb b/app/models/project.rb index 967c82cb5..f071010e2 100644 --- a/app/models/project.rb +++ b/app/models/project.rb @@ -40,7 +40,7 @@ class Project < ActiveRecord::Base has_many :versions, :dependent => :destroy belongs_to :default_version, :class_name => 'Version' has_many :time_entries, :dependent => :destroy - has_many :queries, :class_name => 'IssueQuery', :dependent => :delete_all + has_many :queries, :dependent => :delete_all has_many :documents, :dependent => :destroy has_many :news, lambda {includes(:author)}, :dependent => :destroy has_many :issue_categories, lambda {order("#{IssueCategory.table_name}.name")}, :dependent => :delete_all @@ -1055,12 +1055,12 @@ class Project < ActiveRecord::Base # Copies queries from +project+ def copy_queries(project) project.queries.each do |query| - new_query = IssueQuery.new + new_query = query.class.new new_query.attributes = query.attributes.dup.except("id", "project_id", "sort_criteria", "user_id", "type") new_query.sort_criteria = query.sort_criteria if query.sort_criteria new_query.project = self new_query.user_id = query.user_id - new_query.role_ids = query.role_ids if query.visibility == IssueQuery::VISIBILITY_ROLES + new_query.role_ids = query.role_ids if query.visibility == ::Query::VISIBILITY_ROLES self.queries << new_query end end diff --git a/test/fixtures/queries.yml b/test/fixtures/queries.yml index b92079aeb..4e58dc6eb 100644 --- a/test/fixtures/queries.yml +++ b/test/fixtures/queries.yml @@ -162,4 +162,24 @@ queries_009: --- - - priority - desc +queries_010: + id: 10 + type: TimeEntryQuery + project_id: 1 + visibility: 2 + name: My spent time + filters: | + --- + user_id: + :values: + - "me" + :operator: = + + user_id: 1 + column_names: + group_by: + sort_criteria: | + --- + - - spent_on + - desc diff --git a/test/unit/project_copy_test.rb b/test/unit/project_copy_test.rb index 9370bebf4..0b2c1e63d 100644 --- a/test/unit/project_copy_test.rb +++ b/test/unit/project_copy_test.rb @@ -235,17 +235,28 @@ class ProjectCopyTest < ActiveSupport::TestCase assert_equal [1, 2], member.role_ids.sort end - test "#copy should copy project specific queries" do - assert @project.valid? - assert @project.queries.empty? - assert @project.copy(@source_project) + def test_copy_should_copy_project_specific_issue_queries + source = Project.generate! + target = Project.new(:name => 'Copy Test', :identifier => 'copy-test') + IssueQuery.generate!(:project => source, :user => User.find(2)) + assert target.copy(source) - assert_equal @source_project.queries.size, @project.queries.size - @project.queries.each do |query| - assert query - assert_equal @project, query.project - end - assert_equal @source_project.queries.map(&:user_id).sort, @project.queries.map(&:user_id).sort + assert_equal 1, target.queries.size + query = target.queries.first + assert_kind_of IssueQuery, query + assert_equal 2, query.user_id + end + + def test_copy_should_copy_project_specific_time_entry_queries + source = Project.generate! + target = Project.new(:name => 'Copy Test', :identifier => 'copy-test') + TimeEntryQuery.generate!(:project => source, :user => User.find(2)) + assert target.copy(source) + + assert_equal 1, target.queries.size + query = target.queries.first + assert_kind_of TimeEntryQuery, query + assert_equal 2, query.user_id end def test_copy_should_copy_queries_roles_visibility From fe906e4fb6b36b1d5e3c796cf0a256a427a8b228 Mon Sep 17 00:00:00 2001 From: Jean-Philippe Lang Date: Tue, 31 Jan 2017 18:31:25 +0000 Subject: [PATCH 0646/1117] Clean up sort orders. git-svn-id: http://svn.redmine.org/redmine/trunk@16321 e93f8b46-1217-0410-a6f0-8f06a7374b81 --- app/models/project.rb | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/app/models/project.rb b/app/models/project.rb index f071010e2..942affe11 100644 --- a/app/models/project.rb +++ b/app/models/project.rb @@ -43,15 +43,15 @@ class Project < ActiveRecord::Base has_many :queries, :dependent => :delete_all has_many :documents, :dependent => :destroy has_many :news, lambda {includes(:author)}, :dependent => :destroy - has_many :issue_categories, lambda {order("#{IssueCategory.table_name}.name")}, :dependent => :delete_all - has_many :boards, lambda {order("position ASC")}, :dependent => :destroy - has_one :repository, lambda {where(["is_default = ?", true])} + has_many :issue_categories, lambda {order(:name)}, :dependent => :delete_all + has_many :boards, lambda {order(:position)}, :dependent => :destroy + has_one :repository, lambda {where(:is_default => true)} has_many :repositories, :dependent => :destroy has_many :changesets, :through => :repository has_one :wiki, :dependent => :destroy # Custom field for the project issues has_and_belongs_to_many :issue_custom_fields, - lambda {order("#{CustomField.table_name}.position")}, + lambda {order(:position)}, :class_name => 'IssueCustomField', :join_table => "#{table_name_prefix}custom_fields_projects#{table_name_suffix}", :association_foreign_key => 'custom_field_id' From d37125dfe98b295cb8dd15d7c12ed2c97a122e8d Mon Sep 17 00:00:00 2001 From: Toshi MARUYAMA Date: Thu, 2 Feb 2017 02:24:50 +0000 Subject: [PATCH 0647/1117] replace depricated Net::LDAP::LdapError by Net::LDAP::Error (#24970) git-svn-id: http://svn.redmine.org/redmine/trunk@16322 e93f8b46-1217-0410-a6f0-8f06a7374b81 --- Gemfile | 2 +- app/models/auth_source_ldap.rb | 4 ++-- test/functional/auth_sources_controller_test.rb | 2 +- test/unit/auth_source_ldap_test.rb | 2 +- test/unit/user_test.rb | 2 +- 5 files changed, 6 insertions(+), 6 deletions(-) diff --git a/Gemfile b/Gemfile index b539a769d..57f6c072f 100644 --- a/Gemfile +++ b/Gemfile @@ -26,7 +26,7 @@ gem "rbpdf", "~> 1.19.0" # Optional gem for LDAP authentication group :ldap do - gem "net-ldap", "~> 0.12.0" + gem "net-ldap", "~> 0.12.1" end # Optional gem for OpenID authentication diff --git a/app/models/auth_source_ldap.rb b/app/models/auth_source_ldap.rb index d2aa25212..1301e326c 100644 --- a/app/models/auth_source_ldap.rb +++ b/app/models/auth_source_ldap.rb @@ -21,7 +21,7 @@ require 'timeout' class AuthSourceLdap < AuthSource NETWORK_EXCEPTIONS = [ - Net::LDAP::LdapError, + Net::LDAP::Error, Errno::ECONNABORTED, Errno::ECONNREFUSED, Errno::ECONNRESET, Errno::EHOSTDOWN, Errno::EHOSTUNREACH, SocketError @@ -117,7 +117,7 @@ class AuthSourceLdap < AuthSource if filter.present? Net::LDAP::Filter.construct(filter) end - rescue Net::LDAP::LdapError, Net::LDAP::FilterSyntaxInvalidError + rescue Net::LDAP::Error, Net::LDAP::FilterSyntaxInvalidError nil end diff --git a/test/functional/auth_sources_controller_test.rb b/test/functional/auth_sources_controller_test.rb index 1ad829655..f711ce159 100644 --- a/test/functional/auth_sources_controller_test.rb +++ b/test/functional/auth_sources_controller_test.rb @@ -134,7 +134,7 @@ class AuthSourcesControllerTest < Redmine::ControllerTest end def test_test_connection_with_failure - AuthSourceLdap.any_instance.stubs(:initialize_ldap_con).raises(Net::LDAP::LdapError.new("Something went wrong")) + AuthSourceLdap.any_instance.stubs(:initialize_ldap_con).raises(Net::LDAP::Error.new("Something went wrong")) get :test_connection, :id => 1 assert_redirected_to '/auth_sources' diff --git a/test/unit/auth_source_ldap_test.rb b/test/unit/auth_source_ldap_test.rb index eac13ff70..3ce7fa98e 100644 --- a/test/unit/auth_source_ldap_test.rb +++ b/test/unit/auth_source_ldap_test.rb @@ -150,7 +150,7 @@ class AuthSourceLdapTest < ActiveSupport::TestCase end def test_search_with_exception_should_return_an_empty_array - Net::LDAP.stubs(:new).raises(Net::LDAP::LdapError, 'Cannot connect') + Net::LDAP.stubs(:new).raises(Net::LDAP::Error, 'Cannot connect') results = AuthSource.search("exa") assert_equal [], results diff --git a/test/unit/user_test.rb b/test/unit/user_test.rb index ebc7d6532..3b42a7dec 100644 --- a/test/unit/user_test.rb +++ b/test/unit/user_test.rb @@ -643,7 +643,7 @@ class UserTest < ActiveSupport::TestCase if ldap_configured? test "#try_to_login using LDAP with failed connection to the LDAP server" do auth_source = AuthSourceLdap.find(1) - AuthSource.any_instance.stubs(:initialize_ldap_con).raises(Net::LDAP::LdapError, 'Cannot connect') + AuthSource.any_instance.stubs(:initialize_ldap_con).raises(Net::LDAP::Error, 'Cannot connect') assert_nil User.try_to_login('edavis', 'wrong') end From 5a86f95d290a35274ca944c160e44d56b3a3430c Mon Sep 17 00:00:00 2001 From: Toshi MARUYAMA Date: Thu, 2 Feb 2017 03:01:19 +0000 Subject: [PATCH 0648/1117] revert r16322 (#24970) Some tests fail. git-svn-id: http://svn.redmine.org/redmine/trunk@16323 e93f8b46-1217-0410-a6f0-8f06a7374b81 --- Gemfile | 2 +- app/models/auth_source_ldap.rb | 4 ++-- test/functional/auth_sources_controller_test.rb | 2 +- test/unit/auth_source_ldap_test.rb | 2 +- test/unit/user_test.rb | 2 +- 5 files changed, 6 insertions(+), 6 deletions(-) diff --git a/Gemfile b/Gemfile index 57f6c072f..b539a769d 100644 --- a/Gemfile +++ b/Gemfile @@ -26,7 +26,7 @@ gem "rbpdf", "~> 1.19.0" # Optional gem for LDAP authentication group :ldap do - gem "net-ldap", "~> 0.12.1" + gem "net-ldap", "~> 0.12.0" end # Optional gem for OpenID authentication diff --git a/app/models/auth_source_ldap.rb b/app/models/auth_source_ldap.rb index 1301e326c..d2aa25212 100644 --- a/app/models/auth_source_ldap.rb +++ b/app/models/auth_source_ldap.rb @@ -21,7 +21,7 @@ require 'timeout' class AuthSourceLdap < AuthSource NETWORK_EXCEPTIONS = [ - Net::LDAP::Error, + Net::LDAP::LdapError, Errno::ECONNABORTED, Errno::ECONNREFUSED, Errno::ECONNRESET, Errno::EHOSTDOWN, Errno::EHOSTUNREACH, SocketError @@ -117,7 +117,7 @@ class AuthSourceLdap < AuthSource if filter.present? Net::LDAP::Filter.construct(filter) end - rescue Net::LDAP::Error, Net::LDAP::FilterSyntaxInvalidError + rescue Net::LDAP::LdapError, Net::LDAP::FilterSyntaxInvalidError nil end diff --git a/test/functional/auth_sources_controller_test.rb b/test/functional/auth_sources_controller_test.rb index f711ce159..1ad829655 100644 --- a/test/functional/auth_sources_controller_test.rb +++ b/test/functional/auth_sources_controller_test.rb @@ -134,7 +134,7 @@ class AuthSourcesControllerTest < Redmine::ControllerTest end def test_test_connection_with_failure - AuthSourceLdap.any_instance.stubs(:initialize_ldap_con).raises(Net::LDAP::Error.new("Something went wrong")) + AuthSourceLdap.any_instance.stubs(:initialize_ldap_con).raises(Net::LDAP::LdapError.new("Something went wrong")) get :test_connection, :id => 1 assert_redirected_to '/auth_sources' diff --git a/test/unit/auth_source_ldap_test.rb b/test/unit/auth_source_ldap_test.rb index 3ce7fa98e..eac13ff70 100644 --- a/test/unit/auth_source_ldap_test.rb +++ b/test/unit/auth_source_ldap_test.rb @@ -150,7 +150,7 @@ class AuthSourceLdapTest < ActiveSupport::TestCase end def test_search_with_exception_should_return_an_empty_array - Net::LDAP.stubs(:new).raises(Net::LDAP::Error, 'Cannot connect') + Net::LDAP.stubs(:new).raises(Net::LDAP::LdapError, 'Cannot connect') results = AuthSource.search("exa") assert_equal [], results diff --git a/test/unit/user_test.rb b/test/unit/user_test.rb index 3b42a7dec..ebc7d6532 100644 --- a/test/unit/user_test.rb +++ b/test/unit/user_test.rb @@ -643,7 +643,7 @@ class UserTest < ActiveSupport::TestCase if ldap_configured? test "#try_to_login using LDAP with failed connection to the LDAP server" do auth_source = AuthSourceLdap.find(1) - AuthSource.any_instance.stubs(:initialize_ldap_con).raises(Net::LDAP::Error, 'Cannot connect') + AuthSource.any_instance.stubs(:initialize_ldap_con).raises(Net::LDAP::LdapError, 'Cannot connect') assert_nil User.try_to_login('edavis', 'wrong') end From 64c6779eaa223ca7c6e18ce008d0b398177696b8 Mon Sep 17 00:00:00 2001 From: Toshi MARUYAMA Date: Thu, 2 Feb 2017 05:41:57 +0000 Subject: [PATCH 0649/1117] Gemfile: pin i18n version 0.7.0 i18n 0.8.0 causes error.

          Redmine::I18nTest#test_languages_options_should_ignore_locales_without_general_lang_name_key:
          I18n::InvalidLocale: "foo" is not a valid locale
              lib/redmine/i18n.rb:58:in `ll'
              lib/redmine/i18n.rb:122:in `block in languages_options'
              lib/redmine/i18n.rb:122:in `map'
              lib/redmine/i18n.rb:122:in `languages_options'
              test/unit/lib/redmine/i18n_test.rb:203:in `test_languages_options_should_ignore_locales_without_general_lang_name_key'
          
          git-svn-id: http://svn.redmine.org/redmine/trunk@16324 e93f8b46-1217-0410-a6f0-8f06a7374b81 --- Gemfile | 1 + 1 file changed, 1 insertion(+) diff --git a/Gemfile b/Gemfile index b539a769d..bb8ba530e 100644 --- a/Gemfile +++ b/Gemfile @@ -16,6 +16,7 @@ gem "roadie-rails" gem "mimemagic" gem "nokogiri", "~> 1.6.8" +gem "i18n", "~> 0.7.0" # Request at least rails-html-sanitizer 1.0.3 because of security advisories gem "rails-html-sanitizer", ">= 1.0.3" From 65e22a4c27c039049c1bac3e2ed865246a61ddc0 Mon Sep 17 00:00:00 2001 From: Toshi MARUYAMA Date: Sat, 4 Feb 2017 10:39:15 +0000 Subject: [PATCH 0650/1117] Japanese translation updated by Go MAEDA (#24971) git-svn-id: http://svn.redmine.org/redmine/trunk@16327 e93f8b46-1217-0410-a6f0-8f06a7374b81 --- config/locales/ja.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/config/locales/ja.yml b/config/locales/ja.yml index 5bf3b95b4..57a24eef9 100644 --- a/config/locales/ja.yml +++ b/config/locales/ja.yml @@ -1235,4 +1235,4 @@ ja: warning_fields_cleared_on_bulk_edit: この編集操作により次のフィールドの値がチケットから削除されます field_updated_by: 更新者 field_last_updated_by: 最終更新者 - field_full_width_layout: Full width layout + field_full_width_layout: ワイド表示 From 76e1c919e20b961417b858a45f199c747f760a10 Mon Sep 17 00:00:00 2001 From: Toshi MARUYAMA Date: Sat, 4 Feb 2017 10:39:25 +0000 Subject: [PATCH 0651/1117] Traditional Chinese translation updated by ChunChang Lo (#24993) git-svn-id: http://svn.redmine.org/redmine/trunk@16328 e93f8b46-1217-0410-a6f0-8f06a7374b81 --- config/locales/zh-TW.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/config/locales/zh-TW.yml b/config/locales/zh-TW.yml index d39c6ed85..9d6ed9c46 100644 --- a/config/locales/zh-TW.yml +++ b/config/locales/zh-TW.yml @@ -456,6 +456,7 @@ field_textarea_font: 文字區域使用的字型 field_updated_by: 更新者 field_last_updated_by: 上次更新者 + field_full_width_layout: 全寬度式版面配置 setting_app_title: 標題 setting_app_subtitle: 副標題 @@ -1295,4 +1296,3 @@ description_date_from: 輸入起始日期 description_date_to: 輸入結束日期 text_repository_identifier_info: '僅允許使用小寫英文字母 (a-z), 阿拉伯數字, 虛線與底線。
          一旦儲存之後, 代碼便無法再次被更改。' - field_full_width_layout: Full width layout From 79fb434fecabce06b1a3ee7aa6da1173dd59f5f3 Mon Sep 17 00:00:00 2001 From: Toshi MARUYAMA Date: Sun, 5 Feb 2017 05:22:29 +0000 Subject: [PATCH 0652/1117] Mercurial 4.1 compatibility (#24999) git-svn-id: http://svn.redmine.org/redmine/trunk@16329 e93f8b46-1217-0410-a6f0-8f06a7374b81 --- .../scm/adapters/mercurial/redminehelper.py | 123 +++++++++--------- 1 file changed, 62 insertions(+), 61 deletions(-) diff --git a/lib/redmine/scm/adapters/mercurial/redminehelper.py b/lib/redmine/scm/adapters/mercurial/redminehelper.py index b7d98a18f..27c30da2f 100644 --- a/lib/redmine/scm/adapters/mercurial/redminehelper.py +++ b/lib/redmine/scm/adapters/mercurial/redminehelper.py @@ -48,6 +48,9 @@ Output example of rhmanifest:: import re, time, cgi, urllib from mercurial import cmdutil, commands, node, error, hg +cmdtable = {} +command = cmdutil.command(cmdtable) + _x = cgi.escape _u = lambda s: cgi.escape(urllib.quote(s)) @@ -124,16 +127,30 @@ def _manifest(ui, repo, path, rev): ui.write('\n') +@command('rhannotate', + [('r', 'rev', '', 'revision'), + ('u', 'user', None, 'list the author (long with -v)'), + ('n', 'number', None, 'list the revision number (default)'), + ('c', 'changeset', None, 'list the changeset'), + ], + 'hg rhannotate [-r REV] [-u] [-n] [-c] FILE...') def rhannotate(ui, repo, *pats, **opts): rev = urllib.unquote_plus(opts.pop('rev', None)) opts['rev'] = rev return commands.annotate(ui, repo, *map(urllib.unquote_plus, pats), **opts) +@command('rhcat', + [('r', 'rev', '', 'revision')], + 'hg rhcat ([-r REV] ...) FILE...') def rhcat(ui, repo, file1, *pats, **opts): rev = urllib.unquote_plus(opts.pop('rev', None)) opts['rev'] = rev return commands.cat(ui, repo, urllib.unquote_plus(file1), *map(urllib.unquote_plus, pats), **opts) +@command('rhdiff', + [('r', 'rev', [], 'revision'), + ('c', 'change', '', 'change made by revision')], + 'hg rhdiff ([-c REV] | [-r REV] ...) [FILE]...') def rhdiff(ui, repo, *pats, **opts): """diff repository (or selected files)""" change = opts.pop('change', None) @@ -143,62 +160,7 @@ def rhdiff(ui, repo, *pats, **opts): opts['nodates'] = True return commands.diff(ui, repo, *map(urllib.unquote_plus, pats), **opts) -def rhlog(ui, repo, *pats, **opts): - rev = opts.pop('rev') - bra0 = opts.pop('branch') - from_rev = urllib.unquote_plus(opts.pop('from', None)) - to_rev = urllib.unquote_plus(opts.pop('to' , None)) - bra = urllib.unquote_plus(opts.pop('rhbranch', None)) - from_rev = from_rev.replace('"', '\\"') - to_rev = to_rev.replace('"', '\\"') - if hg.util.version() >= '1.6': - opts['rev'] = ['"%s":"%s"' % (from_rev, to_rev)] - else: - opts['rev'] = ['%s:%s' % (from_rev, to_rev)] - opts['branch'] = [bra] - return commands.log(ui, repo, *map(urllib.unquote_plus, pats), **opts) - -def rhmanifest(ui, repo, path='', **opts): - """output the sub-manifest of the specified directory""" - ui.write('\n') - ui.write('\n') - ui.write('\n' % _u(repo.root)) - try: - _manifest(ui, repo, urllib.unquote_plus(path), urllib.unquote_plus(opts.get('rev'))) - finally: - ui.write('\n') - ui.write('\n') - -def rhsummary(ui, repo, **opts): - """output the summary of the repository""" - ui.write('\n') - ui.write('\n') - ui.write('\n' % _u(repo.root)) - try: - _tip(ui, repo) - _tags(ui, repo) - _branches(ui, repo) - # TODO: bookmarks in core (Mercurial>=1.8) - finally: - ui.write('\n') - ui.write('\n') - -cmdtable = { - 'rhannotate': (rhannotate, - [('r', 'rev', '', 'revision'), - ('u', 'user', None, 'list the author (long with -v)'), - ('n', 'number', None, 'list the revision number (default)'), - ('c', 'changeset', None, 'list the changeset'), - ], - 'hg rhannotate [-r REV] [-u] [-n] [-c] FILE...'), - 'rhcat': (rhcat, - [('r', 'rev', '', 'revision')], - 'hg rhcat ([-r REV] ...) FILE...'), - 'rhdiff': (rhdiff, - [('r', 'rev', [], 'revision'), - ('c', 'change', '', 'change made by revision')], - 'hg rhdiff ([-c REV] | [-r REV] ...) [FILE]...'), - 'rhlog': (rhlog, +@command('rhlog', [ ('r', 'rev', [], 'show the specified revision'), ('b', 'branch', [], @@ -217,9 +179,48 @@ cmdtable = { ''), ('', 'template', '', 'display with template')], - 'hg rhlog [OPTION]... [FILE]'), - 'rhmanifest': (rhmanifest, + 'hg rhlog [OPTION]... [FILE]') +def rhlog(ui, repo, *pats, **opts): + rev = opts.pop('rev') + bra0 = opts.pop('branch') + from_rev = urllib.unquote_plus(opts.pop('from', None)) + to_rev = urllib.unquote_plus(opts.pop('to' , None)) + bra = urllib.unquote_plus(opts.pop('rhbranch', None)) + from_rev = from_rev.replace('"', '\\"') + to_rev = to_rev.replace('"', '\\"') + if hg.util.version() >= '1.6': + opts['rev'] = ['"%s":"%s"' % (from_rev, to_rev)] + else: + opts['rev'] = ['%s:%s' % (from_rev, to_rev)] + opts['branch'] = [bra] + return commands.log(ui, repo, *map(urllib.unquote_plus, pats), **opts) + +@command('rhmanifest', [('r', 'rev', '', 'show the specified revision')], - 'hg rhmanifest [-r REV] [PATH]'), - 'rhsummary': (rhsummary, [], 'hg rhsummary'), -} + 'hg rhmanifest [-r REV] [PATH]') +def rhmanifest(ui, repo, path='', **opts): + """output the sub-manifest of the specified directory""" + ui.write('\n') + ui.write('\n') + ui.write('\n' % _u(repo.root)) + try: + _manifest(ui, repo, urllib.unquote_plus(path), urllib.unquote_plus(opts.get('rev'))) + finally: + ui.write('\n') + ui.write('\n') + +@command('rhsummary',[], 'hg rhsummary') +def rhsummary(ui, repo, **opts): + """output the summary of the repository""" + ui.write('\n') + ui.write('\n') + ui.write('\n' % _u(repo.root)) + try: + _tip(ui, repo) + _tags(ui, repo) + _branches(ui, repo) + # TODO: bookmarks in core (Mercurial>=1.8) + finally: + ui.write('\n') + ui.write('\n') + From e20adb0532f07510320b118df2c2e53efafd294e Mon Sep 17 00:00:00 2001 From: Toshi MARUYAMA Date: Thu, 9 Feb 2017 04:08:36 +0000 Subject: [PATCH 0653/1117] remove trailing white space from app/controllers/issues_controller.rb git-svn-id: http://svn.redmine.org/redmine/trunk@16332 e93f8b46-1217-0410-a6f0-8f06a7374b81 --- app/controllers/issues_controller.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app/controllers/issues_controller.rb b/app/controllers/issues_controller.rb index ee24d53a1..906130e1a 100644 --- a/app/controllers/issues_controller.rb +++ b/app/controllers/issues_controller.rb @@ -404,7 +404,7 @@ class IssuesController < ApplicationController # Overrides Redmine::MenuManager::MenuController::ClassMethods for # when the "New issue" tab is enabled def current_menu_item - if Setting.new_item_menu_tab == '1' && [:new, :create].include?(action_name.to_sym) + if Setting.new_item_menu_tab == '1' && [:new, :create].include?(action_name.to_sym) :new_issue else super From 3da129ddcf3c23309afb06f57ea5b7b488859262 Mon Sep 17 00:00:00 2001 From: Toshi MARUYAMA Date: Sun, 12 Feb 2017 14:09:07 +0000 Subject: [PATCH 0654/1117] remove trailing white space from test/unit/setting_test.rb git-svn-id: http://svn.redmine.org/redmine/trunk@16333 e93f8b46-1217-0410-a6f0-8f06a7374b81 --- test/unit/setting_test.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/test/unit/setting_test.rb b/test/unit/setting_test.rb index 58ea2fba2..d2bdf5efc 100644 --- a/test/unit/setting_test.rb +++ b/test/unit/setting_test.rb @@ -110,7 +110,7 @@ class SettingTest < ActiveSupport::TestCase def test_setting_serialied_as_binary_should_be_loaded_as_utf8_encoded_strings yaml = <<-YAML ---- +--- - keywords: !binary | Zml4ZXMsY2xvc2VzLNC40YHQv9GA0LDQstC70LXQvdC+LNCz0L7RgtC+0LLQ vizRgdC00LXQu9Cw0L3QvixmaXhlZA== From 1aa32dfd37d887f141003f9735566d1815fa7c6f Mon Sep 17 00:00:00 2001 From: Toshi MARUYAMA Date: Thu, 16 Feb 2017 05:49:08 +0000 Subject: [PATCH 0655/1117] remove empty lines including trailing white space from test/unit/search_test.rb git-svn-id: http://svn.redmine.org/redmine/trunk@16334 e93f8b46-1217-0410-a6f0-8f06a7374b81 --- test/unit/search_test.rb | 4 ---- 1 file changed, 4 deletions(-) diff --git a/test/unit/search_test.rb b/test/unit/search_test.rb index 7395811ca..fc3b74654 100644 --- a/test/unit/search_test.rb +++ b/test/unit/search_test.rb @@ -153,7 +153,6 @@ class SearchTest < ActiveSupport::TestCase unless sqlite? issue1 = Issue.generate!(:subject => "Special chars: ÖÖ") issue2 = Issue.generate!(:subject => "Special chars: Öö") - r = Issue.search_results('ÖÖ') assert_include issue1, r assert_include issue2, r @@ -164,7 +163,6 @@ class SearchTest < ActiveSupport::TestCase if mysql? issue1 = Issue.generate!(:subject => "OO") issue2 = Issue.generate!(:subject => "oo") - r = Issue.search_results('ÖÖ') assert_include issue1, r assert_include issue2, r @@ -178,10 +176,8 @@ class SearchTest < ActiveSupport::TestCase ActiveRecord::Base.connection.execute("CREATE EXTENSION IF NOT EXISTS unaccent") Redmine::Database.reset assert Redmine::Database.postgresql_unaccent? - issue1 = Issue.generate!(:subject => "OO") issue2 = Issue.generate!(:subject => "oo") - r = Issue.search_results('ÖÖ') assert_include issue1, r assert_include issue2, r From 648d27e978e98c50eabefd8ac7e170e3e85a3381 Mon Sep 17 00:00:00 2001 From: Toshi MARUYAMA Date: Tue, 21 Feb 2017 10:29:24 +0000 Subject: [PATCH 0656/1117] Remove unused "description_date_*" from locale files (#24899) Contributed by Go MAEDA. git-svn-id: http://svn.redmine.org/redmine/trunk@16335 e93f8b46-1217-0410-a6f0-8f06a7374b81 --- config/locales/ar.yml | 4 ---- config/locales/az.yml | 4 ---- config/locales/bg.yml | 4 ---- config/locales/bs.yml | 4 ---- config/locales/ca.yml | 4 ---- config/locales/cs.yml | 4 ---- config/locales/da.yml | 4 ---- config/locales/de.yml | 4 ---- config/locales/el.yml | 4 ---- config/locales/en-GB.yml | 4 ---- config/locales/en.yml | 4 ---- config/locales/es-PA.yml | 4 ---- config/locales/es.yml | 4 ---- config/locales/et.yml | 4 ---- config/locales/eu.yml | 4 ---- config/locales/fa.yml | 4 ---- config/locales/fi.yml | 4 ---- config/locales/fr.yml | 4 ---- config/locales/gl.yml | 4 ---- config/locales/he.yml | 4 ---- config/locales/hr.yml | 4 ---- config/locales/hu.yml | 4 ---- config/locales/id.yml | 4 ---- config/locales/it.yml | 4 ---- config/locales/ja.yml | 4 ---- config/locales/ko.yml | 4 ---- config/locales/lt.yml | 4 ---- config/locales/lv.yml | 4 ---- config/locales/mk.yml | 4 ---- config/locales/mn.yml | 4 ---- config/locales/nl.yml | 4 ---- config/locales/no.yml | 4 ---- config/locales/pl.yml | 4 ---- config/locales/pt-BR.yml | 4 ---- config/locales/pt.yml | 4 ---- config/locales/ro.yml | 4 ---- config/locales/ru.yml | 4 ---- config/locales/sk.yml | 4 ---- config/locales/sl.yml | 4 ---- config/locales/sq.yml | 4 ---- config/locales/sr-YU.yml | 4 ---- config/locales/sr.yml | 4 ---- config/locales/sv.yml | 4 ---- config/locales/th.yml | 4 ---- config/locales/tr.yml | 4 ---- config/locales/uk.yml | 4 ---- config/locales/vi.yml | 4 ---- config/locales/zh-TW.yml | 4 ---- config/locales/zh.yml | 4 ---- 49 files changed, 196 deletions(-) diff --git a/config/locales/ar.yml b/config/locales/ar.yml index 1691e0156..05724d243 100644 --- a/config/locales/ar.yml +++ b/config/locales/ar.yml @@ -984,10 +984,6 @@ ar: description_all_columns: كل الاعمدة description_issue_category_reassign: اختر التصنيف description_wiki_subpages_reassign: اختر صفحة جديدة - description_date_range_list: اختر المجال من القائمة - description_date_range_interval: اختر المدة عن طريق اختيار تاريخ البداية والنهاية - description_date_from: ادخل تاريخ البداية - description_date_to: ادخل تاريخ الانتهاء text_rmagick_available: RMagick available (optional) text_wiki_page_destroy_question: This page has %{descendants} child page(s) and descendant(s). What do you want to do? text_repository_usernames_mapping: |- diff --git a/config/locales/az.yml b/config/locales/az.yml index 89cad5e70..96ca7bf2f 100644 --- a/config/locales/az.yml +++ b/config/locales/az.yml @@ -1066,16 +1066,12 @@ az: description_project_scope: Layihənin həcmi description_filter: Filtr description_user_mail_notification: E-poçt Mail xəbərdarlıqlarının sazlaması - description_date_from: Başlama tarixini daxil edin description_message_content: Mesajın kontenti description_available_columns: Mövcud sütunlar - description_date_range_interval: Tarixlər diapazonunu seçin description_issue_category_reassign: Məsələnin kateqoriyasını seçin description_search: Axtarış sahəsi description_notes: Qeyd - description_date_range_list: Siyahıdan diapazonu seçin description_choose_project: Layihələr - description_date_to: Yerinə yetirilmə tarixini daxil edin description_query_sort_criteria_attribute: Çeşidləmə meyarları description_wiki_subpages_reassign: Yeni valideyn səhifəsini seçmək description_selected_columns: Seçilmiş sütunlar diff --git a/config/locales/bg.yml b/config/locales/bg.yml index 0d2583113..ae24d9c02 100644 --- a/config/locales/bg.yml +++ b/config/locales/bg.yml @@ -1208,8 +1208,4 @@ bg: description_issue_category_reassign: Изберете категория description_wiki_subpages_reassign: Изберете нова родителска страница description_all_columns: Всички колони - description_date_range_list: Изберете диапазон от списъка - description_date_range_interval: Изберете диапазон чрез задаване на начална и крайна дати - description_date_from: Въведете начална дата - description_date_to: Въведете крайна дата text_repository_identifier_info: 'Позволени са малки букви (a-z), цифри, тирета и _.
          Промяна след създаването му не е възможна.' diff --git a/config/locales/bs.yml b/config/locales/bs.yml index df2cee4b7..9c3586f21 100644 --- a/config/locales/bs.yml +++ b/config/locales/bs.yml @@ -980,16 +980,12 @@ bs: description_project_scope: Search scope description_filter: Filter description_user_mail_notification: Mail notification settings - description_date_from: Enter start date description_message_content: Message content description_available_columns: Available Columns - description_date_range_interval: Choose range by selecting start and end date description_issue_category_reassign: Choose issue category description_search: Searchfield description_notes: Notes - description_date_range_list: Choose range from list description_choose_project: Projects - description_date_to: Enter end date description_query_sort_criteria_attribute: Sort attribute description_wiki_subpages_reassign: Choose new parent page description_selected_columns: Selected Columns diff --git a/config/locales/ca.yml b/config/locales/ca.yml index 3fa40dd8c..e26d527b2 100644 --- a/config/locales/ca.yml +++ b/config/locales/ca.yml @@ -970,16 +970,12 @@ ca: description_project_scope: "Àmbit de la cerca" description_filter: "Filtre" description_user_mail_notification: "Configuració de les notificacions per correu" - description_date_from: "Introduir data d'inici" description_message_content: "Contingut del missatge" description_available_columns: "Columnes disponibles" - description_date_range_interval: "Escollir un rang seleccionat de dates (inici i fi)" description_issue_category_reassign: "Escollir una categoria de l'assumpte" description_search: "Camp de cerca" description_notes: "Notes" - description_date_range_list: "Escollir un rang de la llista" description_choose_project: "Projectes" - description_date_to: "Introduir data final" description_query_sort_criteria_attribute: "Atribut d'ordenació" description_wiki_subpages_reassign: "Esculli la nova pàgina pare" description_selected_columns: "Columnes seleccionades" diff --git a/config/locales/cs.yml b/config/locales/cs.yml index 46815428d..521e9fac4 100644 --- a/config/locales/cs.yml +++ b/config/locales/cs.yml @@ -974,16 +974,12 @@ cs: description_project_scope: Rozsah vyhledávání description_filter: Filtr description_user_mail_notification: Nastavení emailových notifikací - description_date_from: Zadejte počáteční datum description_message_content: Obsah zprávy description_available_columns: Dostupné sloupce - description_date_range_interval: Zvolte rozsah výběrem počátečního a koncového data description_issue_category_reassign: Zvolte kategorii úkolu description_search: Vyhledávací pole description_notes: Poznámky - description_date_range_list: Zvolte rozsah ze seznamu description_choose_project: Projekty - description_date_to: Zadejte datum description_query_sort_criteria_attribute: Třídící atribut description_wiki_subpages_reassign: Zvolte novou rodičovskou stránku description_selected_columns: Vybraný sloupec diff --git a/config/locales/da.yml b/config/locales/da.yml index 5020adc34..4cb74e166 100644 --- a/config/locales/da.yml +++ b/config/locales/da.yml @@ -984,16 +984,12 @@ da: description_project_scope: Search scope description_filter: Filter description_user_mail_notification: Mail notification settings - description_date_from: Enter start date description_message_content: Message content description_available_columns: Available Columns - description_date_range_interval: Choose range by selecting start and end date description_issue_category_reassign: Choose issue category description_search: Searchfield description_notes: Notes - description_date_range_list: Choose range from list description_choose_project: Projects - description_date_to: Enter end date description_query_sort_criteria_attribute: Sort attribute description_wiki_subpages_reassign: Choose new parent page description_selected_columns: Selected Columns diff --git a/config/locales/de.yml b/config/locales/de.yml index 283e9406f..20909e109 100644 --- a/config/locales/de.yml +++ b/config/locales/de.yml @@ -229,10 +229,6 @@ de: description_all_columns: Alle Spalten description_available_columns: Verfügbare Spalten description_choose_project: Projekte - description_date_from: Startdatum eintragen - description_date_range_interval: Zeitraum durch Start- und Enddatum festlegen - description_date_range_list: Zeitraum aus einer Liste wählen - description_date_to: Enddatum eintragen description_filter: Filter description_issue_category_reassign: Neue Kategorie wählen description_message_content: Nachrichteninhalt diff --git a/config/locales/el.yml b/config/locales/el.yml index 689ba6cee..94ff5ad1b 100644 --- a/config/locales/el.yml +++ b/config/locales/el.yml @@ -967,16 +967,12 @@ el: description_project_scope: Search scope description_filter: Filter description_user_mail_notification: Mail notification settings - description_date_from: Enter start date description_message_content: Message content description_available_columns: Available Columns - description_date_range_interval: Choose range by selecting start and end date description_issue_category_reassign: Choose issue category description_search: Searchfield description_notes: Notes - description_date_range_list: Choose range from list description_choose_project: Projects - description_date_to: Enter end date description_query_sort_criteria_attribute: Sort attribute description_wiki_subpages_reassign: Choose new parent page description_selected_columns: Selected Columns diff --git a/config/locales/en-GB.yml b/config/locales/en-GB.yml index 4bd828225..219e7f73b 100644 --- a/config/locales/en-GB.yml +++ b/config/locales/en-GB.yml @@ -976,16 +976,12 @@ en-GB: description_project_scope: Search scope description_filter: Filter description_user_mail_notification: Mail notification settings - description_date_from: Enter start date description_message_content: Message content description_available_columns: Available Columns - description_date_range_interval: Choose range by selecting start and end date description_issue_category_reassign: Choose issue category description_search: Searchfield description_notes: Notes - description_date_range_list: Choose range from list description_choose_project: Projects - description_date_to: Enter end date description_query_sort_criteria_attribute: Sort attribute description_wiki_subpages_reassign: Choose new parent page description_selected_columns: Selected Columns diff --git a/config/locales/en.yml b/config/locales/en.yml index fb9b6bf1f..a7e3e7fd8 100644 --- a/config/locales/en.yml +++ b/config/locales/en.yml @@ -1205,8 +1205,4 @@ en: description_all_columns: All Columns description_issue_category_reassign: Choose issue category description_wiki_subpages_reassign: Choose new parent page - description_date_range_list: Choose range from list - description_date_range_interval: Choose range by selecting start and end date - description_date_from: Enter start date - description_date_to: Enter end date text_repository_identifier_info: 'Only lower case letters (a-z), numbers, dashes and underscores are allowed.
          Once saved, the identifier cannot be changed.' diff --git a/config/locales/es-PA.yml b/config/locales/es-PA.yml index 7fcdf01d8..cb85801c0 100644 --- a/config/locales/es-PA.yml +++ b/config/locales/es-PA.yml @@ -1012,16 +1012,12 @@ es-PA: description_project_scope: Ámbito de búsqueda description_filter: Filtro description_user_mail_notification: Configuración de notificaciones por correo - description_date_from: Introduzca la fecha de inicio description_message_content: Contenido del mensaje description_available_columns: Columnas disponibles - description_date_range_interval: Elija el rango seleccionando la fecha de inicio y fin description_issue_category_reassign: Elija la categoría de la incidencia description_search: Campo de búsqueda description_notes: Notas - description_date_range_list: Elija el rango en la lista description_choose_project: Proyectos - description_date_to: Introduzca la fecha fin description_query_sort_criteria_attribute: Atributo de ordenación description_wiki_subpages_reassign: Elija la nueva página padre description_selected_columns: Columnas seleccionadas diff --git a/config/locales/es.yml b/config/locales/es.yml index fb80781e1..d1e664fe1 100644 --- a/config/locales/es.yml +++ b/config/locales/es.yml @@ -1010,16 +1010,12 @@ es: description_project_scope: Ámbito de búsqueda description_filter: Filtro description_user_mail_notification: Configuración de notificaciones por correo - description_date_from: Introduzca la fecha de inicio description_message_content: Contenido del mensaje description_available_columns: Columnas disponibles - description_date_range_interval: Elija el rango seleccionando la fecha de inicio y fin description_issue_category_reassign: Elija la categoría de la petición description_search: Campo de búsqueda description_notes: Notas - description_date_range_list: Elija el rango en la lista description_choose_project: Proyectos - description_date_to: Introduzca la fecha fin description_query_sort_criteria_attribute: Atributo de ordenación description_wiki_subpages_reassign: Elija la nueva página padre description_selected_columns: Columnas seleccionadas diff --git a/config/locales/et.yml b/config/locales/et.yml index ea78d1eaf..ea887c84b 100644 --- a/config/locales/et.yml +++ b/config/locales/et.yml @@ -1028,10 +1028,6 @@ et: description_all_columns: "Kõik veerud" description_issue_category_reassign: "Vali uus kategooria" description_wiki_subpages_reassign: "Vali lehele uus vanem" - description_date_range_list: "Vali vahemik nimekirjast" - description_date_range_interval: "Vali vahemik algus- ja lõpukuupäeva abil" - description_date_from: "Sisesta alguskuupäev" - description_date_to: "Sisesta lõpukuupäev" error_session_expired: "Sinu sessioon on aegunud. Palun logi uuesti sisse" text_session_expiration_settings: "Hoiatus! Nende sätete muutmine võib kehtivad sessioonid lõpetada. Ka sinu enda oma!" setting_session_lifetime: "Sessiooni eluiga" diff --git a/config/locales/eu.yml b/config/locales/eu.yml index 3bc6a36c4..2ae638c94 100644 --- a/config/locales/eu.yml +++ b/config/locales/eu.yml @@ -969,16 +969,12 @@ eu: description_project_scope: Search scope description_filter: Filter description_user_mail_notification: Mail notification settings - description_date_from: Enter start date description_message_content: Message content description_available_columns: Available Columns - description_date_range_interval: Choose range by selecting start and end date description_issue_category_reassign: Choose issue category description_search: Searchfield description_notes: Notes - description_date_range_list: Choose range from list description_choose_project: Projects - description_date_to: Enter end date description_query_sort_criteria_attribute: Sort attribute description_wiki_subpages_reassign: Choose new parent page description_selected_columns: Selected Columns diff --git a/config/locales/fa.yml b/config/locales/fa.yml index baec1f9c8..13247dfff 100644 --- a/config/locales/fa.yml +++ b/config/locales/fa.yml @@ -969,16 +969,12 @@ fa: description_project_scope: Search scope description_filter: Filter description_user_mail_notification: Mail notification settings - description_date_from: Enter start date description_message_content: Message content description_available_columns: Available Columns - description_date_range_interval: Choose range by selecting start and end date description_issue_category_reassign: Choose issue category description_search: Searchfield description_notes: Notes - description_date_range_list: Choose range from list description_choose_project: Projects - description_date_to: Enter end date description_query_sort_criteria_attribute: Sort attribute description_wiki_subpages_reassign: Choose new parent page description_selected_columns: Selected Columns diff --git a/config/locales/fi.yml b/config/locales/fi.yml index 33516b84e..49bbcaaa6 100644 --- a/config/locales/fi.yml +++ b/config/locales/fi.yml @@ -988,16 +988,12 @@ fi: description_project_scope: Search scope description_filter: Filter description_user_mail_notification: Mail notification settings - description_date_from: Enter start date description_message_content: Message content description_available_columns: Available Columns - description_date_range_interval: Choose range by selecting start and end date description_issue_category_reassign: Choose issue category description_search: Searchfield description_notes: Notes - description_date_range_list: Choose range from list description_choose_project: Projects - description_date_to: Enter end date description_query_sort_criteria_attribute: Sort attribute description_wiki_subpages_reassign: Choose new parent page description_selected_columns: Selected Columns diff --git a/config/locales/fr.yml b/config/locales/fr.yml index b1e0239c7..dfac2ce40 100644 --- a/config/locales/fr.yml +++ b/config/locales/fr.yml @@ -1212,10 +1212,6 @@ fr: description_all_columns: Toutes les colonnes description_issue_category_reassign: Choisir une catégorie description_wiki_subpages_reassign: Choisir une nouvelle page parent - description_date_range_list: Choisir une période prédéfinie - description_date_range_interval: Choisir une période - description_date_from: Date de début - description_date_to: Date de fin text_repository_identifier_info: 'Seuls les lettres minuscules (a-z), chiffres, tirets et tirets bas sont autorisés.
          Un fois sauvegardé, l''identifiant ne pourra plus être modifié.' label_parent_task_attributes_derived: Calculé à partir des sous-tâches label_parent_task_attributes_independent: Indépendent des sous-tâches diff --git a/config/locales/gl.yml b/config/locales/gl.yml index a98e07c6f..4b8b2947b 100644 --- a/config/locales/gl.yml +++ b/config/locales/gl.yml @@ -981,16 +981,12 @@ gl: description_project_scope: "Ámbito da busca" description_filter: "Filtro" description_user_mail_notification: "Configuración das notificacións por correo electrónico" - description_date_from: "Introduza a data de inicio" description_message_content: "Contido da mensaxe" description_available_columns: "Columnas dispoñíbeis" - description_date_range_interval: "Escolla un intervalo seleccionando unha data de inicio e outra de fin." description_issue_category_reassign: "Escolla a categoría da petición." description_search: "Campo de busca" description_notes: "Notas" - description_date_range_list: "Escolla un intervalo da lista." description_choose_project: "Proxectos" - description_date_to: "Introduza a data de fin" description_query_sort_criteria_attribute: "Ordenar polo atributo" description_wiki_subpages_reassign: "Escoller unha nova páxina superior" description_selected_columns: "Columnas seleccionadas" diff --git a/config/locales/he.yml b/config/locales/he.yml index 28d6550fb..655a9681c 100644 --- a/config/locales/he.yml +++ b/config/locales/he.yml @@ -972,16 +972,12 @@ he: description_project_scope: Search scope description_filter: Filter description_user_mail_notification: Mail notification settings - description_date_from: Enter start date description_message_content: Message content description_available_columns: Available Columns - description_date_range_interval: Choose range by selecting start and end date description_issue_category_reassign: Choose issue category description_search: Searchfield description_notes: Notes - description_date_range_list: Choose range from list description_choose_project: Projects - description_date_to: Enter end date description_query_sort_criteria_attribute: Sort attribute description_wiki_subpages_reassign: Choose new parent page description_selected_columns: Selected Columns diff --git a/config/locales/hr.yml b/config/locales/hr.yml index 65e97b06e..ff77b53e7 100644 --- a/config/locales/hr.yml +++ b/config/locales/hr.yml @@ -966,16 +966,12 @@ hr: description_project_scope: Search scope description_filter: Filter description_user_mail_notification: Mail notification settings - description_date_from: Enter start date description_message_content: Message content description_available_columns: Available Columns - description_date_range_interval: Choose range by selecting start and end date description_issue_category_reassign: Choose issue category description_search: Searchfield description_notes: Notes - description_date_range_list: Choose range from list description_choose_project: Projects - description_date_to: Enter end date description_query_sort_criteria_attribute: Sort attribute description_wiki_subpages_reassign: Choose new parent page description_selected_columns: Selected Columns diff --git a/config/locales/hu.yml b/config/locales/hu.yml index a55042486..dc295f38d 100644 --- a/config/locales/hu.yml +++ b/config/locales/hu.yml @@ -987,16 +987,12 @@ description_project_scope: Search scope description_filter: Filter description_user_mail_notification: Mail notification settings - description_date_from: Enter start date description_message_content: Message content description_available_columns: Available Columns - description_date_range_interval: Choose range by selecting start and end date description_issue_category_reassign: Choose issue category description_search: Searchfield description_notes: Notes - description_date_range_list: Choose range from list description_choose_project: Projects - description_date_to: Enter end date description_query_sort_criteria_attribute: Sort attribute description_wiki_subpages_reassign: Choose new parent page description_selected_columns: Selected Columns diff --git a/config/locales/id.yml b/config/locales/id.yml index f8638cddb..63c0bc9f9 100644 --- a/config/locales/id.yml +++ b/config/locales/id.yml @@ -971,16 +971,12 @@ id: description_project_scope: Search scope description_filter: Filter description_user_mail_notification: Mail notification settings - description_date_from: Enter start date description_message_content: Message content description_available_columns: Available Columns - description_date_range_interval: Choose range by selecting start and end date description_issue_category_reassign: Choose issue category description_search: Searchfield description_notes: Notes - description_date_range_list: Choose range from list description_choose_project: Projects - description_date_to: Enter end date description_query_sort_criteria_attribute: Sort attribute description_wiki_subpages_reassign: Choose new parent page description_selected_columns: Selected Columns diff --git a/config/locales/it.yml b/config/locales/it.yml index 8917c66bb..0f4a2530d 100644 --- a/config/locales/it.yml +++ b/config/locales/it.yml @@ -970,16 +970,12 @@ it: description_project_scope: Ambito della ricerca description_filter: Filtro description_user_mail_notification: Impostazioni notifica via mail - description_date_from: Inserisci la data d'inizio description_message_content: Contenuto del messaggio description_available_columns: Colonne disponibili - description_date_range_interval: Scegli l'intervallo selezionando la data di inizio e di fine description_issue_category_reassign: Scegli la categoria della segnalazione description_search: Campo di ricerca description_notes: Note - description_date_range_list: Scegli l'intervallo dalla lista description_choose_project: Progetti - description_date_to: Inserisci la data di fine description_query_sort_criteria_attribute: Attributo di ordinamento description_wiki_subpages_reassign: Scegli la nuova pagina padre description_selected_columns: Colonne selezionate diff --git a/config/locales/ja.yml b/config/locales/ja.yml index 57a24eef9..e0d0ebd2b 100644 --- a/config/locales/ja.yml +++ b/config/locales/ja.yml @@ -999,16 +999,12 @@ ja: description_project_scope: 検索範囲 description_filter: Filter description_user_mail_notification: メール通知の設定 - description_date_from: 開始日 description_message_content: 内容 description_available_columns: 利用できる項目 - description_date_range_interval: 日付で指定 description_issue_category_reassign: 新しいカテゴリを選択してください description_search: 検索キーワード description_notes: 注記 - description_date_range_list: 一覧から選択 description_choose_project: プロジェクト - description_date_to: 終了日 description_query_sort_criteria_attribute: 項目 description_wiki_subpages_reassign: 新しい親ページを選択してください description_selected_columns: 選択された項目 diff --git a/config/locales/ko.yml b/config/locales/ko.yml index da545895a..ab7c6194f 100644 --- a/config/locales/ko.yml +++ b/config/locales/ko.yml @@ -1019,16 +1019,12 @@ ko: description_project_scope: "검색 범위" description_filter: "검색 조건" description_user_mail_notification: "메일 알림 설정" - description_date_from: "시작 날짜 입력" description_message_content: "메세지 내용" description_available_columns: "가능한 컬럼" - description_date_range_interval: "시작과 끝 날짜로 범위를 선택하십시오." description_issue_category_reassign: "일감 범주를 선택하십시오." description_search: "검색항목" description_notes: "덧글" - description_date_range_list: "목록에서 범위를 선택 하십시오." description_choose_project: "프로젝트" - description_date_to: "종료 날짜 입력" description_query_sort_criteria_attribute: "정렬 속성" description_wiki_subpages_reassign: "새로운 상위 페이지를 선택하십시오." description_selected_columns: "선택된 컬럼" diff --git a/config/locales/lt.yml b/config/locales/lt.yml index eab651081..af437abd7 100644 --- a/config/locales/lt.yml +++ b/config/locales/lt.yml @@ -1179,10 +1179,6 @@ lt: description_all_columns: AVisi stulpeliai description_issue_category_reassign: Pasirinkti darbo kategoriją description_wiki_subpages_reassign: Pasirinkti naują pagrindinį puslapį - description_date_range_list: Pasirinkitę diapazoną iš sąrašo - description_date_range_interval: Pasirinkite diapazoną pasirinkdami pradžios ir pabaigos datas - description_date_from: Įvesti pradžios datą - description_date_to: Įvesti pabaigos datą text_repository_identifier_info: 'Leidžiamos tik mažosios raidės (a-z), skaitmenys, brūkšneliai ir pabraukimo simboliai.
          Kartą išsaugojus pakeitimai negalimi' label_wiki_page_new: New wiki page label_relations: Relations diff --git a/config/locales/lv.yml b/config/locales/lv.yml index ed21dbadf..2a9edd1f9 100644 --- a/config/locales/lv.yml +++ b/config/locales/lv.yml @@ -961,16 +961,12 @@ lv: description_project_scope: Search scope description_filter: Filter description_user_mail_notification: Mail notification settings - description_date_from: Enter start date description_message_content: Message content description_available_columns: Available Columns - description_date_range_interval: Choose range by selecting start and end date description_issue_category_reassign: Choose issue category description_search: Searchfield description_notes: Notes - description_date_range_list: Choose range from list description_choose_project: Projects - description_date_to: Enter end date description_query_sort_criteria_attribute: Sort attribute description_wiki_subpages_reassign: Choose new parent page description_selected_columns: Selected Columns diff --git a/config/locales/mk.yml b/config/locales/mk.yml index d58cd12e3..0bd62e986 100644 --- a/config/locales/mk.yml +++ b/config/locales/mk.yml @@ -966,16 +966,12 @@ mk: description_project_scope: Search scope description_filter: Filter description_user_mail_notification: Mail notification settings - description_date_from: Enter start date description_message_content: Message content description_available_columns: Available Columns - description_date_range_interval: Choose range by selecting start and end date description_issue_category_reassign: Choose issue category description_search: Searchfield description_notes: Notes - description_date_range_list: Choose range from list description_choose_project: Projects - description_date_to: Enter end date description_query_sort_criteria_attribute: Sort attribute description_wiki_subpages_reassign: Choose new parent page description_selected_columns: Selected Columns diff --git a/config/locales/mn.yml b/config/locales/mn.yml index 5ea00fa53..07f06436d 100644 --- a/config/locales/mn.yml +++ b/config/locales/mn.yml @@ -968,16 +968,12 @@ mn: description_project_scope: Search scope description_filter: Filter description_user_mail_notification: Mail notification settings - description_date_from: Enter start date description_message_content: Message content description_available_columns: Available Columns - description_date_range_interval: Choose range by selecting start and end date description_issue_category_reassign: Choose issue category description_search: Searchfield description_notes: Notes - description_date_range_list: Choose range from list description_choose_project: Projects - description_date_to: Enter end date description_query_sort_criteria_attribute: Sort attribute description_wiki_subpages_reassign: Choose new parent page description_selected_columns: Selected Columns diff --git a/config/locales/nl.yml b/config/locales/nl.yml index 7804fca9b..a9894dcdc 100644 --- a/config/locales/nl.yml +++ b/config/locales/nl.yml @@ -951,16 +951,12 @@ nl: description_project_scope: Zoekbereik description_filter: Filteren description_user_mail_notification: Instellingen voor e-mailnotificaties - description_date_from: Startdatum invullen description_message_content: Berichtinhoud description_available_columns: Beschikbare kolommen - description_date_range_interval: Bereik bij het selecteren van een start- en einddatum kiezen description_issue_category_reassign: Issuecategorie kiezen description_search: Zoekveld description_notes: Notities - description_date_range_list: Bereik vanuit de lijst kiezen description_choose_project: Projecten - description_date_to: Einddatum invullen description_query_sort_criteria_attribute: Attribuut sorteren description_wiki_subpages_reassign: Nieuwe hoofdpagina kiezen description_selected_columns: Geselecteerde kolommen diff --git a/config/locales/no.yml b/config/locales/no.yml index 2d66b473b..1d97a1b46 100644 --- a/config/locales/no.yml +++ b/config/locales/no.yml @@ -960,16 +960,12 @@ description_project_scope: Search scope description_filter: Filter description_user_mail_notification: Mail notification settings - description_date_from: Oppgi startdato description_message_content: Meldingsinnhold description_available_columns: Tilgjengelige kolonner - description_date_range_interval: Velg datointervall ved å spesifisere start- og sluttdato description_issue_category_reassign: Choose issue category description_search: Søkefelt description_notes: Notes - description_date_range_list: Choose range from list description_choose_project: Prosjekter - description_date_to: Oppgi sluttdato description_query_sort_criteria_attribute: Sort attribute description_wiki_subpages_reassign: Velg ny overordnet side description_selected_columns: Valgte kolonner diff --git a/config/locales/pl.yml b/config/locales/pl.yml index c1e905ecc..bcaa48628 100644 --- a/config/locales/pl.yml +++ b/config/locales/pl.yml @@ -986,16 +986,12 @@ pl: description_project_scope: Search scope description_filter: Filter description_user_mail_notification: Mail notification settings - description_date_from: Enter start date description_message_content: Message content description_available_columns: Dostępne kolumny - description_date_range_interval: Choose range by selecting start and end date description_issue_category_reassign: Choose issue category description_search: Searchfield description_notes: Notes - description_date_range_list: Choose range from list description_choose_project: Projects - description_date_to: Enter end date description_query_sort_criteria_attribute: Sort attribute description_wiki_subpages_reassign: Choose new parent page description_selected_columns: Wybrane kolumny diff --git a/config/locales/pt-BR.yml b/config/locales/pt-BR.yml index 3a4135691..c57f9c608 100644 --- a/config/locales/pt-BR.yml +++ b/config/locales/pt-BR.yml @@ -991,16 +991,12 @@ pt-BR: description_project_scope: Escopo da pesquisa description_filter: Filtro description_user_mail_notification: Configuração de notificações por e-mail - description_date_from: Digite a data inicial description_message_content: Conteúdo da mensagem description_available_columns: Colunas disponíveis - description_date_range_interval: Escolha um período selecionando a data de início e fim description_issue_category_reassign: Escolha uma categoria de tarefas description_search: Campo de busca description_notes: Notas - description_date_range_list: Escolha um período a partir da lista description_choose_project: Projetos - description_date_to: Digite a data final description_query_sort_criteria_attribute: Atributo de ordenação description_wiki_subpages_reassign: Escolha uma nova página pai description_selected_columns: Colunas selecionadas diff --git a/config/locales/pt.yml b/config/locales/pt.yml index 722fa537f..e20de98b3 100644 --- a/config/locales/pt.yml +++ b/config/locales/pt.yml @@ -977,16 +977,12 @@ pt: description_project_scope: Âmbito da pesquisa description_filter: Filtro description_user_mail_notification: Configurações das notificações por e-mail - description_date_from: Introduza data de início description_message_content: Conteúdo da mensagem description_available_columns: Colunas disponíveis - description_date_range_interval: Escolha o intervalo selecionando a data de início e de fim description_issue_category_reassign: Escolha a categoria da tarefa description_search: Campo de pesquisa description_notes: Notas - description_date_range_list: Escolha o intervalo da lista description_choose_project: Projeto - description_date_to: Introduza data de fim description_query_sort_criteria_attribute: Ordenar atributos description_wiki_subpages_reassign: Escolha nova página pai description_selected_columns: Colunas selecionadas diff --git a/config/locales/ro.yml b/config/locales/ro.yml index 6da0f641e..e55adbdb7 100644 --- a/config/locales/ro.yml +++ b/config/locales/ro.yml @@ -962,16 +962,12 @@ ro: description_project_scope: Search scope description_filter: Filter description_user_mail_notification: Mail notification settings - description_date_from: Enter start date description_message_content: Message content description_available_columns: Available Columns - description_date_range_interval: Choose range by selecting start and end date description_issue_category_reassign: Choose issue category description_search: Searchfield description_notes: Notes - description_date_range_list: Choose range from list description_choose_project: Projects - description_date_to: Enter end date description_query_sort_criteria_attribute: Sort attribute description_wiki_subpages_reassign: Choose new parent page description_selected_columns: Selected Columns diff --git a/config/locales/ru.yml b/config/locales/ru.yml index a07174a33..d97df5b41 100644 --- a/config/locales/ru.yml +++ b/config/locales/ru.yml @@ -1076,16 +1076,12 @@ ru: description_project_scope: Область поиска description_filter: Фильтр description_user_mail_notification: Настройки почтовых оповещений - description_date_from: Введите дату начала description_message_content: Содержание сообщения description_available_columns: Доступные столбцы - description_date_range_interval: Выберите диапазон, установив дату начала и дату окончания description_issue_category_reassign: Выберите категорию задачи description_search: Поле поиска description_notes: Примечания - description_date_range_list: Выберите диапазон из списка description_choose_project: Проекты - description_date_to: Введите дату выполнения description_query_sort_criteria_attribute: Критерий сортировки description_wiki_subpages_reassign: Выбрать новую родительскую страницу description_selected_columns: Выбранные столбцы diff --git a/config/locales/sk.yml b/config/locales/sk.yml index d7e5f5239..d295a3613 100644 --- a/config/locales/sk.yml +++ b/config/locales/sk.yml @@ -962,16 +962,12 @@ sk: description_project_scope: Rozsah vyhľadávania description_filter: Filter description_user_mail_notification: Nastavenia upozornení emailom - description_date_from: Zadajte počiatočný dátum description_message_content: Obsah správy description_available_columns: Dostupné stĺpce - description_date_range_interval: Zvoľte obdobie zadaním počiatočného a koncového dátumu description_issue_category_reassign: Vybrať kategóriu úlohy description_search: Vyhľadávanie description_notes: Poznámky - description_date_range_list: Vyberte zo zoznamu obdobie description_choose_project: Projekty - description_date_to: Zadajte koncový dátum description_query_sort_criteria_attribute: Atribút triedenia description_wiki_subpages_reassign: Vybrať novú nadradenú stránku description_selected_columns: Vybrané stĺpce diff --git a/config/locales/sl.yml b/config/locales/sl.yml index 3d1fec6d5..e19cb4dcb 100644 --- a/config/locales/sl.yml +++ b/config/locales/sl.yml @@ -970,16 +970,12 @@ sl: description_project_scope: Search scope description_filter: Filter description_user_mail_notification: Mail notification settings - description_date_from: Enter start date description_message_content: Message content description_available_columns: Available Columns - description_date_range_interval: Choose range by selecting start and end date description_issue_category_reassign: Choose issue category description_search: Searchfield description_notes: Notes - description_date_range_list: Choose range from list description_choose_project: Projects - description_date_to: Enter end date description_query_sort_criteria_attribute: Sort attribute description_wiki_subpages_reassign: Choose new parent page description_selected_columns: Selected Columns diff --git a/config/locales/sq.yml b/config/locales/sq.yml index 03ccfcd6e..107256d01 100644 --- a/config/locales/sq.yml +++ b/config/locales/sq.yml @@ -1007,10 +1007,6 @@ sq: description_all_columns: All Columns description_issue_category_reassign: Choose issue category description_wiki_subpages_reassign: Choose new parent page - description_date_range_list: Choose range from list - description_date_range_interval: Choose range by selecting start and end date - description_date_from: Enter start date - description_date_to: Enter end date error_session_expired: Your session has expired. Please login again. text_session_expiration_settings: "Warning: changing these settings may expire the current sessions including yours." setting_session_lifetime: Session maximum lifetime diff --git a/config/locales/sr-YU.yml b/config/locales/sr-YU.yml index 3454c005d..70c330fec 100644 --- a/config/locales/sr-YU.yml +++ b/config/locales/sr-YU.yml @@ -970,16 +970,12 @@ sr-YU: description_project_scope: Search scope description_filter: Filter description_user_mail_notification: Mail notification settings - description_date_from: Enter start date description_message_content: Message content description_available_columns: Available Columns - description_date_range_interval: Choose range by selecting start and end date description_issue_category_reassign: Choose issue category description_search: Searchfield description_notes: Notes - description_date_range_list: Choose range from list description_choose_project: Projects - description_date_to: Enter end date description_query_sort_criteria_attribute: Sort attribute description_wiki_subpages_reassign: Choose new parent page description_selected_columns: Selected Columns diff --git a/config/locales/sr.yml b/config/locales/sr.yml index c319518ad..67a7af8c6 100644 --- a/config/locales/sr.yml +++ b/config/locales/sr.yml @@ -968,16 +968,12 @@ sr: description_project_scope: Search scope description_filter: Filter description_user_mail_notification: Mail notification settings - description_date_from: Enter start date description_message_content: Message content description_available_columns: Available Columns - description_date_range_interval: Choose range by selecting start and end date description_issue_category_reassign: Choose issue category description_search: Searchfield description_notes: Notes - description_date_range_list: Choose range from list description_choose_project: Projects - description_date_to: Enter end date description_query_sort_criteria_attribute: Sort attribute description_wiki_subpages_reassign: Choose new parent page description_selected_columns: Selected Columns diff --git a/config/locales/sv.yml b/config/locales/sv.yml index cee92ef69..0fd953e1f 100644 --- a/config/locales/sv.yml +++ b/config/locales/sv.yml @@ -1114,10 +1114,6 @@ sv: description_all_columns: Alla kolumner description_issue_category_reassign: Välj ärendekategori description_wiki_subpages_reassign: Välj ny föräldersida - description_date_range_list: Välj intervall från listan - description_date_range_interval: Ange intervall genom att välja start- och slutdatum - description_date_from: Ange startdatum - description_date_to: Ange slutdatum text_repository_identifier_info: 'Endast gemener (a-z), siffror, streck och understreck är tillåtna.
          När identifieraren sparats kan den inte ändras.' notice_account_not_activated_yet: Du har inte aktiverat ditt konto än. Om du vill få ett nytt aktiveringsbrev, klicka på denna länk . notice_account_locked: Ditt konto är låst. diff --git a/config/locales/th.yml b/config/locales/th.yml index 9866c2017..cc6d64ad4 100644 --- a/config/locales/th.yml +++ b/config/locales/th.yml @@ -964,16 +964,12 @@ th: description_project_scope: Search scope description_filter: Filter description_user_mail_notification: Mail notification settings - description_date_from: Enter start date description_message_content: Message content description_available_columns: Available Columns - description_date_range_interval: Choose range by selecting start and end date description_issue_category_reassign: Choose issue category description_search: Searchfield description_notes: Notes - description_date_range_list: Choose range from list description_choose_project: Projects - description_date_to: Enter end date description_query_sort_criteria_attribute: Sort attribute description_wiki_subpages_reassign: Choose new parent page description_selected_columns: Selected Columns diff --git a/config/locales/tr.yml b/config/locales/tr.yml index 2d3abfd36..603282c6e 100644 --- a/config/locales/tr.yml +++ b/config/locales/tr.yml @@ -979,16 +979,12 @@ tr: description_project_scope: Arama kapsamı description_filter: Süzgeç description_user_mail_notification: E-posta bildirim ayarları - description_date_from: Başlangıç tarihini gir description_message_content: Mesaj içeriği description_available_columns: Kullanılabilir Sütunlar - description_date_range_interval: Başlangıç ve bitiş tarihini seçerek tarih aralığını belirleyin description_issue_category_reassign: İş kategorisini seçin description_search: Arama alanı description_notes: Notlar - description_date_range_list: Listeden tarih aralığını seçin description_choose_project: Projeler - description_date_to: Bitiş tarihini gir description_query_sort_criteria_attribute: Sıralama ölçütü description_wiki_subpages_reassign: Yeni üst sayfa seç description_selected_columns: Seçilmiş Sütunlar diff --git a/config/locales/uk.yml b/config/locales/uk.yml index f75e40a04..397e2a296 100644 --- a/config/locales/uk.yml +++ b/config/locales/uk.yml @@ -964,16 +964,12 @@ uk: description_project_scope: Search scope description_filter: Filter description_user_mail_notification: Mail notification settings - description_date_from: Enter start date description_message_content: Message content description_available_columns: Available Columns - description_date_range_interval: Choose range by selecting start and end date description_issue_category_reassign: Choose issue category description_search: Searchfield description_notes: Notes - description_date_range_list: Choose range from list description_choose_project: Projects - description_date_to: Enter end date description_query_sort_criteria_attribute: Sort attribute description_wiki_subpages_reassign: Choose new parent page description_selected_columns: Selected Columns diff --git a/config/locales/vi.yml b/config/locales/vi.yml index 4efe3e9ae..2768a3a05 100644 --- a/config/locales/vi.yml +++ b/config/locales/vi.yml @@ -1023,16 +1023,12 @@ vi: description_project_scope: Phạm vi tìm kiếm description_filter: Lọc description_user_mail_notification: Thiết lập email thông báo - description_date_from: Nhập ngày bắt đầu description_message_content: Nội dung thông điệp description_available_columns: Các cột có sẵn - description_date_range_interval: Chọn khoảng thời gian giữa ngày bắt đầu và kết thúc description_issue_category_reassign: Chọn danh mục vấn đề description_search: Trường tìm kiếm description_notes: Các chú ý - description_date_range_list: Chọn khoảng từ danh sách description_choose_project: Các dự án - description_date_to: Nhập ngày kết thúc description_query_sort_criteria_attribute: Sắp xếp thuộc tính description_wiki_subpages_reassign: Chọn một trang cấp trên label_parent_revision: Cha diff --git a/config/locales/zh-TW.yml b/config/locales/zh-TW.yml index 9d6ed9c46..cbdd3b969 100644 --- a/config/locales/zh-TW.yml +++ b/config/locales/zh-TW.yml @@ -1291,8 +1291,4 @@ description_all_columns: 所有欄位 description_issue_category_reassign: 選擇議題分類 description_wiki_subpages_reassign: 選擇新的父頁面 - description_date_range_list: 從清單中選取範圍 - description_date_range_interval: 選擇起始與結束日期以設定範圍區間 - description_date_from: 輸入起始日期 - description_date_to: 輸入結束日期 text_repository_identifier_info: '僅允許使用小寫英文字母 (a-z), 阿拉伯數字, 虛線與底線。
          一旦儲存之後, 代碼便無法再次被更改。' diff --git a/config/locales/zh.yml b/config/locales/zh.yml index eea4ad6ed..19d39f1b0 100644 --- a/config/locales/zh.yml +++ b/config/locales/zh.yml @@ -974,16 +974,12 @@ zh: description_project_scope: 搜索范围 description_filter: 过滤器 description_user_mail_notification: 邮件通知设置 - description_date_from: 输入开始日期 description_message_content: 信息内容 description_available_columns: 备选列 - description_date_range_interval: 按开始日期和结束日期选择范围 description_issue_category_reassign: 选择问题类别 description_search: 搜索字段 description_notes: 批注 - description_date_range_list: 从列表中选择范围 description_choose_project: 项目 - description_date_to: 输入结束日期 description_query_sort_criteria_attribute: 排序方式 description_wiki_subpages_reassign: 选择父页面 description_selected_columns: 已选列 From 88da2159b40f441d359ed86ba6edfea75fa5eb5e Mon Sep 17 00:00:00 2001 From: Toshi MARUYAMA Date: Tue, 21 Feb 2017 10:40:25 +0000 Subject: [PATCH 0657/1117] Remove unused "label_planning" from locale files (#24900) Contributed by Go MAEDA. git-svn-id: http://svn.redmine.org/redmine/trunk@16336 e93f8b46-1217-0410-a6f0-8f06a7374b81 --- config/locales/ar.yml | 1 - config/locales/az.yml | 1 - config/locales/bg.yml | 1 - config/locales/bs.yml | 1 - config/locales/ca.yml | 1 - config/locales/cs.yml | 1 - config/locales/da.yml | 1 - config/locales/de.yml | 1 - config/locales/el.yml | 1 - config/locales/en-GB.yml | 1 - config/locales/en.yml | 1 - config/locales/es-PA.yml | 1 - config/locales/es.yml | 1 - config/locales/et.yml | 1 - config/locales/eu.yml | 1 - config/locales/fa.yml | 1 - config/locales/fi.yml | 1 - config/locales/fr.yml | 1 - config/locales/gl.yml | 1 - config/locales/he.yml | 1 - config/locales/hr.yml | 1 - config/locales/hu.yml | 1 - config/locales/id.yml | 1 - config/locales/it.yml | 1 - config/locales/ja.yml | 1 - config/locales/ko.yml | 1 - config/locales/lt.yml | 1 - config/locales/lv.yml | 1 - config/locales/mk.yml | 1 - config/locales/mn.yml | 1 - config/locales/nl.yml | 1 - config/locales/no.yml | 1 - config/locales/pl.yml | 1 - config/locales/pt-BR.yml | 1 - config/locales/pt.yml | 1 - config/locales/ro.yml | 1 - config/locales/ru.yml | 1 - config/locales/sk.yml | 1 - config/locales/sl.yml | 1 - config/locales/sq.yml | 1 - config/locales/sr-YU.yml | 1 - config/locales/sr.yml | 1 - config/locales/sv.yml | 1 - config/locales/th.yml | 1 - config/locales/tr.yml | 1 - config/locales/uk.yml | 1 - config/locales/vi.yml | 1 - config/locales/zh-TW.yml | 1 - config/locales/zh.yml | 1 - 49 files changed, 49 deletions(-) diff --git a/config/locales/ar.yml b/config/locales/ar.yml index 05724d243..74183b5b4 100644 --- a/config/locales/ar.yml +++ b/config/locales/ar.yml @@ -775,7 +775,6 @@ ar: label_preferences: تفضيلات label_chronological_order: في ترتيب زمني label_reverse_chronological_order: في ترتيب زمني عكسي - label_planning: التخطيط label_incoming_emails: رسائل البريد الإلكتروني الوارد label_generate_key: إنشاء مفتاح label_issue_watchers: المراقبون diff --git a/config/locales/az.yml b/config/locales/az.yml index 96ca7bf2f..08689cf6a 100644 --- a/config/locales/az.yml +++ b/config/locales/az.yml @@ -597,7 +597,6 @@ az: label_permissions_report: Giriş hüquqları üzrə hesabat label_permissions: Giriş hüquqları label_personalize_page: bu səhifəni fərdiləşdirmək - label_planning: Planlaşdırma label_please_login: Xahiş edirik, daxil olun. label_plugins: Modullar label_precedes: növbəti diff --git a/config/locales/bg.yml b/config/locales/bg.yml index ae24d9c02..2dfb41320 100644 --- a/config/locales/bg.yml +++ b/config/locales/bg.yml @@ -891,7 +891,6 @@ bg: label_preferences: Предпочитания label_chronological_order: Хронологичен ред label_reverse_chronological_order: Обратен хронологичен ред - label_planning: Планиране label_incoming_emails: Входящи e-mail-и label_generate_key: Генериране на ключ label_issue_watchers: Наблюдатели diff --git a/config/locales/bs.yml b/config/locales/bs.yml index 9c3586f21..7c179a864 100644 --- a/config/locales/bs.yml +++ b/config/locales/bs.yml @@ -689,7 +689,6 @@ bs: label_preferences: Postavke label_chronological_order: Hronološki poredak label_reverse_chronological_order: Reverzni hronološki poredak - label_planning: Planiranje label_incoming_emails: Dolazni email-ovi label_generate_key: Generiši ključ label_issue_watchers: Praćeno od diff --git a/config/locales/ca.yml b/config/locales/ca.yml index e26d527b2..67446f399 100644 --- a/config/locales/ca.yml +++ b/config/locales/ca.yml @@ -739,7 +739,6 @@ ca: label_preferences: "Preferències" label_chronological_order: "En ordre cronològic" label_reverse_chronological_order: "En ordre cronològic invers" - label_planning: "Planificació" label_incoming_emails: "Correu electrònics d'entrada" label_generate_key: "Generar una clau" label_issue_watchers: "Vigilàncies" diff --git a/config/locales/cs.yml b/config/locales/cs.yml index 521e9fac4..68b9fa302 100644 --- a/config/locales/cs.yml +++ b/config/locales/cs.yml @@ -753,7 +753,6 @@ cs: label_preferences: Nastavení label_chronological_order: V chronologickém pořadí label_reverse_chronological_order: V obrácaném chronologickém pořadí - label_planning: Plánování label_incoming_emails: Příchozí e-maily label_generate_key: Generovat klíč label_issue_watchers: Sledování diff --git a/config/locales/da.yml b/config/locales/da.yml index 4cb74e166..872fdae9d 100644 --- a/config/locales/da.yml +++ b/config/locales/da.yml @@ -722,7 +722,6 @@ da: label_overall_activity: Overordnet aktivitet setting_default_projects_public: Nye projekter er offentlige som standard error_scm_annotate: "Filen findes ikke, eller kunne ikke annoteres." - label_planning: Planlægning text_subprojects_destroy_warning: "Dets underprojekter(er): %{value} vil også blive slettet." permission_edit_issues: Redigér sager setting_diff_max_lines_displayed: Højeste antal forskelle der vises diff --git a/config/locales/de.yml b/config/locales/de.yml index 20909e109..f9ed24f8d 100644 --- a/config/locales/de.yml +++ b/config/locales/de.yml @@ -673,7 +673,6 @@ de: label_permissions: Berechtigungen label_permissions_report: Berechtigungsübersicht label_personalize_page: Diese Seite anpassen - label_planning: Terminplanung label_please_login: Anmelden label_plugins: Plugins label_precedes: Vorgänger von diff --git a/config/locales/el.yml b/config/locales/el.yml index 94ff5ad1b..62d72b84e 100644 --- a/config/locales/el.yml +++ b/config/locales/el.yml @@ -692,7 +692,6 @@ el: label_preferences: Προτιμήσεις label_chronological_order: Κατά χρονολογική σειρά label_reverse_chronological_order: Κατά αντίστροφη χρονολογική σειρά - label_planning: Σχεδιασμός label_incoming_emails: Εισερχόμενα email label_generate_key: Δημιουργία κλειδιού label_issue_watchers: Παρατηρητές diff --git a/config/locales/en-GB.yml b/config/locales/en-GB.yml index 219e7f73b..953cb6658 100644 --- a/config/locales/en-GB.yml +++ b/config/locales/en-GB.yml @@ -761,7 +761,6 @@ en-GB: label_preferences: Preferences label_chronological_order: In chronological order label_reverse_chronological_order: In reverse chronological order - label_planning: Planning label_incoming_emails: Incoming emails label_generate_key: Generate a key label_issue_watchers: Watchers diff --git a/config/locales/en.yml b/config/locales/en.yml index a7e3e7fd8..fa0893b18 100644 --- a/config/locales/en.yml +++ b/config/locales/en.yml @@ -889,7 +889,6 @@ en: label_preferences: Preferences label_chronological_order: In chronological order label_reverse_chronological_order: In reverse chronological order - label_planning: Planning label_incoming_emails: Incoming emails label_generate_key: Generate a key label_issue_watchers: Watchers diff --git a/config/locales/es-PA.yml b/config/locales/es-PA.yml index cb85801c0..dd53753f3 100644 --- a/config/locales/es-PA.yml +++ b/config/locales/es-PA.yml @@ -551,7 +551,6 @@ es-PA: label_permissions: Permisos label_permissions_report: Informe de permisos label_personalize_page: Personalizar esta página - label_planning: Planificación label_please_login: Por favor, inicie sesión label_plugins: Extensiones label_precedes: anterior a diff --git a/config/locales/es.yml b/config/locales/es.yml index d1e664fe1..569bf1a66 100644 --- a/config/locales/es.yml +++ b/config/locales/es.yml @@ -549,7 +549,6 @@ es: label_permissions: Permisos label_permissions_report: Informe de permisos label_personalize_page: Personalizar esta página - label_planning: Planificación label_please_login: Por favor, inicie sesión label_plugins: Extensiones label_precedes: anterior a diff --git a/config/locales/et.yml b/config/locales/et.yml index ea887c84b..dfafc7712 100644 --- a/config/locales/et.yml +++ b/config/locales/et.yml @@ -806,7 +806,6 @@ et: label_preferences: "Eelistused" label_chronological_order: "kronoloogiline" label_reverse_chronological_order: "tagurpidi kronoloogiline" - label_planning: "Planeerimine" label_incoming_emails: "Sissetulevad e-kirjad" label_generate_key: "Genereeri võti" label_issue_watchers: "Jälgijad" diff --git a/config/locales/eu.yml b/config/locales/eu.yml index 2ae638c94..e3c3cfcb6 100644 --- a/config/locales/eu.yml +++ b/config/locales/eu.yml @@ -718,7 +718,6 @@ eu: label_preferences: Hobespenak label_chronological_order: Orden kronologikoan label_reverse_chronological_order: Alderantzizko orden kronologikoan - label_planning: Planifikazioa label_incoming_emails: Sarrerako epostak label_generate_key: Giltza sortu label_issue_watchers: Behatzaileak diff --git a/config/locales/fa.yml b/config/locales/fa.yml index 13247dfff..123644c75 100644 --- a/config/locales/fa.yml +++ b/config/locales/fa.yml @@ -747,7 +747,6 @@ fa: label_preferences: پسندها label_chronological_order: به ترتیب تاریخ label_reverse_chronological_order: برعکس ترتیب تاریخ - label_planning: برنامه ریزی label_incoming_emails: ایمیل‌های آمده label_generate_key: ساخت کلید label_issue_watchers: دیده‌بان‌ها diff --git a/config/locales/fi.yml b/config/locales/fi.yml index 49bbcaaa6..5cada2bc8 100644 --- a/config/locales/fi.yml +++ b/config/locales/fi.yml @@ -729,7 +729,6 @@ fi: setting_default_projects_public: Uudet projektit ovat oletuksena julkisia label_overall_activity: Kokonaishistoria error_scm_annotate: "Merkintää ei ole tai siihen ei voi lisätä selityksiä." - label_planning: Suunnittelu text_subprojects_destroy_warning: "Tämän aliprojekti(t): %{value} tullaan myös poistamaan." label_and_its_subprojects: "%{value} ja aliprojektit" mail_body_reminder: "%{count} sinulle nimettyä tapahtuma(a) erääntyy %{days} päivä sisään:" diff --git a/config/locales/fr.yml b/config/locales/fr.yml index dfac2ce40..e083e8652 100644 --- a/config/locales/fr.yml +++ b/config/locales/fr.yml @@ -898,7 +898,6 @@ fr: label_preferences: Préférences label_chronological_order: Dans l'ordre chronologique label_reverse_chronological_order: Dans l'ordre chronologique inverse - label_planning: Planning label_incoming_emails: Emails entrants label_generate_key: Générer une clé label_issue_watchers: Observateurs diff --git a/config/locales/gl.yml b/config/locales/gl.yml index 4b8b2947b..5313c8f4a 100644 --- a/config/locales/gl.yml +++ b/config/locales/gl.yml @@ -524,7 +524,6 @@ gl: label_permissions: Permisos label_permissions_report: Informe de permisos label_personalize_page: Personalizar esta páxina - label_planning: Planificación label_please_login: "Acceder" label_plugins: Complementos label_precedes: anterior a diff --git a/config/locales/he.yml b/config/locales/he.yml index 655a9681c..17e524055 100644 --- a/config/locales/he.yml +++ b/config/locales/he.yml @@ -744,7 +744,6 @@ he: label_preferences: העדפות label_chronological_order: בסדר כרונולוגי label_reverse_chronological_order: בסדר כרונולוגי הפוך - label_planning: תכנון label_incoming_emails: דוא"ל נכנס label_generate_key: צור מפתח label_issue_watchers: צופים diff --git a/config/locales/hr.yml b/config/locales/hr.yml index ff77b53e7..343269cb2 100644 --- a/config/locales/hr.yml +++ b/config/locales/hr.yml @@ -709,7 +709,6 @@ hr: label_preferences: Preferences label_chronological_order: U kronološkom redoslijedu label_reverse_chronological_order: U obrnutom kronološkom redoslijedu - label_planning: Planiranje label_incoming_emails: Dolazne poruke e-pošte label_generate_key: Generiraj ključ label_issue_watchers: Promatrači diff --git a/config/locales/hu.yml b/config/locales/hu.yml index dc295f38d..43ededb8a 100644 --- a/config/locales/hu.yml +++ b/config/locales/hu.yml @@ -624,7 +624,6 @@ label_preferences: Tulajdonságok label_chronological_order: Időrendben label_reverse_chronological_order: Fordított időrendben - label_planning: Tervezés button_login: Bejelentkezés button_submit: Elfogad diff --git a/config/locales/id.yml b/config/locales/id.yml index 63c0bc9f9..637059f11 100644 --- a/config/locales/id.yml +++ b/config/locales/id.yml @@ -700,7 +700,6 @@ id: label_preferences: Preferensi label_chronological_order: Urut sesuai kronologis label_reverse_chronological_order: Urut dari yang terbaru - label_planning: Perencanaan label_incoming_emails: Email masuk label_generate_key: Buat kunci label_issue_watchers: Pemantau diff --git a/config/locales/it.yml b/config/locales/it.yml index 0f4a2530d..f395ce266 100644 --- a/config/locales/it.yml +++ b/config/locales/it.yml @@ -708,7 +708,6 @@ it: label_overall_activity: Attività generale setting_default_projects_public: I nuovi progetti sono pubblici in modo predefinito error_scm_annotate: "L'oggetto non esiste o non può essere annotato." - label_planning: Pianificazione text_subprojects_destroy_warning: "Anche i suoi sottoprogetti: %{value} verranno eliminati." label_and_its_subprojects: "%{value} ed i suoi sottoprogetti" mail_body_reminder: "%{count} segnalazioni che ti sono state assegnate scadranno nei prossimi %{days} giorni:" diff --git a/config/locales/ja.yml b/config/locales/ja.yml index e0d0ebd2b..916d18480 100644 --- a/config/locales/ja.yml +++ b/config/locales/ja.yml @@ -785,7 +785,6 @@ ja: label_preferences: 設定 label_chronological_order: 古い順 label_reverse_chronological_order: 新しい順 - label_planning: 計画 label_incoming_emails: 受信メール label_generate_key: キーの生成 label_issue_watchers: ウォッチャー diff --git a/config/locales/ko.yml b/config/locales/ko.yml index ab7c6194f..4fd133fd0 100644 --- a/config/locales/ko.yml +++ b/config/locales/ko.yml @@ -733,7 +733,6 @@ ko: label_preferences: 설정 label_chronological_order: 시간 순으로 정렬 label_reverse_chronological_order: 시간 역순으로 정렬 - label_planning: 프로젝트계획 label_incoming_emails: 수신 메일 label_generate_key: 키 생성 label_issue_watchers: 일감관람자 diff --git a/config/locales/lt.yml b/config/locales/lt.yml index af437abd7..bfb09b3cf 100644 --- a/config/locales/lt.yml +++ b/config/locales/lt.yml @@ -872,7 +872,6 @@ lt: label_preferences: Savybės label_chronological_order: Chronologine tvarka label_reverse_chronological_order: Atbuline chronologine tvarka - label_planning: Planavimas label_incoming_emails: Įeinantys laiškai label_generate_key: Generuoti raktą label_issue_watchers: Stebėtojai diff --git a/config/locales/lv.yml b/config/locales/lv.yml index 2a9edd1f9..26dd1b7d7 100644 --- a/config/locales/lv.yml +++ b/config/locales/lv.yml @@ -715,7 +715,6 @@ lv: label_preferences: Priekšrocības label_chronological_order: Hronoloģiskā kārtībā label_reverse_chronological_order: Apgriezti hronoloģiskā kārtībā - label_planning: Plānošana label_incoming_emails: "Ienākošie e-pasti" label_generate_key: Ģenerēt atslēgu label_issue_watchers: Vērotāji diff --git a/config/locales/mk.yml b/config/locales/mk.yml index 0bd62e986..1b2941b09 100644 --- a/config/locales/mk.yml +++ b/config/locales/mk.yml @@ -735,7 +735,6 @@ mk: label_preferences: Preferences label_chronological_order: Во хронолошки ред label_reverse_chronological_order: In reverse chronological order - label_planning: Планирање label_incoming_emails: Дојдовни е-пораки label_generate_key: Генерирај клуч label_issue_watchers: Watchers diff --git a/config/locales/mn.yml b/config/locales/mn.yml index 07f06436d..a3d7fa11d 100644 --- a/config/locales/mn.yml +++ b/config/locales/mn.yml @@ -721,7 +721,6 @@ mn: label_preferences: Тохиргоо label_chronological_order: Цагаан толгойн үсгийн дарааллаар label_reverse_chronological_order: Урвуу цагаан толгойн үсгийн дарааллаар - label_planning: Төлөвлөлт label_incoming_emails: Ирсэн мэйлүүд label_generate_key: Түлхүүр үүсгэх label_issue_watchers: Ажиглагчид diff --git a/config/locales/nl.yml b/config/locales/nl.yml index a9894dcdc..758eff776 100644 --- a/config/locales/nl.yml +++ b/config/locales/nl.yml @@ -493,7 +493,6 @@ nl: label_permissions: Permissies label_permissions_report: Permissierapport label_personalize_page: Personaliseer deze pagina - label_planning: Planning label_please_login: Gelieve in te loggen label_plugins: Plugins label_precedes: gaat vooraf aan diff --git a/config/locales/no.yml b/config/locales/no.yml index 1d97a1b46..da541778f 100644 --- a/config/locales/no.yml +++ b/config/locales/no.yml @@ -596,7 +596,6 @@ label_preferences: Brukerinnstillinger label_chronological_order: I kronologisk rekkefølge label_reverse_chronological_order: I omvendt kronologisk rekkefølge - label_planning: Planlegging button_login: Logg inn button_submit: Send diff --git a/config/locales/pl.yml b/config/locales/pl.yml index bcaa48628..d8253dd0f 100644 --- a/config/locales/pl.yml +++ b/config/locales/pl.yml @@ -526,7 +526,6 @@ pl: label_permissions: Uprawnienia label_permissions_report: Raport uprawnień label_personalize_page: Personalizuj tę stronę - label_planning: Planowanie label_please_login: Zaloguj się label_plugins: Wtyczki label_precedes: poprzedza diff --git a/config/locales/pt-BR.yml b/config/locales/pt-BR.yml index c57f9c608..c75563af1 100644 --- a/config/locales/pt-BR.yml +++ b/config/locales/pt-BR.yml @@ -636,7 +636,6 @@ pt-BR: label_preferences: Preferências label_chronological_order: Em ordem cronológica label_reverse_chronological_order: Em ordem cronológica inversa - label_planning: Planejamento label_incoming_emails: E-mails recebidos label_generate_key: Gerar uma chave label_issue_watchers: Observadores diff --git a/config/locales/pt.yml b/config/locales/pt.yml index e20de98b3..4d34597a5 100644 --- a/config/locales/pt.yml +++ b/config/locales/pt.yml @@ -623,7 +623,6 @@ pt: label_preferences: Preferências label_chronological_order: Em ordem cronológica label_reverse_chronological_order: Em ordem cronológica inversa - label_planning: Planeamento label_incoming_emails: E-mails recebidos label_generate_key: Gerar uma chave label_issue_watchers: Observadores diff --git a/config/locales/ro.yml b/config/locales/ro.yml index e55adbdb7..2e98b4717 100644 --- a/config/locales/ro.yml +++ b/config/locales/ro.yml @@ -671,7 +671,6 @@ ro: label_preferences: Preferințe label_chronological_order: în ordine cronologică label_reverse_chronological_order: În ordine invers cronologică - label_planning: Planificare label_incoming_emails: Mesaje primite label_generate_key: Generează o cheie label_issue_watchers: Cine urmărește diff --git a/config/locales/ru.yml b/config/locales/ru.yml index d97df5b41..0201efc9f 100644 --- a/config/locales/ru.yml +++ b/config/locales/ru.yml @@ -607,7 +607,6 @@ ru: label_permissions_report: Отчёт по правам доступа label_permissions: Права доступа label_personalize_page: Персонализировать данную страницу - label_planning: Планирование label_please_login: Пожалуйста, войдите. label_plugins: Модули label_precedes: следующая diff --git a/config/locales/sk.yml b/config/locales/sk.yml index d295a3613..bc1c45e67 100644 --- a/config/locales/sk.yml +++ b/config/locales/sk.yml @@ -705,7 +705,6 @@ sk: enumeration_doc_categories: Kategórie dokumentov enumeration_activities: Aktivity (sledovanie času) error_scm_annotate: "Položka neexistuje, alebo nemôže byť komentovaná." - label_planning: Plánovanie text_subprojects_destroy_warning: "Jeho podprojekty: %{value} budú tiež vymazané." label_and_its_subprojects: "%{value} a jeho podprojekty" mail_body_reminder: "Nasledovné úlohy (%{count}), ktoré sú vám priradené, majú byť hotové za %{days} dní:" diff --git a/config/locales/sl.yml b/config/locales/sl.yml index e19cb4dcb..6c1e3ca54 100644 --- a/config/locales/sl.yml +++ b/config/locales/sl.yml @@ -665,7 +665,6 @@ sl: label_preferences: Preference label_chronological_order: Kronološko label_reverse_chronological_order: Obrnjeno kronološko - label_planning: Načrtovanje label_incoming_emails: Prihajajoča e-pošta label_generate_key: Ustvari ključ label_issue_watchers: Spremljevalci diff --git a/config/locales/sq.yml b/config/locales/sq.yml index 107256d01..8ee4875aa 100644 --- a/config/locales/sq.yml +++ b/config/locales/sq.yml @@ -787,7 +787,6 @@ sq: label_preferences: Preferences label_chronological_order: In chronological order label_reverse_chronological_order: In reverse chronological order - label_planning: Planning label_incoming_emails: Incoming emails label_generate_key: Generate a key label_issue_watchers: Watchers diff --git a/config/locales/sr-YU.yml b/config/locales/sr-YU.yml index 70c330fec..42b5b53c9 100644 --- a/config/locales/sr-YU.yml +++ b/config/locales/sr-YU.yml @@ -735,7 +735,6 @@ sr-YU: label_preferences: Podešavanja label_chronological_order: po hronološkom redosledu label_reverse_chronological_order: po obrnutom hronološkom redosledu - label_planning: Planiranje label_incoming_emails: Dolazne e-poruke label_generate_key: Generisanje ključa label_issue_watchers: Posmatrači diff --git a/config/locales/sr.yml b/config/locales/sr.yml index 67a7af8c6..0efbf513c 100644 --- a/config/locales/sr.yml +++ b/config/locales/sr.yml @@ -733,7 +733,6 @@ sr: label_preferences: Подешавања label_chronological_order: по хронолошком редоследу label_reverse_chronological_order: по обрнутом хронолошком редоследу - label_planning: Планирање label_incoming_emails: Долазне е-поруке label_generate_key: Генерисање кључа label_issue_watchers: Посматрачи diff --git a/config/locales/sv.yml b/config/locales/sv.yml index 0fd953e1f..77a077b7a 100644 --- a/config/locales/sv.yml +++ b/config/locales/sv.yml @@ -864,7 +864,6 @@ sv: label_preferences: Användarinställningar label_chronological_order: I kronologisk ordning label_reverse_chronological_order: I omvänd kronologisk ordning - label_planning: Planering label_incoming_emails: Inkommande mail label_generate_key: Generera en nyckel label_issue_watchers: Bevakare diff --git a/config/locales/th.yml b/config/locales/th.yml index cc6d64ad4..db07c1722 100644 --- a/config/locales/th.yml +++ b/config/locales/th.yml @@ -601,7 +601,6 @@ th: label_preferences: ค่าที่ชอบใจ label_chronological_order: เรียงจากเก่าไปใหม่ label_reverse_chronological_order: เรียงจากใหม่ไปเก่า - label_planning: การวางแผน button_login: เข้าระบบ button_submit: จัดส่งข้อมูล diff --git a/config/locales/tr.yml b/config/locales/tr.yml index 603282c6e..686fd1f56 100644 --- a/config/locales/tr.yml +++ b/config/locales/tr.yml @@ -615,7 +615,6 @@ tr: label_preferences: Tercihler label_chronological_order: Tarih sırasına göre label_reverse_chronological_order: Ters tarih sırasına göre - label_planning: Planlanıyor button_login: Giriş button_submit: Gönder diff --git a/config/locales/uk.yml b/config/locales/uk.yml index 397e2a296..0bc141cab 100644 --- a/config/locales/uk.yml +++ b/config/locales/uk.yml @@ -705,7 +705,6 @@ uk: label_overall_activity: Overall activity setting_default_projects_public: New projects are public by default error_scm_annotate: "The entry does not exist or can not be annotated." - label_planning: Planning text_subprojects_destroy_warning: "Its subproject(s): %{value} will be also deleted." label_and_its_subprojects: "%{value} and its subprojects" mail_body_reminder: "%{count} issue(s) that are assigned to you are due in the next %{days} days:" diff --git a/config/locales/vi.yml b/config/locales/vi.yml index 2768a3a05..196712e9c 100644 --- a/config/locales/vi.yml +++ b/config/locales/vi.yml @@ -665,7 +665,6 @@ vi: label_preferences: Cấu hình label_chronological_order: Bài cũ xếp trước label_reverse_chronological_order: Bài mới xếp trước - label_planning: Kế hoạch label_incoming_emails: Nhận mail label_generate_key: Tạo mã label_issue_watchers: Theo dõi diff --git a/config/locales/zh-TW.yml b/config/locales/zh-TW.yml index cbdd3b969..ecea07b9e 100644 --- a/config/locales/zh-TW.yml +++ b/config/locales/zh-TW.yml @@ -973,7 +973,6 @@ label_preferences: 偏好選項 label_chronological_order: 以時間由遠至近排序 label_reverse_chronological_order: 以時間由近至遠排序 - label_planning: 計劃表 label_incoming_emails: 傳入的電子郵件 label_generate_key: 產生金鑰 label_issue_watchers: 監看者 diff --git a/config/locales/zh.yml b/config/locales/zh.yml index 19d39f1b0..02cf63916 100644 --- a/config/locales/zh.yml +++ b/config/locales/zh.yml @@ -752,7 +752,6 @@ zh: label_preferences: 首选项 label_chronological_order: 按时间顺序 label_reverse_chronological_order: 按时间顺序(倒序) - label_planning: 计划 label_incoming_emails: 接收邮件 label_generate_key: 生成一个key label_issue_watchers: 跟踪者 From dc2991d6e281acaacf99584c903a476ee6057f05 Mon Sep 17 00:00:00 2001 From: Toshi MARUYAMA Date: Tue, 21 Feb 2017 10:41:06 +0000 Subject: [PATCH 0658/1117] Remove unused "label_more" from locale files (#24901) Contributed by Go MAEDA. git-svn-id: http://svn.redmine.org/redmine/trunk@16337 e93f8b46-1217-0410-a6f0-8f06a7374b81 --- config/locales/ar.yml | 1 - config/locales/az.yml | 1 - config/locales/bg.yml | 1 - config/locales/bs.yml | 1 - config/locales/ca.yml | 1 - config/locales/cs.yml | 1 - config/locales/da.yml | 1 - config/locales/de.yml | 1 - config/locales/el.yml | 1 - config/locales/en-GB.yml | 1 - config/locales/en.yml | 1 - config/locales/es-PA.yml | 1 - config/locales/es.yml | 1 - config/locales/et.yml | 1 - config/locales/eu.yml | 1 - config/locales/fa.yml | 1 - config/locales/fi.yml | 1 - config/locales/fr.yml | 1 - config/locales/gl.yml | 1 - config/locales/he.yml | 1 - config/locales/hr.yml | 1 - config/locales/hu.yml | 1 - config/locales/id.yml | 1 - config/locales/it.yml | 1 - config/locales/ja.yml | 1 - config/locales/ko.yml | 1 - config/locales/lt.yml | 1 - config/locales/lv.yml | 1 - config/locales/mk.yml | 1 - config/locales/mn.yml | 1 - config/locales/nl.yml | 1 - config/locales/no.yml | 1 - config/locales/pl.yml | 1 - config/locales/pt-BR.yml | 1 - config/locales/pt.yml | 1 - config/locales/ro.yml | 1 - config/locales/ru.yml | 1 - config/locales/sk.yml | 1 - config/locales/sl.yml | 1 - config/locales/sq.yml | 1 - config/locales/sr-YU.yml | 1 - config/locales/sr.yml | 1 - config/locales/sv.yml | 1 - config/locales/th.yml | 1 - config/locales/tr.yml | 1 - config/locales/uk.yml | 1 - config/locales/vi.yml | 1 - config/locales/zh-TW.yml | 1 - config/locales/zh.yml | 1 - 49 files changed, 49 deletions(-) diff --git a/config/locales/ar.yml b/config/locales/ar.yml index 74183b5b4..12639edb2 100644 --- a/config/locales/ar.yml +++ b/config/locales/ar.yml @@ -765,7 +765,6 @@ ar: label_age: العمر label_change_properties: تغيير الخصائص label_general: عامة - label_more: أكثر label_scm: scm label_plugins: الإضافات label_ldap_authentication: مصادقة LDAP diff --git a/config/locales/az.yml b/config/locales/az.yml index 08689cf6a..36a60b8a6 100644 --- a/config/locales/az.yml +++ b/config/locales/az.yml @@ -565,7 +565,6 @@ az: label_months_from: ay label_month: Ay label_more_than_ago: gündən əvvəl - label_more: Çox label_my_account: Mənim hesabım label_my_page: Mənim səhifəm label_my_page_block: Mənim səhifəmin bloku diff --git a/config/locales/bg.yml b/config/locales/bg.yml index 2dfb41320..5523ea4d5 100644 --- a/config/locales/bg.yml +++ b/config/locales/bg.yml @@ -881,7 +881,6 @@ bg: label_age: Възраст label_change_properties: Промяна на настройки label_general: Основни - label_more: Още label_scm: SCM (Система за контрол на версиите) label_plugins: Плъгини label_ldap_authentication: LDAP оторизация diff --git a/config/locales/bs.yml b/config/locales/bs.yml index 7c179a864..ec797d86f 100644 --- a/config/locales/bs.yml +++ b/config/locales/bs.yml @@ -679,7 +679,6 @@ bs: label_age: Starost label_change_properties: Promjena osobina label_general: Generalno - label_more: Više label_scm: SCM label_plugins: Plugin-ovi label_ldap_authentication: LDAP authentifikacija diff --git a/config/locales/ca.yml b/config/locales/ca.yml index 67446f399..eea6dc3af 100644 --- a/config/locales/ca.yml +++ b/config/locales/ca.yml @@ -729,7 +729,6 @@ ca: label_age: "Edat" label_change_properties: "Canvia les propietats" label_general: "General" - label_more: "Més" label_scm: "SCM" label_plugins: "Complements" label_ldap_authentication: "Autenticació LDAP" diff --git a/config/locales/cs.yml b/config/locales/cs.yml index 68b9fa302..78506b139 100644 --- a/config/locales/cs.yml +++ b/config/locales/cs.yml @@ -743,7 +743,6 @@ cs: label_age: Věk label_change_properties: Změnit vlastnosti label_general: Obecné - label_more: Více label_scm: SCM label_plugins: Doplňky label_ldap_authentication: Autentifikace LDAP diff --git a/config/locales/da.yml b/config/locales/da.yml index 872fdae9d..00e563b4b 100644 --- a/config/locales/da.yml +++ b/config/locales/da.yml @@ -600,7 +600,6 @@ da: label_age: Alder label_change_properties: Ændre indstillinger label_general: Generelt - label_more: Mere label_scm: SCM label_plugins: Plugins label_ldap_authentication: LDAP-godkendelse diff --git a/config/locales/de.yml b/config/locales/de.yml index f9ed24f8d..c29f57410 100644 --- a/config/locales/de.yml +++ b/config/locales/de.yml @@ -635,7 +635,6 @@ de: label_module_plural: Module label_month: Monat label_months_from: Monate ab - label_more: Mehr label_more_than_ago: vor mehr als label_my_account: Mein Konto label_my_page: Meine Seite diff --git a/config/locales/el.yml b/config/locales/el.yml index 62d72b84e..9c2c54896 100644 --- a/config/locales/el.yml +++ b/config/locales/el.yml @@ -682,7 +682,6 @@ el: label_age: Ηλικία label_change_properties: Αλλαγή ιδιοτήτων label_general: Γενικά - label_more: Περισσότερα label_scm: SCM label_plugins: Plugins label_ldap_authentication: Πιστοποίηση LDAP diff --git a/config/locales/en-GB.yml b/config/locales/en-GB.yml index 953cb6658..86cd5086b 100644 --- a/config/locales/en-GB.yml +++ b/config/locales/en-GB.yml @@ -751,7 +751,6 @@ en-GB: label_age: Age label_change_properties: Change properties label_general: General - label_more: More label_scm: SCM label_plugins: Plugins label_ldap_authentication: LDAP authentication diff --git a/config/locales/en.yml b/config/locales/en.yml index fa0893b18..eb3d7cf37 100644 --- a/config/locales/en.yml +++ b/config/locales/en.yml @@ -879,7 +879,6 @@ en: label_age: Age label_change_properties: Change properties label_general: General - label_more: More label_scm: SCM label_plugins: Plugins label_ldap_authentication: LDAP authentication diff --git a/config/locales/es-PA.yml b/config/locales/es-PA.yml index dd53753f3..6be068db0 100644 --- a/config/locales/es-PA.yml +++ b/config/locales/es-PA.yml @@ -521,7 +521,6 @@ es-PA: label_module_plural: Módulos label_month: Mes label_months_from: meses de - label_more: Más label_more_than_ago: hace más de label_my_account: Mi cuenta label_my_page: Mi página diff --git a/config/locales/es.yml b/config/locales/es.yml index 569bf1a66..dada57d8e 100644 --- a/config/locales/es.yml +++ b/config/locales/es.yml @@ -519,7 +519,6 @@ es: label_module_plural: Módulos label_month: Mes label_months_from: meses de - label_more: Más label_more_than_ago: hace más de label_my_account: Mi cuenta label_my_page: Mi página diff --git a/config/locales/et.yml b/config/locales/et.yml index dfafc7712..f761e9cd3 100644 --- a/config/locales/et.yml +++ b/config/locales/et.yml @@ -796,7 +796,6 @@ et: label_age: "Vanus" label_change_properties: "Muuda omadusi" label_general: "Üldine" - label_more: "Rohkem" label_scm: "Lähtekoodi haldusvahend" label_plugins: "Lisamoodulid" label_ldap_authentication: "LDAP autentimine" diff --git a/config/locales/eu.yml b/config/locales/eu.yml index e3c3cfcb6..264c5661a 100644 --- a/config/locales/eu.yml +++ b/config/locales/eu.yml @@ -708,7 +708,6 @@ eu: label_age: Adina label_change_properties: Propietateak aldatu label_general: Orokorra - label_more: Gehiago label_scm: IKK label_plugins: Pluginak label_ldap_authentication: LDAP autentikazioa diff --git a/config/locales/fa.yml b/config/locales/fa.yml index 123644c75..ed7aa2d39 100644 --- a/config/locales/fa.yml +++ b/config/locales/fa.yml @@ -737,7 +737,6 @@ fa: label_age: سن label_change_properties: ویرایش ویژگی‌ها label_general: همگانی - label_more: بیشتر label_scm: SCM label_plugins: افزونه‌ها label_ldap_authentication: شناساییLDAP diff --git a/config/locales/fi.yml b/config/locales/fi.yml index 5cada2bc8..fb3534002 100644 --- a/config/locales/fi.yml +++ b/config/locales/fi.yml @@ -678,7 +678,6 @@ fi: setting_user_format: Käyttäjien esitysmuoto text_status_changed_by_changeset: "Päivitetty muutosversioon %{value}." text_issues_destroy_confirmation: 'Oletko varma että haluat poistaa valitut tapahtumat ?' - label_more: Lisää label_issue_added: Tapahtuma lisätty label_issue_updated: Tapahtuma päivitetty label_document_added: Dokumentti lisätty diff --git a/config/locales/fr.yml b/config/locales/fr.yml index e083e8652..48dc7a35e 100644 --- a/config/locales/fr.yml +++ b/config/locales/fr.yml @@ -888,7 +888,6 @@ fr: label_age: Âge label_change_properties: Changer les propriétés label_general: Général - label_more: Plus label_scm: SCM label_plugins: Plugins label_ldap_authentication: Authentification LDAP diff --git a/config/locales/gl.yml b/config/locales/gl.yml index 5313c8f4a..6a67cdbe5 100644 --- a/config/locales/gl.yml +++ b/config/locales/gl.yml @@ -494,7 +494,6 @@ gl: label_module_plural: Módulos label_month: Mes label_months_from: meses de - label_more: Máis label_more_than_ago: "hai máis de" label_my_account: "Conta" label_my_page: "Páxina persoal" diff --git a/config/locales/he.yml b/config/locales/he.yml index 17e524055..9d1e93f3a 100644 --- a/config/locales/he.yml +++ b/config/locales/he.yml @@ -734,7 +734,6 @@ he: label_age: גיל label_change_properties: שנה מאפיינים label_general: כללי - label_more: עוד label_scm: מערכת ניהול תצורה label_plugins: תוספים label_ldap_authentication: הזדהות LDAP diff --git a/config/locales/hr.yml b/config/locales/hr.yml index 343269cb2..e05b58812 100644 --- a/config/locales/hr.yml +++ b/config/locales/hr.yml @@ -699,7 +699,6 @@ hr: label_age: Starost label_change_properties: Promijeni svojstva label_general: Općenito - label_more: Još label_scm: SCM label_plugins: Plugins label_ldap_authentication: LDAP autentikacija diff --git a/config/locales/hu.yml b/config/locales/hu.yml index 43ededb8a..8a5073664 100644 --- a/config/locales/hu.yml +++ b/config/locales/hu.yml @@ -614,7 +614,6 @@ label_age: Kor label_change_properties: Tulajdonságok változtatása label_general: Általános - label_more: továbbiak label_scm: SCM label_plugins: Pluginek label_ldap_authentication: LDAP azonosítás diff --git a/config/locales/id.yml b/config/locales/id.yml index 637059f11..7c8a7a754 100644 --- a/config/locales/id.yml +++ b/config/locales/id.yml @@ -690,7 +690,6 @@ id: label_age: Umur label_change_properties: Rincian perubahan label_general: Umum - label_more: Lanjut label_scm: SCM label_plugins: Plugin label_ldap_authentication: Otentikasi LDAP diff --git a/config/locales/it.yml b/config/locales/it.yml index f395ce266..d0e6a4601 100644 --- a/config/locales/it.yml +++ b/config/locales/it.yml @@ -659,7 +659,6 @@ it: label_associated_revisions: Revisioni associate setting_user_format: Formato visualizzazione utenti text_status_changed_by_changeset: "Applicata nel changeset %{value}." - label_more: Altro text_issues_destroy_confirmation: 'Sei sicuro di voler eliminare le segnalazioni selezionate?' label_scm: SCM text_select_project_modules: 'Seleziona i moduli abilitati per questo progetto:' diff --git a/config/locales/ja.yml b/config/locales/ja.yml index 916d18480..fad1b2fc5 100644 --- a/config/locales/ja.yml +++ b/config/locales/ja.yml @@ -775,7 +775,6 @@ ja: label_age: 経過期間 label_change_properties: プロパティの変更 label_general: 全般 - label_more: 続き label_scm: バージョン管理システム label_plugins: プラグイン label_ldap_authentication: LDAP認証 diff --git a/config/locales/ko.yml b/config/locales/ko.yml index 4fd133fd0..8d22f3cc6 100644 --- a/config/locales/ko.yml +++ b/config/locales/ko.yml @@ -723,7 +723,6 @@ ko: label_age: 마지막 수정일 label_change_properties: 속성 변경 label_general: 일반 - label_more: 제목 및 설명 수정 label_scm: 형상관리시스템 label_plugins: 플러그인 label_ldap_authentication: LDAP 인증 diff --git a/config/locales/lt.yml b/config/locales/lt.yml index bfb09b3cf..35a227cfc 100644 --- a/config/locales/lt.yml +++ b/config/locales/lt.yml @@ -862,7 +862,6 @@ lt: label_age: Amžius label_change_properties: Pakeisti nustatymus label_general: Bendri(-as) - label_more: Daugiau label_scm: SCM label_plugins: Įskiepiai label_ldap_authentication: LDAP autentifikacija diff --git a/config/locales/lv.yml b/config/locales/lv.yml index 26dd1b7d7..28f96a345 100644 --- a/config/locales/lv.yml +++ b/config/locales/lv.yml @@ -705,7 +705,6 @@ lv: label_age: Vecums label_change_properties: Mainīt atribūtus label_general: Galvenais - label_more: Vēl label_scm: SCM label_plugins: Spraudņi label_ldap_authentication: LDAP pilnvarošana diff --git a/config/locales/mk.yml b/config/locales/mk.yml index 1b2941b09..8c7864e62 100644 --- a/config/locales/mk.yml +++ b/config/locales/mk.yml @@ -725,7 +725,6 @@ mk: label_age: Age label_change_properties: Change properties label_general: Општо - label_more: Повеќе label_scm: SCM label_plugins: Додатоци label_ldap_authentication: LDAP автентикација diff --git a/config/locales/mn.yml b/config/locales/mn.yml index a3d7fa11d..0293cf14e 100644 --- a/config/locales/mn.yml +++ b/config/locales/mn.yml @@ -711,7 +711,6 @@ mn: label_age: Нас label_change_properties: Тохиргоог өөрчлөх label_general: Ерөнхий - label_more: Цааш нь label_scm: SCM label_plugins: Модулууд label_ldap_authentication: LDAP нэвтрэх горим diff --git a/config/locales/nl.yml b/config/locales/nl.yml index 758eff776..e15c33609 100644 --- a/config/locales/nl.yml +++ b/config/locales/nl.yml @@ -463,7 +463,6 @@ nl: label_module_plural: Modules label_month: Maand label_months_from: maanden vanaf - label_more: Meer label_more_than_ago: meer dan x dagen geleden label_my_account: Mijn account label_my_page: Mijn pagina diff --git a/config/locales/no.yml b/config/locales/no.yml index da541778f..3dd2d3b76 100644 --- a/config/locales/no.yml +++ b/config/locales/no.yml @@ -586,7 +586,6 @@ label_age: Alder label_change_properties: Endre egenskaper label_general: Generell - label_more: Mer label_scm: SCM label_plugins: Tillegg label_ldap_authentication: LDAP-autentisering diff --git a/config/locales/pl.yml b/config/locales/pl.yml index d8253dd0f..1e3ccf93e 100644 --- a/config/locales/pl.yml +++ b/config/locales/pl.yml @@ -494,7 +494,6 @@ pl: label_module_plural: Moduły label_month: Miesiąc label_months_from: miesiące od - label_more: Więcej label_more_than_ago: dni od teraz label_my_account: Moje konto label_my_page: Moja strona diff --git a/config/locales/pt-BR.yml b/config/locales/pt-BR.yml index c75563af1..7339ee56a 100644 --- a/config/locales/pt-BR.yml +++ b/config/locales/pt-BR.yml @@ -626,7 +626,6 @@ pt-BR: label_age: Idade label_change_properties: Alterar propriedades label_general: Geral - label_more: Mais label_scm: 'Controle de versão:' label_plugins: Plugins label_ldap_authentication: Autenticação LDAP diff --git a/config/locales/pt.yml b/config/locales/pt.yml index 4d34597a5..93308dd17 100644 --- a/config/locales/pt.yml +++ b/config/locales/pt.yml @@ -613,7 +613,6 @@ pt: label_age: Idade label_change_properties: Mudar propriedades label_general: Geral - label_more: Mais label_scm: SCM label_plugins: Extensões label_ldap_authentication: Autenticação LDAP diff --git a/config/locales/ro.yml b/config/locales/ro.yml index 2e98b4717..db0e5096f 100644 --- a/config/locales/ro.yml +++ b/config/locales/ro.yml @@ -661,7 +661,6 @@ ro: label_age: vechime label_change_properties: Schimbă proprietățile label_general: General - label_more: Mai mult label_scm: SCM label_plugins: Plugin-uri label_ldap_authentication: autentificare LDAP diff --git a/config/locales/ru.yml b/config/locales/ru.yml index 0201efc9f..d86285414 100644 --- a/config/locales/ru.yml +++ b/config/locales/ru.yml @@ -575,7 +575,6 @@ ru: label_months_from: месяцев(ца) с label_month: Месяц label_more_than_ago: более, чем дней(я) назад - label_more: Больше label_my_account: Моя учётная запись label_my_page: Моя страница label_my_page_block: Блок моей страницы diff --git a/config/locales/sk.yml b/config/locales/sk.yml index bc1c45e67..ea89281a1 100644 --- a/config/locales/sk.yml +++ b/config/locales/sk.yml @@ -590,7 +590,6 @@ sk: label_age: Vek label_change_properties: Zmeniť vlastnosti label_general: Všeobecné - label_more: Viac label_scm: SCM label_plugins: Pluginy label_ldap_authentication: Autentifikácia LDAP diff --git a/config/locales/sl.yml b/config/locales/sl.yml index 6c1e3ca54..267a9dce0 100644 --- a/config/locales/sl.yml +++ b/config/locales/sl.yml @@ -655,7 +655,6 @@ sl: label_age: Starost label_change_properties: Sprememba lastnosti label_general: Splošno - label_more: Več label_scm: SCM label_plugins: Vtičniki label_ldap_authentication: LDAP overovljanje diff --git a/config/locales/sq.yml b/config/locales/sq.yml index 8ee4875aa..170358115 100644 --- a/config/locales/sq.yml +++ b/config/locales/sq.yml @@ -777,7 +777,6 @@ sq: label_age: Age label_change_properties: Change properties label_general: General - label_more: More label_scm: SCM label_plugins: Plugins label_ldap_authentication: LDAP authentication diff --git a/config/locales/sr-YU.yml b/config/locales/sr-YU.yml index 42b5b53c9..f7211e6ed 100644 --- a/config/locales/sr-YU.yml +++ b/config/locales/sr-YU.yml @@ -725,7 +725,6 @@ sr-YU: label_age: Starost label_change_properties: Promeni svojstva label_general: Opšti - label_more: Više label_scm: SCM label_plugins: Dodatne komponente label_ldap_authentication: LDAP potvrda identiteta diff --git a/config/locales/sr.yml b/config/locales/sr.yml index 0efbf513c..e959e9e88 100644 --- a/config/locales/sr.yml +++ b/config/locales/sr.yml @@ -723,7 +723,6 @@ sr: label_age: Старост label_change_properties: Промени својства label_general: Општи - label_more: Више label_scm: SCM label_plugins: Додатне компоненте label_ldap_authentication: LDAP потврда идентитета diff --git a/config/locales/sv.yml b/config/locales/sv.yml index 77a077b7a..f45a1c1b6 100644 --- a/config/locales/sv.yml +++ b/config/locales/sv.yml @@ -854,7 +854,6 @@ sv: label_age: Ålder label_change_properties: Ändra inställningar label_general: Allmänt - label_more: Mer label_scm: SCM label_plugins: Tillägg label_ldap_authentication: LDAP-autentisering diff --git a/config/locales/th.yml b/config/locales/th.yml index db07c1722..919cdbac0 100644 --- a/config/locales/th.yml +++ b/config/locales/th.yml @@ -591,7 +591,6 @@ th: label_age: อายุ label_change_properties: เปลี่ยนคุณสมบัติ label_general: ทั่วๆ ไป - label_more: อื่น ๆ label_scm: ตัวจัดการต้นฉบับ label_plugins: ส่วนเสริม label_ldap_authentication: การยืนยันตัวตนโดยใช้ LDAP diff --git a/config/locales/tr.yml b/config/locales/tr.yml index 686fd1f56..936e8c919 100644 --- a/config/locales/tr.yml +++ b/config/locales/tr.yml @@ -605,7 +605,6 @@ tr: label_age: Yaş label_change_properties: Özellikleri değiştir label_general: Genel - label_more: Daha fazla label_scm: KY label_plugins: Eklentiler label_ldap_authentication: LDAP Denetimi diff --git a/config/locales/uk.yml b/config/locales/uk.yml index 0bc141cab..64ecf81ec 100644 --- a/config/locales/uk.yml +++ b/config/locales/uk.yml @@ -654,7 +654,6 @@ uk: setting_user_format: Users display format label_age: Age label_file_added: File added - label_more: More field_default_value: Default value label_scm: SCM label_general: General diff --git a/config/locales/vi.yml b/config/locales/vi.yml index 196712e9c..18c4e8d10 100644 --- a/config/locales/vi.yml +++ b/config/locales/vi.yml @@ -655,7 +655,6 @@ vi: label_age: Thời gian label_change_properties: Thay đổi thuộc tính label_general: Tổng quan - label_more: Chi tiết label_scm: SCM label_plugins: Module label_ldap_authentication: Chứng thực LDAP diff --git a/config/locales/zh-TW.yml b/config/locales/zh-TW.yml index ecea07b9e..1bcf67f27 100644 --- a/config/locales/zh-TW.yml +++ b/config/locales/zh-TW.yml @@ -963,7 +963,6 @@ label_age: 年齡 label_change_properties: 變更屬性 label_general: 一般 - label_more: 更多 » label_scm: 版本控管 label_plugins: 外掛程式 label_ldap_authentication: LDAP 認證 diff --git a/config/locales/zh.yml b/config/locales/zh.yml index 02cf63916..dbed55913 100644 --- a/config/locales/zh.yml +++ b/config/locales/zh.yml @@ -742,7 +742,6 @@ zh: label_age: 提交时间 label_change_properties: 修改属性 label_general: 一般 - label_more: 更多 label_scm: SCM label_plugins: 插件 label_ldap_authentication: LDAP 认证 From 359d7e43a0a9058903a9c8f2ed38940aa278877f Mon Sep 17 00:00:00 2001 From: Toshi MARUYAMA Date: Tue, 21 Feb 2017 11:03:39 +0000 Subject: [PATCH 0659/1117] remove empty lines including trailing white space from test/unit/time_entry_activity_test.rb git-svn-id: http://svn.redmine.org/redmine/trunk@16338 e93f8b46-1217-0410-a6f0-8f06a7374b81 --- test/unit/time_entry_activity_test.rb | 3 --- 1 file changed, 3 deletions(-) diff --git a/test/unit/time_entry_activity_test.rb b/test/unit/time_entry_activity_test.rb index 9bc476006..001327731 100644 --- a/test/unit/time_entry_activity_test.rb +++ b/test/unit/time_entry_activity_test.rb @@ -106,13 +106,10 @@ class TimeEntryActivityTest < ActiveSupport::TestCase def test_destroying_a_system_activity_should_reassign_children_activities project = Project.generate! entries = [] - system_activity = TimeEntryActivity.create!(:name => 'Activity') entries << TimeEntry.generate!(:project => project, :activity => system_activity) - project_activity = TimeEntryActivity.create!(:name => 'Activity', :project => project, :parent_id => system_activity.id) entries << TimeEntry.generate!(:project => project.reload, :activity => project_activity) - assert_difference 'TimeEntryActivity.count', -2 do assert_nothing_raised do assert system_activity.destroy(TimeEntryActivity.find_by_name('Development')) From 7816a4025a0342ded7d2f68c38b331dbde3f2321 Mon Sep 17 00:00:00 2001 From: Toshi MARUYAMA Date: Tue, 21 Feb 2017 11:19:23 +0000 Subject: [PATCH 0660/1117] remove trailing white space from test/fixtures/workflows.yml git-svn-id: http://svn.redmine.org/redmine/trunk@16339 e93f8b46-1217-0410-a6f0-8f06a7374b81 --- test/fixtures/workflows.yml | 552 ++++++++++++++++++------------------ 1 file changed, 276 insertions(+), 276 deletions(-) diff --git a/test/fixtures/workflows.yml b/test/fixtures/workflows.yml index 7eb5481bb..c6ae675fa 100644 --- a/test/fixtures/workflows.yml +++ b/test/fixtures/workflows.yml @@ -1,1923 +1,1923 @@ ---- -WorkflowTransitions_189: +--- +WorkflowTransitions_189: new_status_id: 5 role_id: 1 old_status_id: 2 id: 189 tracker_id: 3 type: WorkflowTransition -WorkflowTransitions_001: +WorkflowTransitions_001: new_status_id: 2 role_id: 1 old_status_id: 1 id: 1 tracker_id: 1 type: WorkflowTransition -WorkflowTransitions_002: +WorkflowTransitions_002: new_status_id: 3 role_id: 1 old_status_id: 1 id: 2 tracker_id: 1 type: WorkflowTransition -WorkflowTransitions_003: +WorkflowTransitions_003: new_status_id: 4 role_id: 1 old_status_id: 1 id: 3 tracker_id: 1 type: WorkflowTransition -WorkflowTransitions_110: +WorkflowTransitions_110: new_status_id: 6 role_id: 1 old_status_id: 4 id: 110 tracker_id: 2 type: WorkflowTransition -WorkflowTransitions_004: +WorkflowTransitions_004: new_status_id: 5 role_id: 1 old_status_id: 1 id: 4 tracker_id: 1 type: WorkflowTransition -WorkflowTransitions_030: +WorkflowTransitions_030: new_status_id: 5 role_id: 1 old_status_id: 6 id: 30 tracker_id: 1 type: WorkflowTransition -WorkflowTransitions_111: +WorkflowTransitions_111: new_status_id: 1 role_id: 1 old_status_id: 5 id: 111 tracker_id: 2 type: WorkflowTransition -WorkflowTransitions_005: +WorkflowTransitions_005: new_status_id: 6 role_id: 1 old_status_id: 1 id: 5 tracker_id: 1 type: WorkflowTransition -WorkflowTransitions_031: +WorkflowTransitions_031: new_status_id: 2 role_id: 2 old_status_id: 1 id: 31 tracker_id: 1 type: WorkflowTransition -WorkflowTransitions_112: +WorkflowTransitions_112: new_status_id: 2 role_id: 1 old_status_id: 5 id: 112 tracker_id: 2 type: WorkflowTransition -WorkflowTransitions_006: +WorkflowTransitions_006: new_status_id: 1 role_id: 1 old_status_id: 2 id: 6 tracker_id: 1 type: WorkflowTransition -WorkflowTransitions_032: +WorkflowTransitions_032: new_status_id: 3 role_id: 2 old_status_id: 1 id: 32 tracker_id: 1 type: WorkflowTransition -WorkflowTransitions_113: +WorkflowTransitions_113: new_status_id: 3 role_id: 1 old_status_id: 5 id: 113 tracker_id: 2 type: WorkflowTransition -WorkflowTransitions_220: +WorkflowTransitions_220: new_status_id: 6 role_id: 2 old_status_id: 2 id: 220 tracker_id: 3 type: WorkflowTransition -WorkflowTransitions_007: +WorkflowTransitions_007: new_status_id: 3 role_id: 1 old_status_id: 2 id: 7 tracker_id: 1 type: WorkflowTransition -WorkflowTransitions_033: +WorkflowTransitions_033: new_status_id: 4 role_id: 2 old_status_id: 1 id: 33 tracker_id: 1 type: WorkflowTransition -WorkflowTransitions_060: +WorkflowTransitions_060: new_status_id: 5 role_id: 2 old_status_id: 6 id: 60 tracker_id: 1 type: WorkflowTransition -WorkflowTransitions_114: +WorkflowTransitions_114: new_status_id: 4 role_id: 1 old_status_id: 5 id: 114 tracker_id: 2 type: WorkflowTransition -WorkflowTransitions_140: +WorkflowTransitions_140: new_status_id: 6 role_id: 2 old_status_id: 4 id: 140 tracker_id: 2 type: WorkflowTransition -WorkflowTransitions_221: +WorkflowTransitions_221: new_status_id: 1 role_id: 2 old_status_id: 3 id: 221 tracker_id: 3 type: WorkflowTransition -WorkflowTransitions_008: +WorkflowTransitions_008: new_status_id: 4 role_id: 1 old_status_id: 2 id: 8 tracker_id: 1 type: WorkflowTransition -WorkflowTransitions_034: +WorkflowTransitions_034: new_status_id: 5 role_id: 2 old_status_id: 1 id: 34 tracker_id: 1 type: WorkflowTransition -WorkflowTransitions_115: +WorkflowTransitions_115: new_status_id: 6 role_id: 1 old_status_id: 5 id: 115 tracker_id: 2 type: WorkflowTransition -WorkflowTransitions_141: +WorkflowTransitions_141: new_status_id: 1 role_id: 2 old_status_id: 5 id: 141 tracker_id: 2 type: WorkflowTransition -WorkflowTransitions_222: +WorkflowTransitions_222: new_status_id: 2 role_id: 2 old_status_id: 3 id: 222 tracker_id: 3 type: WorkflowTransition -WorkflowTransitions_223: +WorkflowTransitions_223: new_status_id: 4 role_id: 2 old_status_id: 3 id: 223 tracker_id: 3 type: WorkflowTransition -WorkflowTransitions_009: +WorkflowTransitions_009: new_status_id: 5 role_id: 1 old_status_id: 2 id: 9 tracker_id: 1 type: WorkflowTransition -WorkflowTransitions_035: +WorkflowTransitions_035: new_status_id: 6 role_id: 2 old_status_id: 1 id: 35 tracker_id: 1 type: WorkflowTransition -WorkflowTransitions_061: +WorkflowTransitions_061: new_status_id: 2 role_id: 3 old_status_id: 1 id: 61 tracker_id: 1 type: WorkflowTransition -WorkflowTransitions_116: +WorkflowTransitions_116: new_status_id: 1 role_id: 1 old_status_id: 6 id: 116 tracker_id: 2 type: WorkflowTransition -WorkflowTransitions_142: +WorkflowTransitions_142: new_status_id: 2 role_id: 2 old_status_id: 5 id: 142 tracker_id: 2 type: WorkflowTransition -WorkflowTransitions_250: +WorkflowTransitions_250: new_status_id: 6 role_id: 3 old_status_id: 2 id: 250 tracker_id: 3 type: WorkflowTransition -WorkflowTransitions_224: +WorkflowTransitions_224: new_status_id: 5 role_id: 2 old_status_id: 3 id: 224 tracker_id: 3 type: WorkflowTransition -WorkflowTransitions_036: +WorkflowTransitions_036: new_status_id: 1 role_id: 2 old_status_id: 2 id: 36 tracker_id: 1 type: WorkflowTransition -WorkflowTransitions_062: +WorkflowTransitions_062: new_status_id: 3 role_id: 3 old_status_id: 1 id: 62 tracker_id: 1 type: WorkflowTransition -WorkflowTransitions_117: +WorkflowTransitions_117: new_status_id: 2 role_id: 1 old_status_id: 6 id: 117 tracker_id: 2 type: WorkflowTransition -WorkflowTransitions_143: +WorkflowTransitions_143: new_status_id: 3 role_id: 2 old_status_id: 5 id: 143 tracker_id: 2 type: WorkflowTransition -WorkflowTransitions_170: +WorkflowTransitions_170: new_status_id: 6 role_id: 3 old_status_id: 4 id: 170 tracker_id: 2 type: WorkflowTransition -WorkflowTransitions_251: +WorkflowTransitions_251: new_status_id: 1 role_id: 3 old_status_id: 3 id: 251 tracker_id: 3 type: WorkflowTransition -WorkflowTransitions_225: +WorkflowTransitions_225: new_status_id: 6 role_id: 2 old_status_id: 3 id: 225 tracker_id: 3 type: WorkflowTransition -WorkflowTransitions_063: +WorkflowTransitions_063: new_status_id: 4 role_id: 3 old_status_id: 1 id: 63 tracker_id: 1 type: WorkflowTransition -WorkflowTransitions_090: +WorkflowTransitions_090: new_status_id: 5 role_id: 3 old_status_id: 6 id: 90 tracker_id: 1 type: WorkflowTransition -WorkflowTransitions_118: +WorkflowTransitions_118: new_status_id: 3 role_id: 1 old_status_id: 6 id: 118 tracker_id: 2 type: WorkflowTransition -WorkflowTransitions_144: +WorkflowTransitions_144: new_status_id: 4 role_id: 2 old_status_id: 5 id: 144 tracker_id: 2 type: WorkflowTransition -WorkflowTransitions_252: +WorkflowTransitions_252: new_status_id: 2 role_id: 3 old_status_id: 3 id: 252 tracker_id: 3 type: WorkflowTransition -WorkflowTransitions_226: +WorkflowTransitions_226: new_status_id: 1 role_id: 2 old_status_id: 4 id: 226 tracker_id: 3 type: WorkflowTransition -WorkflowTransitions_038: +WorkflowTransitions_038: new_status_id: 4 role_id: 2 old_status_id: 2 id: 38 tracker_id: 1 type: WorkflowTransition -WorkflowTransitions_064: +WorkflowTransitions_064: new_status_id: 5 role_id: 3 old_status_id: 1 id: 64 tracker_id: 1 type: WorkflowTransition -WorkflowTransitions_091: +WorkflowTransitions_091: new_status_id: 2 role_id: 1 old_status_id: 1 id: 91 tracker_id: 2 type: WorkflowTransition -WorkflowTransitions_119: +WorkflowTransitions_119: new_status_id: 4 role_id: 1 old_status_id: 6 id: 119 tracker_id: 2 type: WorkflowTransition -WorkflowTransitions_145: +WorkflowTransitions_145: new_status_id: 6 role_id: 2 old_status_id: 5 id: 145 tracker_id: 2 type: WorkflowTransition -WorkflowTransitions_171: +WorkflowTransitions_171: new_status_id: 1 role_id: 3 old_status_id: 5 id: 171 tracker_id: 2 type: WorkflowTransition -WorkflowTransitions_253: +WorkflowTransitions_253: new_status_id: 4 role_id: 3 old_status_id: 3 id: 253 tracker_id: 3 type: WorkflowTransition -WorkflowTransitions_227: +WorkflowTransitions_227: new_status_id: 2 role_id: 2 old_status_id: 4 id: 227 tracker_id: 3 type: WorkflowTransition -WorkflowTransitions_039: +WorkflowTransitions_039: new_status_id: 5 role_id: 2 old_status_id: 2 id: 39 tracker_id: 1 type: WorkflowTransition -WorkflowTransitions_065: +WorkflowTransitions_065: new_status_id: 6 role_id: 3 old_status_id: 1 id: 65 tracker_id: 1 type: WorkflowTransition -WorkflowTransitions_092: +WorkflowTransitions_092: new_status_id: 3 role_id: 1 old_status_id: 1 id: 92 tracker_id: 2 type: WorkflowTransition -WorkflowTransitions_146: +WorkflowTransitions_146: new_status_id: 1 role_id: 2 old_status_id: 6 id: 146 tracker_id: 2 type: WorkflowTransition -WorkflowTransitions_172: +WorkflowTransitions_172: new_status_id: 2 role_id: 3 old_status_id: 5 id: 172 tracker_id: 2 type: WorkflowTransition -WorkflowTransitions_254: +WorkflowTransitions_254: new_status_id: 5 role_id: 3 old_status_id: 3 id: 254 tracker_id: 3 type: WorkflowTransition -WorkflowTransitions_228: +WorkflowTransitions_228: new_status_id: 3 role_id: 2 old_status_id: 4 id: 228 tracker_id: 3 type: WorkflowTransition -WorkflowTransitions_066: +WorkflowTransitions_066: new_status_id: 1 role_id: 3 old_status_id: 2 id: 66 tracker_id: 1 type: WorkflowTransition -WorkflowTransitions_093: +WorkflowTransitions_093: new_status_id: 4 role_id: 1 old_status_id: 1 id: 93 tracker_id: 2 type: WorkflowTransition -WorkflowTransitions_147: +WorkflowTransitions_147: new_status_id: 2 role_id: 2 old_status_id: 6 id: 147 tracker_id: 2 type: WorkflowTransition -WorkflowTransitions_173: +WorkflowTransitions_173: new_status_id: 3 role_id: 3 old_status_id: 5 id: 173 tracker_id: 2 type: WorkflowTransition -WorkflowTransitions_255: +WorkflowTransitions_255: new_status_id: 6 role_id: 3 old_status_id: 3 id: 255 tracker_id: 3 type: WorkflowTransition -WorkflowTransitions_229: +WorkflowTransitions_229: new_status_id: 5 role_id: 2 old_status_id: 4 id: 229 tracker_id: 3 type: WorkflowTransition -WorkflowTransitions_067: +WorkflowTransitions_067: new_status_id: 3 role_id: 3 old_status_id: 2 id: 67 tracker_id: 1 type: WorkflowTransition -WorkflowTransitions_148: +WorkflowTransitions_148: new_status_id: 3 role_id: 2 old_status_id: 6 id: 148 tracker_id: 2 type: WorkflowTransition -WorkflowTransitions_174: +WorkflowTransitions_174: new_status_id: 4 role_id: 3 old_status_id: 5 id: 174 tracker_id: 2 type: WorkflowTransition -WorkflowTransitions_256: +WorkflowTransitions_256: new_status_id: 1 role_id: 3 old_status_id: 4 id: 256 tracker_id: 3 type: WorkflowTransition -WorkflowTransitions_068: +WorkflowTransitions_068: new_status_id: 4 role_id: 3 old_status_id: 2 id: 68 tracker_id: 1 type: WorkflowTransition -WorkflowTransitions_094: +WorkflowTransitions_094: new_status_id: 5 role_id: 1 old_status_id: 1 id: 94 tracker_id: 2 type: WorkflowTransition -WorkflowTransitions_149: +WorkflowTransitions_149: new_status_id: 4 role_id: 2 old_status_id: 6 id: 149 tracker_id: 2 type: WorkflowTransition -WorkflowTransitions_175: +WorkflowTransitions_175: new_status_id: 6 role_id: 3 old_status_id: 5 id: 175 tracker_id: 2 type: WorkflowTransition -WorkflowTransitions_257: +WorkflowTransitions_257: new_status_id: 2 role_id: 3 old_status_id: 4 id: 257 tracker_id: 3 type: WorkflowTransition -WorkflowTransitions_069: +WorkflowTransitions_069: new_status_id: 5 role_id: 3 old_status_id: 2 id: 69 tracker_id: 1 type: WorkflowTransition -WorkflowTransitions_095: +WorkflowTransitions_095: new_status_id: 6 role_id: 1 old_status_id: 1 id: 95 tracker_id: 2 type: WorkflowTransition -WorkflowTransitions_176: +WorkflowTransitions_176: new_status_id: 1 role_id: 3 old_status_id: 6 id: 176 tracker_id: 2 type: WorkflowTransition -WorkflowTransitions_258: +WorkflowTransitions_258: new_status_id: 3 role_id: 3 old_status_id: 4 id: 258 tracker_id: 3 type: WorkflowTransition -WorkflowTransitions_096: +WorkflowTransitions_096: new_status_id: 1 role_id: 1 old_status_id: 2 id: 96 tracker_id: 2 type: WorkflowTransition -WorkflowTransitions_177: +WorkflowTransitions_177: new_status_id: 2 role_id: 3 old_status_id: 6 id: 177 tracker_id: 2 type: WorkflowTransition -WorkflowTransitions_259: +WorkflowTransitions_259: new_status_id: 5 role_id: 3 old_status_id: 4 id: 259 tracker_id: 3 type: WorkflowTransition -WorkflowTransitions_097: +WorkflowTransitions_097: new_status_id: 3 role_id: 1 old_status_id: 2 id: 97 tracker_id: 2 type: WorkflowTransition -WorkflowTransitions_178: +WorkflowTransitions_178: new_status_id: 3 role_id: 3 old_status_id: 6 id: 178 tracker_id: 2 type: WorkflowTransition -WorkflowTransitions_098: +WorkflowTransitions_098: new_status_id: 4 role_id: 1 old_status_id: 2 id: 98 tracker_id: 2 type: WorkflowTransition -WorkflowTransitions_179: +WorkflowTransitions_179: new_status_id: 4 role_id: 3 old_status_id: 6 id: 179 tracker_id: 2 type: WorkflowTransition -WorkflowTransitions_099: +WorkflowTransitions_099: new_status_id: 5 role_id: 1 old_status_id: 2 id: 99 tracker_id: 2 type: WorkflowTransition -WorkflowTransitions_100: +WorkflowTransitions_100: new_status_id: 6 role_id: 1 old_status_id: 2 id: 100 tracker_id: 2 type: WorkflowTransition -WorkflowTransitions_020: +WorkflowTransitions_020: new_status_id: 6 role_id: 1 old_status_id: 4 id: 20 tracker_id: 1 type: WorkflowTransition -WorkflowTransitions_101: +WorkflowTransitions_101: new_status_id: 1 role_id: 1 old_status_id: 3 id: 101 tracker_id: 2 type: WorkflowTransition -WorkflowTransitions_021: +WorkflowTransitions_021: new_status_id: 1 role_id: 1 old_status_id: 5 id: 21 tracker_id: 1 type: WorkflowTransition -WorkflowTransitions_102: +WorkflowTransitions_102: new_status_id: 2 role_id: 1 old_status_id: 3 id: 102 tracker_id: 2 type: WorkflowTransition -WorkflowTransitions_210: +WorkflowTransitions_210: new_status_id: 5 role_id: 1 old_status_id: 6 id: 210 tracker_id: 3 type: WorkflowTransition -WorkflowTransitions_022: +WorkflowTransitions_022: new_status_id: 2 role_id: 1 old_status_id: 5 id: 22 tracker_id: 1 type: WorkflowTransition -WorkflowTransitions_103: +WorkflowTransitions_103: new_status_id: 4 role_id: 1 old_status_id: 3 id: 103 tracker_id: 2 type: WorkflowTransition -WorkflowTransitions_023: +WorkflowTransitions_023: new_status_id: 3 role_id: 1 old_status_id: 5 id: 23 tracker_id: 1 type: WorkflowTransition -WorkflowTransitions_104: +WorkflowTransitions_104: new_status_id: 5 role_id: 1 old_status_id: 3 id: 104 tracker_id: 2 type: WorkflowTransition -WorkflowTransitions_130: +WorkflowTransitions_130: new_status_id: 6 role_id: 2 old_status_id: 2 id: 130 tracker_id: 2 type: WorkflowTransition -WorkflowTransitions_211: +WorkflowTransitions_211: new_status_id: 2 role_id: 2 old_status_id: 1 id: 211 tracker_id: 3 type: WorkflowTransition -WorkflowTransitions_024: +WorkflowTransitions_024: new_status_id: 4 role_id: 1 old_status_id: 5 id: 24 tracker_id: 1 type: WorkflowTransition -WorkflowTransitions_050: +WorkflowTransitions_050: new_status_id: 6 role_id: 2 old_status_id: 4 id: 50 tracker_id: 1 type: WorkflowTransition -WorkflowTransitions_105: +WorkflowTransitions_105: new_status_id: 6 role_id: 1 old_status_id: 3 id: 105 tracker_id: 2 type: WorkflowTransition -WorkflowTransitions_131: +WorkflowTransitions_131: new_status_id: 1 role_id: 2 old_status_id: 3 id: 131 tracker_id: 2 type: WorkflowTransition -WorkflowTransitions_212: +WorkflowTransitions_212: new_status_id: 3 role_id: 2 old_status_id: 1 id: 212 tracker_id: 3 type: WorkflowTransition -WorkflowTransitions_025: +WorkflowTransitions_025: new_status_id: 6 role_id: 1 old_status_id: 5 id: 25 tracker_id: 1 type: WorkflowTransition -WorkflowTransitions_051: +WorkflowTransitions_051: new_status_id: 1 role_id: 2 old_status_id: 5 id: 51 tracker_id: 1 type: WorkflowTransition -WorkflowTransitions_106: +WorkflowTransitions_106: new_status_id: 1 role_id: 1 old_status_id: 4 id: 106 tracker_id: 2 type: WorkflowTransition -WorkflowTransitions_132: +WorkflowTransitions_132: new_status_id: 2 role_id: 2 old_status_id: 3 id: 132 tracker_id: 2 type: WorkflowTransition -WorkflowTransitions_213: +WorkflowTransitions_213: new_status_id: 4 role_id: 2 old_status_id: 1 id: 213 tracker_id: 3 type: WorkflowTransition -WorkflowTransitions_240: +WorkflowTransitions_240: new_status_id: 5 role_id: 2 old_status_id: 6 id: 240 tracker_id: 3 type: WorkflowTransition -WorkflowTransitions_026: +WorkflowTransitions_026: new_status_id: 1 role_id: 1 old_status_id: 6 id: 26 tracker_id: 1 type: WorkflowTransition -WorkflowTransitions_052: +WorkflowTransitions_052: new_status_id: 2 role_id: 2 old_status_id: 5 id: 52 tracker_id: 1 type: WorkflowTransition -WorkflowTransitions_107: +WorkflowTransitions_107: new_status_id: 2 role_id: 1 old_status_id: 4 id: 107 tracker_id: 2 type: WorkflowTransition -WorkflowTransitions_133: +WorkflowTransitions_133: new_status_id: 4 role_id: 2 old_status_id: 3 id: 133 tracker_id: 2 type: WorkflowTransition -WorkflowTransitions_214: +WorkflowTransitions_214: new_status_id: 5 role_id: 2 old_status_id: 1 id: 214 tracker_id: 3 type: WorkflowTransition -WorkflowTransitions_241: +WorkflowTransitions_241: new_status_id: 2 role_id: 3 old_status_id: 1 id: 241 tracker_id: 3 type: WorkflowTransition -WorkflowTransitions_027: +WorkflowTransitions_027: new_status_id: 2 role_id: 1 old_status_id: 6 id: 27 tracker_id: 1 type: WorkflowTransition -WorkflowTransitions_053: +WorkflowTransitions_053: new_status_id: 3 role_id: 2 old_status_id: 5 id: 53 tracker_id: 1 type: WorkflowTransition -WorkflowTransitions_080: +WorkflowTransitions_080: new_status_id: 6 role_id: 3 old_status_id: 4 id: 80 tracker_id: 1 type: WorkflowTransition -WorkflowTransitions_108: +WorkflowTransitions_108: new_status_id: 3 role_id: 1 old_status_id: 4 id: 108 tracker_id: 2 type: WorkflowTransition -WorkflowTransitions_134: +WorkflowTransitions_134: new_status_id: 5 role_id: 2 old_status_id: 3 id: 134 tracker_id: 2 type: WorkflowTransition -WorkflowTransitions_160: +WorkflowTransitions_160: new_status_id: 6 role_id: 3 old_status_id: 2 id: 160 tracker_id: 2 type: WorkflowTransition -WorkflowTransitions_215: +WorkflowTransitions_215: new_status_id: 6 role_id: 2 old_status_id: 1 id: 215 tracker_id: 3 type: WorkflowTransition -WorkflowTransitions_242: +WorkflowTransitions_242: new_status_id: 3 role_id: 3 old_status_id: 1 id: 242 tracker_id: 3 type: WorkflowTransition -WorkflowTransitions_028: +WorkflowTransitions_028: new_status_id: 3 role_id: 1 old_status_id: 6 id: 28 tracker_id: 1 type: WorkflowTransition -WorkflowTransitions_054: +WorkflowTransitions_054: new_status_id: 4 role_id: 2 old_status_id: 5 id: 54 tracker_id: 1 type: WorkflowTransition -WorkflowTransitions_081: +WorkflowTransitions_081: new_status_id: 1 role_id: 3 old_status_id: 5 id: 81 tracker_id: 1 type: WorkflowTransition -WorkflowTransitions_109: +WorkflowTransitions_109: new_status_id: 5 role_id: 1 old_status_id: 4 id: 109 tracker_id: 2 type: WorkflowTransition -WorkflowTransitions_135: +WorkflowTransitions_135: new_status_id: 6 role_id: 2 old_status_id: 3 id: 135 tracker_id: 2 type: WorkflowTransition -WorkflowTransitions_161: +WorkflowTransitions_161: new_status_id: 1 role_id: 3 old_status_id: 3 id: 161 tracker_id: 2 type: WorkflowTransition -WorkflowTransitions_216: +WorkflowTransitions_216: new_status_id: 1 role_id: 2 old_status_id: 2 id: 216 tracker_id: 3 type: WorkflowTransition -WorkflowTransitions_243: +WorkflowTransitions_243: new_status_id: 4 role_id: 3 old_status_id: 1 id: 243 tracker_id: 3 type: WorkflowTransition -WorkflowTransitions_029: +WorkflowTransitions_029: new_status_id: 4 role_id: 1 old_status_id: 6 id: 29 tracker_id: 1 type: WorkflowTransition -WorkflowTransitions_055: +WorkflowTransitions_055: new_status_id: 6 role_id: 2 old_status_id: 5 id: 55 tracker_id: 1 type: WorkflowTransition -WorkflowTransitions_082: +WorkflowTransitions_082: new_status_id: 2 role_id: 3 old_status_id: 5 id: 82 tracker_id: 1 type: WorkflowTransition -WorkflowTransitions_136: +WorkflowTransitions_136: new_status_id: 1 role_id: 2 old_status_id: 4 id: 136 tracker_id: 2 type: WorkflowTransition -WorkflowTransitions_162: +WorkflowTransitions_162: new_status_id: 2 role_id: 3 old_status_id: 3 id: 162 tracker_id: 2 type: WorkflowTransition -WorkflowTransitions_217: +WorkflowTransitions_217: new_status_id: 3 role_id: 2 old_status_id: 2 id: 217 tracker_id: 3 type: WorkflowTransition -WorkflowTransitions_270: +WorkflowTransitions_270: new_status_id: 5 role_id: 3 old_status_id: 6 id: 270 tracker_id: 3 type: WorkflowTransition -WorkflowTransitions_244: +WorkflowTransitions_244: new_status_id: 5 role_id: 3 old_status_id: 1 id: 244 tracker_id: 3 type: WorkflowTransition -WorkflowTransitions_056: +WorkflowTransitions_056: new_status_id: 1 role_id: 2 old_status_id: 6 id: 56 tracker_id: 1 type: WorkflowTransition -WorkflowTransitions_137: +WorkflowTransitions_137: new_status_id: 2 role_id: 2 old_status_id: 4 id: 137 tracker_id: 2 type: WorkflowTransition -WorkflowTransitions_163: +WorkflowTransitions_163: new_status_id: 4 role_id: 3 old_status_id: 3 id: 163 tracker_id: 2 type: WorkflowTransition -WorkflowTransitions_190: +WorkflowTransitions_190: new_status_id: 6 role_id: 1 old_status_id: 2 id: 190 tracker_id: 3 type: WorkflowTransition -WorkflowTransitions_218: +WorkflowTransitions_218: new_status_id: 4 role_id: 2 old_status_id: 2 id: 218 tracker_id: 3 type: WorkflowTransition -WorkflowTransitions_245: +WorkflowTransitions_245: new_status_id: 6 role_id: 3 old_status_id: 1 id: 245 tracker_id: 3 type: WorkflowTransition -WorkflowTransitions_057: +WorkflowTransitions_057: new_status_id: 2 role_id: 2 old_status_id: 6 id: 57 tracker_id: 1 type: WorkflowTransition -WorkflowTransitions_083: +WorkflowTransitions_083: new_status_id: 3 role_id: 3 old_status_id: 5 id: 83 tracker_id: 1 type: WorkflowTransition -WorkflowTransitions_138: +WorkflowTransitions_138: new_status_id: 3 role_id: 2 old_status_id: 4 id: 138 tracker_id: 2 type: WorkflowTransition -WorkflowTransitions_164: +WorkflowTransitions_164: new_status_id: 5 role_id: 3 old_status_id: 3 id: 164 tracker_id: 2 type: WorkflowTransition -WorkflowTransitions_191: +WorkflowTransitions_191: new_status_id: 1 role_id: 1 old_status_id: 3 id: 191 tracker_id: 3 type: WorkflowTransition -WorkflowTransitions_219: +WorkflowTransitions_219: new_status_id: 5 role_id: 2 old_status_id: 2 id: 219 tracker_id: 3 type: WorkflowTransition -WorkflowTransitions_246: +WorkflowTransitions_246: new_status_id: 1 role_id: 3 old_status_id: 2 id: 246 tracker_id: 3 type: WorkflowTransition -WorkflowTransitions_058: +WorkflowTransitions_058: new_status_id: 3 role_id: 2 old_status_id: 6 id: 58 tracker_id: 1 type: WorkflowTransition -WorkflowTransitions_084: +WorkflowTransitions_084: new_status_id: 4 role_id: 3 old_status_id: 5 id: 84 tracker_id: 1 type: WorkflowTransition -WorkflowTransitions_139: +WorkflowTransitions_139: new_status_id: 5 role_id: 2 old_status_id: 4 id: 139 tracker_id: 2 type: WorkflowTransition -WorkflowTransitions_165: +WorkflowTransitions_165: new_status_id: 6 role_id: 3 old_status_id: 3 id: 165 tracker_id: 2 type: WorkflowTransition -WorkflowTransitions_192: +WorkflowTransitions_192: new_status_id: 2 role_id: 1 old_status_id: 3 id: 192 tracker_id: 3 type: WorkflowTransition -WorkflowTransitions_247: +WorkflowTransitions_247: new_status_id: 3 role_id: 3 old_status_id: 2 id: 247 tracker_id: 3 type: WorkflowTransition -WorkflowTransitions_059: +WorkflowTransitions_059: new_status_id: 4 role_id: 2 old_status_id: 6 id: 59 tracker_id: 1 type: WorkflowTransition -WorkflowTransitions_085: +WorkflowTransitions_085: new_status_id: 6 role_id: 3 old_status_id: 5 id: 85 tracker_id: 1 type: WorkflowTransition -WorkflowTransitions_166: +WorkflowTransitions_166: new_status_id: 1 role_id: 3 old_status_id: 4 id: 166 tracker_id: 2 type: WorkflowTransition -WorkflowTransitions_248: +WorkflowTransitions_248: new_status_id: 4 role_id: 3 old_status_id: 2 id: 248 tracker_id: 3 type: WorkflowTransition -WorkflowTransitions_086: +WorkflowTransitions_086: new_status_id: 1 role_id: 3 old_status_id: 6 id: 86 tracker_id: 1 type: WorkflowTransition -WorkflowTransitions_167: +WorkflowTransitions_167: new_status_id: 2 role_id: 3 old_status_id: 4 id: 167 tracker_id: 2 type: WorkflowTransition -WorkflowTransitions_193: +WorkflowTransitions_193: new_status_id: 4 role_id: 1 old_status_id: 3 id: 193 tracker_id: 3 type: WorkflowTransition -WorkflowTransitions_249: +WorkflowTransitions_249: new_status_id: 5 role_id: 3 old_status_id: 2 id: 249 tracker_id: 3 type: WorkflowTransition -WorkflowTransitions_087: +WorkflowTransitions_087: new_status_id: 2 role_id: 3 old_status_id: 6 id: 87 tracker_id: 1 type: WorkflowTransition -WorkflowTransitions_168: +WorkflowTransitions_168: new_status_id: 3 role_id: 3 old_status_id: 4 id: 168 tracker_id: 2 type: WorkflowTransition -WorkflowTransitions_194: +WorkflowTransitions_194: new_status_id: 5 role_id: 1 old_status_id: 3 id: 194 tracker_id: 3 type: WorkflowTransition -WorkflowTransitions_088: +WorkflowTransitions_088: new_status_id: 3 role_id: 3 old_status_id: 6 id: 88 tracker_id: 1 type: WorkflowTransition -WorkflowTransitions_169: +WorkflowTransitions_169: new_status_id: 5 role_id: 3 old_status_id: 4 id: 169 tracker_id: 2 type: WorkflowTransition -WorkflowTransitions_195: +WorkflowTransitions_195: new_status_id: 6 role_id: 1 old_status_id: 3 id: 195 tracker_id: 3 type: WorkflowTransition -WorkflowTransitions_089: +WorkflowTransitions_089: new_status_id: 4 role_id: 3 old_status_id: 6 id: 89 tracker_id: 1 type: WorkflowTransition -WorkflowTransitions_196: +WorkflowTransitions_196: new_status_id: 1 role_id: 1 old_status_id: 4 id: 196 tracker_id: 3 type: WorkflowTransition -WorkflowTransitions_197: +WorkflowTransitions_197: new_status_id: 2 role_id: 1 old_status_id: 4 id: 197 tracker_id: 3 type: WorkflowTransition -WorkflowTransitions_198: +WorkflowTransitions_198: new_status_id: 3 role_id: 1 old_status_id: 4 id: 198 tracker_id: 3 type: WorkflowTransition -WorkflowTransitions_199: +WorkflowTransitions_199: new_status_id: 5 role_id: 1 old_status_id: 4 id: 199 tracker_id: 3 type: WorkflowTransition -WorkflowTransitions_010: +WorkflowTransitions_010: new_status_id: 6 role_id: 1 old_status_id: 2 id: 10 tracker_id: 1 type: WorkflowTransition -WorkflowTransitions_011: +WorkflowTransitions_011: new_status_id: 1 role_id: 1 old_status_id: 3 id: 11 tracker_id: 1 type: WorkflowTransition -WorkflowTransitions_012: +WorkflowTransitions_012: new_status_id: 2 role_id: 1 old_status_id: 3 id: 12 tracker_id: 1 type: WorkflowTransition -WorkflowTransitions_200: +WorkflowTransitions_200: new_status_id: 6 role_id: 1 old_status_id: 4 id: 200 tracker_id: 3 type: WorkflowTransition -WorkflowTransitions_013: +WorkflowTransitions_013: new_status_id: 4 role_id: 1 old_status_id: 3 id: 13 tracker_id: 1 type: WorkflowTransition -WorkflowTransitions_120: +WorkflowTransitions_120: new_status_id: 5 role_id: 1 old_status_id: 6 id: 120 tracker_id: 2 type: WorkflowTransition -WorkflowTransitions_201: +WorkflowTransitions_201: new_status_id: 1 role_id: 1 old_status_id: 5 id: 201 tracker_id: 3 type: WorkflowTransition -WorkflowTransitions_040: +WorkflowTransitions_040: new_status_id: 6 role_id: 2 old_status_id: 2 id: 40 tracker_id: 1 type: WorkflowTransition -WorkflowTransitions_121: +WorkflowTransitions_121: new_status_id: 2 role_id: 2 old_status_id: 1 id: 121 tracker_id: 2 type: WorkflowTransition -WorkflowTransitions_202: +WorkflowTransitions_202: new_status_id: 2 role_id: 1 old_status_id: 5 id: 202 tracker_id: 3 type: WorkflowTransition -WorkflowTransitions_014: +WorkflowTransitions_014: new_status_id: 5 role_id: 1 old_status_id: 3 id: 14 tracker_id: 1 type: WorkflowTransition -WorkflowTransitions_041: +WorkflowTransitions_041: new_status_id: 1 role_id: 2 old_status_id: 3 id: 41 tracker_id: 1 type: WorkflowTransition -WorkflowTransitions_122: +WorkflowTransitions_122: new_status_id: 3 role_id: 2 old_status_id: 1 id: 122 tracker_id: 2 type: WorkflowTransition -WorkflowTransitions_203: +WorkflowTransitions_203: new_status_id: 3 role_id: 1 old_status_id: 5 id: 203 tracker_id: 3 type: WorkflowTransition -WorkflowTransitions_015: +WorkflowTransitions_015: new_status_id: 6 role_id: 1 old_status_id: 3 id: 15 tracker_id: 1 type: WorkflowTransition -WorkflowTransitions_230: +WorkflowTransitions_230: new_status_id: 6 role_id: 2 old_status_id: 4 id: 230 tracker_id: 3 type: WorkflowTransition -WorkflowTransitions_123: +WorkflowTransitions_123: new_status_id: 4 role_id: 2 old_status_id: 1 id: 123 tracker_id: 2 type: WorkflowTransition -WorkflowTransitions_204: +WorkflowTransitions_204: new_status_id: 4 role_id: 1 old_status_id: 5 id: 204 tracker_id: 3 type: WorkflowTransition -WorkflowTransitions_016: +WorkflowTransitions_016: new_status_id: 1 role_id: 1 old_status_id: 4 id: 16 tracker_id: 1 type: WorkflowTransition -WorkflowTransitions_042: +WorkflowTransitions_042: new_status_id: 2 role_id: 2 old_status_id: 3 id: 42 tracker_id: 1 type: WorkflowTransition -WorkflowTransitions_231: +WorkflowTransitions_231: new_status_id: 1 role_id: 2 old_status_id: 5 id: 231 tracker_id: 3 type: WorkflowTransition -WorkflowTransitions_070: +WorkflowTransitions_070: new_status_id: 6 role_id: 3 old_status_id: 2 id: 70 tracker_id: 1 type: WorkflowTransition -WorkflowTransitions_124: +WorkflowTransitions_124: new_status_id: 5 role_id: 2 old_status_id: 1 id: 124 tracker_id: 2 type: WorkflowTransition -WorkflowTransitions_150: +WorkflowTransitions_150: new_status_id: 5 role_id: 2 old_status_id: 6 id: 150 tracker_id: 2 type: WorkflowTransition -WorkflowTransitions_205: +WorkflowTransitions_205: new_status_id: 6 role_id: 1 old_status_id: 5 id: 205 tracker_id: 3 type: WorkflowTransition -WorkflowTransitions_017: +WorkflowTransitions_017: new_status_id: 2 role_id: 1 old_status_id: 4 id: 17 tracker_id: 1 type: WorkflowTransition -WorkflowTransitions_043: +WorkflowTransitions_043: new_status_id: 4 role_id: 2 old_status_id: 3 id: 43 tracker_id: 1 type: WorkflowTransition -WorkflowTransitions_232: +WorkflowTransitions_232: new_status_id: 2 role_id: 2 old_status_id: 5 id: 232 tracker_id: 3 type: WorkflowTransition -WorkflowTransitions_125: +WorkflowTransitions_125: new_status_id: 6 role_id: 2 old_status_id: 1 id: 125 tracker_id: 2 type: WorkflowTransition -WorkflowTransitions_151: +WorkflowTransitions_151: new_status_id: 2 role_id: 3 old_status_id: 1 id: 151 tracker_id: 2 type: WorkflowTransition -WorkflowTransitions_206: +WorkflowTransitions_206: new_status_id: 1 role_id: 1 old_status_id: 6 id: 206 tracker_id: 3 type: WorkflowTransition -WorkflowTransitions_018: +WorkflowTransitions_018: new_status_id: 3 role_id: 1 old_status_id: 4 id: 18 tracker_id: 1 type: WorkflowTransition -WorkflowTransitions_044: +WorkflowTransitions_044: new_status_id: 5 role_id: 2 old_status_id: 3 id: 44 tracker_id: 1 type: WorkflowTransition -WorkflowTransitions_071: +WorkflowTransitions_071: new_status_id: 1 role_id: 3 old_status_id: 3 id: 71 tracker_id: 1 type: WorkflowTransition -WorkflowTransitions_233: +WorkflowTransitions_233: new_status_id: 3 role_id: 2 old_status_id: 5 id: 233 tracker_id: 3 type: WorkflowTransition -WorkflowTransitions_126: +WorkflowTransitions_126: new_status_id: 1 role_id: 2 old_status_id: 2 id: 126 tracker_id: 2 type: WorkflowTransition -WorkflowTransitions_152: +WorkflowTransitions_152: new_status_id: 3 role_id: 3 old_status_id: 1 id: 152 tracker_id: 2 type: WorkflowTransition -WorkflowTransitions_207: +WorkflowTransitions_207: new_status_id: 2 role_id: 1 old_status_id: 6 id: 207 tracker_id: 3 type: WorkflowTransition -WorkflowTransitions_019: +WorkflowTransitions_019: new_status_id: 5 role_id: 1 old_status_id: 4 id: 19 tracker_id: 1 type: WorkflowTransition -WorkflowTransitions_045: +WorkflowTransitions_045: new_status_id: 6 role_id: 2 old_status_id: 3 id: 45 tracker_id: 1 type: WorkflowTransition -WorkflowTransitions_260: +WorkflowTransitions_260: new_status_id: 6 role_id: 3 old_status_id: 4 id: 260 tracker_id: 3 type: WorkflowTransition -WorkflowTransitions_234: +WorkflowTransitions_234: new_status_id: 4 role_id: 2 old_status_id: 5 id: 234 tracker_id: 3 type: WorkflowTransition -WorkflowTransitions_127: +WorkflowTransitions_127: new_status_id: 3 role_id: 2 old_status_id: 2 id: 127 tracker_id: 2 type: WorkflowTransition -WorkflowTransitions_153: +WorkflowTransitions_153: new_status_id: 4 role_id: 3 old_status_id: 1 id: 153 tracker_id: 2 type: WorkflowTransition -WorkflowTransitions_180: +WorkflowTransitions_180: new_status_id: 5 role_id: 3 old_status_id: 6 id: 180 tracker_id: 2 type: WorkflowTransition -WorkflowTransitions_208: +WorkflowTransitions_208: new_status_id: 3 role_id: 1 old_status_id: 6 id: 208 tracker_id: 3 type: WorkflowTransition -WorkflowTransitions_046: +WorkflowTransitions_046: new_status_id: 1 role_id: 2 old_status_id: 4 id: 46 tracker_id: 1 type: WorkflowTransition -WorkflowTransitions_072: +WorkflowTransitions_072: new_status_id: 2 role_id: 3 old_status_id: 3 id: 72 tracker_id: 1 type: WorkflowTransition -WorkflowTransitions_261: +WorkflowTransitions_261: new_status_id: 1 role_id: 3 old_status_id: 5 id: 261 tracker_id: 3 type: WorkflowTransition -WorkflowTransitions_235: +WorkflowTransitions_235: new_status_id: 6 role_id: 2 old_status_id: 5 id: 235 tracker_id: 3 type: WorkflowTransition -WorkflowTransitions_154: +WorkflowTransitions_154: new_status_id: 5 role_id: 3 old_status_id: 1 id: 154 tracker_id: 2 type: WorkflowTransition -WorkflowTransitions_181: +WorkflowTransitions_181: new_status_id: 2 role_id: 1 old_status_id: 1 id: 181 tracker_id: 3 type: WorkflowTransition -WorkflowTransitions_209: +WorkflowTransitions_209: new_status_id: 4 role_id: 1 old_status_id: 6 id: 209 tracker_id: 3 type: WorkflowTransition -WorkflowTransitions_047: +WorkflowTransitions_047: new_status_id: 2 role_id: 2 old_status_id: 4 id: 47 tracker_id: 1 type: WorkflowTransition -WorkflowTransitions_073: +WorkflowTransitions_073: new_status_id: 4 role_id: 3 old_status_id: 3 id: 73 tracker_id: 1 type: WorkflowTransition -WorkflowTransitions_128: +WorkflowTransitions_128: new_status_id: 4 role_id: 2 old_status_id: 2 id: 128 tracker_id: 2 type: WorkflowTransition -WorkflowTransitions_262: +WorkflowTransitions_262: new_status_id: 2 role_id: 3 old_status_id: 5 id: 262 tracker_id: 3 type: WorkflowTransition -WorkflowTransitions_236: +WorkflowTransitions_236: new_status_id: 1 role_id: 2 old_status_id: 6 id: 236 tracker_id: 3 type: WorkflowTransition -WorkflowTransitions_155: +WorkflowTransitions_155: new_status_id: 6 role_id: 3 old_status_id: 1 id: 155 tracker_id: 2 type: WorkflowTransition -WorkflowTransitions_048: +WorkflowTransitions_048: new_status_id: 3 role_id: 2 old_status_id: 4 id: 48 tracker_id: 1 type: WorkflowTransition -WorkflowTransitions_074: +WorkflowTransitions_074: new_status_id: 5 role_id: 3 old_status_id: 3 id: 74 tracker_id: 1 type: WorkflowTransition -WorkflowTransitions_129: +WorkflowTransitions_129: new_status_id: 5 role_id: 2 old_status_id: 2 id: 129 tracker_id: 2 type: WorkflowTransition -WorkflowTransitions_263: +WorkflowTransitions_263: new_status_id: 3 role_id: 3 old_status_id: 5 id: 263 tracker_id: 3 type: WorkflowTransition -WorkflowTransitions_237: +WorkflowTransitions_237: new_status_id: 2 role_id: 2 old_status_id: 6 id: 237 tracker_id: 3 type: WorkflowTransition -WorkflowTransitions_182: +WorkflowTransitions_182: new_status_id: 3 role_id: 1 old_status_id: 1 id: 182 tracker_id: 3 type: WorkflowTransition -WorkflowTransitions_049: +WorkflowTransitions_049: new_status_id: 5 role_id: 2 old_status_id: 4 id: 49 tracker_id: 1 type: WorkflowTransition -WorkflowTransitions_075: +WorkflowTransitions_075: new_status_id: 6 role_id: 3 old_status_id: 3 id: 75 tracker_id: 1 type: WorkflowTransition -WorkflowTransitions_156: +WorkflowTransitions_156: new_status_id: 1 role_id: 3 old_status_id: 2 id: 156 tracker_id: 2 type: WorkflowTransition -WorkflowTransitions_264: +WorkflowTransitions_264: new_status_id: 4 role_id: 3 old_status_id: 5 id: 264 tracker_id: 3 type: WorkflowTransition -WorkflowTransitions_238: +WorkflowTransitions_238: new_status_id: 3 role_id: 2 old_status_id: 6 id: 238 tracker_id: 3 type: WorkflowTransition -WorkflowTransitions_183: +WorkflowTransitions_183: new_status_id: 4 role_id: 1 old_status_id: 1 id: 183 tracker_id: 3 type: WorkflowTransition -WorkflowTransitions_076: +WorkflowTransitions_076: new_status_id: 1 role_id: 3 old_status_id: 4 id: 76 tracker_id: 1 type: WorkflowTransition -WorkflowTransitions_157: +WorkflowTransitions_157: new_status_id: 3 role_id: 3 old_status_id: 2 id: 157 tracker_id: 2 type: WorkflowTransition -WorkflowTransitions_265: +WorkflowTransitions_265: new_status_id: 6 role_id: 3 old_status_id: 5 id: 265 tracker_id: 3 type: WorkflowTransition -WorkflowTransitions_239: +WorkflowTransitions_239: new_status_id: 4 role_id: 2 old_status_id: 6 id: 239 tracker_id: 3 type: WorkflowTransition -WorkflowTransitions_077: +WorkflowTransitions_077: new_status_id: 2 role_id: 3 old_status_id: 4 id: 77 tracker_id: 1 type: WorkflowTransition -WorkflowTransitions_158: +WorkflowTransitions_158: new_status_id: 4 role_id: 3 old_status_id: 2 id: 158 tracker_id: 2 type: WorkflowTransition -WorkflowTransitions_184: +WorkflowTransitions_184: new_status_id: 5 role_id: 1 old_status_id: 1 id: 184 tracker_id: 3 type: WorkflowTransition -WorkflowTransitions_266: +WorkflowTransitions_266: new_status_id: 1 role_id: 3 old_status_id: 6 id: 266 tracker_id: 3 type: WorkflowTransition -WorkflowTransitions_078: +WorkflowTransitions_078: new_status_id: 3 role_id: 3 old_status_id: 4 id: 78 tracker_id: 1 type: WorkflowTransition -WorkflowTransitions_159: +WorkflowTransitions_159: new_status_id: 5 role_id: 3 old_status_id: 2 id: 159 tracker_id: 2 type: WorkflowTransition -WorkflowTransitions_185: +WorkflowTransitions_185: new_status_id: 6 role_id: 1 old_status_id: 1 id: 185 tracker_id: 3 type: WorkflowTransition -WorkflowTransitions_267: +WorkflowTransitions_267: new_status_id: 2 role_id: 3 old_status_id: 6 id: 267 tracker_id: 3 type: WorkflowTransition -WorkflowTransitions_079: +WorkflowTransitions_079: new_status_id: 5 role_id: 3 old_status_id: 4 id: 79 tracker_id: 1 type: WorkflowTransition -WorkflowTransitions_186: +WorkflowTransitions_186: new_status_id: 1 role_id: 1 old_status_id: 2 id: 186 tracker_id: 3 type: WorkflowTransition -WorkflowTransitions_268: +WorkflowTransitions_268: new_status_id: 3 role_id: 3 old_status_id: 6 id: 268 tracker_id: 3 type: WorkflowTransition -WorkflowTransitions_187: +WorkflowTransitions_187: new_status_id: 3 role_id: 1 old_status_id: 2 id: 187 tracker_id: 3 type: WorkflowTransition -WorkflowTransitions_269: +WorkflowTransitions_269: new_status_id: 4 role_id: 3 old_status_id: 6 id: 269 tracker_id: 3 type: WorkflowTransition -WorkflowTransitions_188: +WorkflowTransitions_188: new_status_id: 4 role_id: 1 old_status_id: 2 id: 188 tracker_id: 3 type: WorkflowTransition -WorkflowTransitions_271: +WorkflowTransitions_271: new_status_id: 3 role_id: 1 old_status_id: 0 id: 271 tracker_id: 2 type: WorkflowTransition -WorkflowTransitions_272: +WorkflowTransitions_272: new_status_id: 3 role_id: 2 old_status_id: 0 id: 272 tracker_id: 1 type: WorkflowTransition -WorkflowTransitions_273: +WorkflowTransitions_273: new_status_id: 2 role_id: 1 old_status_id: 0 id: 273 tracker_id: 3 type: WorkflowTransition -WorkflowTransitions_274: +WorkflowTransitions_274: new_status_id: 2 role_id: 1 old_status_id: 0 id: 274 tracker_id: 1 type: WorkflowTransition -WorkflowTransitions_275: +WorkflowTransitions_275: new_status_id: 1 role_id: 1 old_status_id: 0 id: 275 tracker_id: 1 type: WorkflowTransition -WorkflowTransitions_276: +WorkflowTransitions_276: new_status_id: 1 role_id: 1 old_status_id: 0 From dcc216002d6b2587f4aef4f628e82d8a970395df Mon Sep 17 00:00:00 2001 From: Toshi MARUYAMA Date: Thu, 23 Feb 2017 02:31:08 +0000 Subject: [PATCH 0661/1117] upgrade Rails to 4.2.8 (#25048) Ruby 2.4 tests fail. git-svn-id: http://svn.redmine.org/redmine/trunk@16340 e93f8b46-1217-0410-a6f0-8f06a7374b81 --- Gemfile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Gemfile b/Gemfile index bb8ba530e..f99d79a6a 100644 --- a/Gemfile +++ b/Gemfile @@ -4,7 +4,7 @@ if Gem::Version.new(Bundler::VERSION) < Gem::Version.new('1.5.0') abort "Redmine requires Bundler 1.5.0 or higher (you're using #{Bundler::VERSION}).\nPlease update with 'gem update bundler'." end -gem "rails", "4.2.7.1" +gem "rails", "4.2.8" gem "addressable", "2.4.0" if RUBY_VERSION < "2.0" gem "jquery-rails", "~> 3.1.4" gem "coderay", "~> 1.1.1" From dac7903da3abb64309b5bf12ce36892b393cb9af Mon Sep 17 00:00:00 2001 From: Jean-Philippe Lang Date: Tue, 28 Feb 2017 18:05:17 +0000 Subject: [PATCH 0662/1117] Fixes uploading of empty files (#25115). - prevents creation of attachment records without existing diskfile and empty digest - adds test case to check file upload API response - also removes the file size check in ActsAsAttachable which still prevented attachment of zero size attachments to containers but only for clients without Javascript (where save_attachments is called with the actual file upload). Patch by Jens Kraemer. git-svn-id: http://svn.redmine.org/redmine/trunk@16341 e93f8b46-1217-0410-a6f0-8f06a7374b81 --- app/models/attachment.rb | 4 +--- .../lib/acts_as_attachable.rb | 1 - test/integration/api_test/attachments_test.rb | 19 +++++++++++++++++++ 3 files changed, 20 insertions(+), 4 deletions(-) diff --git a/app/models/attachment.rb b/app/models/attachment.rb index d0384372a..52c782521 100644 --- a/app/models/attachment.rb +++ b/app/models/attachment.rb @@ -85,7 +85,6 @@ class Attachment < ActiveRecord::Base def file=(incoming_file) unless incoming_file.nil? @temp_file = incoming_file - if @temp_file.size > 0 if @temp_file.respond_to?(:original_filename) self.filename = @temp_file.original_filename self.filename.force_encoding("UTF-8") @@ -94,7 +93,6 @@ class Attachment < ActiveRecord::Base self.content_type = @temp_file.content_type.to_s.chomp end self.filesize = @temp_file.size - end end end @@ -110,7 +108,7 @@ class Attachment < ActiveRecord::Base # Copies the temporary file to its final location # and computes its MD5 hash def files_to_final_location - if @temp_file && (@temp_file.size > 0) + if @temp_file self.disk_directory = target_directory self.disk_filename = Attachment.disk_filename(filename, disk_directory) logger.info("Saving attachment '#{self.diskfile}' (#{@temp_file.size} bytes)") if logger diff --git a/lib/plugins/acts_as_attachable/lib/acts_as_attachable.rb b/lib/plugins/acts_as_attachable/lib/acts_as_attachable.rb index 2e5fc841c..45fa72b2d 100644 --- a/lib/plugins/acts_as_attachable/lib/acts_as_attachable.rb +++ b/lib/plugins/acts_as_attachable/lib/acts_as_attachable.rb @@ -89,7 +89,6 @@ module Redmine next unless attachment.is_a?(Hash) a = nil if file = attachment['file'] - next unless file.size > 0 a = Attachment.create(:file => file, :author => author) elsif token = attachment['token'].presence a = Attachment.find_by_token(token) diff --git a/test/integration/api_test/attachments_test.rb b/test/integration/api_test/attachments_test.rb index 4188d7116..641dccabf 100644 --- a/test/integration/api_test/attachments_test.rb +++ b/test/integration/api_test/attachments_test.rb @@ -197,4 +197,23 @@ class Redmine::ApiTest::AttachmentsTest < Redmine::ApiTest::Base end end end + + test "POST /uploads.json should create an empty file and return a valid token" do + set_tmp_attachments_directory + assert_difference 'Attachment.count' do + post '/uploads.json', '', {"CONTENT_TYPE" => 'application/octet-stream'}.merge(credentials('jsmith')) + assert_response :created + + end + + json = ActiveSupport::JSON.decode(response.body) + assert_kind_of Hash, json['upload'] + token = json['upload']['token'] + assert token.present? + + assert attachment = Attachment.find_by_token(token) + assert_equal 0, attachment.filesize + assert attachment.digest.present? + assert File.exist? attachment.diskfile + end end From 2b33756e9a038d7cf4e4138d95995717f0ea4267 Mon Sep 17 00:00:00 2001 From: Toshi MARUYAMA Date: Wed, 1 Mar 2017 03:54:09 +0000 Subject: [PATCH 0663/1117] use Monday for general_first_day_of_week in Turkish (#24938) Contributed by ozgur yazilimas. git-svn-id: http://svn.redmine.org/redmine/trunk@16343 e93f8b46-1217-0410-a6f0-8f06a7374b81 --- config/locales/tr.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/config/locales/tr.yml b/config/locales/tr.yml index 936e8c919..ec5de5946 100644 --- a/config/locales/tr.yml +++ b/config/locales/tr.yml @@ -159,7 +159,7 @@ tr: general_csv_encoding: ISO-8859-9 general_pdf_fontname: freesans general_pdf_monospaced_fontname: freemono - general_first_day_of_week: '7' + general_first_day_of_week: '1' notice_account_updated: Hesap başarıyla güncelleştirildi. notice_account_invalid_credentials: Geçersiz kullanıcı ya da parola From 2b0e910cd532d28360b2ebdd74561e2c4bacf4d5 Mon Sep 17 00:00:00 2001 From: Jean-Philippe Lang Date: Thu, 2 Mar 2017 18:13:59 +0000 Subject: [PATCH 0664/1117] Adds a filter on issue attachments (#2783). git-svn-id: http://svn.redmine.org/redmine/trunk@16344 e93f8b46-1217-0410-a6f0-8f06a7374b81 --- app/models/issue_query.rb | 15 +++++++++++++++ test/unit/query_test.rb | 35 ++++++++++++++++++++++++++++++++++- 2 files changed, 49 insertions(+), 1 deletion(-) diff --git a/app/models/issue_query.rb b/app/models/issue_query.rb index fd5c933c3..60ba44282 100644 --- a/app/models/issue_query.rb +++ b/app/models/issue_query.rb @@ -140,6 +140,9 @@ class IssueQuery < Query :values => [[l(:general_text_yes), "1"], [l(:general_text_no), "0"]] end + add_available_filter "attachment", + :type => :text, :name => l(:label_attachment) + if User.current.logged? add_available_filter "watcher_id", :type => :list, :values => [["<< #{l(:label_me)} >>", "me"]] @@ -437,6 +440,18 @@ class IssueQuery < Query "#{Issue.table_name}.is_private #{op} (#{va})" end + def sql_for_attachment_field(field, operator, value) + case operator + when "*", "!*" + e = (operator == "*" ? "EXISTS" : "NOT EXISTS") + "#{e} (SELECT 1 FROM #{Attachment.table_name} a WHERE a.container_type = 'Issue' AND a.container_id = #{Issue.table_name}.id)" + when "~", "!~" + c = sql_contains("a.filename", value.first) + e = (operator == "~" ? "EXISTS" : "NOT EXISTS") + "#{e} (SELECT 1 FROM #{Attachment.table_name} a WHERE a.container_type = 'Issue' AND a.container_id = #{Issue.table_name}.id AND #{c})" + end + end + def sql_for_parent_id_field(field, operator, value) case operator when "=" diff --git a/test/unit/query_test.rb b/test/unit/query_test.rb index 81f62516d..aced780f1 100644 --- a/test/unit/query_test.rb +++ b/test/unit/query_test.rb @@ -29,7 +29,8 @@ class QueryTest < ActiveSupport::TestCase :queries, :projects_trackers, :custom_fields_trackers, - :workflows + :workflows, + :attachments def setup User.current = nil @@ -1194,6 +1195,38 @@ class QueryTest < ActiveSupport::TestCase assert_equal [].map(&:id).sort, find_issues_with_query(query) end + def test_filter_on_attachment_any + query = IssueQuery.new(:name => '_') + query.filters = {"attachment" => {:operator => '*', :values => ['']}} + issues = find_issues_with_query(query) + assert issues.any? + assert_nil issues.detect {|issue| issue.attachments.empty?} + end + + def test_filter_on_attachment_none + query = IssueQuery.new(:name => '_') + query.filters = {"attachment" => {:operator => '!*', :values => ['']}} + issues = find_issues_with_query(query) + assert issues.any? + assert_nil issues.detect {|issue| issue.attachments.any?} + end + + def test_filter_on_attachment_contains + query = IssueQuery.new(:name => '_') + query.filters = {"attachment" => {:operator => '~', :values => ['error281']}} + issues = find_issues_with_query(query) + assert issues.any? + assert_nil issues.detect {|issue| ! issue.attachments.any? {|attachment| attachment.filename.include?('error281')}} + end + + def test_filter_on_attachment_not_contains + query = IssueQuery.new(:name => '_') + query.filters = {"attachment" => {:operator => '!~', :values => ['error281']}} + issues = find_issues_with_query(query) + assert issues.any? + assert_nil issues.detect {|issue| issue.attachments.any? {|attachment| attachment.filename.include?('error281')}} + end + def test_statement_should_be_nil_with_no_filters q = IssueQuery.new(:name => '_') q.filters = {} From 7d04dca69777b3accda9cac5d8e5707112442d3a Mon Sep 17 00:00:00 2001 From: Jean-Philippe Lang Date: Thu, 2 Mar 2017 18:16:13 +0000 Subject: [PATCH 0665/1117] Prevent warning about already defined constant. git-svn-id: http://svn.redmine.org/redmine/trunk@16345 e93f8b46-1217-0410-a6f0-8f06a7374b81 --- lib/tasks/redmine.rake | 3 +++ 1 file changed, 3 insertions(+) diff --git a/lib/tasks/redmine.rake b/lib/tasks/redmine.rake index 973e63e29..f1827bb65 100644 --- a/lib/tasks/redmine.rake +++ b/lib/tasks/redmine.rake @@ -103,6 +103,9 @@ DESC Target.connection.reset_pk_sequence!(table_name) if Target.primary_key target_count = Target.count abort "Some records were not migrated" unless source_count == target_count + + Object.send(:remove_const, :Target) + Object.send(:remove_const, :Source) end end From 27ebd8430920886c36abf163162649ee698dcca4 Mon Sep 17 00:00:00 2001 From: Jean-Philippe Lang Date: Thu, 2 Mar 2017 18:16:54 +0000 Subject: [PATCH 0666/1117] Priority should always be preloaded as it's used to render issue links. git-svn-id: http://svn.redmine.org/redmine/trunk@16346 e93f8b46-1217-0410-a6f0-8f06a7374b81 --- app/models/issue_query.rb | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/app/models/issue_query.rb b/app/models/issue_query.rb index 60ba44282..458eea00a 100644 --- a/app/models/issue_query.rb +++ b/app/models/issue_query.rb @@ -276,6 +276,7 @@ class IssueQuery < Query scope = Issue.visible. joins(:status, :project). + preload(:priority). where(statement). includes(([:status, :project] + (options[:include] || [])).uniq). where(options[:conditions]). @@ -284,7 +285,7 @@ class IssueQuery < Query limit(options[:limit]). offset(options[:offset]) - scope = scope.preload([:tracker, :priority, :author, :assigned_to, :fixed_version, :category] & columns.map(&:name)) + scope = scope.preload([:tracker, :author, :assigned_to, :fixed_version, :category] & columns.map(&:name)) if has_custom_field_column? scope = scope.preload(:custom_values) end From 7741263ab605189c7728cf79d89a150b4bf4b27b Mon Sep 17 00:00:00 2001 From: Jean-Philippe Lang Date: Thu, 2 Mar 2017 18:20:17 +0000 Subject: [PATCH 0667/1117] ThemesTest#test_without_theme_js may fail if third-party theme is installed (#25118). Patch by Go MAEDA. git-svn-id: http://svn.redmine.org/redmine/trunk@16347 e93f8b46-1217-0410-a6f0-8f06a7374b81 --- test/integration/lib/redmine/themes_test.rb | 2 ++ 1 file changed, 2 insertions(+) diff --git a/test/integration/lib/redmine/themes_test.rb b/test/integration/lib/redmine/themes_test.rb index 65968afcf..200c0c286 100644 --- a/test/integration/lib/redmine/themes_test.rb +++ b/test/integration/lib/redmine/themes_test.rb @@ -37,6 +37,8 @@ class ThemesTest < Redmine::IntegrationTest end def test_without_theme_js + # simulate a state theme.js does not exists + @theme.javascripts.clear get '/' assert_response :success From 125d8e26b6e8c6ee3dd01e6b928dbdef754303db Mon Sep 17 00:00:00 2001 From: Jean-Philippe Lang Date: Thu, 2 Mar 2017 19:41:00 +0000 Subject: [PATCH 0668/1117] Flash messages on CustomFields destroy (#24801). MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Patch by Javier Menéndez. git-svn-id: http://svn.redmine.org/redmine/trunk@16348 e93f8b46-1217-0410-a6f0-8f06a7374b81 --- app/controllers/custom_fields_controller.rb | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/app/controllers/custom_fields_controller.rb b/app/controllers/custom_fields_controller.rb index 71e4394f5..232583bae 100644 --- a/app/controllers/custom_fields_controller.rb +++ b/app/controllers/custom_fields_controller.rb @@ -76,7 +76,9 @@ class CustomFieldsController < ApplicationController def destroy begin - @custom_field.destroy + if @custom_field.destroy + flash[:notice] = l(:notice_successful_delete) + end rescue flash[:error] = l(:error_can_not_delete_custom_field) end From 64b30de7875910390474610923b91b0e9c783287 Mon Sep 17 00:00:00 2001 From: Jean-Philippe Lang Date: Thu, 2 Mar 2017 19:42:18 +0000 Subject: [PATCH 0669/1117] Turns @@languages_lookup into a cache by using ||= (#25014). Patch by Jens Kraemer. git-svn-id: http://svn.redmine.org/redmine/trunk@16349 e93f8b46-1217-0410-a6f0-8f06a7374b81 --- lib/redmine/i18n.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/redmine/i18n.rb b/lib/redmine/i18n.rb index dfeaf474e..44bad4d06 100644 --- a/lib/redmine/i18n.rb +++ b/lib/redmine/i18n.rb @@ -130,7 +130,7 @@ module Redmine end def find_language(lang) - @@languages_lookup = valid_languages.inject({}) {|k, v| k[v.to_s.downcase] = v; k } + @@languages_lookup ||= valid_languages.inject({}) {|k, v| k[v.to_s.downcase] = v; k } @@languages_lookup[lang.to_s.downcase] end From 502376f8eec9d9d9aee71c59cda002151a436328 Mon Sep 17 00:00:00 2001 From: Jean-Philippe Lang Date: Thu, 2 Mar 2017 19:43:36 +0000 Subject: [PATCH 0670/1117] Filter out current issue from the related issues autocomplete (#25055). Patch by Marius BALTEANU. git-svn-id: http://svn.redmine.org/redmine/trunk@16350 e93f8b46-1217-0410-a6f0-8f06a7374b81 --- app/views/issue_relations/_form.html.erb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app/views/issue_relations/_form.html.erb b/app/views/issue_relations/_form.html.erb index 29b7f0f14..3a1018c1b 100644 --- a/app/views/issue_relations/_form.html.erb +++ b/app/views/issue_relations/_form.html.erb @@ -9,6 +9,6 @@ <%= link_to_function l(:button_cancel), '$("#new-relation-form").hide();'%>

          -<%= javascript_tag "observeAutocompleteField('relation_issue_to_id', '#{escape_javascript auto_complete_issues_path(:project_id => @project, :scope => (Setting.cross_project_issue_relations? ? 'all' : nil))}')" %> +<%= javascript_tag "observeAutocompleteField('relation_issue_to_id', '#{escape_javascript auto_complete_issues_path(:project_id => @project, :scope => (Setting.cross_project_issue_relations? ? 'all' : nil), :issue_id => @issue.id)}')" %> <%= javascript_tag "setPredecessorFieldsVisibility();" %> From 18f431acc02757818f029c6551a6626ff796be63 Mon Sep 17 00:00:00 2001 From: Jean-Philippe Lang Date: Thu, 2 Mar 2017 19:47:58 +0000 Subject: [PATCH 0671/1117] Allow to disable description field in tracker setting (#25052). Patch by Go MAEDA and Mischa The Evil. git-svn-id: http://svn.redmine.org/redmine/trunk@16351 e93f8b46-1217-0410-a6f0-8f06a7374b81 --- app/models/tracker.rb | 4 ++-- test/unit/issue_test.rb | 1 - 2 files changed, 2 insertions(+), 3 deletions(-) diff --git a/app/models/tracker.rb b/app/models/tracker.rb index 2dcbaed04..9c19111b1 100644 --- a/app/models/tracker.rb +++ b/app/models/tracker.rb @@ -18,10 +18,10 @@ class Tracker < ActiveRecord::Base include Redmine::SafeAttributes - CORE_FIELDS_UNDISABLABLE = %w(project_id tracker_id subject description priority_id is_private).freeze + CORE_FIELDS_UNDISABLABLE = %w(project_id tracker_id subject priority_id is_private).freeze # Fields that can be disabled # Other (future) fields should be appended, not inserted! - CORE_FIELDS = %w(assigned_to_id category_id fixed_version_id parent_issue_id start_date due_date estimated_hours done_ratio).freeze + CORE_FIELDS = %w(assigned_to_id category_id fixed_version_id parent_issue_id start_date due_date estimated_hours done_ratio description).freeze CORE_FIELDS_ALL = (CORE_FIELDS_UNDISABLABLE + CORE_FIELDS).freeze before_destroy :check_integrity diff --git a/test/unit/issue_test.rb b/test/unit/issue_test.rb index 235e2e7f7..60ba42f80 100644 --- a/test/unit/issue_test.rb +++ b/test/unit/issue_test.rb @@ -810,7 +810,6 @@ class IssueTest < ActiveSupport::TestCase assert_include 'tracker_id', issue.safe_attribute_names assert_include 'status_id', issue.safe_attribute_names assert_include 'subject', issue.safe_attribute_names - assert_include 'description', issue.safe_attribute_names assert_include 'custom_field_values', issue.safe_attribute_names assert_include 'custom_fields', issue.safe_attribute_names assert_include 'lock_version', issue.safe_attribute_names From 7fe4a76f4cb0d601f13bb3a4e5bc7f16580c4086 Mon Sep 17 00:00:00 2001 From: Jean-Philippe Lang Date: Thu, 2 Mar 2017 19:51:19 +0000 Subject: [PATCH 0672/1117] Adds an index to attachments.disk_filename (#25022). Patch by Jens Kraemer. git-svn-id: http://svn.redmine.org/redmine/trunk@16352 e93f8b46-1217-0410-a6f0-8f06a7374b81 --- ...170207050700_add_index_on_disk_filename_to_attachments.rb | 5 +++++ 1 file changed, 5 insertions(+) create mode 100644 db/migrate/20170207050700_add_index_on_disk_filename_to_attachments.rb diff --git a/db/migrate/20170207050700_add_index_on_disk_filename_to_attachments.rb b/db/migrate/20170207050700_add_index_on_disk_filename_to_attachments.rb new file mode 100644 index 000000000..6f41a9c4b --- /dev/null +++ b/db/migrate/20170207050700_add_index_on_disk_filename_to_attachments.rb @@ -0,0 +1,5 @@ +class AddIndexOnDiskFilenameToAttachments < ActiveRecord::Migration + def change + add_index :attachments, :disk_filename + end +end From df90907dc7faf76220ab031f4854c4c071b259a2 Mon Sep 17 00:00:00 2001 From: Jean-Philippe Lang Date: Thu, 2 Mar 2017 22:47:36 +0000 Subject: [PATCH 0673/1117] Ruby 2.4: Fixed "Fixnum is deprecated" warning of nokogiri (#25048). Patch by Go MAEDA. git-svn-id: http://svn.redmine.org/redmine/trunk@16353 e93f8b46-1217-0410-a6f0-8f06a7374b81 --- Gemfile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Gemfile b/Gemfile index f99d79a6a..83e44626c 100644 --- a/Gemfile +++ b/Gemfile @@ -15,7 +15,7 @@ gem "actionpack-xml_parser" gem "roadie-rails" gem "mimemagic" -gem "nokogiri", "~> 1.6.8" +gem "nokogiri", (RUBY_VERSION >= "2.1" ? ">= 1.7.0" : "~> 1.6.8") gem "i18n", "~> 0.7.0" # Request at least rails-html-sanitizer 1.0.3 because of security advisories From eaf8fb9885e17e8f7755a2a3ac8d3d897c7f5469 Mon Sep 17 00:00:00 2001 From: Jean-Philippe Lang Date: Thu, 2 Mar 2017 22:48:11 +0000 Subject: [PATCH 0674/1117] Ruby 2.4: Fixed "key must be 32 bytes" error of OpenSSL::Cipher (#25048). Patch by Go MAEDA. git-svn-id: http://svn.redmine.org/redmine/trunk@16354 e93f8b46-1217-0410-a6f0-8f06a7374b81 --- lib/redmine/ciphering.rb | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/lib/redmine/ciphering.rb b/lib/redmine/ciphering.rb index 9257336a6..3d9f9eeb7 100644 --- a/lib/redmine/ciphering.rb +++ b/lib/redmine/ciphering.rb @@ -26,7 +26,7 @@ module Redmine if cipher_key.blank? || text.blank? text else - c = OpenSSL::Cipher::Cipher.new("aes-256-cbc") + c = OpenSSL::Cipher.new("aes-256-cbc") iv = c.random_iv c.encrypt c.key = cipher_key @@ -44,7 +44,7 @@ module Redmine return text end text = match[1] - c = OpenSSL::Cipher::Cipher.new("aes-256-cbc") + c = OpenSSL::Cipher.new("aes-256-cbc") e, iv = text.split("--").map {|s| Base64.decode64(s)} c.decrypt c.key = cipher_key @@ -58,9 +58,9 @@ module Redmine def cipher_key key = Redmine::Configuration['database_cipher_key'].to_s - key.blank? ? nil : Digest::SHA256.hexdigest(key) + key.blank? ? nil : Digest::SHA256.hexdigest(key)[0..31] end - + def logger Rails.logger end @@ -84,8 +84,8 @@ module Redmine object.send :write_attribute, attribute, clear raise(ActiveRecord::Rollback) unless object.save(:validation => false) end - end - end ? true : false + end ? true : false + end end private From 2d21ca082e047d37287f01f760fadf9b331d082b Mon Sep 17 00:00:00 2001 From: Jean-Philippe Lang Date: Thu, 2 Mar 2017 22:48:48 +0000 Subject: [PATCH 0675/1117] Ruby 2.4: Fixed "Fixnum is deprecated" warning in QueryTest. (#25048). Patch by Go MAEDA. git-svn-id: http://svn.redmine.org/redmine/trunk@16355 e93f8b46-1217-0410-a6f0-8f06a7374b81 --- test/unit/query_test.rb | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/test/unit/query_test.rb b/test/unit/query_test.rb index aced780f1..31a4ac2d3 100644 --- a/test/unit/query_test.rb +++ b/test/unit/query_test.rb @@ -32,6 +32,8 @@ class QueryTest < ActiveSupport::TestCase :workflows, :attachments + INTEGER_KLASS = RUBY_VERSION >= "2.4" ? Integer : Fixnum + def setup User.current = nil end @@ -1612,7 +1614,7 @@ class QueryTest < ActiveSupport::TestCase count_by_group = q.issue_count_by_group assert_kind_of Hash, count_by_group assert_equal %w(NilClass User), count_by_group.keys.collect {|k| k.class.name}.uniq.sort - assert_equal %w(Fixnum), count_by_group.values.collect {|k| k.class.name}.uniq + assert_equal %W(#{INTEGER_KLASS}), count_by_group.values.collect {|k| k.class.name}.uniq assert count_by_group.has_key?(User.find(3)) end @@ -1621,7 +1623,7 @@ class QueryTest < ActiveSupport::TestCase count_by_group = q.issue_count_by_group assert_kind_of Hash, count_by_group assert_equal %w(NilClass String), count_by_group.keys.collect {|k| k.class.name}.uniq.sort - assert_equal %w(Fixnum), count_by_group.values.collect {|k| k.class.name}.uniq + assert_equal %W(#{INTEGER_KLASS}), count_by_group.values.collect {|k| k.class.name}.uniq assert count_by_group.has_key?('MySQL') end @@ -1630,7 +1632,7 @@ class QueryTest < ActiveSupport::TestCase count_by_group = q.issue_count_by_group assert_kind_of Hash, count_by_group assert_equal %w(Date NilClass), count_by_group.keys.collect {|k| k.class.name}.uniq.sort - assert_equal %w(Fixnum), count_by_group.values.collect {|k| k.class.name}.uniq + assert_equal %W(#{INTEGER_KLASS}), count_by_group.values.collect {|k| k.class.name}.uniq end def test_issue_count_with_nil_group_only From 2676167adb043741a447c31bb69f0b7f70373e0b Mon Sep 17 00:00:00 2001 From: Jean-Philippe Lang Date: Thu, 2 Mar 2017 23:14:31 +0000 Subject: [PATCH 0676/1117] Missing fixtures. git-svn-id: http://svn.redmine.org/redmine/trunk@16356 e93f8b46-1217-0410-a6f0-8f06a7374b81 --- test/integration/attachments_test.rb | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/test/integration/attachments_test.rb b/test/integration/attachments_test.rb index ec7626953..4a5da1b99 100644 --- a/test/integration/attachments_test.rb +++ b/test/integration/attachments_test.rb @@ -19,9 +19,10 @@ require File.expand_path('../../test_helper', __FILE__) class AttachmentsTest < Redmine::IntegrationTest fixtures :projects, :enabled_modules, - :users, :roles, :members, :member_roles, + :users, :email_addresses, + :roles, :members, :member_roles, :trackers, :projects_trackers, - :issue_statuses, :enumerations + :issues, :issue_statuses, :enumerations def test_upload_should_set_default_content_type log_user('jsmith', 'jsmith') From e9d2c2dd963951c3802b21c76818a723dfaef688 Mon Sep 17 00:00:00 2001 From: Jean-Philippe Lang Date: Thu, 2 Mar 2017 23:17:11 +0000 Subject: [PATCH 0677/1117] Missing fixtures. git-svn-id: http://svn.redmine.org/redmine/trunk@16357 e93f8b46-1217-0410-a6f0-8f06a7374b81 --- test/functional/versions_controller_test.rb | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/test/functional/versions_controller_test.rb b/test/functional/versions_controller_test.rb index c2f054eee..87c6517df 100644 --- a/test/functional/versions_controller_test.rb +++ b/test/functional/versions_controller_test.rb @@ -18,9 +18,12 @@ require File.expand_path('../../test_helper', __FILE__) class VersionsControllerTest < Redmine::ControllerTest - fixtures :projects, :versions, :issues, :users, :roles, :members, - :member_roles, :enabled_modules, :issue_statuses, - :issue_categories, :enumerations + fixtures :projects, :enabled_modules, + :trackers, :projects_trackers, + :versions, :issue_statuses, :issue_categories, :enumerations, + :issues, + :users, :email_addresses, + :roles, :members, :member_roles def setup User.current = nil From ddef0ad7c164c8eee4a9832fe8fbce1fb538745a Mon Sep 17 00:00:00 2001 From: Jean-Philippe Lang Date: Fri, 3 Mar 2017 17:16:53 +0000 Subject: [PATCH 0678/1117] Moves redcloth3.rb to lib/redmine/wiki_formatting/textile. git-svn-id: http://svn.redmine.org/redmine/trunk@16358 e93f8b46-1217-0410-a6f0-8f06a7374b81 --- lib/redmine/wiki_formatting/textile/formatter.rb | 2 +- lib/{ => redmine/wiki_formatting/textile}/redcloth3.rb | 0 2 files changed, 1 insertion(+), 1 deletion(-) rename lib/{ => redmine/wiki_formatting/textile}/redcloth3.rb (100%) diff --git a/lib/redmine/wiki_formatting/textile/formatter.rb b/lib/redmine/wiki_formatting/textile/formatter.rb index 91ea14960..5862a1c62 100644 --- a/lib/redmine/wiki_formatting/textile/formatter.rb +++ b/lib/redmine/wiki_formatting/textile/formatter.rb @@ -15,7 +15,7 @@ # along with this program; if not, write to the Free Software # Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. -require 'redcloth3' +require File.expand_path('../redcloth3', __FILE__) require 'digest/md5' module Redmine diff --git a/lib/redcloth3.rb b/lib/redmine/wiki_formatting/textile/redcloth3.rb similarity index 100% rename from lib/redcloth3.rb rename to lib/redmine/wiki_formatting/textile/redcloth3.rb From 3faa3693d16207a0398adb389f244c6de396e271 Mon Sep 17 00:00:00 2001 From: Jean-Philippe Lang Date: Fri, 3 Mar 2017 17:17:50 +0000 Subject: [PATCH 0679/1117] Test failures. git-svn-id: http://svn.redmine.org/redmine/trunk@16359 e93f8b46-1217-0410-a6f0-8f06a7374b81 --- .../field_format/version_field_format_test.rb | 5 +++++ test/unit/project_test.rb | 3 ++- test/unit/time_entry_query_test.rb | 14 ++++++++------ 3 files changed, 15 insertions(+), 7 deletions(-) diff --git a/test/unit/lib/redmine/field_format/version_field_format_test.rb b/test/unit/lib/redmine/field_format/version_field_format_test.rb index 22aeeb285..ca7827987 100644 --- a/test/unit/lib/redmine/field_format/version_field_format_test.rb +++ b/test/unit/lib/redmine/field_format/version_field_format_test.rb @@ -24,6 +24,11 @@ class Redmine::VersionFieldFormatTest < ActionView::TestCase :issue_statuses, :issue_categories, :issue_relations, :workflows, :enumerations + def setup + super + User.current = nil + end + def test_version_status_should_reject_blank_values field = IssueCustomField.new(:name => 'Foo', :field_format => 'version', :version_status => ["open", ""]) field.save! diff --git a/test/unit/project_test.rb b/test/unit/project_test.rb index b740ee649..66d6fa3b2 100644 --- a/test/unit/project_test.rb +++ b/test/unit/project_test.rb @@ -37,7 +37,8 @@ class ProjectTest < ActiveSupport::TestCase :repositories, :news, :comments, :documents, - :workflows + :workflows, + :attachments def setup @ecookbook = Project.find(1) diff --git a/test/unit/time_entry_query_test.rb b/test/unit/time_entry_query_test.rb index 317f037d0..f60091cb9 100644 --- a/test/unit/time_entry_query_test.rb +++ b/test/unit/time_entry_query_test.rb @@ -68,13 +68,15 @@ class TimeEntryQueryTest < ActiveSupport::TestCase TimeEntry.generate!(:activity => override, :hours => 2.0) TimeEntry.generate!(:activity => other, :hours => 4.0) - query = TimeEntryQuery.new(:name => '_') - query.add_filter('activity_id', '=', [system.id.to_s]) - assert_equal 3.0, query.results_scope.sum(:hours) + with_current_user User.find(2) do + query = TimeEntryQuery.new(:name => '_') + query.add_filter('activity_id', '=', [system.id.to_s]) + assert_equal 3.0, query.results_scope.sum(:hours) - query = TimeEntryQuery.new(:name => '_') - query.add_filter('activity_id', '!', [system.id.to_s]) - assert_equal 4.0, query.results_scope.sum(:hours) + query = TimeEntryQuery.new(:name => '_') + query.add_filter('activity_id', '!', [system.id.to_s]) + assert_equal 4.0, query.results_scope.sum(:hours) + end end def test_project_query_should_include_project_issue_custom_fields_only_as_filters From 331c1f674dc2a8b17062a1422e14189d116f4277 Mon Sep 17 00:00:00 2001 From: Jean-Philippe Lang Date: Fri, 3 Mar 2017 17:18:58 +0000 Subject: [PATCH 0680/1117] Add attachment information to issues.xml in REST API (#12181). git-svn-id: http://svn.redmine.org/redmine/trunk@16360 e93f8b46-1217-0410-a6f0-8f06a7374b81 --- app/views/issues/index.api.rsb | 6 ++++++ test/integration/api_test/issues_test.rb | 16 ++++++++++++++++ 2 files changed, 22 insertions(+) diff --git a/app/views/issues/index.api.rsb b/app/views/issues/index.api.rsb index 7660ccbd5..4bba32549 100644 --- a/app/views/issues/index.api.rsb +++ b/app/views/issues/index.api.rsb @@ -26,6 +26,12 @@ api.array :issues, api_meta(:total_count => @issue_count, :offset => @offset, :l api.updated_on issue.updated_on api.closed_on issue.closed_on + api.array :attachments do + issue.attachments.each do |attachment| + render_api_attachment(attachment, api) + end + end if include_in_api_response?('attachments') + api.array :relations do issue.relations.each do |relation| api.relation(:id => relation.id, :issue_id => relation.issue_from_id, :issue_to_id => relation.issue_to_id, :relation_type => relation.relation_type, :delay => relation.delay) diff --git a/test/integration/api_test/issues_test.rb b/test/integration/api_test/issues_test.rb index 65bf3be5b..f62f83258 100644 --- a/test/integration/api_test/issues_test.rb +++ b/test/integration/api_test/issues_test.rb @@ -82,6 +82,22 @@ class Redmine::ApiTest::IssuesTest < Redmine::ApiTest::Base end end + test "GET /issues.xml with attachments" do + get '/issues.xml?include=attachments' + + assert_response :success + assert_equal 'application/xml', @response.content_type + + assert_select 'issue id', :text => '3' do + assert_select '~ attachments attachment', 4 + end + + assert_select 'issue id', :text => '1' do + assert_select '~ attachments' + assert_select '~ attachments attachment', 0 + end + end + test "GET /issues.xml with invalid query params" do get '/issues.xml', {:f => ['start_date'], :op => {:start_date => '='}} From 299c3de64e43eaf4451857a6623cc446130d9005 Mon Sep 17 00:00:00 2001 From: Jean-Philippe Lang Date: Fri, 3 Mar 2017 17:21:36 +0000 Subject: [PATCH 0681/1117] The cancel operation in the issue edit mode doesn't work (#21579). Patch by Marius BALTEANU. git-svn-id: http://svn.redmine.org/redmine/trunk@16361 e93f8b46-1217-0410-a6f0-8f06a7374b81 --- app/views/issues/_edit.html.erb | 2 +- test/functional/issues_controller_test.rb | 16 ++++++++++++++++ 2 files changed, 17 insertions(+), 1 deletion(-) diff --git a/app/views/issues/_edit.html.erb b/app/views/issues/_edit.html.erb index fff258db5..fe2119a07 100644 --- a/app/views/issues/_edit.html.erb +++ b/app/views/issues/_edit.html.erb @@ -69,7 +69,7 @@ <%= hidden_field_tag 'last_journal_id', params[:last_journal_id] || @issue.last_journal_id %> <%= submit_tag l(:button_submit) %> <%= preview_link preview_edit_issue_path(:project_id => @project, :id => @issue), 'issue-form' %> - | <%= link_to l(:button_cancel), {}, :onclick => "$('#update').hide(); return false;" %> + | <%= link_to l(:button_cancel), issue_path(id: @issue.id), :onclick => params[:action] == 'show' ? "$('#update').hide(); return false;" : '' %> <%= hidden_field_tag 'prev_issue_id', @prev_issue_id if @prev_issue_id %> <%= hidden_field_tag 'next_issue_id', @next_issue_id if @next_issue_id %> diff --git a/test/functional/issues_controller_test.rb b/test/functional/issues_controller_test.rb index 455bf834a..b47ff53fb 100644 --- a/test/functional/issues_controller_test.rb +++ b/test/functional/issues_controller_test.rb @@ -4852,4 +4852,20 @@ class IssuesControllerTest < Redmine::ControllerTest User.add_to_project(user, Project.find(2), Role.find_by_name('Manager')) user end + + def test_cancel_edit_link_for_issue_show_action_should_have_onclick_action + @request.session[:user_id] = 1 + + get :show, :id => 1 + assert_response :success + assert_select 'a[href=?][onclick=?]', "/issues/1", "$('#update').hide(); return false;", :text => 'Cancel' + end + + def test_cancel_edit_link_for_issue_edit_action_should_not_have_onclick_action + @request.session[:user_id] = 1 + + get :edit, :id => 1 + assert_response :success + assert_select 'a[href=?][onclick=?]', "/issues/1", "", :text => 'Cancel' + end end From fdb8b93f8526f7beeebdfa60b70e65d84d20788d Mon Sep 17 00:00:00 2001 From: Jean-Philippe Lang Date: Fri, 3 Mar 2017 17:25:44 +0000 Subject: [PATCH 0682/1117] Fix PDF formatting (#21705). Patch by Greg T. git-svn-id: http://svn.redmine.org/redmine/trunk@16362 e93f8b46-1217-0410-a6f0-8f06a7374b81 --- lib/redmine/export/pdf/issues_pdf_helper.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/redmine/export/pdf/issues_pdf_helper.rb b/lib/redmine/export/pdf/issues_pdf_helper.rb index eba06425f..4c0b935da 100644 --- a/lib/redmine/export/pdf/issues_pdf_helper.rb +++ b/lib/redmine/export/pdf/issues_pdf_helper.rb @@ -138,7 +138,7 @@ module Redmine pdf.SetFontStyle('B',9) pdf.RDMCell(35+155, 5, value.custom_field.name, "LRT", 1) pdf.SetFontStyle('',9) - pdf.RDMwriteFormattedCell(35+155, 5, '', '', text, issue.attachments, "LRB") + pdf.RDMwriteHTMLCell(35+155, 5, '', '', text, issue.attachments, "LRB") end unless issue.leaf? From 0dc3d200177a85f06c2976979fd1b9581f19e909 Mon Sep 17 00:00:00 2001 From: Jean-Philippe Lang Date: Fri, 3 Mar 2017 17:26:56 +0000 Subject: [PATCH 0683/1117] Changes overflow to auto (#21705). Patch by Greg T. git-svn-id: http://svn.redmine.org/redmine/trunk@16363 e93f8b46-1217-0410-a6f0-8f06a7374b81 --- public/stylesheets/application.css | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/public/stylesheets/application.css b/public/stylesheets/application.css index 9cde8f7b3..d977bb9b9 100644 --- a/public/stylesheets/application.css +++ b/public/stylesheets/application.css @@ -463,7 +463,7 @@ div.issue .next-prev-links {color:#999;} div.issue .attributes {margin-top: 2em;} div.issue .attributes .attribute {padding-left:180px; clear:left; min-height: 1.8em;} div.issue .attributes .attribute .label {width: 170px; margin-left:-180px; font-weight:bold; float:left; overflow:hidden; text-overflow: ellipsis;} -div.issue .attribute .value {overflow:hidden; text-overflow: ellipsis;} +div.issue .attribute .value {overflow:auto; text-overflow: ellipsis;} div.issue.overdue .due-date .value { color: #c22; } #issue_tree table.issues, #relations table.issues { border: 0; } From ca2c742e5e83e29badbf92d31c110fa1233a7f76 Mon Sep 17 00:00:00 2001 From: Jean-Philippe Lang Date: Fri, 3 Mar 2017 17:36:21 +0000 Subject: [PATCH 0684/1117] Fix for "Personalize this page mode" (#8761). Patch by Marius BALTEANU. git-svn-id: http://svn.redmine.org/redmine/trunk@16364 e93f8b46-1217-0410-a6f0-8f06a7374b81 --- public/stylesheets/application.css | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/public/stylesheets/application.css b/public/stylesheets/application.css index d977bb9b9..1957a0d7f 100644 --- a/public/stylesheets/application.css +++ b/public/stylesheets/application.css @@ -1131,6 +1131,12 @@ div.wiki img {vertical-align:middle; max-width:100%;} .handle {cursor: move;} +body.action-page_layout .block-receiver .contextual { + display: none; +} +body.action-page_layout .block-receiver .hascontextmenu { + cursor: move; +} /***** Gantt chart *****/ .gantt_hdr { position:absolute; From ba788c336d0d860043d680134c8ff05dceca52a5 Mon Sep 17 00:00:00 2001 From: Jean-Philippe Lang Date: Fri, 3 Mar 2017 19:12:51 +0000 Subject: [PATCH 0685/1117] REST API: option to get the project activities for time entries (#7506). git-svn-id: http://svn.redmine.org/redmine/trunk@16365 e93f8b46-1217-0410-a6f0-8f06a7374b81 --- app/helpers/projects_helper.rb | 7 ++++++- test/integration/api_test/projects_test.rb | 8 ++++++++ 2 files changed, 14 insertions(+), 1 deletion(-) diff --git a/app/helpers/projects_helper.rb b/app/helpers/projects_helper.rb index e8115205b..3e1f0d804 100644 --- a/app/helpers/projects_helper.rb +++ b/app/helpers/projects_helper.rb @@ -120,11 +120,16 @@ module ProjectsHelper end end if include_in_api_response?('issue_categories') + api.array :time_entry_activities do + project.activities.each do |activity| + api.time_entry_activity(:id => activity.id, :name => activity.name) + end + end if include_in_api_response?('time_entry_activities') + api.array :enabled_modules do project.enabled_modules.each do |enabled_module| api.enabled_module(:id => enabled_module.id, :name => enabled_module.name) end end if include_in_api_response?('enabled_modules') - end end diff --git a/test/integration/api_test/projects_test.rb b/test/integration/api_test/projects_test.rb index 7f9eeeb54..7b9c58a13 100644 --- a/test/integration/api_test/projects_test.rb +++ b/test/integration/api_test/projects_test.rb @@ -114,6 +114,14 @@ class Redmine::ApiTest::ProjectsTest < Redmine::ApiTest::Base assert_select 'issue_categories[type=array] issue_category[id="2"][name=Recipes]' end + test "GET /projects/:id.xml with include=time_entry_activities should return activities" do + get '/projects/1.xml?include=time_entry_activities' + assert_response :success + assert_equal 'application/xml', @response.content_type + + assert_select 'time_entry_activities[type=array] time_entry_activity[id="10"][name=Development]' + end + test "GET /projects/:id.xml with include=trackers should return trackers" do get '/projects/1.xml?include=trackers' assert_response :success From 06c6de06e4d47531ebc6afef63b925ca80552339 Mon Sep 17 00:00:00 2001 From: Jean-Philippe Lang Date: Sun, 5 Mar 2017 07:42:52 +0000 Subject: [PATCH 0686/1117] Last updated by colum in issue list (#6375). git-svn-id: http://svn.redmine.org/redmine/trunk@16366 e93f8b46-1217-0410-a6f0-8f06a7374b81 --- app/models/issue.rb | 26 ++++++++++++++++++++++ app/models/issue_query.rb | 9 ++++++++ public/stylesheets/application.css | 2 +- test/functional/issues_controller_test.rb | 19 ++++++++++++++++ test/unit/query_test.rb | 27 +++++++++++++++++++++-- 5 files changed, 80 insertions(+), 3 deletions(-) diff --git a/app/models/issue.rb b/app/models/issue.rb index 1877ca2c9..19fef95b5 100644 --- a/app/models/issue.rb +++ b/app/models/issue.rb @@ -245,6 +245,7 @@ class Issue < ActiveRecord::Base @spent_hours = nil @total_spent_hours = nil @total_estimated_hours = nil + @last_updated_by = nil base_reload(*args) end @@ -1069,6 +1070,14 @@ class Issue < ActiveRecord::Base @relations ||= IssueRelation::Relations.new(self, (relations_from + relations_to).sort) end + def last_updated_by + if @last_updated_by + @last_updated_by.presence + else + journals.reorder(:id => :desc).first.try(:user) + end + end + # Preloads relations for a collection of issues def self.load_relations(issues) if issues.any? @@ -1132,6 +1141,23 @@ class Issue < ActiveRecord::Base where(:ancestors => {:id => issues.map(&:id)}) end + # Preloads users who updated last a collection of issues + def self.load_visible_last_updated_by(issues, user=User.current) + if issues.any? + issue_ids = issues.map(&:id) + journals = Journal.joins(issue: :project).preload(:user). + where(:journalized_type => 'Issue', :journalized_id => issue_ids). + where("#{Journal.table_name}.id = (SELECT MAX(j.id) FROM #{Journal.table_name} j" + + " WHERE j.journalized_type='Issue' AND j.journalized_id=#{Journal.table_name}.journalized_id" + + " AND #{Journal.visible_notes_condition(user, :skip_pre_condition => true)})").to_a + + issues.each do |issue| + journal = journals.detect {|j| j.journalized_id == issue.id} + issue.instance_variable_set("@last_updated_by", journal.try(:user) || '') + end + end + end + # Finds an issue relation given its id. def find_relation(relation_id) IssueRelation.where("issue_to_id = ? OR issue_from_id = ?", id, id).find(relation_id) diff --git a/app/models/issue_query.rb b/app/models/issue_query.rb index 458eea00a..88b51f593 100644 --- a/app/models/issue_query.rb +++ b/app/models/issue_query.rb @@ -43,6 +43,7 @@ class IssueQuery < Query QueryColumn.new(:done_ratio, :sortable => "#{Issue.table_name}.done_ratio", :groupable => true), QueryColumn.new(:created_on, :sortable => "#{Issue.table_name}.created_on", :default_order => 'desc'), QueryColumn.new(:closed_on, :sortable => "#{Issue.table_name}.closed_on", :default_order => 'desc'), + QueryColumn.new(:last_updated_by, :sortable => lambda {User.fields_for_order_statement("last_journal_user")}), QueryColumn.new(:relations, :caption => :label_related_issues), QueryColumn.new(:description, :inline => false) ] @@ -298,6 +299,9 @@ class IssueQuery < Query if has_column?(:total_spent_hours) Issue.load_visible_total_spent_hours(issues) end + if has_column?(:last_updated_by) + Issue.load_visible_last_updated_by(issues) + end if has_column?(:relations) Issue.load_visible_relations(issues) end @@ -572,6 +576,11 @@ class IssueQuery < Query if order_options.include?('users') joins << "LEFT OUTER JOIN #{User.table_name} ON #{User.table_name}.id = #{queried_table_name}.assigned_to_id" end + if order_options.include?('last_journal_user') + joins << "LEFT OUTER JOIN #{Journal.table_name} ON #{Journal.table_name}.id = (SELECT MAX(#{Journal.table_name}.id) FROM #{Journal.table_name}" + + " WHERE #{Journal.table_name}.journalized_type='Issue' AND #{Journal.table_name}.journalized_id=#{Issue.table_name}.id AND #{Journal.visible_notes_condition(User.current, :skip_pre_condition => true)})" + + " LEFT OUTER JOIN #{User.table_name} last_journal_user ON last_journal_user.id = #{Journal.table_name}.user_id"; + end if order_options.include?('versions') joins << "LEFT OUTER JOIN #{Version.table_name} ON #{Version.table_name}.id = #{queried_table_name}.fixed_version_id" end diff --git a/public/stylesheets/application.css b/public/stylesheets/application.css index 1957a0d7f..6c2ffed30 100644 --- a/public/stylesheets/application.css +++ b/public/stylesheets/application.css @@ -254,7 +254,7 @@ tr.project.idnt-8 td.name {padding-left: 11em;} tr.project.idnt-9 td.name {padding-left: 12.5em;} tr.issue { text-align: center; white-space: nowrap; } -tr.issue td.subject, tr.issue td.category, td.assigned_to, tr.issue td.string, tr.issue td.text, tr.issue td.list, tr.issue td.relations, tr.issue td.parent { white-space: normal; } +tr.issue td.subject, tr.issue td.category, td.assigned_to, td.last_updated_by, tr.issue td.string, tr.issue td.text, tr.issue td.list, tr.issue td.relations, tr.issue td.parent { white-space: normal; } tr.issue td.relations { text-align: left; } tr.issue td.done_ratio table.progress { margin-left:auto; margin-right: auto;} tr.issue td.relations span {white-space: nowrap;} diff --git a/test/functional/issues_controller_test.rb b/test/functional/issues_controller_test.rb index b47ff53fb..6aa6a0623 100644 --- a/test/functional/issues_controller_test.rb +++ b/test/functional/issues_controller_test.rb @@ -741,6 +741,18 @@ class IssuesControllerTest < Redmine::ControllerTest assert_response :success end + def test_index_sort_by_last_updated_by + get :index, :sort => 'last_updated_by' + assert_response :success + assert_select 'table.issues.sort-by-last-updated-by.sort-asc' + end + + def test_index_sort_by_last_updated_by_desc + get :index, :sort => 'last_updated_by:desc' + assert_response :success + assert_select 'table.issues.sort-by-last-updated-by.sort-desc' + end + def test_index_sort_by_spent_hours get :index, :sort => 'spent_hours:desc' assert_response :success @@ -970,6 +982,13 @@ class IssuesControllerTest < Redmine::ControllerTest assert_select 'td.parent a[title=?]', parent.subject end + def test_index_with_last_updated_by_column + get :index, :c => %w(subject last_updated_by), :issue_id => '1,2,3', :sort => 'id', :set_filter => '1' + + assert_select 'td.last_updated_by' + assert_equal ["John Smith", "John Smith", ""], css_select('td.last_updated_by').map(&:text) + end + def test_index_with_estimated_hours_total Issue.delete_all Issue.generate!(:estimated_hours => 5.5) diff --git a/test/unit/query_test.rb b/test/unit/query_test.rb index 31a4ac2d3..77340e1ca 100644 --- a/test/unit/query_test.rb +++ b/test/unit/query_test.rb @@ -29,7 +29,7 @@ class QueryTest < ActiveSupport::TestCase :queries, :projects_trackers, :custom_fields_trackers, - :workflows, + :workflows, :journals, :attachments INTEGER_KLASS = RUBY_VERSION >= "2.4" ? Integer : Fixnum @@ -762,7 +762,7 @@ class QueryTest < ActiveSupport::TestCase query = IssueQuery.new(:name => '_') filter_name = "updated_by" assert_include filter_name, query.available_filters.keys - + query.filters = {filter_name => {:operator => '=', :values => ['me']}} assert_equal [2], find_issues_with_query(query).map(&:id).sort end @@ -1322,6 +1322,19 @@ class QueryTest < ActiveSupport::TestCase assert_not_nil issues.first.instance_variable_get("@spent_hours") end + def test_query_should_preload_last_updated_by + with_current_user User.find(2) do + q = IssueQuery.new(:name => '_', :column_names => [:subject, :last_updated_by]) + q.filters = {"issue_id" => {:operator => '=', :values => ['1,2,3']}} + assert q.has_column?(:last_updated_by) + + issues = q.issues.sort_by(&:id) + assert issues.all? {|issue| !issue.instance_variable_get("@last_updated_by").nil?} + assert_equal ["User", "User", "NilClass"], issues.map { |i| i.last_updated_by.class.name} + assert_equal ["John Smith", "John Smith", ""], issues.map { |i| i.last_updated_by.to_s } + end + end + def test_groupable_columns_should_include_custom_fields q = IssueQuery.new column = q.groupable_columns.detect {|c| c.name == :cf_1} @@ -1384,6 +1397,16 @@ class QueryTest < ActiveSupport::TestCase end end + def test_sortable_columns_should_sort_last_updated_by_according_to_user_format_setting + with_settings :user_format => 'lastname_comma_firstname' do + q = IssueQuery.new + q.sort_criteria = [['last_updated_by', 'desc']] + + assert q.sortable_columns.has_key?('last_updated_by') + assert_equal %w(last_journal_user.lastname last_journal_user.firstname last_journal_user.id), q.sortable_columns['last_updated_by'] + end + end + def test_sortable_columns_should_include_custom_field q = IssueQuery.new assert q.sortable_columns['cf_1'] From 91d10c63f02c6116c6215d66fa8ff7b17cddf527 Mon Sep 17 00:00:00 2001 From: Jean-Philippe Lang Date: Sun, 5 Mar 2017 07:58:07 +0000 Subject: [PATCH 0687/1117] Show Last Comment in Issue list (#1474). Patch by Marius BALTEANU. git-svn-id: http://svn.redmine.org/redmine/trunk@16367 e93f8b46-1217-0410-a6f0-8f06a7374b81 --- app/helpers/queries_helper.rb | 2 ++ app/models/issue.rb | 26 +++++++++++++++ app/models/issue_query.rb | 6 +++- app/views/issues/_list.html.erb | 7 +++- app/views/issues/index.html.erb | 1 + app/views/timelog/_list.html.erb | 7 +++- config/locales/en.yml | 1 + lib/redmine/export/pdf/issues_pdf_helper.rb | 11 ++++-- public/stylesheets/application.css | 4 +-- test/functional/issues_controller_test.rb | 37 +++++++++++++++++++++ test/unit/query_test.rb | 11 ++++-- 11 files changed, 104 insertions(+), 9 deletions(-) diff --git a/app/helpers/queries_helper.rb b/app/helpers/queries_helper.rb index 458fb70fd..c356ca0d4 100644 --- a/app/helpers/queries_helper.rb +++ b/app/helpers/queries_helper.rb @@ -185,6 +185,8 @@ module QueriesHelper value ? (value.visible? ? link_to_issue(value, :subject => false) : "##{value.id}") : '' when :description item.description? ? content_tag('div', textilizable(item, :description), :class => "wiki") : '' + when :last_notes + item.last_notes.present? ? content_tag('div', textilizable(item, :last_notes), :class => "wiki") : '' when :done_ratio progress_bar(value) when :relations diff --git a/app/models/issue.rb b/app/models/issue.rb index 19fef95b5..c80920ca5 100644 --- a/app/models/issue.rb +++ b/app/models/issue.rb @@ -246,6 +246,7 @@ class Issue < ActiveRecord::Base @total_spent_hours = nil @total_estimated_hours = nil @last_updated_by = nil + @last_notes = nil base_reload(*args) end @@ -1078,6 +1079,15 @@ class Issue < ActiveRecord::Base end end + def last_notes + if @last_notes + @last_notes + else + notes = self.journals.visible.where.not(notes: '').to_a + notes.last.notes unless notes.empty? + end + end + # Preloads relations for a collection of issues def self.load_relations(issues) if issues.any? @@ -1158,6 +1168,22 @@ class Issue < ActiveRecord::Base end end + # Preloads visible last notes for a collection of issues + def self.load_visible_last_notes(issues, user=User.current) + if issues.any? + issue_ids = issues.map(&:id) + + notes = Journal.joins(issue: :project).where.not(notes: ''). + where(Journal.visible_notes_condition(User.current, :skip_pre_condition => true)). + where(:issues => {:id => issue_ids}).order("#{Journal.table_name}.id ASC").to_a + + issues.each do |issue| + note = notes.select{|note| note.journalized_id == issue.id} + issue.instance_variable_set "@last_notes", (note.empty? ? '' : note.last.notes) + end + end + end + # Finds an issue relation given its id. def find_relation(relation_id) IssueRelation.where("issue_to_id = ? OR issue_from_id = ?", id, id).find(relation_id) diff --git a/app/models/issue_query.rb b/app/models/issue_query.rb index 88b51f593..7f399f469 100644 --- a/app/models/issue_query.rb +++ b/app/models/issue_query.rb @@ -45,7 +45,8 @@ class IssueQuery < Query QueryColumn.new(:closed_on, :sortable => "#{Issue.table_name}.closed_on", :default_order => 'desc'), QueryColumn.new(:last_updated_by, :sortable => lambda {User.fields_for_order_statement("last_journal_user")}), QueryColumn.new(:relations, :caption => :label_related_issues), - QueryColumn.new(:description, :inline => false) + QueryColumn.new(:description, :inline => false), + QueryColumn.new(:last_notes, :caption => :label_last_notes, :inline => false) ] def initialize(attributes=nil, *args) @@ -305,6 +306,9 @@ class IssueQuery < Query if has_column?(:relations) Issue.load_visible_relations(issues) end + if has_column?(:last_notes) + Issue.load_visible_last_notes(issues) + end issues rescue ::ActiveRecord::StatementInvalid => e raise StatementInvalid.new(e.message) diff --git a/app/views/issues/_list.html.erb b/app/views/issues/_list.html.erb index 7e34fca24..3ae5e7023 100644 --- a/app/views/issues/_list.html.erb +++ b/app/views/issues/_list.html.erb @@ -33,7 +33,12 @@ <% @query.block_columns.each do |column| if (text = column_content(column, issue)) && text.present? -%>
          - + <% end -%> <% end -%> diff --git a/app/views/issues/index.html.erb b/app/views/issues/index.html.erb index 3d456aad1..80210814e 100644 --- a/app/views/issues/index.html.erb +++ b/app/views/issues/index.html.erb @@ -37,6 +37,7 @@

          +

          <% if @issue_count > Setting.issues_export_limit.to_i %>

          diff --git a/app/views/timelog/_list.html.erb b/app/views/timelog/_list.html.erb index 0fb72aeb4..b39eb5cc3 100644 --- a/app/views/timelog/_list.html.erb +++ b/app/views/timelog/_list.html.erb @@ -50,7 +50,12 @@ <% @query.block_columns.each do |column| if (text = column_content(column, issue)) && text.present? -%>

          - + <% end -%> <% end -%> diff --git a/config/locales/en.yml b/config/locales/en.yml index eb3d7cf37..2d9260fb5 100644 --- a/config/locales/en.yml +++ b/config/locales/en.yml @@ -1014,6 +1014,7 @@ en: label_font_default: Default font label_font_monospace: Monospaced font label_font_proportional: Proportional font + label_last_notes: Last notes button_login: Login button_submit: Submit diff --git a/lib/redmine/export/pdf/issues_pdf_helper.rb b/lib/redmine/export/pdf/issues_pdf_helper.rb index 4c0b935da..cf8a79d3c 100644 --- a/lib/redmine/export/pdf/issues_pdf_helper.rb +++ b/lib/redmine/export/pdf/issues_pdf_helper.rb @@ -278,8 +278,8 @@ module Redmine table_width = col_width.inject(0, :+) end - # use full width if the description is displayed - if table_width > 0 && query.has_column?(:description) + # use full width if the description or last_notes are displayed + if table_width > 0 && (query.has_column?(:description) || query.has_column?(:last_notes)) col_width = col_width.map {|w| w * (page_width - right_margin - left_margin) / table_width} table_width = col_width.inject(0, :+) end @@ -339,6 +339,13 @@ module Redmine pdf.RDMwriteHTMLCell(0, 5, 10, '', issue.description.to_s, issue.attachments, "LRBT") pdf.set_auto_page_break(false) end + + if query.has_column?(:last_notes) && issue.last_notes.present? + pdf.set_x(10) + pdf.set_auto_page_break(true, bottom_margin) + pdf.RDMwriteHTMLCell(0, 5, 10, '', issue.last_notes.to_s, [], "LRBT") + pdf.set_auto_page_break(false) + end end if issues.size == Setting.issues_export_limit.to_i diff --git a/public/stylesheets/application.css b/public/stylesheets/application.css index 6c2ffed30..7754fc565 100644 --- a/public/stylesheets/application.css +++ b/public/stylesheets/application.css @@ -258,8 +258,8 @@ tr.issue td.subject, tr.issue td.category, td.assigned_to, td.last_updated_by, t tr.issue td.relations { text-align: left; } tr.issue td.done_ratio table.progress { margin-left:auto; margin-right: auto;} tr.issue td.relations span {white-space: nowrap;} -table.issues td.description {color:#777; font-size:90%; padding:4px 4px 4px 24px; text-align:left; white-space:normal;} -table.issues td.description pre {white-space:normal;} +table.issues td.description, table.issues td.last_notes {color:#777; font-size:90%; padding:4px 4px 4px 24px; text-align:left; white-space:normal;} +table.issues td.description pre, table.issues td.last_notes pre {white-space:normal;} tr.issue.idnt td.subject {background: url(../images/bullet_arrow_right.png) no-repeat 0 50%;} tr.issue.idnt-1 td.subject {padding-left: 24px; background-position: 8px 50%;} diff --git a/test/functional/issues_controller_test.rb b/test/functional/issues_controller_test.rb index 6aa6a0623..63ac34fdd 100644 --- a/test/functional/issues_controller_test.rb +++ b/test/functional/issues_controller_test.rb @@ -971,6 +971,43 @@ class IssuesControllerTest < Redmine::ControllerTest assert_equal 'application/pdf', response.content_type end + def test_index_with_last_notes_column + get :index, :set_filter => 1, :c => %w(subject last_notes) + + assert_response :success + assert_select 'table.issues thead th', 3 # columns: chekbox + id + subject + + assert_select 'td.last_notes[colspan="3"]', :text => 'Some notes with Redmine links: #2, r2.' + assert_select 'td.last_notes[colspan="3"]', :text => 'A comment with inline image: and a reference to #1 and r2.' + + get :index, :set_filter => 1, :c => %w(subject last_notes), :format => 'pdf' + assert_response :success + assert_equal 'application/pdf', response.content_type + end + + def test_index_with_last_notes_column_should_display_private_notes_with_permission_only + journal = Journal.create!(:journalized => Issue.find(2), :notes => 'Privates notes', :private_notes => true, :user_id => 1) + @request.session[:user_id] = 2 + + get :index, :set_filter => 1, :c => %w(subject last_notes) + assert_response :success + assert_select 'td.last_notes[colspan="3"]', :text => 'Privates notes' + + Role.find(1).remove_permission! :view_private_notes + + get :index, :set_filter => 1, :c => %w(subject last_notes) + assert_response :success + assert_select 'td.last_notes[colspan="3"]', :text => 'A comment with inline image: and a reference to #1 and r2.' + end + + def test_index_with_description_and_last_notes_columns_should_display_column_name + get :index, :set_filter => 1, :c => %w(subject last_notes description) + assert_response :success + + assert_select 'td.last_notes[colspan="3"] span', :text => 'Last notes' + assert_select 'td.description[colspan="3"] span', :text => 'Description' + end + def test_index_with_parent_column Issue.delete_all parent = Issue.generate! diff --git a/test/unit/query_test.rb b/test/unit/query_test.rb index 77340e1ca..5a3283900 100644 --- a/test/unit/query_test.rb +++ b/test/unit/query_test.rb @@ -1302,10 +1302,10 @@ class QueryTest < ActiveSupport::TestCase def test_inline_and_block_columns q = IssueQuery.new - q.column_names = ['subject', 'description', 'tracker'] + q.column_names = ['subject', 'description', 'tracker', 'last_notes'] assert_equal [:id, :subject, :tracker], q.inline_columns.map(&:name) - assert_equal [:description], q.block_columns.map(&:name) + assert_equal [:description, :last_notes], q.block_columns.map(&:name) end def test_custom_field_columns_should_be_inline @@ -1335,6 +1335,13 @@ class QueryTest < ActiveSupport::TestCase end end + def test_query_should_preload_last_notes + q = IssueQuery.new(:name => '_', :column_names => [:subject, :last_notes]) + assert q.has_column?(:last_notes) + issues = q.issues + assert_not_nil issues.first.instance_variable_get("@last_notes") + end + def test_groupable_columns_should_include_custom_fields q = IssueQuery.new column = q.groupable_columns.detect {|c| c.name == :cf_1} From fe1e98f131fc258711084cc9faa74cfa0b3b0fcd Mon Sep 17 00:00:00 2001 From: Jean-Philippe Lang Date: Sun, 5 Mar 2017 07:59:16 +0000 Subject: [PATCH 0688/1117] Adds :label_last_notes string to locales (#1474). git-svn-id: http://svn.redmine.org/redmine/trunk@16368 e93f8b46-1217-0410-a6f0-8f06a7374b81 --- config/locales/ar.yml | 1 + config/locales/az.yml | 1 + config/locales/bg.yml | 1 + config/locales/bs.yml | 1 + config/locales/ca.yml | 1 + config/locales/cs.yml | 1 + config/locales/da.yml | 1 + config/locales/de.yml | 1 + config/locales/el.yml | 1 + config/locales/en-GB.yml | 1 + config/locales/es-PA.yml | 1 + config/locales/es.yml | 1 + config/locales/et.yml | 1 + config/locales/eu.yml | 1 + config/locales/fa.yml | 1 + config/locales/fi.yml | 1 + config/locales/fr.yml | 1 + config/locales/gl.yml | 1 + config/locales/he.yml | 1 + config/locales/hr.yml | 1 + config/locales/hu.yml | 1 + config/locales/id.yml | 1 + config/locales/it.yml | 1 + config/locales/ja.yml | 1 + config/locales/ko.yml | 1 + config/locales/lt.yml | 1 + config/locales/lv.yml | 1 + config/locales/mk.yml | 1 + config/locales/mn.yml | 1 + config/locales/nl.yml | 1 + config/locales/no.yml | 1 + config/locales/pl.yml | 1 + config/locales/pt-BR.yml | 1 + config/locales/pt.yml | 1 + config/locales/ro.yml | 1 + config/locales/ru.yml | 1 + config/locales/sk.yml | 1 + config/locales/sl.yml | 1 + config/locales/sq.yml | 1 + config/locales/sr-YU.yml | 1 + config/locales/sr.yml | 1 + config/locales/sv.yml | 1 + config/locales/th.yml | 1 + config/locales/tr.yml | 1 + config/locales/uk.yml | 1 + config/locales/vi.yml | 1 + config/locales/zh-TW.yml | 1 + config/locales/zh.yml | 1 + 48 files changed, 48 insertions(+) diff --git a/config/locales/ar.yml b/config/locales/ar.yml index 12639edb2..60015da94 100644 --- a/config/locales/ar.yml +++ b/config/locales/ar.yml @@ -1223,3 +1223,4 @@ ar: field_updated_by: Updated by field_last_updated_by: Last updated by field_full_width_layout: Full width layout + label_last_notes: Last notes diff --git a/config/locales/az.yml b/config/locales/az.yml index 36a60b8a6..0e33500f5 100644 --- a/config/locales/az.yml +++ b/config/locales/az.yml @@ -1318,3 +1318,4 @@ az: field_updated_by: Updated by field_last_updated_by: Last updated by field_full_width_layout: Full width layout + label_last_notes: Last notes diff --git a/config/locales/bg.yml b/config/locales/bg.yml index 5523ea4d5..fe82ea124 100644 --- a/config/locales/bg.yml +++ b/config/locales/bg.yml @@ -1207,3 +1207,4 @@ bg: description_wiki_subpages_reassign: Изберете нова родителска страница description_all_columns: Всички колони text_repository_identifier_info: 'Позволени са малки букви (a-z), цифри, тирета и _.
          Промяна след създаването му не е възможна.' + label_last_notes: Last notes diff --git a/config/locales/bs.yml b/config/locales/bs.yml index ec797d86f..8f2bdd78d 100644 --- a/config/locales/bs.yml +++ b/config/locales/bs.yml @@ -1236,3 +1236,4 @@ bs: field_updated_by: Updated by field_last_updated_by: Last updated by field_full_width_layout: Full width layout + label_last_notes: Last notes diff --git a/config/locales/ca.yml b/config/locales/ca.yml index eea6dc3af..bd011294c 100644 --- a/config/locales/ca.yml +++ b/config/locales/ca.yml @@ -1213,3 +1213,4 @@ ca: field_updated_by: Updated by field_last_updated_by: Last updated by field_full_width_layout: Full width layout + label_last_notes: Last notes diff --git a/config/locales/cs.yml b/config/locales/cs.yml index 78506b139..1cb61483d 100644 --- a/config/locales/cs.yml +++ b/config/locales/cs.yml @@ -1222,3 +1222,4 @@ cs: field_updated_by: Updated by field_last_updated_by: Last updated by field_full_width_layout: Full width layout + label_last_notes: Last notes diff --git a/config/locales/da.yml b/config/locales/da.yml index 00e563b4b..9aa5bd096 100644 --- a/config/locales/da.yml +++ b/config/locales/da.yml @@ -1240,3 +1240,4 @@ da: field_updated_by: Updated by field_last_updated_by: Last updated by field_full_width_layout: Full width layout + label_last_notes: Last notes diff --git a/config/locales/de.yml b/config/locales/de.yml index c29f57410..62a451411 100644 --- a/config/locales/de.yml +++ b/config/locales/de.yml @@ -1225,3 +1225,4 @@ de: field_updated_by: Updated by field_last_updated_by: Last updated by field_full_width_layout: Full width layout + label_last_notes: Last notes diff --git a/config/locales/el.yml b/config/locales/el.yml index 9c2c54896..b7e9a87cc 100644 --- a/config/locales/el.yml +++ b/config/locales/el.yml @@ -1223,3 +1223,4 @@ el: field_updated_by: Updated by field_last_updated_by: Last updated by field_full_width_layout: Full width layout + label_last_notes: Last notes diff --git a/config/locales/en-GB.yml b/config/locales/en-GB.yml index 86cd5086b..6330d2803 100644 --- a/config/locales/en-GB.yml +++ b/config/locales/en-GB.yml @@ -1225,3 +1225,4 @@ en-GB: field_updated_by: Updated by field_last_updated_by: Last updated by field_full_width_layout: Full width layout + label_last_notes: Last notes diff --git a/config/locales/es-PA.yml b/config/locales/es-PA.yml index 6be068db0..12c4e1bfd 100644 --- a/config/locales/es-PA.yml +++ b/config/locales/es-PA.yml @@ -1253,3 +1253,4 @@ es-PA: field_updated_by: Updated by field_last_updated_by: Last updated by field_full_width_layout: Full width layout + label_last_notes: Last notes diff --git a/config/locales/es.yml b/config/locales/es.yml index dada57d8e..9419b539f 100644 --- a/config/locales/es.yml +++ b/config/locales/es.yml @@ -1251,3 +1251,4 @@ es: field_updated_by: Updated by field_last_updated_by: Last updated by field_full_width_layout: Full width layout + label_last_notes: Last notes diff --git a/config/locales/et.yml b/config/locales/et.yml index f761e9cd3..ef2d50fc0 100644 --- a/config/locales/et.yml +++ b/config/locales/et.yml @@ -1228,3 +1228,4 @@ et: field_updated_by: Updated by field_last_updated_by: Last updated by field_full_width_layout: Full width layout + label_last_notes: Last notes diff --git a/config/locales/eu.yml b/config/locales/eu.yml index 264c5661a..fd46b3a4c 100644 --- a/config/locales/eu.yml +++ b/config/locales/eu.yml @@ -1224,3 +1224,4 @@ eu: field_updated_by: Updated by field_last_updated_by: Last updated by field_full_width_layout: Full width layout + label_last_notes: Last notes diff --git a/config/locales/fa.yml b/config/locales/fa.yml index ed7aa2d39..e0b7d5b9a 100644 --- a/config/locales/fa.yml +++ b/config/locales/fa.yml @@ -1224,3 +1224,4 @@ fa: field_updated_by: Updated by field_last_updated_by: Last updated by field_full_width_layout: Full width layout + label_last_notes: Last notes diff --git a/config/locales/fi.yml b/config/locales/fi.yml index fb3534002..d9a3e8dd3 100644 --- a/config/locales/fi.yml +++ b/config/locales/fi.yml @@ -1244,3 +1244,4 @@ fi: field_updated_by: Updated by field_last_updated_by: Last updated by field_full_width_layout: Full width layout + label_last_notes: Last notes diff --git a/config/locales/fr.yml b/config/locales/fr.yml index 48dc7a35e..87a54bdd8 100644 --- a/config/locales/fr.yml +++ b/config/locales/fr.yml @@ -1021,6 +1021,7 @@ fr: label_font_default: Police par défaut label_font_monospace: Police non proportionnelle label_font_proportional: Police proportionnelle + label_last_notes: Dernières notes button_login: Connexion button_submit: Soumettre diff --git a/config/locales/gl.yml b/config/locales/gl.yml index 6a67cdbe5..7b8a1534a 100644 --- a/config/locales/gl.yml +++ b/config/locales/gl.yml @@ -1231,3 +1231,4 @@ gl: field_updated_by: Updated by field_last_updated_by: Last updated by field_full_width_layout: Full width layout + label_last_notes: Last notes diff --git a/config/locales/he.yml b/config/locales/he.yml index 9d1e93f3a..dfac75f6f 100644 --- a/config/locales/he.yml +++ b/config/locales/he.yml @@ -1228,3 +1228,4 @@ he: field_updated_by: Updated by field_last_updated_by: Last updated by field_full_width_layout: Full width layout + label_last_notes: Last notes diff --git a/config/locales/hr.yml b/config/locales/hr.yml index e05b58812..f675f88de 100644 --- a/config/locales/hr.yml +++ b/config/locales/hr.yml @@ -1222,3 +1222,4 @@ hr: field_updated_by: Updated by field_last_updated_by: Last updated by field_full_width_layout: Full width layout + label_last_notes: Last notes diff --git a/config/locales/hu.yml b/config/locales/hu.yml index 8a5073664..fcff5de54 100644 --- a/config/locales/hu.yml +++ b/config/locales/hu.yml @@ -1242,3 +1242,4 @@ field_updated_by: Updated by field_last_updated_by: Last updated by field_full_width_layout: Full width layout + label_last_notes: Last notes diff --git a/config/locales/id.yml b/config/locales/id.yml index 7c8a7a754..aa33d75f0 100644 --- a/config/locales/id.yml +++ b/config/locales/id.yml @@ -1227,3 +1227,4 @@ id: field_updated_by: Updated by field_last_updated_by: Last updated by field_full_width_layout: Full width layout + label_last_notes: Last notes diff --git a/config/locales/it.yml b/config/locales/it.yml index d0e6a4601..f60fb5303 100644 --- a/config/locales/it.yml +++ b/config/locales/it.yml @@ -1218,3 +1218,4 @@ it: field_updated_by: Updated by field_last_updated_by: Last updated by field_full_width_layout: Full width layout + label_last_notes: Last notes diff --git a/config/locales/ja.yml b/config/locales/ja.yml index fad1b2fc5..aa6f3cf9f 100644 --- a/config/locales/ja.yml +++ b/config/locales/ja.yml @@ -1230,3 +1230,4 @@ ja: field_updated_by: 更新者 field_last_updated_by: 最終更新者 field_full_width_layout: ワイド表示 + label_last_notes: Last notes diff --git a/config/locales/ko.yml b/config/locales/ko.yml index 8d22f3cc6..ebcfc886a 100644 --- a/config/locales/ko.yml +++ b/config/locales/ko.yml @@ -1262,3 +1262,4 @@ ko: field_updated_by: Updated by field_last_updated_by: Last updated by field_full_width_layout: Full width layout + label_last_notes: Last notes diff --git a/config/locales/lt.yml b/config/locales/lt.yml index 35a227cfc..8a14bbcd7 100644 --- a/config/locales/lt.yml +++ b/config/locales/lt.yml @@ -1212,3 +1212,4 @@ lt: field_updated_by: Updated by field_last_updated_by: Last updated by field_full_width_layout: Full width layout + label_last_notes: Last notes diff --git a/config/locales/lv.yml b/config/locales/lv.yml index 28f96a345..402c3b4aa 100644 --- a/config/locales/lv.yml +++ b/config/locales/lv.yml @@ -1217,3 +1217,4 @@ lv: field_updated_by: Updated by field_last_updated_by: Last updated by field_full_width_layout: Full width layout + label_last_notes: Last notes diff --git a/config/locales/mk.yml b/config/locales/mk.yml index 8c7864e62..dc6d47133 100644 --- a/config/locales/mk.yml +++ b/config/locales/mk.yml @@ -1223,3 +1223,4 @@ mk: field_updated_by: Updated by field_last_updated_by: Last updated by field_full_width_layout: Full width layout + label_last_notes: Last notes diff --git a/config/locales/mn.yml b/config/locales/mn.yml index 0293cf14e..b1d7dd3d5 100644 --- a/config/locales/mn.yml +++ b/config/locales/mn.yml @@ -1224,3 +1224,4 @@ mn: field_updated_by: Updated by field_last_updated_by: Last updated by field_full_width_layout: Full width layout + label_last_notes: Last notes diff --git a/config/locales/nl.yml b/config/locales/nl.yml index e15c33609..0df614ad9 100644 --- a/config/locales/nl.yml +++ b/config/locales/nl.yml @@ -1198,3 +1198,4 @@ nl: field_updated_by: Updated by field_last_updated_by: Last updated by field_full_width_layout: Full width layout + label_last_notes: Last notes diff --git a/config/locales/no.yml b/config/locales/no.yml index 3dd2d3b76..998261986 100644 --- a/config/locales/no.yml +++ b/config/locales/no.yml @@ -1213,3 +1213,4 @@ field_updated_by: Updated by field_last_updated_by: Last updated by field_full_width_layout: Full width layout + label_last_notes: Last notes diff --git a/config/locales/pl.yml b/config/locales/pl.yml index 1e3ccf93e..9a508bd46 100644 --- a/config/locales/pl.yml +++ b/config/locales/pl.yml @@ -1238,3 +1238,4 @@ pl: field_updated_by: Updated by field_last_updated_by: Last updated by field_full_width_layout: Full width layout + label_last_notes: Last notes diff --git a/config/locales/pt-BR.yml b/config/locales/pt-BR.yml index 7339ee56a..04390c03b 100644 --- a/config/locales/pt-BR.yml +++ b/config/locales/pt-BR.yml @@ -1241,3 +1241,4 @@ pt-BR: field_updated_by: Updated by field_last_updated_by: Last updated by field_full_width_layout: Full width layout + label_last_notes: Last notes diff --git a/config/locales/pt.yml b/config/locales/pt.yml index 93308dd17..583b97f7f 100644 --- a/config/locales/pt.yml +++ b/config/locales/pt.yml @@ -1226,3 +1226,4 @@ pt: field_updated_by: Updated by field_last_updated_by: Last updated by field_full_width_layout: Full width layout + label_last_notes: Last notes diff --git a/config/locales/ro.yml b/config/locales/ro.yml index db0e5096f..ab0e648fd 100644 --- a/config/locales/ro.yml +++ b/config/locales/ro.yml @@ -1218,3 +1218,4 @@ ro: field_updated_by: Updated by field_last_updated_by: Last updated by field_full_width_layout: Full width layout + label_last_notes: Last notes diff --git a/config/locales/ru.yml b/config/locales/ru.yml index d86285414..1c1836ea3 100644 --- a/config/locales/ru.yml +++ b/config/locales/ru.yml @@ -1325,3 +1325,4 @@ ru: field_updated_by: Updated by field_last_updated_by: Last updated by field_full_width_layout: Full width layout + label_last_notes: Last notes diff --git a/config/locales/sk.yml b/config/locales/sk.yml index ea89281a1..37df0d2f6 100644 --- a/config/locales/sk.yml +++ b/config/locales/sk.yml @@ -1213,3 +1213,4 @@ sk: field_updated_by: Updated by field_last_updated_by: Last updated by field_full_width_layout: Full width layout + label_last_notes: Last notes diff --git a/config/locales/sl.yml b/config/locales/sl.yml index 267a9dce0..e3acd1e8c 100644 --- a/config/locales/sl.yml +++ b/config/locales/sl.yml @@ -1223,3 +1223,4 @@ sl: field_updated_by: Updated by field_last_updated_by: Last updated by field_full_width_layout: Full width layout + label_last_notes: Last notes diff --git a/config/locales/sq.yml b/config/locales/sq.yml index 170358115..3cfc37684 100644 --- a/config/locales/sq.yml +++ b/config/locales/sq.yml @@ -1219,3 +1219,4 @@ sq: field_updated_by: Updated by field_last_updated_by: Last updated by field_full_width_layout: Full width layout + label_last_notes: Last notes diff --git a/config/locales/sr-YU.yml b/config/locales/sr-YU.yml index f7211e6ed..bb3a1e983 100644 --- a/config/locales/sr-YU.yml +++ b/config/locales/sr-YU.yml @@ -1225,3 +1225,4 @@ sr-YU: field_updated_by: Updated by field_last_updated_by: Last updated by field_full_width_layout: Full width layout + label_last_notes: Last notes diff --git a/config/locales/sr.yml b/config/locales/sr.yml index e959e9e88..0ef0532ec 100644 --- a/config/locales/sr.yml +++ b/config/locales/sr.yml @@ -1224,3 +1224,4 @@ sr: field_updated_by: Updated by field_last_updated_by: Last updated by field_full_width_layout: Full width layout + label_last_notes: Last notes diff --git a/config/locales/sv.yml b/config/locales/sv.yml index f45a1c1b6..e9fa871bb 100644 --- a/config/locales/sv.yml +++ b/config/locales/sv.yml @@ -1256,3 +1256,4 @@ sv: field_updated_by: Updated by field_last_updated_by: Last updated by field_full_width_layout: Full width layout + label_last_notes: Last notes diff --git a/config/locales/th.yml b/config/locales/th.yml index 919cdbac0..12bd1d3f6 100644 --- a/config/locales/th.yml +++ b/config/locales/th.yml @@ -1220,3 +1220,4 @@ th: field_updated_by: Updated by field_last_updated_by: Last updated by field_full_width_layout: Full width layout + label_last_notes: Last notes diff --git a/config/locales/tr.yml b/config/locales/tr.yml index ec5de5946..4c1b0a07f 100644 --- a/config/locales/tr.yml +++ b/config/locales/tr.yml @@ -1231,3 +1231,4 @@ tr: field_updated_by: Updated by field_last_updated_by: Last updated by field_full_width_layout: Full width layout + label_last_notes: Last notes diff --git a/config/locales/uk.yml b/config/locales/uk.yml index 64ecf81ec..9df40cb2f 100644 --- a/config/locales/uk.yml +++ b/config/locales/uk.yml @@ -1218,3 +1218,4 @@ uk: field_updated_by: Updated by field_last_updated_by: Last updated by field_full_width_layout: Full width layout + label_last_notes: Last notes diff --git a/config/locales/vi.yml b/config/locales/vi.yml index 18c4e8d10..8274e95d7 100644 --- a/config/locales/vi.yml +++ b/config/locales/vi.yml @@ -1276,3 +1276,4 @@ vi: field_updated_by: Updated by field_last_updated_by: Last updated by field_full_width_layout: Full width layout + label_last_notes: Last notes diff --git a/config/locales/zh-TW.yml b/config/locales/zh-TW.yml index 1bcf67f27..dc734f314 100644 --- a/config/locales/zh-TW.yml +++ b/config/locales/zh-TW.yml @@ -1290,3 +1290,4 @@ description_issue_category_reassign: 選擇議題分類 description_wiki_subpages_reassign: 選擇新的父頁面 text_repository_identifier_info: '僅允許使用小寫英文字母 (a-z), 阿拉伯數字, 虛線與底線。
          一旦儲存之後, 代碼便無法再次被更改。' + label_last_notes: Last notes diff --git a/config/locales/zh.yml b/config/locales/zh.yml index dbed55913..8b3abb76e 100644 --- a/config/locales/zh.yml +++ b/config/locales/zh.yml @@ -1216,3 +1216,4 @@ zh: field_updated_by: Updated by field_last_updated_by: Last updated by field_full_width_layout: Full width layout + label_last_notes: Last notes From 9d8209fddc39e60bd4c3c2bcc440f1f3fb9842c0 Mon Sep 17 00:00:00 2001 From: Jean-Philippe Lang Date: Sun, 5 Mar 2017 08:05:29 +0000 Subject: [PATCH 0689/1117] Don't load all issues' journals (#1474). git-svn-id: http://svn.redmine.org/redmine/trunk@16369 e93f8b46-1217-0410-a6f0-8f06a7374b81 --- app/models/issue.rb | 14 ++++++++------ 1 file changed, 8 insertions(+), 6 deletions(-) diff --git a/app/models/issue.rb b/app/models/issue.rb index c80920ca5..431574acd 100644 --- a/app/models/issue.rb +++ b/app/models/issue.rb @@ -1172,14 +1172,16 @@ class Issue < ActiveRecord::Base def self.load_visible_last_notes(issues, user=User.current) if issues.any? issue_ids = issues.map(&:id) - - notes = Journal.joins(issue: :project).where.not(notes: ''). - where(Journal.visible_notes_condition(User.current, :skip_pre_condition => true)). - where(:issues => {:id => issue_ids}).order("#{Journal.table_name}.id ASC").to_a + journals = Journal.joins(issue: :project). + where(:journalized_type => 'Issue', :journalized_id => issue_ids). + where("#{Journal.table_name}.id = (SELECT MAX(j.id) FROM #{Journal.table_name} j" + + " WHERE j.journalized_type='Issue' AND j.journalized_id=#{Journal.table_name}.journalized_id" + + " AND j.notes <> ''" + + " AND #{Journal.visible_notes_condition(user, :skip_pre_condition => true)})").to_a issues.each do |issue| - note = notes.select{|note| note.journalized_id == issue.id} - issue.instance_variable_set "@last_notes", (note.empty? ? '' : note.last.notes) + journal = journals.detect {|j| j.journalized_id == issue.id} + issue.instance_variable_set("@last_notes", journal.try(:notes) || '') end end end From 7a60e44d43e412fc06b0039307051ffd33380e6c Mon Sep 17 00:00:00 2001 From: Jean-Philippe Lang Date: Sun, 5 Mar 2017 08:08:21 +0000 Subject: [PATCH 0690/1117] Load only last journal with notes (#1474). git-svn-id: http://svn.redmine.org/redmine/trunk@16370 e93f8b46-1217-0410-a6f0-8f06a7374b81 --- app/models/issue.rb | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/app/models/issue.rb b/app/models/issue.rb index 431574acd..1fd84210d 100644 --- a/app/models/issue.rb +++ b/app/models/issue.rb @@ -1083,8 +1083,7 @@ class Issue < ActiveRecord::Base if @last_notes @last_notes else - notes = self.journals.visible.where.not(notes: '').to_a - notes.last.notes unless notes.empty? + journals.where.not(notes: '').reorder(:id => :desc).first.try(:notes) end end From a9a1f6205aca80c57c4be9b99dbf67aed733133c Mon Sep 17 00:00:00 2001 From: Jean-Philippe Lang Date: Sun, 5 Mar 2017 08:41:20 +0000 Subject: [PATCH 0691/1117] Mail parts with empty content should be ignored (#25256). MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Patch by Felix Schäfer. git-svn-id: http://svn.redmine.org/redmine/trunk@16371 e93f8b46-1217-0410-a6f0-8f06a7374b81 --- app/models/mail_handler.rb | 20 +++++------ .../fixtures/mail_handler/empty_text_part.eml | 36 +++++++++++++++++++ test/unit/mail_handler_test.rb | 5 +++ 3 files changed, 51 insertions(+), 10 deletions(-) create mode 100644 test/fixtures/mail_handler/empty_text_part.eml diff --git a/app/models/mail_handler.rb b/app/models/mail_handler.rb index 402be4f51..53f37a29e 100644 --- a/app/models/mail_handler.rb +++ b/app/models/mail_handler.rb @@ -445,19 +445,21 @@ class MailHandler < ActionMailer::Base def plain_text_body return @plain_text_body unless @plain_text_body.nil? - parts = if (text_parts = email.all_parts.select {|p| p.mime_type == 'text/plain'}).present? - text_parts - elsif (html_parts = email.all_parts.select {|p| p.mime_type == 'text/html'}).present? - html_parts - else - [email] - end + @plain_text_body = email_parts_to_text(email.all_parts.select {|p| p.mime_type == 'text/plain'}).presence + @plain_text_body ||= email_parts_to_text(email.all_parts.select {|p| p.mime_type == 'text/html'}).presence + + @plain_text_body ||= email_parts_to_text([email]) + + @plain_text_body + end + + def email_parts_to_text(parts) parts.reject! do |part| part.attachment? end - @plain_text_body = parts.map do |p| + parts.map do |p| body_charset = Mail::RubyVer.respond_to?(:pick_encoding) ? Mail::RubyVer.pick_encoding(p.charset).to_s : p.charset @@ -465,8 +467,6 @@ class MailHandler < ActionMailer::Base # convert html parts to text p.mime_type == 'text/html' ? self.class.html_body_to_text(body) : self.class.plain_text_body_to_text(body) end.join("\r\n") - - @plain_text_body end def cleaned_up_text_body diff --git a/test/fixtures/mail_handler/empty_text_part.eml b/test/fixtures/mail_handler/empty_text_part.eml new file mode 100644 index 000000000..7e770249f --- /dev/null +++ b/test/fixtures/mail_handler/empty_text_part.eml @@ -0,0 +1,36 @@ +From JSmith@somenet.foo Fri Mar 22 08:30:28 2013 +From: John Smith +Content-Type: multipart/mixed; boundary="Apple-Mail=_33C8180A-B097-4B87-A925-441300BDB9C9" +Message-Id: +Mime-Version: 1.0 (Mac OS X Mail 6.3 \(1503\)) +Subject: Test with an empty text part +Date: Fri, 22 Mar 2013 17:30:20 +0200 +To: redmine@somenet.foo +X-Mailer: Apple Mail (2.1503) + + + +--Apple-Mail=_33C8180A-B097-4B87-A925-441300BDB9C9 +Content-Transfer-Encoding: quoted-printable +Content-Type: text/plain; + charset=us-ascii + + +--Apple-Mail=_33C8180A-B097-4B87-A925-441300BDB9C9 +Content-Transfer-Encoding: quoted-printable +Content-Type: text/html; + charset=us-ascii + + + + + + + +

          The html part.

          + + + + +--Apple-Mail=_33C8180A-B097-4B87-A925-441300BDB9C9-- diff --git a/test/unit/mail_handler_test.rb b/test/unit/mail_handler_test.rb index 562359a38..73040f766 100644 --- a/test/unit/mail_handler_test.rb +++ b/test/unit/mail_handler_test.rb @@ -623,6 +623,11 @@ class MailHandlerTest < ActiveSupport::TestCase assert_include 'third', issue.description end + def test_empty_text_part_should_not_stop_looking_for_content + issue = submit_email('empty_text_part.eml', :issue => {:project => 'ecookbook'}) + assert_equal 'The html part.', issue.description + end + def test_attachment_text_part_should_be_added_as_issue_attachment issue = submit_email('multiple_text_parts.eml', :issue => {:project => 'ecookbook'}) assert_not_include 'Plain text attachment', issue.description From 2503731d3c1fb07257aeefd8e42120014fca8529 Mon Sep 17 00:00:00 2001 From: Jean-Philippe Lang Date: Sun, 5 Mar 2017 08:55:13 +0000 Subject: [PATCH 0692/1117] Removes invalid attributes from gravatar img tag. git-svn-id: http://svn.redmine.org/redmine/trunk@16372 e93f8b46-1217-0410-a6f0-8f06a7374b81 --- lib/plugins/gravatar/lib/gravatar.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/plugins/gravatar/lib/gravatar.rb b/lib/plugins/gravatar/lib/gravatar.rb index f614f0354..5d9cda340 100644 --- a/lib/plugins/gravatar/lib/gravatar.rb +++ b/lib/plugins/gravatar/lib/gravatar.rb @@ -56,7 +56,7 @@ module GravatarHelper # double the size for hires displays options[:srcset] = "#{gravatar_url(email, options.merge(size: options[:size].to_i * 2))} 2x" - image_tag src, options + image_tag src, options.except(:rating, :size, :default, :ssl) end # Returns the base Gravatar URL for the given email hash From 6865c96d99fe0c3b93d929c823c9f9f892ca78ad Mon Sep 17 00:00:00 2001 From: Jean-Philippe Lang Date: Sun, 5 Mar 2017 08:59:40 +0000 Subject: [PATCH 0693/1117] Span elements should not contain a div. git-svn-id: http://svn.redmine.org/redmine/trunk@16373 e93f8b46-1217-0410-a6f0-8f06a7374b81 --- app/helpers/application_helper.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app/helpers/application_helper.rb b/app/helpers/application_helper.rb index 908b35502..540080fae 100644 --- a/app/helpers/application_helper.rb +++ b/app/helpers/application_helper.rb @@ -378,7 +378,7 @@ module ApplicationHelper :class => 'drdn-content' ) - content_tag('span', trigger + content, :id => "project-jump", :class => "drdn") + content_tag('div', trigger + content, :id => "project-jump", :class => "drdn") end def project_tree_options_for_select(projects, options = {}) From 89daf0f16a7e51a52c010cfb197c5bbe51e4810f Mon Sep 17 00:00:00 2001 From: Jean-Philippe Lang Date: Sun, 5 Mar 2017 09:16:16 +0000 Subject: [PATCH 0694/1117] Password reset should count as a password change for User#must_change_passwd (#25253). MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Patch by Felix Schäfer. git-svn-id: http://svn.redmine.org/redmine/trunk@16374 e93f8b46-1217-0410-a6f0-8f06a7374b81 --- app/controllers/account_controller.rb | 19 ++++++++++++------- 1 file changed, 12 insertions(+), 7 deletions(-) diff --git a/app/controllers/account_controller.rb b/app/controllers/account_controller.rb index 54a29fbf4..f98603270 100644 --- a/app/controllers/account_controller.rb +++ b/app/controllers/account_controller.rb @@ -80,13 +80,18 @@ class AccountController < ApplicationController return end if request.post? - @user.password, @user.password_confirmation = params[:new_password], params[:new_password_confirmation] - if @user.save - @token.destroy - Mailer.password_updated(@user) - flash[:notice] = l(:notice_account_password_updated) - redirect_to signin_path - return + if @user.must_change_passwd? && @user.check_password?(params[:new_password]) + flash.now[:error] = l(:notice_new_password_must_be_different) + else + @user.password, @user.password_confirmation = params[:new_password], params[:new_password_confirmation] + @user.must_change_passwd = false + if @user.save + @token.destroy + Mailer.password_updated(@user) + flash[:notice] = l(:notice_account_password_updated) + redirect_to signin_path + return + end end end render :template => "account/password_recovery" From ec9f9c26a8079610b43c64f4ea8ba4027566b44e Mon Sep 17 00:00:00 2001 From: Jean-Philippe Lang Date: Sun, 5 Mar 2017 09:16:33 +0000 Subject: [PATCH 0695/1117] Adds tests for #25253. git-svn-id: http://svn.redmine.org/redmine/trunk@16375 e93f8b46-1217-0410-a6f0-8f06a7374b81 --- test/functional/account_controller_test.rb | 28 ++++++++++++++++++++++ 1 file changed, 28 insertions(+) diff --git a/test/functional/account_controller_test.rb b/test/functional/account_controller_test.rb index 7bb6ab576..01affec56 100644 --- a/test/functional/account_controller_test.rb +++ b/test/functional/account_controller_test.rb @@ -438,6 +438,34 @@ class AccountControllerTest < Redmine::ControllerTest assert_select 'input[type=hidden][name=token][value=?]', token.value end + def test_post_lost_password_with_token_should_not_accept_same_password_if_user_must_change_password + user = User.find(2) + user.password = "originalpassword" + user.must_change_passwd = true + user.save! + token = Token.create!(:action => 'recovery', :user => user) + + post :lost_password, :token => token.value, :new_password => 'originalpassword', :new_password_confirmation => 'originalpassword' + assert_response :success + assert_not_nil Token.find_by_id(token.id), "Token was deleted" + + assert_select '.flash', :text => /The new password must be different/ + assert_select 'input[type=hidden][name=token][value=?]', token.value + end + + def test_post_lost_password_with_token_should_reset_must_change_password + user = User.find(2) + user.password = "originalpassword" + user.must_change_passwd = true + user.save! + token = Token.create!(:action => 'recovery', :user => user) + + post :lost_password, :token => token.value, :new_password => 'newpassword', :new_password_confirmation => 'newpassword' + assert_redirected_to '/login' + + assert_equal false, user.reload.must_change_passwd + end + def test_post_lost_password_with_invalid_token_should_redirect post :lost_password, :token => "abcdef", :new_password => 'newpass', :new_password_confirmation => 'newpass' assert_redirected_to '/' From 8ae81b98d53221169cf550d19a30b5c3cf57f901 Mon Sep 17 00:00:00 2001 From: Jean-Philippe Lang Date: Sun, 5 Mar 2017 11:05:50 +0000 Subject: [PATCH 0696/1117] Fix loading of last visible journal (#1474, #6375). git-svn-id: http://svn.redmine.org/redmine/trunk@16376 e93f8b46-1217-0410-a6f0-8f06a7374b81 --- app/models/issue.rb | 22 +++++++++++++--------- test/functional/issues_controller_test.rb | 3 ++- 2 files changed, 15 insertions(+), 10 deletions(-) diff --git a/app/models/issue.rb b/app/models/issue.rb index 1fd84210d..d8dce76b4 100644 --- a/app/models/issue.rb +++ b/app/models/issue.rb @@ -1154,11 +1154,13 @@ class Issue < ActiveRecord::Base def self.load_visible_last_updated_by(issues, user=User.current) if issues.any? issue_ids = issues.map(&:id) - journals = Journal.joins(issue: :project).preload(:user). + journal_ids = Journal.joins(issue: :project). where(:journalized_type => 'Issue', :journalized_id => issue_ids). - where("#{Journal.table_name}.id = (SELECT MAX(j.id) FROM #{Journal.table_name} j" + - " WHERE j.journalized_type='Issue' AND j.journalized_id=#{Journal.table_name}.journalized_id" + - " AND #{Journal.visible_notes_condition(user, :skip_pre_condition => true)})").to_a + where(Journal.visible_notes_condition(user, :skip_pre_condition => true)). + group(:journalized_id). + maximum(:id). + values + journals = Journal.where(:id => journal_ids).to_a issues.each do |issue| journal = journals.detect {|j| j.journalized_id == issue.id} @@ -1171,12 +1173,14 @@ class Issue < ActiveRecord::Base def self.load_visible_last_notes(issues, user=User.current) if issues.any? issue_ids = issues.map(&:id) - journals = Journal.joins(issue: :project). + journal_ids = Journal.joins(issue: :project). where(:journalized_type => 'Issue', :journalized_id => issue_ids). - where("#{Journal.table_name}.id = (SELECT MAX(j.id) FROM #{Journal.table_name} j" + - " WHERE j.journalized_type='Issue' AND j.journalized_id=#{Journal.table_name}.journalized_id" + - " AND j.notes <> ''" + - " AND #{Journal.visible_notes_condition(user, :skip_pre_condition => true)})").to_a + where(Journal.visible_notes_condition(user, :skip_pre_condition => true)). + where.not(notes: ''). + group(:journalized_id). + maximum(:id). + values + journals = Journal.where(:id => journal_ids).to_a issues.each do |issue| journal = journals.detect {|j| j.journalized_id == issue.id} diff --git a/test/functional/issues_controller_test.rb b/test/functional/issues_controller_test.rb index 63ac34fdd..f120baba2 100644 --- a/test/functional/issues_controller_test.rb +++ b/test/functional/issues_controller_test.rb @@ -986,6 +986,7 @@ class IssuesControllerTest < Redmine::ControllerTest end def test_index_with_last_notes_column_should_display_private_notes_with_permission_only + journal = Journal.create!(:journalized => Issue.find(2), :notes => 'Public notes', :user_id => 1) journal = Journal.create!(:journalized => Issue.find(2), :notes => 'Privates notes', :private_notes => true, :user_id => 1) @request.session[:user_id] = 2 @@ -997,7 +998,7 @@ class IssuesControllerTest < Redmine::ControllerTest get :index, :set_filter => 1, :c => %w(subject last_notes) assert_response :success - assert_select 'td.last_notes[colspan="3"]', :text => 'A comment with inline image: and a reference to #1 and r2.' + assert_select 'td.last_notes[colspan="3"]', :text => 'Public notes' end def test_index_with_description_and_last_notes_columns_should_display_column_name From 29ad5b31e0721cb0194ef019289dba265e116f45 Mon Sep 17 00:00:00 2001 From: Jean-Philippe Lang Date: Sun, 5 Mar 2017 15:16:24 +0000 Subject: [PATCH 0697/1117] Preload journal's user (#6375). git-svn-id: http://svn.redmine.org/redmine/trunk@16377 e93f8b46-1217-0410-a6f0-8f06a7374b81 --- app/models/issue.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app/models/issue.rb b/app/models/issue.rb index d8dce76b4..d96f61e15 100644 --- a/app/models/issue.rb +++ b/app/models/issue.rb @@ -1160,7 +1160,7 @@ class Issue < ActiveRecord::Base group(:journalized_id). maximum(:id). values - journals = Journal.where(:id => journal_ids).to_a + journals = Journal.where(:id => journal_ids).preload(:user).to_a issues.each do |issue| journal = journals.detect {|j| j.journalized_id == issue.id} From 58ee62e23990799f1c6d733e1a9a7f046d004816 Mon Sep 17 00:00:00 2001 From: Jean-Philippe Lang Date: Tue, 7 Mar 2017 17:51:27 +0000 Subject: [PATCH 0698/1117] Issue description filter's 'none' operator does not match issues with blank descriptions (#25077). Patch by Marius BALTEANU. git-svn-id: http://svn.redmine.org/redmine/trunk@16378 e93f8b46-1217-0410-a6f0-8f06a7374b81 --- app/models/query.rb | 4 ++-- test/unit/query_test.rb | 12 ++++++++++++ 2 files changed, 14 insertions(+), 2 deletions(-) diff --git a/app/models/query.rb b/app/models/query.rb index 4f183329a..321821a93 100644 --- a/app/models/query.rb +++ b/app/models/query.rb @@ -984,7 +984,7 @@ class Query < ActiveRecord::Base " SELECT customized_id FROM #{CustomValue.table_name}" + " WHERE customized_type='#{target_class}' AND custom_field_id=#{chained_custom_field_id}" + " AND #{sql_for_field(field, operator, value, CustomValue.table_name, 'value')}))" - + end def sql_for_custom_field_attribute(field, operator, value, custom_field_id, attribute) @@ -1048,7 +1048,7 @@ class Query < ActiveRecord::Base end when "!*" sql = "#{db_table}.#{db_field} IS NULL" - sql << " OR #{db_table}.#{db_field} = ''" if is_custom_filter + sql << " OR #{db_table}.#{db_field} = ''" if (is_custom_filter || [:text, :string].include?(type_for(field))) when "*" sql = "#{db_table}.#{db_field} IS NOT NULL" sql << " AND #{db_table}.#{db_field} <> ''" if is_custom_filter diff --git a/test/unit/query_test.rb b/test/unit/query_test.rb index 5a3283900..7f2ef3d1c 100644 --- a/test/unit/query_test.rb +++ b/test/unit/query_test.rb @@ -217,6 +217,18 @@ class QueryTest < ActiveSupport::TestCase assert issues.all? {|i| i.custom_field_value(2).blank?} end + def test_operator_none_for_text + query = IssueQuery.new(:name => '_') + query.add_filter('status_id', '*', ['']) + query.add_filter('description', '!*', ['']) + assert query.has_filter?('description') + issues = find_issues_with_query(query) + + assert issues.any? + assert issues.all? {|i| i.description.blank?} + assert_equal [11, 12], issues.map(&:id).sort + end + def test_operator_all query = IssueQuery.new(:project => Project.find(1), :name => '_') query.add_filter('fixed_version_id', '*', ['']) From a63908c5eda2747eb40c6880d7b04ee8b706d9fe Mon Sep 17 00:00:00 2001 From: Jean-Philippe Lang Date: Tue, 7 Mar 2017 17:54:09 +0000 Subject: [PATCH 0699/1117] Emails with no text or html Content not handled properly (#25269, #25256). MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Patch by Felix Schäfer. git-svn-id: http://svn.redmine.org/redmine/trunk@16379 e93f8b46-1217-0410-a6f0-8f06a7374b81 --- app/models/mail_handler.rb | 10 ++++-- .../mail_handler/empty_text_and_html_part.eml | 35 +++++++++++++++++++ test/unit/mail_handler_test.rb | 5 +++ 3 files changed, 48 insertions(+), 2 deletions(-) create mode 100644 test/fixtures/mail_handler/empty_text_and_html_part.eml diff --git a/app/models/mail_handler.rb b/app/models/mail_handler.rb index 53f37a29e..dc033de75 100644 --- a/app/models/mail_handler.rb +++ b/app/models/mail_handler.rb @@ -445,13 +445,19 @@ class MailHandler < ActionMailer::Base def plain_text_body return @plain_text_body unless @plain_text_body.nil? + # check if we have any plain-text parts with content @plain_text_body = email_parts_to_text(email.all_parts.select {|p| p.mime_type == 'text/plain'}).presence + # if not, we try to parse the body from the HTML-parts @plain_text_body ||= email_parts_to_text(email.all_parts.select {|p| p.mime_type == 'text/html'}).presence - @plain_text_body ||= email_parts_to_text([email]) + # If there is still no body found, and there are no mime-parts defined, + # we use the whole raw mail body + @plain_text_body ||= email_parts_to_text([email]).presence if email.all_parts.empty? - @plain_text_body + # As a fallback we return an empty plain text body (e.g. if we have only + # empty text parts but a non-text attachment) + @plain_text_body ||= "" end def email_parts_to_text(parts) diff --git a/test/fixtures/mail_handler/empty_text_and_html_part.eml b/test/fixtures/mail_handler/empty_text_and_html_part.eml new file mode 100644 index 000000000..744a3f614 --- /dev/null +++ b/test/fixtures/mail_handler/empty_text_and_html_part.eml @@ -0,0 +1,35 @@ +From JSmith@somenet.foo Fri Mar 22 08:30:28 2013 +From: John Smith +Content-Type: multipart/mixed; boundary="Apple-Mail=_33C8180A-B097-4B87-A925-441300BDB9C9" +Message-Id: +Mime-Version: 1.0 (Mac OS X Mail 6.3 \(1503\)) +Subject: Test with an empty text part +Date: Fri, 22 Mar 2013 17:30:20 +0200 +To: redmine@somenet.foo +X-Mailer: Apple Mail (2.1503) + + + +--Apple-Mail=_33C8180A-B097-4B87-A925-441300BDB9C9 +Content-Transfer-Encoding: quoted-printable +Content-Type: text/plain; + charset=us-ascii + + +--Apple-Mail=_33C8180A-B097-4B87-A925-441300BDB9C9 +Content-Transfer-Encoding: quoted-printable +Content-Type: text/html; + charset=us-ascii + + + + + + + + + + + +--Apple-Mail=_33C8180A-B097-4B87-A925-441300BDB9C9-- diff --git a/test/unit/mail_handler_test.rb b/test/unit/mail_handler_test.rb index 73040f766..5f0b3e3e0 100644 --- a/test/unit/mail_handler_test.rb +++ b/test/unit/mail_handler_test.rb @@ -628,6 +628,11 @@ class MailHandlerTest < ActiveSupport::TestCase assert_equal 'The html part.', issue.description end + def test_empty_text_and_html_part_should_make_an_empty_description + issue = submit_email('empty_text_and_html_part.eml', :issue => {:project => 'ecookbook'}) + assert_equal '', issue.description + end + def test_attachment_text_part_should_be_added_as_issue_attachment issue = submit_email('multiple_text_parts.eml', :issue => {:project => 'ecookbook'}) assert_not_include 'Plain text attachment', issue.description From f338fe9075e16de82a3bcbc860675d3404e8a774 Mon Sep 17 00:00:00 2001 From: Jean-Philippe Lang Date: Wed, 8 Mar 2017 19:55:56 +0000 Subject: [PATCH 0700/1117] Allow to set multiple values in emails for list custom fields (#16549). git-svn-id: http://svn.redmine.org/redmine/trunk@16380 e93f8b46-1217-0410-a6f0-8f06a7374b81 --- lib/redmine/field_format.rb | 48 +++++++++++++++---- .../ticket_with_custom_fields.eml | 1 + .../field_format/enumeration_format_test.rb | 9 ++++ .../redmine/field_format/list_format_test.rb | 20 ++++++++ .../field_format/user_field_format_test.rb | 18 +++++++ test/unit/mail_handler_test.rb | 5 +- 6 files changed, 90 insertions(+), 11 deletions(-) diff --git a/lib/redmine/field_format.rb b/lib/redmine/field_format.rb index cfdab0e21..c1ce0055c 100644 --- a/lib/redmine/field_format.rb +++ b/lib/redmine/field_format.rb @@ -167,12 +167,13 @@ module Redmine def value_from_keyword(custom_field, keyword, object) possible_values_options = possible_values_options(custom_field, object) if possible_values_options.present? - keyword = keyword.to_s - if v = possible_values_options.detect {|text, id| keyword.casecmp(text) == 0} - if v.is_a?(Array) - v.last - else - v + parse_keyword(custom_field, keyword) do |k| + if v = possible_values_options.detect {|text, id| k.casecmp(text) == 0} + if v.is_a?(Array) + v.last + else + v + end end end else @@ -180,6 +181,31 @@ module Redmine end end + def parse_keyword(custom_field, keyword, &block) + separator = Regexp.escape "," + keyword = keyword.to_s + + if custom_field.multiple? + values = [] + while keyword.length > 0 + k = keyword.dup + loop do + if value = yield(k.strip) + values << value + break + elsif k.slice!(/#{separator}([^#{separator}]*)\Z/).nil? + break + end + end + keyword.slice!(/\A#{Regexp.escape k}#{separator}?/) + end + values + else + yield keyword.strip + end + end + protected :parse_keyword + # Returns the validation errors for custom_field # Should return an empty array if custom_field is valid def validate_custom_field(custom_field) @@ -766,8 +792,9 @@ module Redmine end def value_from_keyword(custom_field, keyword, object) - value = custom_field.enumerations.where("LOWER(name) LIKE LOWER(?)", keyword).first - value ? value.id : nil + parse_keyword(custom_field, keyword) do |k| + custom_field.enumerations.where("LOWER(name) LIKE LOWER(?)", k).first.try(:id) + end end end @@ -800,8 +827,9 @@ module Redmine def value_from_keyword(custom_field, keyword, object) users = possible_values_records(custom_field, object).to_a - user = Principal.detect_by_keyword(users, keyword) - user ? user.id : nil + parse_keyword(custom_field, keyword) do |k| + Principal.detect_by_keyword(users, k).try(:id) + end end def before_custom_field_save(custom_field) diff --git a/test/fixtures/mail_handler/ticket_with_custom_fields.eml b/test/fixtures/mail_handler/ticket_with_custom_fields.eml index 58dde7e0f..177ec5f2f 100644 --- a/test/fixtures/mail_handler/ticket_with_custom_fields.eml +++ b/test/fixtures/mail_handler/ticket_with_custom_fields.eml @@ -40,3 +40,4 @@ pulvinar dui, a gravida orci mi eget odio. Nunc a lacus. category: Stock management searchable field: Value for a custom field Database: postgresql +OS: Mac OS X ,windows diff --git a/test/unit/lib/redmine/field_format/enumeration_format_test.rb b/test/unit/lib/redmine/field_format/enumeration_format_test.rb index 467c1ed9d..457a48194 100644 --- a/test/unit/lib/redmine/field_format/enumeration_format_test.rb +++ b/test/unit/lib/redmine/field_format/enumeration_format_test.rb @@ -87,5 +87,14 @@ class Redmine::EnumerationFieldFormatTest < ActionView::TestCase def test_value_from_keyword_should_return_enumeration_id assert_equal @foo.id, @field.value_from_keyword('foo', nil) + assert_nil @field.value_from_keyword('baz', nil) + end + + def test_value_from_keyword_for_multiple_custom_field_should_return_enumeration_ids + @field.multiple = true + @field.save! + assert_equal [@foo.id, @bar.id], @field.value_from_keyword('foo, bar', nil) + assert_equal [@foo.id], @field.value_from_keyword('foo, baz', nil) + assert_equal [], @field.value_from_keyword('baz', nil) end end diff --git a/test/unit/lib/redmine/field_format/list_format_test.rb b/test/unit/lib/redmine/field_format/list_format_test.rb index af44cc59f..1677aea8e 100644 --- a/test/unit/lib/redmine/field_format/list_format_test.rb +++ b/test/unit/lib/redmine/field_format/list_format_test.rb @@ -165,4 +165,24 @@ class Redmine::ListFieldFormatTest < ActionView::TestCase end end end + + def test_value_from_keyword_should_return_value + field = GroupCustomField.create!(:name => 'List', :field_format => 'list', :possible_values => ['Foo', 'Bar', 'Baz,qux']) + + assert_equal 'Foo', field.value_from_keyword('foo', nil) + assert_equal 'Baz,qux', field.value_from_keyword('baz,qux', nil) + assert_nil field.value_from_keyword('invalid', nil) + end + + def test_value_from_keyword_for_multiple_custom_field_should_return_values + field = GroupCustomField.create!(:name => 'List', :field_format => 'list', :possible_values => ['Foo', 'Bar', 'Baz,qux'], :multiple => true) + + assert_equal ['Foo','Bar'], field.value_from_keyword('foo,bar', nil) + assert_equal ['Baz,qux'], field.value_from_keyword('baz,qux', nil) + assert_equal ['Baz,qux', 'Foo'], field.value_from_keyword('baz,qux,foo', nil) + assert_equal ['Foo'], field.value_from_keyword('foo,invalid', nil) + assert_equal ['Foo'], field.value_from_keyword(',foo,', nil) + assert_equal ['Foo'], field.value_from_keyword(',foo, ,,', nil) + assert_equal [], field.value_from_keyword('invalid', nil) + end end diff --git a/test/unit/lib/redmine/field_format/user_field_format_test.rb b/test/unit/lib/redmine/field_format/user_field_format_test.rb index 6aa751be8..ca35746dc 100644 --- a/test/unit/lib/redmine/field_format/user_field_format_test.rb +++ b/test/unit/lib/redmine/field_format/user_field_format_test.rb @@ -58,4 +58,22 @@ class Redmine::UserFieldFormatTest < ActionView::TestCase assert_equal ['Dave Lopper'], field.possible_values_options(project).map(&:first) end + + def test_value_from_keyword_should_return_user_id + field = IssueCustomField.new(:field_format => 'user') + project = Project.find(1) + + assert_equal 2, field.value_from_keyword('jsmith', project) + assert_equal 3, field.value_from_keyword('Dave Lopper', project) + assert_nil field.value_from_keyword('Unknown User', project) + end + + def test_value_from_keyword_for_multiple_custom_field_should_return_enumeration_ids + field = IssueCustomField.new(:field_format => 'user', :multiple => true) + project = Project.find(1) + + assert_equal [2, 3], field.value_from_keyword('jsmith, Dave Lopper', project) + assert_equal [2], field.value_from_keyword('jsmith', project) + assert_equal [], field.value_from_keyword('Unknown User', project) + end end diff --git a/test/unit/mail_handler_test.rb b/test/unit/mail_handler_test.rb index 5f0b3e3e0..e6c20481e 100644 --- a/test/unit/mail_handler_test.rb +++ b/test/unit/mail_handler_test.rb @@ -232,8 +232,10 @@ class MailHandlerTest < ActiveSupport::TestCase end def test_add_issue_with_custom_fields + mutiple = IssueCustomField.generate!(:field_format => 'list', :name => 'OS', :multiple => true, :possible_values => ['Linux', 'Windows', 'Mac OS X']) + issue = submit_email('ticket_with_custom_fields.eml', - :issue => {:project => 'onlinestore'}, :allow_override => ['database', 'Searchable_field'] + :issue => {:project => 'onlinestore'}, :allow_override => ['database', 'Searchable_field', 'OS'] ) assert issue.is_a?(Issue) assert !issue.new_record? @@ -241,6 +243,7 @@ class MailHandlerTest < ActiveSupport::TestCase assert_equal 'New ticket with custom field values', issue.subject assert_equal 'PostgreSQL', issue.custom_field_value(1) assert_equal 'Value for a custom field', issue.custom_field_value(2) + assert_equal ['Mac OS X', 'Windows'], issue.custom_field_value(mutiple.id).sort assert !issue.description.match(/^searchable field:/i) end From 109d6de0c53dcf2d77d9daea8ab50947507f6ca2 Mon Sep 17 00:00:00 2001 From: Jean-Philippe Lang Date: Wed, 8 Mar 2017 20:35:11 +0000 Subject: [PATCH 0701/1117] Adding a principal to 2 projects with member inheritance leads to an error (#25289). MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Patch by Felix Schäfer. git-svn-id: http://svn.redmine.org/redmine/trunk@16381 e93f8b46-1217-0410-a6f0-8f06a7374b81 --- app/models/member.rb | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/app/models/member.rb b/app/models/member.rb index 06b90bf55..b19f78c6b 100644 --- a/app/models/member.rb +++ b/app/models/member.rb @@ -184,9 +184,11 @@ class Member < ActiveRecord::Base project_ids = Array.wrap(attributes[:project_ids] || attributes[:project_id]) role_ids = attributes[:role_ids] project_ids.each do |project_id| - members << Member.new(:principal => principal, :role_ids => role_ids, :project_id => project_id) + member = Member.find_or_new(project_id, principal) + member.role_ids |= role_ids + member.save + members << member end - principal.members << members end members end From 9c6ba6653981b9ae921d1ca115946bc1fc39d3af Mon Sep 17 00:00:00 2001 From: Jean-Philippe Lang Date: Wed, 8 Mar 2017 20:36:22 +0000 Subject: [PATCH 0702/1117] Adds a test for #25289. git-svn-id: http://svn.redmine.org/redmine/trunk@16382 e93f8b46-1217-0410-a6f0-8f06a7374b81 --- app/models/member.rb | 3 ++- test/unit/member_test.rb | 11 +++++++++++ 2 files changed, 13 insertions(+), 1 deletion(-) diff --git a/app/models/member.rb b/app/models/member.rb index b19f78c6b..61cec0d79 100644 --- a/app/models/member.rb +++ b/app/models/member.rb @@ -172,7 +172,8 @@ class Member < ActiveRecord::Base end end - # Creates memberships for principal with the attributes + # Creates memberships for principal with the attributes, or add the roles + # if the membership already exists. # * project_ids : one or more project ids # * role_ids : ids of the roles to give to each membership # diff --git a/test/unit/member_test.rb b/test/unit/member_test.rb index ce9898f4b..344aec7b9 100644 --- a/test/unit/member_test.rb +++ b/test/unit/member_test.rb @@ -196,4 +196,15 @@ class MemberTest < ActiveSupport::TestCase member.roles << Role.generate!(:all_roles_managed => true) assert_equal [], member.managed_roles end + + def test_create_principal_memberships_should_not_error_with_2_projects_and_inheritance + parent = Project.generate! + child = Project.generate!(:parent_id => parent.id, :inherit_members => true) + user = User.generate! + + assert_difference 'Member.count', 2 do + members = Member.create_principal_memberships(user, :project_ids => [parent.id, child.id], :role_ids => [1]) + assert members.none?(&:new_record?), "Unsaved members were returned: #{members.select(&:new_record?).map{|m| m.errors.full_messages}*","}" + end + end end From ff6d8c6f5c2eac2cddec200f3c3b5d2c1366d349 Mon Sep 17 00:00:00 2001 From: Jean-Philippe Lang Date: Wed, 8 Mar 2017 21:22:08 +0000 Subject: [PATCH 0703/1117] Adding a subtask should default to a tracker without disabled parent field (#16260). git-svn-id: http://svn.redmine.org/redmine/trunk@16383 e93f8b46-1217-0410-a6f0-8f06a7374b81 --- app/models/issue.rb | 11 ++++++++-- test/functional/issues_controller_test.rb | 26 +++++++++++++++++++++++ 2 files changed, 35 insertions(+), 2 deletions(-) diff --git a/app/models/issue.rb b/app/models/issue.rb index d96f61e15..a8b68ccbb 100644 --- a/app/models/issue.rb +++ b/app/models/issue.rb @@ -530,10 +530,17 @@ class Issue < ActiveRecord::Base self.tracker_id = t end end - if project + if project && tracker.nil? # Set a default tracker to accept custom field values # even if tracker is not specified - self.tracker ||= allowed_target_trackers(user).first + allowed_trackers = allowed_target_trackers(user) + + if attrs['parent_issue_id'].present? + # If parent_issue_id is present, the first tracker for which this field + # is not disabled is chosen as default + self.tracker = allowed_trackers.detect {|t| t.core_fields.include?('parent_issue_id')} + end + self.tracker ||= allowed_trackers.first end statuses_allowed = new_statuses_allowed_to(user) diff --git a/test/functional/issues_controller_test.rb b/test/functional/issues_controller_test.rb index f120baba2..24ec49a70 100644 --- a/test/functional/issues_controller_test.rb +++ b/test/functional/issues_controller_test.rb @@ -1920,6 +1920,32 @@ class IssuesControllerTest < Redmine::ControllerTest end end + def test_new_should_default_to_first_tracker + @request.session[:user_id] = 2 + + get :new, :project_id => 1 + assert_response :success + assert_select 'select[name=?]', 'issue[tracker_id]' do + assert_select 'option', 3 + assert_select 'option[value="1"][selected=selected]' + end + end + + def test_new_with_parent_issue_id_should_default_to_first_tracker_without_disabled_parent_field + tracker = Tracker.find(1) + tracker.core_fields -= ['parent_issue_id'] + tracker.save! + @request.session[:user_id] = 2 + + get :new, :project_id => 1, :issue => {:parent_issue_id => 1} + assert_response :success + assert_select 'select[name=?]', 'issue[tracker_id]' do + assert_select 'option', 2 + assert_select 'option[value="2"][selected=selected]' + assert_select 'option[value="1"]', 0 + end + end + def test_new_without_allowed_trackers_should_respond_with_403 role = Role.find(1) role.set_permission_trackers 'add_issues', [] From d171aa83988b08e1aa3a0a23345635af0db83f1e Mon Sep 17 00:00:00 2001 From: Jean-Philippe Lang Date: Wed, 8 Mar 2017 21:37:13 +0000 Subject: [PATCH 0704/1117] Test broken by r16381 (#25289). git-svn-id: http://svn.redmine.org/redmine/trunk@16384 e93f8b46-1217-0410-a6f0-8f06a7374b81 --- app/models/member.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app/models/member.rb b/app/models/member.rb index 61cec0d79..d709f5ff7 100644 --- a/app/models/member.rb +++ b/app/models/member.rb @@ -183,7 +183,7 @@ class Member < ActiveRecord::Base members = [] if attributes project_ids = Array.wrap(attributes[:project_ids] || attributes[:project_id]) - role_ids = attributes[:role_ids] + role_ids = Array.wrap(attributes[:role_ids]) project_ids.each do |project_id| member = Member.find_or_new(project_id, principal) member.role_ids |= role_ids From eb0a93d353bd04a82303c8faaefe38493fcd9f9d Mon Sep 17 00:00:00 2001 From: Jean-Philippe Lang Date: Thu, 9 Mar 2017 19:08:02 +0000 Subject: [PATCH 0705/1117] Removes MyControllerTest#page_layout (#25297). git-svn-id: http://svn.redmine.org/redmine/trunk@16385 e93f8b46-1217-0410-a6f0-8f06a7374b81 --- app/controllers/my_controller.rb | 17 ++++-------- app/helpers/my_helper.rb | 9 +++---- app/views/my/page.html.erb | 37 ++++++++++++++++++++++++--- app/views/my/page_layout.html.erb | 29 --------------------- config/routes.rb | 1 - public/javascripts/application.js | 15 ----------- public/stylesheets/application.css | 21 ++++++--------- test/functional/my_controller_test.rb | 11 +++----- test/integration/routing/my_test.rb | 1 - 9 files changed, 53 insertions(+), 88 deletions(-) delete mode 100644 app/views/my/page_layout.html.erb diff --git a/app/controllers/my_controller.rb b/app/controllers/my_controller.rb index be1c3c36d..7d8770776 100644 --- a/app/controllers/my_controller.rb +++ b/app/controllers/my_controller.rb @@ -142,12 +142,6 @@ class MyController < ApplicationController @updated_blocks = block_settings.keys end - # User's page layout configuration - def page_layout - @user = User.current - @blocks = @user.pref.my_page_layout - end - # Add a block to user's page # The block is added on top of the page # params[:block] : id of the block to add @@ -155,7 +149,7 @@ class MyController < ApplicationController @user = User.current @user.pref.add_block params[:block] @user.pref.save - redirect_to my_page_layout_path + redirect_to my_page_path end # Remove a block to user's page @@ -164,18 +158,17 @@ class MyController < ApplicationController @user = User.current @user.pref.remove_block params[:block] @user.pref.save - redirect_to my_page_layout_path + redirect_to my_page_path end # Change blocks order on user's page # params[:group] : group to order (top, left or right) # params[:blocks] : array of block ids of the group def order_blocks - group = params[:group] @user = User.current - if group.is_a?(String) - group_items = (params["blocks"] || []).collect(&:underscore) - group_items.each {|s| s.sub!(/^block_/, '')} + group = params[:group].to_s + if %w(top left right).include? group + group_items = (params[:blocks] || []).collect(&:underscore) # remove group blocks if they are presents in other groups group_items.each {|s| @user.pref.remove_block(s)} @user.pref.my_page_layout[group] = group_items diff --git a/app/helpers/my_helper.rb b/app/helpers/my_helper.rb index 0a9324515..d8930c077 100644 --- a/app/helpers/my_helper.rb +++ b/app/helpers/my_helper.rb @@ -26,10 +26,9 @@ module MyHelper blocks.each do |block| content = render_block_content(block, user) if content.present? - if options[:edit] - close = link_to(l(:button_delete), {:action => "remove_block", :block => block}, :method => 'post', :class => "icon-only icon-close") - content = close + content_tag('div', content, :class => 'handle') - end + handle = content_tag('span', '', :class => 'hanlde sort-handle') + close = link_to(l(:button_delete), {:action => "remove_block", :block => block}, :method => 'post', :class => "icon-only icon-close") + content = content_tag('div', handle + close, :class => 'contextual') + content s << content_tag('div', content, :class => "mypage-box", :id => "block-#{block}") end @@ -60,7 +59,7 @@ module MyHelper Redmine::MyPage.block_options.each do |label, block| options << content_tag('option', label, :value => block, :disabled => disabled.include?(block)) end - select_tag('block', options, :id => "block-select") + select_tag('block', options, :id => "block-select", :onchange => "this.form.submit();") end def calendar_items(startdt, enddt) diff --git a/app/views/my/page.html.erb b/app/views/my/page.html.erb index d5b8e3e30..2eb29ad0c 100644 --- a/app/views/my/page.html.erb +++ b/app/views/my/page.html.erb @@ -1,21 +1,50 @@
          - <%= link_to l(:label_personalize_page), {:action => 'page_layout'}, :class => 'icon icon-edit' %> + <%= form_tag({:action => "add_block"}, :id => "block-form") do %> + <%= label_tag('block-select', l(:button_add)) %>: + <%= block_select_tag(@user) %> + <% end %>

          <%=l(:label_my_page)%>

          -
          +
          +
          <%= render_blocks(@blocks['top'], @user) %>
          -
          +
          <%= render_blocks(@blocks['left'], @user) %>
          -
          +
          <%= render_blocks(@blocks['right'], @user) %>
          +
          <%= context_menu %> +<%= javascript_tag do %> +$(document).ready(function(){ + $('#list-top, #list-left, #list-right').sortable({ + connectWith: '.block-receiver', + tolerance: 'pointer', + start: function(event, ui){$(this).parent().addClass('dragging');}, + stop: function(event, ui){$(this).parent().removeClass('dragging');}, + update: function(event, ui){ + // trigger the call on the list that receives the block only + if ($(this).find(ui.item).length > 0) { + $.ajax({ + url: "<%= escape_javascript url_for(:action => "order_blocks") %>", + type: 'post', + data: { + 'group': $(this).attr('id').replace(/^list-/, ''), + 'blocks': $.map($(this).children(), function(el){return $(el).attr('id').replace(/^block-/, '');}) + } + }); + } + } + }); +}); +<% end %> + <% html_title(l(:label_my_page)) -%> diff --git a/app/views/my/page_layout.html.erb b/app/views/my/page_layout.html.erb deleted file mode 100644 index 09475c09b..000000000 --- a/app/views/my/page_layout.html.erb +++ /dev/null @@ -1,29 +0,0 @@ -
          - -<%= form_tag({:action => "add_block"}, :id => "block-form") do %> - <%= label_tag('block-select', l(:label_my_page_block)) %>: - <%= block_select_tag(@user) %> - <%= link_to l(:button_add), '#', :onclick => '$("#block-form").submit(); return false;', :class => 'icon icon-add' %> -<% end %> -<%= link_to l(:button_back), {:action => 'page'}, :class => 'icon icon-cancel' %> -
          - -

          <%=l(:label_my_page)%>

          - -
          - <%= render_blocks(@blocks['top'], @user, :edit => true) %> -
          - -
          - <%= render_blocks(@blocks['left'], @user, :edit => true) %> -
          - -
          - <%= render_blocks(@blocks['right'], @user, :edit => true) %> -
          - -<%= javascript_tag "initMyPageSortable('top', '#{ escape_javascript url_for(:action => "order_blocks", :group => "top") }');" %> -<%= javascript_tag "initMyPageSortable('left', '#{ escape_javascript url_for(:action => "order_blocks", :group => "left") }');" %> -<%= javascript_tag "initMyPageSortable('right', '#{ escape_javascript url_for(:action => "order_blocks", :group => "right") }');" %> - -<% html_title(l(:label_my_page)) -%> diff --git a/config/routes.rb b/config/routes.rb index c2a400349..ab1e1bcab 100644 --- a/config/routes.rb +++ b/config/routes.rb @@ -80,7 +80,6 @@ Rails.application.routes.draw do post 'my/api_key', :to => 'my#reset_api_key' post 'my/rss_key', :to => 'my#reset_rss_key', :as => 'my_rss_key' match 'my/password', :controller => 'my', :action => 'password', :via => [:get, :post] - match 'my/page_layout', :controller => 'my', :action => 'page_layout', :via => :get match 'my/add_block', :controller => 'my', :action => 'add_block', :via => :post match 'my/remove_block', :controller => 'my', :action => 'remove_block', :via => :post match 'my/order_blocks', :controller => 'my', :action => 'order_blocks', :via => :post diff --git a/public/javascripts/application.js b/public/javascripts/application.js index c99e35ab5..5fdf5ecb4 100644 --- a/public/javascripts/application.js +++ b/public/javascripts/application.js @@ -710,21 +710,6 @@ function beforeShowDatePicker(input, inst) { } }( jQuery )); -function initMyPageSortable(list, url) { - $('#list-'+list).sortable({ - connectWith: '.block-receiver', - tolerance: 'pointer', - update: function(){ - $.ajax({ - url: url, - type: 'post', - data: {'blocks': $.map($('#list-'+list).children(), function(el){return $(el).attr('id');})} - }); - } - }); - $("#list-top, #list-left, #list-right").disableSelection(); -} - var warnLeavingUnsavedMessage; function warnLeavingUnsaved(message) { warnLeavingUnsavedMessage = message; diff --git a/public/stylesheets/application.css b/public/stylesheets/application.css index 7754fc565..b60f6a51b 100644 --- a/public/stylesheets/application.css +++ b/public/stylesheets/application.css @@ -1115,28 +1115,23 @@ div.wiki img {vertical-align:middle; max-width:100%;} /***** My page layout *****/ .block-receiver { - border:1px dashed #c0c0c0; - margin-bottom: 20px; - padding: 15px 0 15px 0; + border:1px dashed #fff; + padding: 15px 0 0 0; +} +.dragging .block-receiver { + border:1px dashed #777; + margin-bottom: 20px; } - .mypage-box { + border:1px solid #ddd; + padding:8px; margin:0 0 20px 0; color:#505050; line-height:1.5em; } -.mypage-box .icon-close { - float:right; -} .handle {cursor: move;} -body.action-page_layout .block-receiver .contextual { - display: none; -} -body.action-page_layout .block-receiver .hascontextmenu { - cursor: move; -} /***** Gantt chart *****/ .gantt_hdr { position:absolute; diff --git a/test/functional/my_controller_test.rb b/test/functional/my_controller_test.rb index 043ab8cdf..e40dd91e3 100644 --- a/test/functional/my_controller_test.rb +++ b/test/functional/my_controller_test.rb @@ -233,25 +233,20 @@ class MyControllerTest < Redmine::ControllerTest assert_equal({:days => "14"}, user.reload.pref.my_page_settings('timelog')) end - def test_page_layout - get :page_layout - assert_response :success - end - def test_add_block post :add_block, :block => 'issuesreportedbyme' - assert_redirected_to '/my/page_layout' + assert_redirected_to '/my/page' assert User.find(2).pref[:my_page_layout]['top'].include?('issuesreportedbyme') end def test_add_invalid_block_should_redirect post :add_block, :block => 'invalid' - assert_redirected_to '/my/page_layout' + assert_redirected_to '/my/page' end def test_remove_block post :remove_block, :block => 'issuesassignedtome' - assert_redirected_to '/my/page_layout' + assert_redirected_to '/my/page' assert !User.find(2).pref[:my_page_layout].values.flatten.include?('issuesassignedtome') end diff --git a/test/integration/routing/my_test.rb b/test/integration/routing/my_test.rb index c2291b01f..39b3b4fa1 100644 --- a/test/integration/routing/my_test.rb +++ b/test/integration/routing/my_test.rb @@ -36,7 +36,6 @@ class RoutingMyTest < Redmine::RoutingTest should_route 'GET /my/password' => 'my#password' should_route 'POST /my/password' => 'my#password' - should_route 'GET /my/page_layout' => 'my#page_layout' should_route 'POST /my/add_block' => 'my#add_block' should_route 'POST /my/remove_block' => 'my#remove_block' should_route 'POST /my/order_blocks' => 'my#order_blocks' From 364d1aa72746424b87e1a17823612096db7c3ae3 Mon Sep 17 00:00:00 2001 From: Jean-Philippe Lang Date: Thu, 9 Mar 2017 19:21:18 +0000 Subject: [PATCH 0706/1117] Use local variables in issues/list partial. git-svn-id: http://svn.redmine.org/redmine/trunk@16386 e93f8b46-1217-0410-a6f0-8f06a7374b81 --- app/views/issues/_list.html.erb | 6 +++--- app/views/issues/index.html.erb | 2 +- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/app/views/issues/_list.html.erb b/app/views/issues/_list.html.erb index 3ae5e7023..ed97d046f 100644 --- a/app/views/issues/_list.html.erb +++ b/app/views/issues/_list.html.erb @@ -14,7 +14,7 @@
          - <% grouped_issue_list(issues, @query, @issue_count_by_group) do |issue, level, group_name, group_count, group_totals| -%> + <% grouped_issue_list(issues, query, issue_count_by_group) do |issue, level, group_name, group_count, group_totals| -%> <% if group_name %> <% reset_cycle %> @@ -30,10 +30,10 @@ <%= raw query.inline_columns.map {|column| ""}.join %> - <% @query.block_columns.each do |column| + <% query.block_columns.each do |column| if (text = column_content(column, issue)) && text.present? -%> - - <% grouped_issue_list(issues, query, issue_count_by_group) do |issue, level, group_name, group_count, group_totals| -%> + <% grouped_issue_list(issues, query) do |issue, level, group_name, group_count, group_totals| -%> <% if group_name %> <% reset_cycle %> diff --git a/app/views/issues/index.html.erb b/app/views/issues/index.html.erb index 7828075cf..80210814e 100644 --- a/app/views/issues/index.html.erb +++ b/app/views/issues/index.html.erb @@ -16,7 +16,7 @@

          <%= l(:label_no_data) %>

          <% else %> <%= render_query_totals(@query) %> -<%= render :partial => 'issues/list', :locals => {:issues => @issues, :query => @query, :issue_count_by_group => @issue_count_by_group} %> +<%= render :partial => 'issues/list', :locals => {:issues => @issues, :query => @query} %> <%= pagination_links_full @issue_pages, @issue_count %> <% end %> diff --git a/app/views/timelog/_list.html.erb b/app/views/timelog/_list.html.erb index b39eb5cc3..d4836056a 100644 --- a/app/views/timelog/_list.html.erb +++ b/app/views/timelog/_list.html.erb @@ -15,7 +15,7 @@ -<% grouped_query_results(entries, @query, @entry_count_by_group) do |entry, group_name, group_count, group_totals| -%> +<% grouped_query_results(entries, @query) do |entry, group_name, group_count, group_totals| -%> <% if group_name %> <% reset_cycle %> diff --git a/lib/redmine/export/pdf/issues_pdf_helper.rb b/lib/redmine/export/pdf/issues_pdf_helper.rb index cf8a79d3c..c72ff6657 100644 --- a/lib/redmine/export/pdf/issues_pdf_helper.rb +++ b/lib/redmine/export/pdf/issues_pdf_helper.rb @@ -299,12 +299,14 @@ module Redmine totals_by_group = query.totals_by_group render_table_header(pdf, query, col_width, row_height, table_width) previous_group = false + result_count_by_group = query.result_count_by_group + issue_list(issues) do |issue, level| if query.grouped? && (group = query.group_by_column.value(issue)) != previous_group pdf.SetFontStyle('B',10) group_label = group.blank? ? 'None' : group.to_s.dup - group_label << " (#{query.issue_count_by_group[group]})" + group_label << " (#{result_count_by_group[group]})" pdf.bookmark group_label, 0, -1 pdf.RDMCell(table_width, row_height * 2, group_label, 'LR', 1, 'L') pdf.SetFontStyle('',8) diff --git a/test/unit/query_test.rb b/test/unit/query_test.rb index 7f2ef3d1c..d691f66be 100644 --- a/test/unit/query_test.rb +++ b/test/unit/query_test.rb @@ -1653,7 +1653,7 @@ class QueryTest < ActiveSupport::TestCase def test_issue_count_by_association_group q = IssueQuery.new(:name => '_', :group_by => 'assigned_to') - count_by_group = q.issue_count_by_group + count_by_group = q.result_count_by_group assert_kind_of Hash, count_by_group assert_equal %w(NilClass User), count_by_group.keys.collect {|k| k.class.name}.uniq.sort assert_equal %W(#{INTEGER_KLASS}), count_by_group.values.collect {|k| k.class.name}.uniq @@ -1662,7 +1662,7 @@ class QueryTest < ActiveSupport::TestCase def test_issue_count_by_list_custom_field_group q = IssueQuery.new(:name => '_', :group_by => 'cf_1') - count_by_group = q.issue_count_by_group + count_by_group = q.result_count_by_group assert_kind_of Hash, count_by_group assert_equal %w(NilClass String), count_by_group.keys.collect {|k| k.class.name}.uniq.sort assert_equal %W(#{INTEGER_KLASS}), count_by_group.values.collect {|k| k.class.name}.uniq @@ -1671,7 +1671,7 @@ class QueryTest < ActiveSupport::TestCase def test_issue_count_by_date_custom_field_group q = IssueQuery.new(:name => '_', :group_by => 'cf_8') - count_by_group = q.issue_count_by_group + count_by_group = q.result_count_by_group assert_kind_of Hash, count_by_group assert_equal %w(Date NilClass), count_by_group.keys.collect {|k| k.class.name}.uniq.sort assert_equal %W(#{INTEGER_KLASS}), count_by_group.values.collect {|k| k.class.name}.uniq @@ -1681,7 +1681,7 @@ class QueryTest < ActiveSupport::TestCase Issue.update_all("assigned_to_id = NULL") q = IssueQuery.new(:name => '_', :group_by => 'assigned_to') - count_by_group = q.issue_count_by_group + count_by_group = q.result_count_by_group assert_kind_of Hash, count_by_group assert_equal 1, count_by_group.keys.size assert_nil count_by_group.keys.first From 373b3c283f48913db38f54166e1befd98e3af2de Mon Sep 17 00:00:00 2001 From: Jean-Philippe Lang Date: Thu, 9 Mar 2017 20:04:30 +0000 Subject: [PATCH 0708/1117] Removes unused i18n strings (#25297). git-svn-id: http://svn.redmine.org/redmine/trunk@16388 e93f8b46-1217-0410-a6f0-8f06a7374b81 --- config/locales/ar.yml | 2 -- config/locales/az.yml | 2 -- config/locales/bg.yml | 2 -- config/locales/bs.yml | 2 -- config/locales/ca.yml | 2 -- config/locales/cs.yml | 2 -- config/locales/da.yml | 2 -- config/locales/de.yml | 2 -- config/locales/el.yml | 2 -- config/locales/en-GB.yml | 2 -- config/locales/en.yml | 2 -- config/locales/es-PA.yml | 2 -- config/locales/es.yml | 2 -- config/locales/et.yml | 2 -- config/locales/eu.yml | 2 -- config/locales/fa.yml | 2 -- config/locales/fi.yml | 2 -- config/locales/fr.yml | 2 -- config/locales/gl.yml | 2 -- config/locales/he.yml | 2 -- config/locales/hr.yml | 2 -- config/locales/hu.yml | 2 -- config/locales/id.yml | 2 -- config/locales/it.yml | 2 -- config/locales/ja.yml | 2 -- config/locales/ko.yml | 2 -- config/locales/lt.yml | 2 -- config/locales/lv.yml | 2 -- config/locales/mk.yml | 2 -- config/locales/mn.yml | 2 -- config/locales/nl.yml | 2 -- config/locales/no.yml | 2 -- config/locales/pl.yml | 2 -- config/locales/pt-BR.yml | 2 -- config/locales/pt.yml | 2 -- config/locales/ro.yml | 2 -- config/locales/ru.yml | 2 -- config/locales/sk.yml | 2 -- config/locales/sl.yml | 2 -- config/locales/sq.yml | 2 -- config/locales/sr-YU.yml | 2 -- config/locales/sr.yml | 2 -- config/locales/sv.yml | 2 -- config/locales/th.yml | 2 -- config/locales/tr.yml | 2 -- config/locales/uk.yml | 2 -- config/locales/vi.yml | 2 -- config/locales/zh-TW.yml | 2 -- config/locales/zh.yml | 2 -- 49 files changed, 98 deletions(-) diff --git a/config/locales/ar.yml b/config/locales/ar.yml index 60015da94..ce7362e00 100644 --- a/config/locales/ar.yml +++ b/config/locales/ar.yml @@ -512,7 +512,6 @@ ar: label_my_page: الصفحة الخاصة بي label_my_account: حسابي label_my_projects: مشاريعي الخاصة - label_my_page_block: حجب صفحتي الخاصة label_administration: إدارة النظام label_login: تسجيل الدخول label_logout: تسجيل الخروج @@ -601,7 +600,6 @@ ar: label_internal: الداخلية label_last_changes: "آخر التغييرات %{count}" label_change_view_all: عرض كافة التغييرات - label_personalize_page: تخصيص هذه الصفحة label_comment: تعليق label_comment_plural: تعليقات label_x_comments: diff --git a/config/locales/az.yml b/config/locales/az.yml index 0e33500f5..71382570a 100644 --- a/config/locales/az.yml +++ b/config/locales/az.yml @@ -567,7 +567,6 @@ az: label_more_than_ago: gündən əvvəl label_my_account: Mənim hesabım label_my_page: Mənim səhifəm - label_my_page_block: Mənim səhifəmin bloku label_my_projects: Mənim layihələrim label_new: Yeni label_new_statuses_allowed: İcazə verilən yeni statuslar @@ -595,7 +594,6 @@ az: label_password_lost: Parolun bərpası label_permissions_report: Giriş hüquqları üzrə hesabat label_permissions: Giriş hüquqları - label_personalize_page: bu səhifəni fərdiləşdirmək label_please_login: Xahiş edirik, daxil olun. label_plugins: Modullar label_precedes: növbəti diff --git a/config/locales/bg.yml b/config/locales/bg.yml index fe82ea124..6a5fca6a6 100644 --- a/config/locales/bg.yml +++ b/config/locales/bg.yml @@ -603,7 +603,6 @@ bg: label_my_page: Лична страница label_my_account: Профил label_my_projects: Проекти, в които участвам - label_my_page_block: Блокове в личната страница label_administration: Администрация label_login: Вход label_logout: Изход @@ -701,7 +700,6 @@ bg: label_internal: Вътрешен label_last_changes: "последни %{count} промени" label_change_view_all: Виж всички промени - label_personalize_page: Персонализиране label_comment: Коментар label_comment_plural: Коментари label_x_comments: diff --git a/config/locales/bs.yml b/config/locales/bs.yml index 8f2bdd78d..e25e9b331 100644 --- a/config/locales/bs.yml +++ b/config/locales/bs.yml @@ -532,7 +532,6 @@ bs: label_internal: Interno label_last_changes: "posljednjih %{count} promjena" label_change_view_all: Vidi sve promjene - label_personalize_page: Personaliziraj ovu stranicu label_comment: Komentar label_comment_plural: Komentari label_x_comments: @@ -909,7 +908,6 @@ bs: error_can_not_remove_role: This role is in use and can not be deleted. error_can_not_delete_tracker: This tracker contains issues and cannot be deleted. field_principal: Principal - label_my_page_block: My page block notice_failed_to_save_members: "Failed to save member(s): %{errors}." text_zoom_out: Zoom out text_zoom_in: Zoom in diff --git a/config/locales/ca.yml b/config/locales/ca.yml index bd011294c..79bc68f7f 100644 --- a/config/locales/ca.yml +++ b/config/locales/ca.yml @@ -483,7 +483,6 @@ ca: label_my_page: "La meva pàgina" label_my_account: "El meu compte" label_my_projects: "Els meus projectes" - label_my_page_block: "Els meus blocs de pàgina" label_administration: "Administració" label_login: "Iniciar sessió" label_logout: "Tancar sessió" @@ -571,7 +570,6 @@ ca: label_internal: "Intern" label_last_changes: "últims %{count} canvis" label_change_view_all: "Visualitza tots els canvis" - label_personalize_page: "Personalitza aquesta pàgina" label_comment: "Comentari" label_comment_plural: "Comentaris" label_x_comments: diff --git a/config/locales/cs.yml b/config/locales/cs.yml index 1cb61483d..f7908e025 100644 --- a/config/locales/cs.yml +++ b/config/locales/cs.yml @@ -495,7 +495,6 @@ cs: label_my_page: Moje stránka label_my_account: Můj účet label_my_projects: Moje projekty - label_my_page_block: Bloky na mé stránce label_administration: Administrace label_login: Přihlášení label_logout: Odhlášení @@ -583,7 +582,6 @@ cs: label_internal: Interní label_last_changes: "posledních %{count} změn" label_change_view_all: Zobrazit všechny změny - label_personalize_page: Přizpůsobit tuto stránku label_comment: Komentář label_comment_plural: Komentáře label_x_comments: diff --git a/config/locales/da.yml b/config/locales/da.yml index 9aa5bd096..987b8e509 100644 --- a/config/locales/da.yml +++ b/config/locales/da.yml @@ -457,7 +457,6 @@ da: label_internal: Intern label_last_changes: "sidste %{count} ændringer" label_change_view_all: Vis alle ændringer - label_personalize_page: Tilret denne side label_comment: Kommentar label_comment_plural: Kommentarer label_x_comments: @@ -912,7 +911,6 @@ da: error_can_not_remove_role: Denne rolle er i brug og kan ikke slettes. error_can_not_delete_tracker: Denne type indeholder sager og kan ikke slettes. field_principal: Principal - label_my_page_block: blok notice_failed_to_save_members: "Fejl under lagring af medlem(mer): %{errors}." text_zoom_out: Zoom ud text_zoom_in: Zoom ind diff --git a/config/locales/de.yml b/config/locales/de.yml index 62a451411..8f4e14de0 100644 --- a/config/locales/de.yml +++ b/config/locales/de.yml @@ -638,7 +638,6 @@ de: label_more_than_ago: vor mehr als label_my_account: Mein Konto label_my_page: Meine Seite - label_my_page_block: Verfügbare Widgets label_my_projects: Meine Projekte label_my_queries: Meine eigenen Abfragen label_new: Neu @@ -671,7 +670,6 @@ de: label_password_required: Bitte geben Sie Ihr Passwort ein label_permissions: Berechtigungen label_permissions_report: Berechtigungsübersicht - label_personalize_page: Diese Seite anpassen label_please_login: Anmelden label_plugins: Plugins label_precedes: Vorgänger von diff --git a/config/locales/el.yml b/config/locales/el.yml index b7e9a87cc..b888d0db2 100644 --- a/config/locales/el.yml +++ b/config/locales/el.yml @@ -530,7 +530,6 @@ el: label_internal: Εσωτερικό label_last_changes: "Τελευταίες %{count} αλλαγές" label_change_view_all: Προβολή όλων των αλλαγών - label_personalize_page: Προσαρμογή σελίδας label_comment: Σχόλιο label_comment_plural: Σχόλια label_x_comments: @@ -896,7 +895,6 @@ el: error_can_not_remove_role: This role is in use and can not be deleted. error_can_not_delete_tracker: This tracker contains issues and cannot be deleted. field_principal: Principal - label_my_page_block: My page block notice_failed_to_save_members: "Failed to save member(s): %{errors}." text_zoom_out: Zoom out text_zoom_in: Zoom in diff --git a/config/locales/en-GB.yml b/config/locales/en-GB.yml index 6330d2803..b626aaf9d 100644 --- a/config/locales/en-GB.yml +++ b/config/locales/en-GB.yml @@ -500,7 +500,6 @@ en-GB: label_my_page: My page label_my_account: My account label_my_projects: My projects - label_my_page_block: My page block label_administration: Administration label_login: Sign in label_logout: Sign out @@ -590,7 +589,6 @@ en-GB: label_internal: Internal label_last_changes: "last %{count} changes" label_change_view_all: View all changes - label_personalize_page: Personalise this page label_comment: Comment label_comment_plural: Comments label_x_comments: diff --git a/config/locales/en.yml b/config/locales/en.yml index 2d9260fb5..531081f78 100644 --- a/config/locales/en.yml +++ b/config/locales/en.yml @@ -601,7 +601,6 @@ en: label_my_page: My page label_my_account: My account label_my_projects: My projects - label_my_page_block: My page block label_administration: Administration label_login: Sign in label_logout: Sign out @@ -699,7 +698,6 @@ en: label_internal: Internal label_last_changes: "last %{count} changes" label_change_view_all: View all changes - label_personalize_page: Personalize this page label_comment: Comment label_comment_plural: Comments label_x_comments: diff --git a/config/locales/es-PA.yml b/config/locales/es-PA.yml index 12c4e1bfd..29eaf88fe 100644 --- a/config/locales/es-PA.yml +++ b/config/locales/es-PA.yml @@ -549,7 +549,6 @@ es-PA: label_password_lost: ¿Olvidaste la contraseña? label_permissions: Permisos label_permissions_report: Informe de permisos - label_personalize_page: Personalizar esta página label_please_login: Por favor, inicie sesión label_plugins: Extensiones label_precedes: anterior a @@ -937,7 +936,6 @@ es-PA: error_can_not_remove_role: Este rol está en uso y no puede ser eliminado. error_can_not_delete_tracker: Este tipo contiene incidencias y no puede ser eliminado. field_principal: Principal - label_my_page_block: Bloque Mi página notice_failed_to_save_members: "Fallo al guardar miembro(s): %{errors}." text_zoom_out: Alejar text_zoom_in: Acercar diff --git a/config/locales/es.yml b/config/locales/es.yml index 9419b539f..385dd8a81 100644 --- a/config/locales/es.yml +++ b/config/locales/es.yml @@ -547,7 +547,6 @@ es: label_password_lost: ¿Olvidaste la contraseña? label_permissions: Permisos label_permissions_report: Informe de permisos - label_personalize_page: Personalizar esta página label_please_login: Por favor, inicie sesión label_plugins: Extensiones label_precedes: anterior a @@ -935,7 +934,6 @@ es: error_can_not_remove_role: Este rol está en uso y no puede ser eliminado. error_can_not_delete_tracker: Este tipo contiene peticiones y no puede ser eliminado. field_principal: Principal - label_my_page_block: Bloque Mi página notice_failed_to_save_members: "Fallo al guardar miembro(s): %{errors}." text_zoom_out: Alejar text_zoom_in: Acercar diff --git a/config/locales/et.yml b/config/locales/et.yml index ef2d50fc0..cce9c720a 100644 --- a/config/locales/et.yml +++ b/config/locales/et.yml @@ -538,7 +538,6 @@ et: label_my_page: "Minu leht" label_my_account: "Minu konto" label_my_projects: "Minu projektid" - label_my_page_block: "Uus blokk" label_administration: "Seadistused" label_login: "Logi sisse" label_logout: "Logi välja" @@ -631,7 +630,6 @@ et: label_internal: "Sisemine" label_last_changes: "viimased %{count} muudatust" label_change_view_all: "Kõik muudatused" - label_personalize_page: "Kujunda leht ümber" label_comment: "Kommentaar" label_comment_plural: "Kommentaarid" label_x_comments: diff --git a/config/locales/eu.yml b/config/locales/eu.yml index fd46b3a4c..794797394 100644 --- a/config/locales/eu.yml +++ b/config/locales/eu.yml @@ -553,7 +553,6 @@ eu: label_internal: Barnekoa label_last_changes: "azken %{count} aldaketak" label_change_view_all: Aldaketa guztiak ikusi - label_personalize_page: Orri hau pertsonalizatu label_comment: Iruzkin label_comment_plural: Iruzkinak label_x_comments: @@ -897,7 +896,6 @@ eu: error_can_not_remove_role: Rol hau erabiltzen hari da eta ezin da ezabatu. error_can_not_delete_tracker: Aztarnari honek zereginak ditu eta ezin da ezabatu. field_principal: Ekintzaile - label_my_page_block: "Nire orriko blokea" notice_failed_to_save_members: "Kidea(k) gordetzean errorea: %{errors}." text_zoom_out: Zooma txikiagotu text_zoom_in: Zooma handiagotu diff --git a/config/locales/fa.yml b/config/locales/fa.yml index e0b7d5b9a..953cb6ad9 100644 --- a/config/locales/fa.yml +++ b/config/locales/fa.yml @@ -489,7 +489,6 @@ fa: label_my_page: صفحه خودم label_my_account: تنظیمات خودم label_my_projects: پروژه‌های خودم - label_my_page_block: بخش صفحه خودم label_administration: مدیریت label_login: نام کاربری label_logout: خروج @@ -577,7 +576,6 @@ fa: label_internal: درونی label_last_changes: "%{count} تغییر آخر" label_change_view_all: دیدن همه تغییرات - label_personalize_page: سفارشی نمودن این صفحه label_comment: نظر label_comment_plural: نظر ها label_x_comments: diff --git a/config/locales/fi.yml b/config/locales/fi.yml index d9a3e8dd3..83cc6187d 100644 --- a/config/locales/fi.yml +++ b/config/locales/fi.yml @@ -451,7 +451,6 @@ fi: label_internal: Sisäinen label_last_changes: "viimeiset %{count} muutokset" label_change_view_all: Näytä kaikki muutokset - label_personalize_page: Personoi tämä sivu label_comment: Kommentti label_comment_plural: Kommentit label_x_comments: @@ -917,7 +916,6 @@ fi: error_can_not_remove_role: This role is in use and can not be deleted. error_can_not_delete_tracker: This tracker contains issues and cannot be deleted. field_principal: Principal - label_my_page_block: My page block notice_failed_to_save_members: "Failed to save member(s): %{errors}." text_zoom_out: Zoom out text_zoom_in: Zoom in diff --git a/config/locales/fr.yml b/config/locales/fr.yml index 87a54bdd8..4721028f2 100644 --- a/config/locales/fr.yml +++ b/config/locales/fr.yml @@ -613,7 +613,6 @@ fr: label_my_page: Ma page label_my_account: Mon compte label_my_projects: Mes projets - label_my_page_block: Blocs disponibles label_administration: Administration label_login: Connexion label_logout: Déconnexion @@ -710,7 +709,6 @@ fr: label_internal: Interne label_last_changes: "%{count} derniers changements" label_change_view_all: Voir tous les changements - label_personalize_page: Personnaliser cette page label_comment: Commentaire label_comment_plural: Commentaires label_x_comments: diff --git a/config/locales/gl.yml b/config/locales/gl.yml index 7b8a1534a..e87e6432c 100644 --- a/config/locales/gl.yml +++ b/config/locales/gl.yml @@ -522,7 +522,6 @@ gl: label_password_lost: "Esqueceu o contrasinal?" label_permissions: Permisos label_permissions_report: Informe de permisos - label_personalize_page: Personalizar esta páxina label_please_login: "Acceder" label_plugins: Complementos label_precedes: anterior a @@ -910,7 +909,6 @@ gl: error_can_not_remove_role: "Este rol non pode eliminarse porque está a usarse." error_can_not_delete_tracker: "Este tipo de petición non pode eliminarse porque existen peticións deste tipo." field_principal: "Principal" - label_my_page_block: "Trebellos:" notice_failed_to_save_members: "Non foi posíbel gardar os membros: %{errors}." text_zoom_out: "Afastar" text_zoom_in: "Achegar" diff --git a/config/locales/he.yml b/config/locales/he.yml index dfac75f6f..239cfe2fd 100644 --- a/config/locales/he.yml +++ b/config/locales/he.yml @@ -487,7 +487,6 @@ he: label_my_page: הדף שלי label_my_account: החשבון שלי label_my_projects: הפרויקטים שלי - label_my_page_block: בלוק הדף שלי label_administration: ניהול label_login: התחבר label_logout: התנתק @@ -575,7 +574,6 @@ he: label_internal: פנימי label_last_changes: "%{count} שינוים אחרונים" label_change_view_all: צפה בכל השינוים - label_personalize_page: התאם אישית דף זה label_comment: תגובה label_comment_plural: תגובות label_x_comments: diff --git a/config/locales/hr.yml b/config/locales/hr.yml index f675f88de..cc5cc0eca 100644 --- a/config/locales/hr.yml +++ b/config/locales/hr.yml @@ -544,7 +544,6 @@ hr: label_internal: Interno label_last_changes: "Posljednjih %{count} promjena" label_change_view_all: Prikaz svih promjena - label_personalize_page: Prilagodite ovu stranicu label_comment: Komentar label_comment_plural: Komentari label_x_comments: @@ -895,7 +894,6 @@ hr: error_can_not_remove_role: This role is in use and can not be deleted. error_can_not_delete_tracker: This tracker contains issues and cannot be deleted. field_principal: Principal - label_my_page_block: My page block notice_failed_to_save_members: "Failed to save member(s): %{errors}." text_zoom_out: Zoom out text_zoom_in: Zoom in diff --git a/config/locales/hu.yml b/config/locales/hu.yml index fcff5de54..606aff735 100644 --- a/config/locales/hu.yml +++ b/config/locales/hu.yml @@ -471,7 +471,6 @@ label_internal: Belső label_last_changes: "utolsó %{count} változás" label_change_view_all: Minden változás megtekintése - label_personalize_page: Az oldal testreszabása label_comment: Megjegyzés label_comment_plural: Megjegyzés label_x_comments: @@ -915,7 +914,6 @@ error_can_not_delete_tracker: Ebbe a kategóriába feladatok tartoznak és ezért nem törölhető. label_project_copy_notifications: Küldjön e-mail értesítéseket projektmásolás közben. field_principal: Felelős - label_my_page_block: Saját kezdőlap-blokk notice_failed_to_save_members: "Nem sikerült menteni a tago(ka)t: %{errors}." text_zoom_out: Kicsinyít text_zoom_in: Nagyít diff --git a/config/locales/id.yml b/config/locales/id.yml index aa33d75f0..7373465a8 100644 --- a/config/locales/id.yml +++ b/config/locales/id.yml @@ -536,7 +536,6 @@ id: label_internal: Internal label_last_changes: "%{count} perubahan terakhir" label_change_view_all: Tampilkan semua perubahan - label_personalize_page: Personalkan halaman ini label_comment: Komentar label_comment_plural: Komentar label_x_comments: @@ -900,7 +899,6 @@ id: error_can_not_remove_role: This role is in use and can not be deleted. error_can_not_delete_tracker: This tracker contains issues and cannot be deleted. field_principal: Principal - label_my_page_block: My page block notice_failed_to_save_members: "Failed to save member(s): %{errors}." text_zoom_out: Zoom out text_zoom_in: Zoom in diff --git a/config/locales/it.yml b/config/locales/it.yml index f60fb5303..ca26a9bc6 100644 --- a/config/locales/it.yml +++ b/config/locales/it.yml @@ -409,7 +409,6 @@ it: label_internal: Interno label_last_changes: "ultime %{count} modifiche" label_change_view_all: Tutte le modifiche - label_personalize_page: Personalizza la pagina label_comment: Commento label_comment_plural: Commenti label_x_comments: @@ -896,7 +895,6 @@ it: error_can_not_remove_role: Questo ruolo è in uso e non può essere eliminato. error_can_not_delete_tracker: Questo tracker contiene segnalazioni e non può essere eliminato. field_principal: Principale - label_my_page_block: La mia pagina di blocco notice_failed_to_save_members: "Impossibile salvare il membro(i): %{errors}." text_zoom_out: Riduci ingrandimento text_zoom_in: Aumenta ingrandimento diff --git a/config/locales/ja.yml b/config/locales/ja.yml index aa6f3cf9f..a6fbfd3c2 100644 --- a/config/locales/ja.yml +++ b/config/locales/ja.yml @@ -522,7 +522,6 @@ ja: label_my_page: マイページ label_my_account: 個人設定 label_my_projects: マイプロジェクト - label_my_page_block: マイページパーツ label_administration: 管理 label_login: ログイン label_logout: ログアウト @@ -611,7 +610,6 @@ ja: label_internal: 内部 label_last_changes: "最新の変更 %{count}件" label_change_view_all: すべての変更を表示 - label_personalize_page: このページをパーソナライズする label_comment: コメント label_comment_plural: コメント label_x_comments: diff --git a/config/locales/ko.yml b/config/locales/ko.yml index ebcfc886a..7965137be 100644 --- a/config/locales/ko.yml +++ b/config/locales/ko.yml @@ -574,7 +574,6 @@ ko: label_internal: 내부 label_last_changes: "최근 %{count}개의 변경사항" label_change_view_all: 모든 변경 내역 보기 - label_personalize_page: 입맛대로 구성하기 label_comment: 댓글 label_comment_plural: 댓글 label_x_comments: @@ -944,7 +943,6 @@ ko: error_can_not_remove_role: 이 역할은 현재 사용 중이이서 삭제할 수 없습니다. error_can_not_delete_tracker: 이 유형의 일감들이 있어서 삭제할 수 없습니다. field_principal: 신원 - label_my_page_block: 내 페이지 출력화면 notice_failed_to_save_members: "%{errors}:구성원을 저장 중 실패하였습니다" text_zoom_out: 더 작게 text_zoom_in: 더 크게 diff --git a/config/locales/lt.yml b/config/locales/lt.yml index 8a14bbcd7..5061d7286 100644 --- a/config/locales/lt.yml +++ b/config/locales/lt.yml @@ -588,7 +588,6 @@ lt: label_my_page: Mano puslapis label_my_account: Mano paskyra label_my_projects: Mano projektai - label_my_page_block: Mano puslapio blokas label_administration: Administravimas label_login: Prisijungti label_logout: Atsijungti @@ -685,7 +684,6 @@ lt: label_internal: Vidinis label_last_changes: "paskutiniai %{count} pokyčiai(-ių)" label_change_view_all: Peržiūrėti visus pakeitimus - label_personalize_page: Suasmeninti šį puslapį label_comment: Komentaras label_comment_plural: Komentarai label_x_comments: diff --git a/config/locales/lv.yml b/config/locales/lv.yml index 402c3b4aa..675f82950 100644 --- a/config/locales/lv.yml +++ b/config/locales/lv.yml @@ -548,7 +548,6 @@ lv: label_internal: Iekšējais label_last_changes: "pēdējās %{count} izmaiņas" label_change_view_all: Skatīt visas izmaiņas - label_personalize_page: Pielāgot šo lapu label_comment: Komentārs label_comment_plural: Komentāri label_x_comments: @@ -890,7 +889,6 @@ lv: error_can_not_delete_tracker: This tracker contains issues and cannot be deleted. label_project_copy_notifications: Send email notifications during the project copy field_principal: Principal - label_my_page_block: My page block notice_failed_to_save_members: "Failed to save member(s): %{errors}." text_zoom_out: Zoom out text_zoom_in: Zoom in diff --git a/config/locales/mk.yml b/config/locales/mk.yml index dc6d47133..d52f0dc3d 100644 --- a/config/locales/mk.yml +++ b/config/locales/mk.yml @@ -479,7 +479,6 @@ mk: label_my_page: Мојата страна label_my_account: Мојот профил label_my_projects: Мои проекти - label_my_page_block: Блок елемент label_administration: Администрација label_login: Најави се label_logout: Одјави се @@ -567,7 +566,6 @@ mk: label_internal: Internal label_last_changes: "последни %{count} промени" label_change_view_all: Прегледај ги сите промени - label_personalize_page: Прилагоди ја странава label_comment: Коментар label_comment_plural: Коментари label_x_comments: diff --git a/config/locales/mn.yml b/config/locales/mn.yml index b1d7dd3d5..92b6b5eda 100644 --- a/config/locales/mn.yml +++ b/config/locales/mn.yml @@ -554,7 +554,6 @@ mn: label_internal: Дотоод label_last_changes: "сүүлийн %{count} өөрчлөлтүүд" label_change_view_all: Бүх өөрчлөлтүүдийг харах - label_personalize_page: Энэ хуудсыг өөрт зориулан өөрчлөх label_comment: Тайлбар label_comment_plural: Тайлбарууд label_x_comments: @@ -897,7 +896,6 @@ mn: error_can_not_remove_role: This role is in use and can not be deleted. error_can_not_delete_tracker: This tracker contains issues and cannot be deleted. field_principal: Principal - label_my_page_block: My page block notice_failed_to_save_members: "Failed to save member(s): %{errors}." text_zoom_out: Zoom out text_zoom_in: Zoom in diff --git a/config/locales/nl.yml b/config/locales/nl.yml index 0df614ad9..efb3044f7 100644 --- a/config/locales/nl.yml +++ b/config/locales/nl.yml @@ -491,7 +491,6 @@ nl: label_password_lost: Wachtwoord vergeten label_permissions: Permissies label_permissions_report: Permissierapport - label_personalize_page: Personaliseer deze pagina label_please_login: Gelieve in te loggen label_plugins: Plugins label_precedes: gaat vooraf aan @@ -878,7 +877,6 @@ nl: error_can_not_remove_role: Deze rol is in gebruik en kan niet worden verwijderd. error_can_not_delete_tracker: Deze tracker bevat nog issues en kan niet verwijderd worden. field_principal: Hoofd - label_my_page_block: Mijn pagina block notice_failed_to_save_members: "Het is niet gelukt om lid/leden op te slaan: %{errors}." text_zoom_out: Uitzoomen text_zoom_in: Inzoomen diff --git a/config/locales/no.yml b/config/locales/no.yml index 998261986..8ce372b8f 100644 --- a/config/locales/no.yml +++ b/config/locales/no.yml @@ -442,7 +442,6 @@ label_internal: Intern label_last_changes: "siste %{count} endringer" label_change_view_all: Vis alle endringer - label_personalize_page: Tilpass denne siden label_comment: Kommentar label_comment_plural: Kommentarer label_x_comments: @@ -883,7 +882,6 @@ error_can_not_remove_role: Denne rollen er i bruk og kan ikke slettes. error_can_not_delete_tracker: Denne sakstypen inneholder saker og kan ikke slettes. field_principal: Principal - label_my_page_block: Min side felt notice_failed_to_save_members: "Feil ved lagring av medlem(mer): %{errors}." text_zoom_out: Zoom ut text_zoom_in: Zoom inn diff --git a/config/locales/pl.yml b/config/locales/pl.yml index 9a508bd46..091f14774 100644 --- a/config/locales/pl.yml +++ b/config/locales/pl.yml @@ -524,7 +524,6 @@ pl: label_password_lost: Zapomniane hasło label_permissions: Uprawnienia label_permissions_report: Raport uprawnień - label_personalize_page: Personalizuj tę stronę label_please_login: Zaloguj się label_plugins: Wtyczki label_precedes: poprzedza @@ -915,7 +914,6 @@ pl: error_can_not_remove_role: Ta rola przypisana jest niektórym użytkownikom i nie może zostać usunięta. error_can_not_delete_tracker: Ten typ przypisany jest do części zagadnień i nie może zostać usunięty. field_principal: Przełożony - label_my_page_block: Elementy notice_failed_to_save_members: "Nie można zapisać uczestników: %{errors}." text_zoom_out: Zmniejsz text_zoom_in: Powiększ diff --git a/config/locales/pt-BR.yml b/config/locales/pt-BR.yml index 04390c03b..fabe33a13 100644 --- a/config/locales/pt-BR.yml +++ b/config/locales/pt-BR.yml @@ -482,7 +482,6 @@ pt-BR: label_internal: Interno label_last_changes: "últimas %{count} alterações" label_change_view_all: Mostrar todas as alterações - label_personalize_page: Personalizar esta página label_comment: Comentário label_comment_plural: Comentários label_x_comments: @@ -918,7 +917,6 @@ pt-BR: error_can_not_remove_role: Este papel está em uso e não pode ser excluído. error_can_not_delete_tracker: Este tipo de tarefa está atribuído a alguma(s) tarefa(s) e não pode ser excluído. field_principal: Principal - label_my_page_block: Meu bloco de página notice_failed_to_save_members: "Falha ao salvar membro(s): %{errors}." text_zoom_out: Afastar zoom text_zoom_in: Aproximar zoom diff --git a/config/locales/pt.yml b/config/locales/pt.yml index 583b97f7f..bf4aec580 100644 --- a/config/locales/pt.yml +++ b/config/locales/pt.yml @@ -467,7 +467,6 @@ pt: label_internal: Interno label_last_changes: "últimas %{count} alterações" label_change_view_all: Ver todas as alterações - label_personalize_page: Personalizar esta página label_comment: Comentário label_comment_plural: Comentários label_x_comments: @@ -903,7 +902,6 @@ pt: error_can_not_remove_role: Esta função está atualmente em uso e não pode ser apagada. error_can_not_delete_tracker: Existem ainda tarefas nesta categoria. Não é possível apagar este tipo de tarefa. field_principal: Principal - label_my_page_block: Bloco da minha página notice_failed_to_save_members: "Erro ao guardar o(s) membro(s): %{errors}." text_zoom_out: Reduzir text_zoom_in: Ampliar diff --git a/config/locales/ro.yml b/config/locales/ro.yml index ab0e648fd..cc17b7c19 100644 --- a/config/locales/ro.yml +++ b/config/locales/ro.yml @@ -514,7 +514,6 @@ ro: label_internal: Intern label_last_changes: "ultimele %{count} schimbări" label_change_view_all: Afișează toate schimbările - label_personalize_page: Personalizează aceasta pagina label_comment: Comentariu label_comment_plural: Comentarii label_x_comments: @@ -891,7 +890,6 @@ ro: error_can_not_remove_role: This role is in use and can not be deleted. error_can_not_delete_tracker: This tracker contains issues and cannot be deleted. field_principal: Principal - label_my_page_block: My page block notice_failed_to_save_members: "Failed to save member(s): %{errors}." text_zoom_out: Zoom out text_zoom_in: Zoom in diff --git a/config/locales/ru.yml b/config/locales/ru.yml index 1c1836ea3..c2d76339d 100644 --- a/config/locales/ru.yml +++ b/config/locales/ru.yml @@ -577,7 +577,6 @@ ru: label_more_than_ago: более, чем дней(я) назад label_my_account: Моя учётная запись label_my_page: Моя страница - label_my_page_block: Блок моей страницы label_my_projects: Мои проекты label_new: Новый label_new_statuses_allowed: Разрешенные новые статусы @@ -605,7 +604,6 @@ ru: label_password_lost: Восстановление пароля label_permissions_report: Отчёт по правам доступа label_permissions: Права доступа - label_personalize_page: Персонализировать данную страницу label_please_login: Пожалуйста, войдите. label_plugins: Модули label_precedes: следующая diff --git a/config/locales/sk.yml b/config/locales/sk.yml index 37df0d2f6..9f2d771ba 100644 --- a/config/locales/sk.yml +++ b/config/locales/sk.yml @@ -447,7 +447,6 @@ sk: label_internal: Interný label_last_changes: "posledných %{count} zmien" label_change_view_all: Zobraziť všetky zmeny - label_personalize_page: Prispôsobiť túto stránku label_comment: Komentár label_comment_plural: Komentáre label_x_comments: @@ -891,7 +890,6 @@ sk: error_can_not_remove_role: "Táto rola sa používa a nemôže byť vymazaná." error_can_not_delete_tracker: "Tento front obsahuje úlohy a nemôže byť vymazaný." field_principal: Objednávateľ - label_my_page_block: Blok obsahu notice_failed_to_save_members: "Nepodarilo sa uložiť členov: %{errors}." text_zoom_out: Oddialiť text_zoom_in: Priblížiť diff --git a/config/locales/sl.yml b/config/locales/sl.yml index e3acd1e8c..b3f1367e9 100644 --- a/config/locales/sl.yml +++ b/config/locales/sl.yml @@ -508,7 +508,6 @@ sl: label_internal: Notranji label_last_changes: "zadnjih %{count} sprememb" label_change_view_all: Poglej vse spremembe - label_personalize_page: Individualiziraj to stran label_comment: Komentar label_comment_plural: Komentarji label_x_comments: @@ -893,7 +892,6 @@ sl: error_can_not_remove_role: Ta vloga je v uporabi in je ni mogoče izbrisati. error_can_not_delete_tracker: Ta sledilnik vsebuje zahtevke in se ga ne more izbrisati. field_principal: Upravnik varnosti - label_my_page_block: Moj gradnik strani notice_failed_to_save_members: "Shranjevanje uporabnika(ov) ni uspelo: %{errors}." text_zoom_out: Približaj text_zoom_in: Oddalji diff --git a/config/locales/sq.yml b/config/locales/sq.yml index 3cfc37684..629dc7883 100644 --- a/config/locales/sq.yml +++ b/config/locales/sq.yml @@ -519,7 +519,6 @@ sq: label_my_page: Faqja ime label_my_account: Llogaria ime label_my_projects: Projektet e mia - label_my_page_block: My page block label_administration: Administrim label_login: Login label_logout: Dalje @@ -612,7 +611,6 @@ sq: label_internal: I brendshem label_last_changes: "%{count} ndryshimet e fundit" label_change_view_all: Shih gjithe ndryshimet - label_personalize_page: Personalizo kete Faqe label_comment: Koment label_comment_plural: Komente label_x_comments: diff --git a/config/locales/sr-YU.yml b/config/locales/sr-YU.yml index bb3a1e983..bc7a87058 100644 --- a/config/locales/sr-YU.yml +++ b/config/locales/sr-YU.yml @@ -479,7 +479,6 @@ sr-YU: label_my_page: Moja stranica label_my_account: Moj nalog label_my_projects: Moji projekti - label_my_page_block: My page block label_administration: Administracija label_login: Prijava label_logout: Odjava @@ -567,7 +566,6 @@ sr-YU: label_internal: Unutrašnji label_last_changes: "poslednjih %{count} promena" label_change_view_all: Prikaži sve promene - label_personalize_page: Personalizuj ovu stranu label_comment: Komentar label_comment_plural: Komentari label_x_comments: diff --git a/config/locales/sr.yml b/config/locales/sr.yml index 0ef0532ec..09f496c50 100644 --- a/config/locales/sr.yml +++ b/config/locales/sr.yml @@ -477,7 +477,6 @@ sr: label_my_page: Моја страница label_my_account: Мој налог label_my_projects: Моји пројекти - label_my_page_block: My page block label_administration: Администрација label_login: Пријава label_logout: Одјава @@ -565,7 +564,6 @@ sr: label_internal: Унутрашњи label_last_changes: "последњих %{count} промена" label_change_view_all: Прикажи све промене - label_personalize_page: Персонализуј ову страну label_comment: Коментар label_comment_plural: Коментари label_x_comments: diff --git a/config/locales/sv.yml b/config/locales/sv.yml index e9fa871bb..9c1fa0b12 100644 --- a/config/locales/sv.yml +++ b/config/locales/sv.yml @@ -586,7 +586,6 @@ sv: label_my_page: Min sida label_my_account: Mitt konto label_my_projects: Mina projekt - label_my_page_block: '"Min sida"-block' label_administration: Administration label_login: Logga in label_logout: Logga ut @@ -681,7 +680,6 @@ sv: label_internal: Intern label_last_changes: "senaste %{count} ändringar" label_change_view_all: Visa alla ändringar - label_personalize_page: Anpassa denna sida label_comment: Kommentar label_comment_plural: Kommentarer label_x_comments: diff --git a/config/locales/th.yml b/config/locales/th.yml index 12bd1d3f6..8ebf9745f 100644 --- a/config/locales/th.yml +++ b/config/locales/th.yml @@ -448,7 +448,6 @@ th: label_internal: ภายใน label_last_changes: "last %{count} เปลี่ยนแปลง" label_change_view_all: ดูการเปลี่ยนแปลงทั้งหมด - label_personalize_page: ปรับแต่งหน้านี้ label_comment: ความเห็น label_comment_plural: ความเห็น label_x_comments: @@ -893,7 +892,6 @@ th: error_can_not_remove_role: This role is in use and can not be deleted. error_can_not_delete_tracker: This tracker contains issues and cannot be deleted. field_principal: Principal - label_my_page_block: My page block notice_failed_to_save_members: "Failed to save member(s): %{errors}." text_zoom_out: Zoom out text_zoom_in: Zoom in diff --git a/config/locales/tr.yml b/config/locales/tr.yml index 4c1b0a07f..cc470e5d7 100644 --- a/config/locales/tr.yml +++ b/config/locales/tr.yml @@ -462,7 +462,6 @@ tr: label_internal: Dahili label_last_changes: "Son %{count} değişiklik" label_change_view_all: Tüm Değişiklikleri göster - label_personalize_page: Bu sayfayı kişiselleştir label_comment: Yorum label_comment_plural: Yorumlar label_x_comments: @@ -907,7 +906,6 @@ tr: error_can_not_remove_role: Bu rol kullanımda olduğundan silinemez. error_can_not_delete_tracker: Bu iş tipi içerisinde iş barındırdığından silinemiyor. field_principal: Temel - label_my_page_block: Kişisel sayfa bloğum notice_failed_to_save_members: "Üyeler kaydedilemiyor: %{errors}." text_zoom_out: Uzaklaş text_zoom_in: Yakınlaş diff --git a/config/locales/uk.yml b/config/locales/uk.yml index 9df40cb2f..c5711ae40 100644 --- a/config/locales/uk.yml +++ b/config/locales/uk.yml @@ -418,7 +418,6 @@ uk: label_internal: Внутрішній label_last_changes: "останні %{count} змін" label_change_view_all: Проглянути всі зміни - label_personalize_page: Персоналізувати цю сторінку label_comment: Коментувати label_comment_plural: Коментарі label_x_comments: @@ -893,7 +892,6 @@ uk: error_can_not_remove_role: This role is in use and can not be deleted. error_can_not_delete_tracker: This tracker contains issues and cannot be deleted. field_principal: Principal - label_my_page_block: My page block notice_failed_to_save_members: "Failed to save member(s): %{errors}." text_zoom_out: Zoom out text_zoom_in: Zoom in diff --git a/config/locales/vi.yml b/config/locales/vi.yml index 8274e95d7..1df6d666e 100644 --- a/config/locales/vi.yml +++ b/config/locales/vi.yml @@ -509,7 +509,6 @@ vi: label_internal: Nội bộ label_last_changes: "%{count} thay đổi cuối" label_change_view_all: Xem mọi thay đổi - label_personalize_page: Điều chỉnh trang này label_comment: Bình luận label_comment_plural: Bình luận label_x_comments: @@ -947,7 +946,6 @@ vi: error_can_not_remove_role: Quyền này đang được dùng và không thể xóa được. error_can_not_delete_tracker: Theo dõi này chứa vấn đề và không thể xóa được. field_principal: Chủ yếu - label_my_page_block: Block trang của tôi notice_failed_to_save_members: "Thất bại khi lưu thành viên : %{errors}." text_zoom_out: Thu nhỏ text_zoom_in: Phóng to diff --git a/config/locales/zh-TW.yml b/config/locales/zh-TW.yml index dc734f314..bfe0adf41 100644 --- a/config/locales/zh-TW.yml +++ b/config/locales/zh-TW.yml @@ -685,7 +685,6 @@ label_my_page: 帳戶首頁 label_my_account: 我的帳戶 label_my_projects: 我的專案 - label_my_page_block: 帳戶首頁區塊 label_administration: 網站管理 label_login: 登入 label_logout: 登出 @@ -783,7 +782,6 @@ label_internal: 內部 label_last_changes: "最近 %{count} 個變更" label_change_view_all: 檢視全部的變更 - label_personalize_page: 自訂版面 label_comment: 回應 label_comment_plural: 回應 label_x_comments: diff --git a/config/locales/zh.yml b/config/locales/zh.yml index 8b3abb76e..f97b40983 100644 --- a/config/locales/zh.yml +++ b/config/locales/zh.yml @@ -494,7 +494,6 @@ zh: label_my_page: 我的工作台 label_my_account: 我的帐号 label_my_projects: 我的项目 - label_my_page_block: 我的工作台模块 label_administration: 管理 label_login: 登录 label_logout: 退出 @@ -582,7 +581,6 @@ zh: label_internal: 内部 label_last_changes: "最近的 %{count} 次变更" label_change_view_all: 查看所有变更 - label_personalize_page: 个性化定制本页 label_comment: 评论 label_comment_plural: 评论 label_x_comments: From b91489ce6bb0943cff50946af6e64be65d3ccd80 Mon Sep 17 00:00:00 2001 From: Jean-Philippe Lang Date: Sat, 11 Mar 2017 13:07:38 +0000 Subject: [PATCH 0709/1117] Fix sort handle on "My page". git-svn-id: http://svn.redmine.org/redmine/trunk@16389 e93f8b46-1217-0410-a6f0-8f06a7374b81 --- app/helpers/my_helper.rb | 2 +- app/views/my/page.html.erb | 1 + 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/app/helpers/my_helper.rb b/app/helpers/my_helper.rb index d8930c077..fe29dfafa 100644 --- a/app/helpers/my_helper.rb +++ b/app/helpers/my_helper.rb @@ -26,7 +26,7 @@ module MyHelper blocks.each do |block| content = render_block_content(block, user) if content.present? - handle = content_tag('span', '', :class => 'hanlde sort-handle') + handle = content_tag('span', '', :class => 'sort-handle') close = link_to(l(:button_delete), {:action => "remove_block", :block => block}, :method => 'post', :class => "icon-only icon-close") content = content_tag('div', handle + close, :class => 'contextual') + content diff --git a/app/views/my/page.html.erb b/app/views/my/page.html.erb index 2eb29ad0c..9fe143516 100644 --- a/app/views/my/page.html.erb +++ b/app/views/my/page.html.erb @@ -28,6 +28,7 @@ $(document).ready(function(){ $('#list-top, #list-left, #list-right').sortable({ connectWith: '.block-receiver', tolerance: 'pointer', + handle: '.sort-handle', start: function(event, ui){$(this).parent().addClass('dragging');}, stop: function(event, ui){$(this).parent().removeClass('dragging');}, update: function(event, ui){ From 71d88e55352a51b20dd5e2a4a44aa695834a36b9 Mon Sep 17 00:00:00 2001 From: Jean-Philippe Lang Date: Mon, 13 Mar 2017 19:17:59 +0000 Subject: [PATCH 0710/1117] Get rid of sort_helper when using queries. git-svn-id: http://svn.redmine.org/redmine/trunk@16390 e93f8b46-1217-0410-a6f0-8f06a7374b81 --- app/controllers/issues_controller.rb | 13 +-- app/controllers/journals_controller.rb | 4 - app/controllers/timelog_controller.rb | 6 +- app/helpers/queries_helper.rb | 48 ++++++-- app/helpers/sort_helper.rb | 99 +---------------- app/models/issue_query.rb | 8 +- app/models/query.rb | 44 +++++--- app/models/time_entry_query.rb | 6 +- app/views/issues/_list.html.erb | 4 +- app/views/queries/_query_form.html.erb | 1 + app/views/timelog/_list.html.erb | 2 +- lib/redmine/helpers/time_report.rb | 1 + lib/redmine/sort_criteria.rb | 104 ++++++++++++++++++ test/functional/issues_controller_test.rb | 18 +-- .../issues_custom_fields_visibility_test.rb | 2 +- test/unit/helpers/sort_helper_test.rb | 4 +- test/unit/query_test.rb | 2 +- 17 files changed, 203 insertions(+), 163 deletions(-) create mode 100644 lib/redmine/sort_criteria.rb diff --git a/app/controllers/issues_controller.rb b/app/controllers/issues_controller.rb index a04c1a6b0..2b9512fc7 100644 --- a/app/controllers/issues_controller.rb +++ b/app/controllers/issues_controller.rb @@ -37,15 +37,10 @@ class IssuesController < ApplicationController helper :queries include QueriesHelper helper :repositories - helper :sort - include SortHelper helper :timelog def index retrieve_query - sort_init(@query.sort_criteria.empty? ? [['id', 'desc']] : @query.sort_criteria) - sort_update(@query.sortable_columns) - @query.sort_criteria = sort_criteria.to_a if @query.valid? case params[:format] @@ -66,9 +61,7 @@ class IssuesController < ApplicationController @issue_count = @query.issue_count @issue_pages = Paginator.new @issue_count, @limit, params['page'] @offset ||= @issue_pages.offset - @issues = @query.issues(:order => sort_clause, - :offset => @offset, - :limit => @limit) + @issues = @query.issues(:offset => @offset, :limit => @limit) respond_to do |format| format.html { render :template => 'issues/index', :layout => !request.xhr? } @@ -421,10 +414,8 @@ class IssuesController < ApplicationController else retrieve_query_from_session if @query - sort_init(@query.sort_criteria.empty? ? [['id', 'desc']] : @query.sort_criteria) - sort_update(@query.sortable_columns, 'issues_index_sort') limit = 500 - issue_ids = @query.issue_ids(:order => sort_clause, :limit => (limit + 1)) + issue_ids = @query.issue_ids(:limit => (limit + 1)) if (idx = issue_ids.index(@issue.id)) && idx < limit if issue_ids.size < 500 @issue_position = idx + 1 diff --git a/app/controllers/journals_controller.rb b/app/controllers/journals_controller.rb index 106c0692d..cce9c1e69 100644 --- a/app/controllers/journals_controller.rb +++ b/app/controllers/journals_controller.rb @@ -27,13 +27,9 @@ class JournalsController < ApplicationController helper :custom_fields helper :queries include QueriesHelper - helper :sort - include SortHelper def index retrieve_query - sort_init 'id', 'desc' - sort_update(@query.sortable_columns) if @query.valid? @journals = @query.journals(:order => "#{Journal.table_name}.created_on DESC", :limit => 25) diff --git a/app/controllers/timelog_controller.rb b/app/controllers/timelog_controller.rb index a88ede4a5..9cfe16312 100644 --- a/app/controllers/timelog_controller.rb +++ b/app/controllers/timelog_controller.rb @@ -32,8 +32,6 @@ class TimelogController < ApplicationController rescue_from Query::StatementInvalid, :with => :query_statement_invalid - helper :sort - include SortHelper helper :issues include TimelogHelper helper :custom_fields @@ -43,9 +41,7 @@ class TimelogController < ApplicationController def index retrieve_time_entry_query - sort_init(@query.sort_criteria.empty? ? [['spent_on', 'desc']] : @query.sort_criteria) - sort_update(@query.sortable_columns) - scope = time_entry_scope(:order => sort_clause). + scope = time_entry_scope. preload(:issue => [:project, :tracker, :status, :assigned_to, :priority]). preload(:project, :user) diff --git a/app/helpers/queries_helper.rb b/app/helpers/queries_helper.rb index 197bbb998..1d0db2877 100644 --- a/app/helpers/queries_helper.rb +++ b/app/helpers/queries_helper.rb @@ -161,10 +161,28 @@ module QueriesHelper content_tag('span', label + " " + value, :class => "total-for-#{column.name.to_s.dasherize}") end - def column_header(column) - column.sortable ? sort_header_tag(column.name.to_s, :caption => column.caption, - :default_order => column.default_order) : - content_tag('th', h(column.caption)) + def column_header(query, column) + if column.sortable? + css, order = nil, column.default_order + if column.name.to_s == query.sort_criteria.first_key + if query.sort_criteria.first_asc? + css = 'sort asc' + order = 'desc' + else + css = 'sort desc' + order = 'asc' + end + end + sort_param = { :sort => query.sort_criteria.add(column.name, order).to_param } + content = link_to(column.caption, + {:params => request.query_parameters.merge(sort_param)}, + :title => l(:label_sort_by, "\"#{column.caption}\""), + :class => css + ) + else + content = column.caption + end + content_tag('th', content) end def column_content(column, item) @@ -257,19 +275,26 @@ module QueriesHelper raise ::Unauthorized unless @query.visible? @query.project = @project session[session_key] = {:id => @query.id, :project_id => @query.project_id} if use_session - sort_clear elsif api_request? || params[:set_filter] || !use_session || session[session_key].nil? || session[session_key][:project_id] != (@project ? @project.id : nil) # Give it a name, required to be valid @query = klass.new(:name => "_", :project => @project) @query.build_from_params(params) - session[session_key] = {:project_id => @query.project_id, :filters => @query.filters, :group_by => @query.group_by, :column_names => @query.column_names, :totalable_names => @query.totalable_names} if use_session + session[session_key] = {:project_id => @query.project_id, :filters => @query.filters, :group_by => @query.group_by, :column_names => @query.column_names, :totalable_names => @query.totalable_names, :sort => @query.sort_criteria.to_a} if use_session else # retrieve from session @query = nil @query = klass.find_by_id(session[session_key][:id]) if session[session_key][:id] - @query ||= klass.new(:name => "_", :filters => session[session_key][:filters], :group_by => session[session_key][:group_by], :column_names => session[session_key][:column_names], :totalable_names => session[session_key][:totalable_names]) + @query ||= klass.new(:name => "_", :filters => session[session_key][:filters], :group_by => session[session_key][:group_by], :column_names => session[session_key][:column_names], :totalable_names => session[session_key][:totalable_names], :sort_criteria => session[session_key][:sort]) @query.project = @project end + if params[:sort].present? + @query.sort_criteria = params[:sort] + if use_session + session[session_key] ||= {} + session[session_key][:sort] = @query.sort_criteria.to_a + end + end + @query end def retrieve_query_from_session(klass=IssueQuery) @@ -281,7 +306,7 @@ module QueriesHelper @query = IssueQuery.find_by_id(session_data[:id]) return unless @query else - @query = IssueQuery.new(:name => "_", :filters => session_data[:filters], :group_by => session_data[:group_by], :column_names => session_data[:column_names], :totalable_names => session_data[:totalable_names]) + @query = IssueQuery.new(:name => "_", :filters => session_data[:filters], :group_by => session_data[:group_by], :column_names => session_data[:column_names], :totalable_names => session_data[:totalable_names], :sort_criteria => session[session_key][:sort]) end if session_data.has_key?(:project_id) @query.project_id = session_data[:project_id] @@ -318,9 +343,16 @@ module QueriesHelper if query.group_by.present? tags << hidden_field_tag("group_by", query.group_by, :id => nil) end + if query.sort_criteria.present? + tags << hidden_field_tag("sort", query.sort_criteria.to_param, :id => nil) + end tags end + + def query_hidden_sort_tag(query) + hidden_field_tag("sort", query.sort_criteria.to_param, :id => nil) + end # Returns the queries that are rendered in the sidebar def sidebar_queries(klass, project) diff --git a/app/helpers/sort_helper.rb b/app/helpers/sort_helper.rb index 8fb13818f..c6bf5383e 100644 --- a/app/helpers/sort_helper.rb +++ b/app/helpers/sort_helper.rb @@ -53,97 +53,6 @@ # module SortHelper - class SortCriteria - - def initialize - @criteria = [] - end - - def available_criteria=(criteria) - unless criteria.is_a?(Hash) - criteria = criteria.inject({}) {|h,k| h[k] = k; h} - end - @available_criteria = criteria - end - - def from_param(param) - @criteria = param.to_s.split(',').collect {|s| s.split(':')[0..1]} - normalize! - end - - def criteria=(arg) - @criteria = arg - normalize! - end - - def to_param - @criteria.collect {|k,o| k + (o ? '' : ':desc')}.join(',') - end - - # Returns an array of SQL fragments used to sort the list - def to_sql - sql = @criteria.collect do |k,o| - if s = @available_criteria[k] - s = [s] unless s.is_a?(Array) - s.collect {|c| append_order(c, o ? "ASC" : "DESC")} - end - end.flatten.compact - sql.blank? ? nil : sql - end - - def to_a - @criteria.dup - end - - def add!(key, asc) - @criteria.delete_if {|k,o| k == key} - @criteria = [[key, asc]] + @criteria - normalize! - end - - def add(*args) - r = self.class.new.from_param(to_param) - r.add!(*args) - r - end - - def first_key - @criteria.first && @criteria.first.first - end - - def first_asc? - @criteria.first && @criteria.first.last - end - - def empty? - @criteria.empty? - end - - private - - def normalize! - @criteria ||= [] - @criteria = @criteria.collect {|s| s = Array(s); [s.first, (s.last == false || s.last == 'desc') ? false : true]} - @criteria = @criteria.select {|k,o| @available_criteria.has_key?(k)} if @available_criteria - @criteria.slice!(3) - self - end - - # Appends ASC/DESC to the sort criterion unless it has a fixed order - def append_order(criterion, order) - if criterion =~ / (asc|desc)$/i - criterion - else - "#{criterion} #{order}" - end - end - - # Appends DESC to the sort criterion unless it has a fixed order - def append_desc(criterion) - append_order(criterion, "DESC") - end - end - def sort_name controller_name + '_' + action_name + '_sort' end @@ -173,10 +82,8 @@ module SortHelper # def sort_update(criteria, sort_name=nil) sort_name ||= self.sort_name - @sort_criteria = SortCriteria.new - @sort_criteria.available_criteria = criteria - @sort_criteria.from_param(params[:sort] || session[sort_name]) - @sort_criteria.criteria = @sort_default if @sort_criteria.empty? + @sort_criteria = Redmine::SortCriteria.new(params[:sort] || session[sort_name] || @sort_default) + @sortable_columns = criteria session[sort_name] = @sort_criteria.to_param end @@ -190,7 +97,7 @@ module SortHelper # Use this to sort the controller's table items collection. # def sort_clause() - @sort_criteria.to_sql + @sort_criteria.sort_clause(@sortable_columns) end def sort_criteria diff --git a/app/models/issue_query.rb b/app/models/issue_query.rb index 71fe8d288..9f3bf290d 100644 --- a/app/models/issue_query.rb +++ b/app/models/issue_query.rb @@ -234,6 +234,10 @@ class IssueQuery < Query Setting.issue_list_default_totals.map(&:to_sym) end + def default_sort_criteria + [['id', 'desc']] + end + def base_scope Issue.visible.joins(:status, :project).where(statement) end @@ -267,7 +271,7 @@ class IssueQuery < Query # Returns the issues # Valid options are :order, :offset, :limit, :include, :conditions def issues(options={}) - order_option = [group_by_sort_order, options[:order]].flatten.reject(&:blank?) + order_option = [group_by_sort_order, (options[:order] || sort_clause)].flatten.reject(&:blank?) scope = Issue.visible. joins(:status, :project). @@ -309,7 +313,7 @@ class IssueQuery < Query # Returns the issues ids def issue_ids(options={}) - order_option = [group_by_sort_order, options[:order]].flatten.reject(&:blank?) + order_option = [group_by_sort_order, (options[:order] || sort_clause)].flatten.reject(&:blank?) Issue.visible. joins(:status, :project). diff --git a/app/models/query.rb b/app/models/query.rb index 7a43ca6fc..192502024 100644 --- a/app/models/query.rb +++ b/app/models/query.rb @@ -377,6 +377,7 @@ class Query < ActiveRecord::Base self.group_by = params[:group_by] || (params[:query] && params[:query][:group_by]) self.column_names = params[:c] || (params[:query] && params[:query][:column_names]) self.totalable_names = params[:t] || (params[:query] && params[:query][:totalable_names]) + self.sort_criteria = params[:sort] || (params[:query] && params[:query][:sort_criteria]) self end @@ -710,37 +711,40 @@ class Query < ActiveRecord::Base options[:totalable_names] || default_totalable_names || [] end + def default_sort_criteria + [] + end + def sort_criteria=(arg) - c = [] - if arg.is_a?(Hash) - arg = arg.keys.sort.collect {|k| arg[k]} - end - if arg - c = arg.select {|k,o| !k.to_s.blank?}.slice(0,3).collect {|k,o| [k.to_s, (o == 'desc' || o == false) ? 'desc' : 'asc']} - end - write_attribute(:sort_criteria, c) + c = Redmine::SortCriteria.new(arg) + write_attribute(:sort_criteria, c.to_a) + c end def sort_criteria - read_attribute(:sort_criteria) || [] + c = read_attribute(:sort_criteria) + if c.blank? + c = default_sort_criteria + end + Redmine::SortCriteria.new(c) end - def sort_criteria_key(arg) - sort_criteria && sort_criteria[arg] && sort_criteria[arg].first + def sort_criteria_key(index) + sort_criteria[index].try(:first) end - def sort_criteria_order(arg) - sort_criteria && sort_criteria[arg] && sort_criteria[arg].last + def sort_criteria_order(index) + sort_criteria[index].try(:last) end - def sort_criteria_order_for(key) - sort_criteria.detect {|k, order| key.to_s == k}.try(:last) + def sort_clause + sort_criteria.sort_clause(sortable_columns) end # Returns the SQL sort order that should be prepended for grouping def group_by_sort_order if column = group_by_column - order = (sort_criteria_order_for(column.name) || column.default_order || 'asc').try(:upcase) + order = (sort_criteria.order_for(column.name) || column.default_order || 'asc').try(:upcase) Array(column.sortable).map {|s| "#{s} #{order}"} end end @@ -878,6 +882,14 @@ class Query < ActiveRecord::Base totals end + def css_classes + s = sort_criteria.first + if s.present? + key, asc = s + "sort-by-#{key.to_s.dasherize} sort-#{asc}" + end + end + private def grouped_query(&block) diff --git a/app/models/time_entry_query.rb b/app/models/time_entry_query.rb index 5b39bd34e..3d37e94da 100644 --- a/app/models/time_entry_query.rb +++ b/app/models/time_entry_query.rb @@ -105,6 +105,10 @@ class TimeEntryQuery < Query def default_totalable_names [:hours] end + + def default_sort_criteria + [['spent_on', 'desc']] + end def base_scope TimeEntry.visible. @@ -114,7 +118,7 @@ class TimeEntryQuery < Query end def results_scope(options={}) - order_option = [group_by_sort_order, options[:order]].flatten.reject(&:blank?) + order_option = [group_by_sort_order, (options[:order] || sort_clause)].flatten.reject(&:blank?) base_scope. order(order_option). diff --git a/app/views/issues/_list.html.erb b/app/views/issues/_list.html.erb index 1e7d01ef7..f9172143b 100644 --- a/app/views/issues/_list.html.erb +++ b/app/views/issues/_list.html.erb @@ -1,7 +1,7 @@ <%= form_tag({}, :data => {:cm_url => issues_context_menu_path}) do -%> <%= hidden_field_tag 'back_url', url_for(:params => request.query_parameters), :id => nil %>
          -
          <%= l(:label_activity) %> <%= l(:label_project) %>
          <%= text %> + <% if query.block_columns.count > 1 %> + <%= column.caption %> + <% end %> + <%= text %> +
          <%= text %> + <% if query.block_columns.count > 1 %> + <%= column.caption %> + <% end %> + <%= text %> +
          <%= check_box_tag("ids[]", issue.id, false, :id => nil) %>#{column_content(column, issue)}
          + <% if query.block_columns.count > 1 %> <%= column.caption %> <% end %> diff --git a/app/views/issues/index.html.erb b/app/views/issues/index.html.erb index 80210814e..7828075cf 100644 --- a/app/views/issues/index.html.erb +++ b/app/views/issues/index.html.erb @@ -16,7 +16,7 @@

          <%= l(:label_no_data) %>

          <% else %> <%= render_query_totals(@query) %> -<%= render :partial => 'issues/list', :locals => {:issues => @issues, :query => @query} %> +<%= render :partial => 'issues/list', :locals => {:issues => @issues, :query => @query, :issue_count_by_group => @issue_count_by_group} %> <%= pagination_links_full @issue_pages, @issue_count %> <% end %> From b714c714024796d3cd3bd215b07b4d8798a35406 Mon Sep 17 00:00:00 2001 From: Jean-Philippe Lang Date: Thu, 9 Mar 2017 20:01:01 +0000 Subject: [PATCH 0707/1117] Get the count by group from the query directly. git-svn-id: http://svn.redmine.org/redmine/trunk@16387 e93f8b46-1217-0410-a6f0-8f06a7374b81 --- app/controllers/issues_controller.rb | 1 - app/helpers/issues_helper.rb | 4 ++-- app/helpers/queries_helper.rb | 5 +++-- app/models/issue_query.rb | 7 ------- app/models/query.rb | 7 +++++++ app/views/issues/_list.html.erb | 2 +- app/views/issues/index.html.erb | 2 +- app/views/timelog/_list.html.erb | 2 +- lib/redmine/export/pdf/issues_pdf_helper.rb | 4 +++- test/unit/query_test.rb | 8 ++++---- 10 files changed, 22 insertions(+), 20 deletions(-) diff --git a/app/controllers/issues_controller.rb b/app/controllers/issues_controller.rb index 906130e1a..a04c1a6b0 100644 --- a/app/controllers/issues_controller.rb +++ b/app/controllers/issues_controller.rb @@ -69,7 +69,6 @@ class IssuesController < ApplicationController @issues = @query.issues(:order => sort_clause, :offset => @offset, :limit => @limit) - @issue_count_by_group = @query.issue_count_by_group respond_to do |format| format.html { render :template => 'issues/index', :layout => !request.xhr? } diff --git a/app/helpers/issues_helper.rb b/app/helpers/issues_helper.rb index f95338284..703607999 100644 --- a/app/helpers/issues_helper.rb +++ b/app/helpers/issues_helper.rb @@ -32,9 +32,9 @@ module IssuesHelper end end - def grouped_issue_list(issues, query, issue_count_by_group, &block) + def grouped_issue_list(issues, query, &block) ancestors = [] - grouped_query_results(issues, query, issue_count_by_group) do |issue, group_name, group_count, group_totals| + grouped_query_results(issues, query) do |issue, group_name, group_count, group_totals| while (ancestors.any? && !issue.is_descendant_of?(ancestors.last)) ancestors.pop end diff --git a/app/helpers/queries_helper.rb b/app/helpers/queries_helper.rb index c356ca0d4..197bbb998 100644 --- a/app/helpers/queries_helper.rb +++ b/app/helpers/queries_helper.rb @@ -115,7 +115,8 @@ module QueriesHelper render :partial => 'queries/columns', :locals => {:query => query, :tag_name => tag_name} end - def grouped_query_results(items, query, item_count_by_group, &block) + def grouped_query_results(items, query, &block) + result_count_by_group = query.result_count_by_group previous_group, first = false, true totals_by_group = query.totalable_columns.inject({}) do |h, column| h[column] = query.total_by_group_for(column) @@ -132,7 +133,7 @@ module QueriesHelper group_name = format_object(group) end group_name ||= "" - group_count = item_count_by_group ? item_count_by_group[group] : nil + group_count = result_count_by_group ? result_count_by_group[group] : nil group_totals = totals_by_group.map {|column, t| total_tag(column, t[group] || 0)}.join(" ").html_safe end end diff --git a/app/models/issue_query.rb b/app/models/issue_query.rb index 7f399f469..71fe8d288 100644 --- a/app/models/issue_query.rb +++ b/app/models/issue_query.rb @@ -245,13 +245,6 @@ class IssueQuery < Query raise StatementInvalid.new(e.message) end - # Returns the issue count by group or nil if query is not grouped - def issue_count_by_group - grouped_query do |scope| - scope.count - end - end - # Returns sum of all the issue's estimated_hours def total_for_estimated_hours(scope) map_total(scope.sum(:estimated_hours)) {|t| t.to_f.round(2)} diff --git a/app/models/query.rb b/app/models/query.rb index 321821a93..7a43ca6fc 100644 --- a/app/models/query.rb +++ b/app/models/query.rb @@ -846,6 +846,13 @@ class Query < ActiveRecord::Base filters_clauses.any? ? filters_clauses.join(' AND ') : nil end + # Returns the result count by group or nil if query is not grouped + def result_count_by_group + grouped_query do |scope| + scope.count + end + end + # Returns the sum of values for the given column def total_for(column) total_with_scope(column, base_scope) diff --git a/app/views/issues/_list.html.erb b/app/views/issues/_list.html.erb index ed97d046f..1e7d01ef7 100644 --- a/app/views/issues/_list.html.erb +++ b/app/views/issues/_list.html.erb @@ -14,7 +14,7 @@
          +
          <% query.inline_columns.each do |column| %> - <%= column_header(column) %> + <%= column_header(query, column) %> <% end %> diff --git a/app/views/queries/_query_form.html.erb b/app/views/queries/_query_form.html.erb index 7cc01ed2f..9ca432b62 100644 --- a/app/views/queries/_query_form.html.erb +++ b/app/views/queries/_query_form.html.erb @@ -1,5 +1,6 @@ <%= hidden_field_tag 'set_filter', '1' %> <%= hidden_field_tag 'type', @query.type, :disabled => true, :id => 'query_type' %> +<%= query_hidden_sort_tag(@query) %>
          diff --git a/app/views/timelog/_list.html.erb b/app/views/timelog/_list.html.erb index d4836056a..21115dfde 100644 --- a/app/views/timelog/_list.html.erb +++ b/app/views/timelog/_list.html.erb @@ -9,7 +9,7 @@ :title => "#{l(:button_check_all)}/#{l(:button_uncheck_all)}" %> <% @query.inline_columns.each do |column| %> - <%= column_header(column) %> + <%= column_header(@query, column) %> <% end %>
          diff --git a/lib/redmine/helpers/time_report.rb b/lib/redmine/helpers/time_report.rb index e06499ea8..9e3448ba7 100644 --- a/lib/redmine/helpers/time_report.rb +++ b/lib/redmine/helpers/time_report.rb @@ -46,6 +46,7 @@ module Redmine time_columns = %w(tyear tmonth tweek spent_on) @hours = [] @scope.includes(:activity). + reorder(nil). group(@criteria.collect{|criteria| @available_criteria[criteria][:sql]} + time_columns). joins(@criteria.collect{|criteria| @available_criteria[criteria][:joins]}.compact). sum(:hours).each do |hash, hours| diff --git a/lib/redmine/sort_criteria.rb b/lib/redmine/sort_criteria.rb new file mode 100644 index 000000000..5fd2e978d --- /dev/null +++ b/lib/redmine/sort_criteria.rb @@ -0,0 +1,104 @@ +# Redmine - project management software +# Copyright (C) 2006-2017 Jean-Philippe Lang +# +# This program is free software; you can redistribute it and/or +# modify it under the terms of the GNU General Public License +# as published by the Free Software Foundation; either version 2 +# of the License, or (at your option) any later version. +# +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU General Public License for more details. +# +# You should have received a copy of the GNU General Public License +# along with this program; if not, write to the Free Software +# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. + +module Redmine + class SortCriteria < Array + def initialize(arg=nil) + super() + if arg.is_a?(Array) + replace arg + elsif arg.is_a?(String) + replace arg.split(',').collect {|s| s.split(':')[0..1]} + elsif arg.is_a?(Hash) + replace arg.values + elsif arg + raise ArgumentError.new("SortCriteria#new takes an Array, String or Hash, not a #{arg.class.name}.") + end + normalize! + end + + def to_param + self.collect {|k,o| k + (o == 'desc' ? ':desc' : '')}.join(',') + end + + def to_a + Array.new(self) + end + + def add!(key, asc) + key = key.to_s + delete_if {|k,o| k == key} + prepend([key, asc]) + normalize! + end + + def add(*args) + self.class.new(self).add!(*args) + end + + def first_key + first.try(:first) + end + + def first_asc? + first.try(:last) == 'asc' + end + + def key_at(arg) + self[arg].try(:first) + end + + def order_at(arg) + self[arg].try(:last) + end + + def order_for(key) + detect {|k, order| key.to_s == k}.try(:last) + end + + def sort_clause(sortable_columns) + if sortable_columns.is_a?(Array) + sortable_columns = sortable_columns.inject({}) {|h,k| h[k]=k; h} + end + + sql = self.collect do |k,o| + if s = sortable_columns[k] + s = [s] unless s.is_a?(Array) + s.collect {|c| append_order(c, o)} + end + end.flatten.compact + sql.blank? ? nil : sql + end + + private + + def normalize! + self.collect! {|s| s = Array(s); [s.first, (s.last == false || s.last.to_s == 'desc') ? 'desc' : 'asc']} + self.slice!(3) + self + end + + # Appends ASC/DESC to the sort criterion unless it has a fixed order + def append_order(criterion, order) + if criterion =~ / (asc|desc)$/i + criterion + else + "#{criterion} #{order.to_s.upcase}" + end + end + end +end diff --git a/test/functional/issues_controller_test.rb b/test/functional/issues_controller_test.rb index 24ec49a70..914d7c386 100644 --- a/test/functional/issues_controller_test.rb +++ b/test/functional/issues_controller_test.rb @@ -682,10 +682,6 @@ class IssuesControllerTest < Redmine::ControllerTest get :index, :sort => 'tracker,id:desc' assert_response :success - sort_params = @request.session['issues_index_sort'] - assert sort_params.is_a?(String) - assert_equal 'tracker,id:desc', sort_params - assert_equal issues_in_list.sort_by {|issue| [issue.tracker.position, -issue.id]}, issues_in_list assert_select 'table.issues.sort-by-tracker.sort-asc' end @@ -1402,8 +1398,7 @@ class IssuesControllerTest < Redmine::ControllerTest end def test_show_should_display_prev_next_links_with_query_in_session - @request.session[:issue_query] = {:filters => {'status_id' => {:values => [''], :operator => 'o'}}, :project_id => nil} - @request.session['issues_index_sort'] = 'id' + @request.session[:issue_query] = {:filters => {'status_id' => {:values => [''], :operator => 'o'}}, :project_id => nil, :sort => [['id', 'asc']]} with_settings :display_subprojects_issues => '0' do get :show, :id => 3 @@ -1440,7 +1435,7 @@ class IssuesControllerTest < Redmine::ControllerTest @request.session[:issue_query] = {:filters => {'status_id' => {:values => [''], :operator => 'o'}}, :project_id => nil} %w(project tracker status priority author assigned_to category fixed_version).each do |assoc_sort| - @request.session['issues_index_sort'] = assoc_sort + @request.session[:issue_query][:sort] = [[assoc_sort, 'asc']] get :show, :id => 3 assert_response :success, "Wrong response status for #{assoc_sort} sort" @@ -1452,8 +1447,7 @@ class IssuesControllerTest < Redmine::ControllerTest end def test_show_should_display_prev_next_links_with_project_query_in_session - @request.session[:issue_query] = {:filters => {'status_id' => {:values => [''], :operator => 'o'}}, :project_id => 1} - @request.session['issues_index_sort'] = 'id' + @request.session[:issue_query] = {:filters => {'status_id' => {:values => [''], :operator => 'o'}}, :project_id => 1, :sort => [['id','asc']]} with_settings :display_subprojects_issues => '0' do get :show, :id => 3 @@ -1468,8 +1462,7 @@ class IssuesControllerTest < Redmine::ControllerTest end def test_show_should_not_display_prev_link_for_first_issue - @request.session[:issue_query] = {:filters => {'status_id' => {:values => [''], :operator => 'o'}}, :project_id => 1} - @request.session['issues_index_sort'] = 'id' + @request.session[:issue_query] = {:filters => {'status_id' => {:values => [''], :operator => 'o'}}, :project_id => 1, :sort => [['id', 'asc']]} with_settings :display_subprojects_issues => '0' do get :show, :id => 1 @@ -1483,8 +1476,7 @@ class IssuesControllerTest < Redmine::ControllerTest end def test_show_should_not_display_prev_next_links_for_issue_not_in_query_results - @request.session[:issue_query] = {:filters => {'status_id' => {:values => [''], :operator => 'c'}}, :project_id => 1} - @request.session['issues_index_sort'] = 'id' + @request.session[:issue_query] = {:filters => {'status_id' => {:values => [''], :operator => 'c'}}, :project_id => 1, :sort => [['id', 'asc']]} get :show, :id => 1 assert_response :success diff --git a/test/functional/issues_custom_fields_visibility_test.rb b/test/functional/issues_custom_fields_visibility_test.rb index 6ebe0c48f..cd395d88c 100644 --- a/test/functional/issues_custom_fields_visibility_test.rb +++ b/test/functional/issues_custom_fields_visibility_test.rb @@ -215,7 +215,7 @@ class IssuesCustomFieldsVisibilityTest < Redmine::ControllerTest # ValueB is not visible to user and ignored while sorting assert_equal %w(ValueB ValueA ValueC), issues_in_list.map{|i| i.custom_field_value(@field2)} - get :index, :set_filter => '1', "cf_#{@field2.id}" => '*' + get :index, :set_filter => '1', "cf_#{@field2.id}" => '*', :sort => "cf_#{@field2.id}" assert_equal %w(ValueA ValueC), issues_in_list.map{|i| i.custom_field_value(@field2)} CustomField.update_all(:field_format => 'list') diff --git a/test/unit/helpers/sort_helper_test.rb b/test/unit/helpers/sort_helper_test.rb index 33657dced..069474377 100644 --- a/test/unit/helpers/sort_helper_test.rb +++ b/test/unit/helpers/sort_helper_test.rb @@ -64,8 +64,8 @@ class SortHelperTest < Redmine::HelperTest sort_init 'attr1', 'desc' sort_update({'attr1' => 'table1.attr1', 'attr2' => 'table2.attr2'}) - assert_equal ['table1.attr1 DESC'], sort_clause - assert_equal 'attr1:desc', @session['foo_bar_sort'] + assert_nil sort_clause + assert_equal 'invalid_key', @session['foo_bar_sort'] end def test_invalid_order_params_sort diff --git a/test/unit/query_test.rb b/test/unit/query_test.rb index d691f66be..885c30caa 100644 --- a/test/unit/query_test.rb +++ b/test/unit/query_test.rb @@ -1441,7 +1441,7 @@ class QueryTest < ActiveSupport::TestCase def test_default_sort q = IssueQuery.new - assert_equal [], q.sort_criteria + assert_equal [['id', 'desc']], q.sort_criteria end def test_set_sort_criteria_with_hash From 9db3d81e462c2bb52a5c8141cb14908a978f4ca9 Mon Sep 17 00:00:00 2001 From: Jean-Philippe Lang Date: Mon, 13 Mar 2017 19:20:16 +0000 Subject: [PATCH 0711/1117] Removes unneeded inclusions of sort_helper. git-svn-id: http://svn.redmine.org/redmine/trunk@16391 e93f8b46-1217-0410-a6f0-8f06a7374b81 --- app/controllers/admin_controller.rb | 2 -- app/controllers/calendars_controller.rb | 2 -- app/controllers/gantts_controller.rb | 2 -- 3 files changed, 6 deletions(-) diff --git a/app/controllers/admin_controller.rb b/app/controllers/admin_controller.rb index 900459816..3920b7427 100644 --- a/app/controllers/admin_controller.rb +++ b/app/controllers/admin_controller.rb @@ -23,8 +23,6 @@ class AdminController < ApplicationController menu_item :info, :only => :info before_action :require_admin - helper :sort - include SortHelper def index @no_configuration_data = Redmine::DefaultData::Loader::no_data? diff --git a/app/controllers/calendars_controller.rb b/app/controllers/calendars_controller.rb index 880f0b8c2..30eed1bbd 100644 --- a/app/controllers/calendars_controller.rb +++ b/app/controllers/calendars_controller.rb @@ -25,8 +25,6 @@ class CalendarsController < ApplicationController helper :projects helper :queries include QueriesHelper - helper :sort - include SortHelper def show if params[:year] and params[:year].to_i > 1900 diff --git a/app/controllers/gantts_controller.rb b/app/controllers/gantts_controller.rb index c9858bb9a..4ebe2af7b 100644 --- a/app/controllers/gantts_controller.rb +++ b/app/controllers/gantts_controller.rb @@ -26,8 +26,6 @@ class GanttsController < ApplicationController helper :projects helper :queries include QueriesHelper - helper :sort - include SortHelper include Redmine::Export::PDF def show From 1946c71b3b2a571bad7002fee1a10608d4dc1257 Mon Sep 17 00:00:00 2001 From: Jean-Philippe Lang Date: Mon, 13 Mar 2017 19:55:29 +0000 Subject: [PATCH 0712/1117] Use explicit url. git-svn-id: http://svn.redmine.org/redmine/trunk@16392 e93f8b46-1217-0410-a6f0-8f06a7374b81 --- app/views/my/blocks/_timelog.html.erb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app/views/my/blocks/_timelog.html.erb b/app/views/my/blocks/_timelog.html.erb index c7ec978fb..23ccc8271 100644 --- a/app/views/my/blocks/_timelog.html.erb +++ b/app/views/my/blocks/_timelog.html.erb @@ -15,7 +15,7 @@ entries_by_day = entries.group_by(&:spent_on)
          @@ -9,7 +9,7 @@ :title => "#{l(:button_check_all)}/#{l(:button_uncheck_all)}" %>
          - <%= label_tag "available_columns", l(:description_available_columns) %> + <%= label_tag available_tag_id, l(:description_available_columns) %>
          <%= select_tag 'available_columns', options_for_select(query_available_inline_columns_options(query)), + :id => available_tag_id, :multiple => true, :size => 10, :style => "width:150px", - :ondblclick => "moveOptions(this.form.available_columns, this.form.selected_columns);" %> + :ondblclick => "moveOptions(this.form.#{available_tag_id}, this.form.#{selected_tag_id});" %>

          + onclick="moveOptions(this.form.<%= available_tag_id %>, this.form.<%= selected_tag_id %>);" />
          + onclick="moveOptions(this.form.<%= selected_tag_id %>, this.form.<%= available_tag_id %>);" />
          - <%= label_tag "selected_columns", l(:description_selected_columns) %> + <%= label_tag selected_tag_id, l(:description_selected_columns) %>
          <%= select_tag tag_name, options_for_select(query_selected_inline_columns_options(query)), - :id => 'selected_columns', :multiple => true, :size => 10, :style => "width:150px", - :ondblclick => "moveOptions(this.form.selected_columns, this.form.available_columns);" %> + :id => selected_tag_id, + :multiple => true, :size => 10, :style => "width:150px", + :ondblclick => "moveOptions(this.form.#{selected_tag_id}, this.form.#{available_tag_id});" %>
          -
          -
          -
          - +
          +
          +
          +
          @@ -34,7 +40,7 @@ <%= javascript_tag do %> $(document).ready(function(){ $('.query-columns').closest('form').submit(function(){ - $('#selected_columns option').prop('selected', true); + $('#<%= selected_tag_id %> option').prop('selected', true); }); }); <% end %> diff --git a/lib/redmine/my_page.rb b/lib/redmine/my_page.rb index 0c11459e4..06f750f4e 100644 --- a/lib/redmine/my_page.rb +++ b/lib/redmine/my_page.rb @@ -20,13 +20,13 @@ module Redmine include Redmine::I18n CORE_BLOCKS = { - 'issuesassignedtome' => :label_assigned_to_me_issues, - 'issuesreportedbyme' => :label_reported_issues, - 'issueswatched' => :label_watched_issues, - 'news' => :label_news_latest, - 'calendar' => :label_calendar, - 'documents' => :label_document_plural, - 'timelog' => :label_spent_time + 'issuesassignedtome' => {:label => :label_assigned_to_me_issues, :partial => 'my/blocks/issues'}, + 'issuesreportedbyme' => {:label => :label_reported_issues, :partial => 'my/blocks/issues'}, + 'issueswatched' => {:label => :label_watched_issues, :partial => 'my/blocks/issues'}, + 'news' => {:label => :label_news_latest, :partial => 'my/blocks/news'}, + 'calendar' => {:label => :label_calendar, :partial => 'my/blocks/calendar'}, + 'documents' => {:label => :label_document_plural, :partial => 'my/blocks/documents'}, + 'timelog' => {:label => :label_spent_time, :partial => 'my/blocks/timelog'} } # Returns the available blocks @@ -36,8 +36,9 @@ module Redmine def self.block_options options = [] - blocks.each do |k, v| - options << [l("my.blocks.#{v}", :default => [v, v.to_s.humanize]), k.dasherize] + blocks.each do |block, block_options| + label = block_options[:label] + options << [l("my.blocks.#{label}", :default => [label, label.to_s.humanize]), block.dasherize] end options end @@ -46,7 +47,7 @@ module Redmine def self.additional_blocks @@additional_blocks ||= Dir.glob("#{Redmine::Plugin.directory}/*/app/views/my/blocks/_*.{rhtml,erb}").inject({}) do |h,file| name = File.basename(file).split('.').first.gsub(/^_/, '') - h[name] = name.to_sym + h[name] = {:label => name.to_sym, :partial => "my/blocks/#{name}"} h end end diff --git a/public/stylesheets/application.css b/public/stylesheets/application.css index b60f6a51b..1b0206d7c 100644 --- a/public/stylesheets/application.css +++ b/public/stylesheets/application.css @@ -1132,6 +1132,7 @@ div.wiki img {vertical-align:middle; max-width:100%;} .handle {cursor: move;} +#my-page .list th.checkbox, #my-page .list td.checkbox {display:none;} /***** Gantt chart *****/ .gantt_hdr { position:absolute; diff --git a/test/functional/issues_controller_test.rb b/test/functional/issues_controller_test.rb index 914d7c386..10ed24c1c 100644 --- a/test/functional/issues_controller_test.rb +++ b/test/functional/issues_controller_test.rb @@ -797,7 +797,7 @@ class IssuesControllerTest < Redmine::ControllerTest assert_equal columns, session[:issue_query][:column_names].map(&:to_s) # ensure only these columns are kept in the selected columns list - assert_select 'select#selected_columns option' do + assert_select 'select[name=?] option', 'c[]' do assert_select 'option', 3 assert_select 'option[value=tracker]' assert_select 'option[value=project]', 0 diff --git a/test/functional/my_controller_test.rb b/test/functional/my_controller_test.rb index 76237dfb5..f79cca5d9 100644 --- a/test/functional/my_controller_test.rb +++ b/test/functional/my_controller_test.rb @@ -51,6 +51,47 @@ class MyControllerTest < Redmine::ControllerTest end end + def test_page_with_assigned_issues_block_and_no_custom_settings + preferences = User.find(2).pref + preferences.my_page_layout = {'top' => ['issuesassignedtome']} + preferences.my_page_settings = nil + preferences.save! + + get :page + assert_select '#block-issuesassignedtome' do + assert_select 'table.issues' do + assert_select 'th a[data-remote=true][data-method=post]', :text => 'Tracker' + end + assert_select '#issuesassignedtome-settings' do + assert_select 'select[name=?]', 'settings[issuesassignedtome][columns][]' + end + end + end + + def test_page_with_assigned_issues_block_and_custom_columns + preferences = User.find(2).pref + preferences.my_page_layout = {'top' => ['issuesassignedtome']} + preferences.my_page_settings = {'issuesassignedtome' => {:columns => ['tracker', 'subject', 'due_date']}} + preferences.save! + + get :page + assert_select '#block-issuesassignedtome' do + assert_select 'table.issues td.due_date' + end + end + + def test_page_with_assigned_issues_block_and_custom_sort + preferences = User.find(2).pref + preferences.my_page_layout = {'top' => ['issuesassignedtome']} + preferences.my_page_settings = {'issuesassignedtome' => {:sort => 'due_date'}} + preferences.save! + + get :page + assert_select '#block-issuesassignedtome' do + assert_select 'table.issues.sort-by-due-date' + end + end + def test_page_with_all_blocks blocks = Redmine::MyPage.blocks.keys preferences = User.find(2).pref diff --git a/test/functional/settings_controller_test.rb b/test/functional/settings_controller_test.rb index d7dacc0ee..098c4b55b 100644 --- a/test/functional/settings_controller_test.rb +++ b/test/functional/settings_controller_test.rb @@ -51,7 +51,7 @@ class SettingsControllerTest < Redmine::ControllerTest assert_response :success end - assert_select 'select[id=selected_columns][name=?]', 'settings[issue_list_default_columns][]' do + assert_select 'select[name=?]', 'settings[issue_list_default_columns][]' do assert_select 'option', 4 assert_select 'option[value=tracker]', :text => 'Tracker' assert_select 'option[value=subject]', :text => 'Subject' @@ -59,7 +59,7 @@ class SettingsControllerTest < Redmine::ControllerTest assert_select 'option[value=updated_on]', :text => 'Updated' end - assert_select 'select[id=available_columns]' do + assert_select 'select[name=?]', 'available_columns[]' do assert_select 'option[value=tracker]', 0 assert_select 'option[value=priority]', :text => 'Priority' end From a0db91e2ab4b6d5cbe608d54a88b529c5e92ea69 Mon Sep 17 00:00:00 2001 From: Jean-Philippe Lang Date: Tue, 14 Mar 2017 18:19:26 +0000 Subject: [PATCH 0721/1117] Removes issues/list_simple partial, no longer used. git-svn-id: http://svn.redmine.org/redmine/trunk@16401 e93f8b46-1217-0410-a6f0-8f06a7374b81 --- app/views/issues/_list_simple.html.erb | 29 -------------------------- public/stylesheets/application.css | 5 ----- 2 files changed, 34 deletions(-) delete mode 100644 app/views/issues/_list_simple.html.erb diff --git a/app/views/issues/_list_simple.html.erb b/app/views/issues/_list_simple.html.erb deleted file mode 100644 index 1e23b161b..000000000 --- a/app/views/issues/_list_simple.html.erb +++ /dev/null @@ -1,29 +0,0 @@ -<% if issues && issues.any? %> -<%= form_tag({}, :data => {:cm_url => issues_context_menu_path}) do %> - - - - - - - - - <% for issue in issues %> - - - - - - - <% end %> - -
          #<%=l(:field_project)%><%=l(:field_status)%><%=l(:field_subject)%>
          - <%= check_box_tag("ids[]", issue.id, false, :style => 'display:none;', :id => nil) %> - <%= link_to("#{issue.tracker} ##{issue.id}", issue_path(issue)) %> - <%= link_to_project(issue.project) %><%= issue.status %> - <%= link_to(issue.subject, issue_path(issue)) %> -
          -<% end %> -<% else %> -

          <%= l(:label_no_data) %>

          -<% end %> diff --git a/public/stylesheets/application.css b/public/stylesheets/application.css index 1b0206d7c..99a034a2f 100644 --- a/public/stylesheets/application.css +++ b/public/stylesheets/application.css @@ -361,11 +361,6 @@ table.boards td.last-message {text-align:left;font-size:80%;} div.table-list.boards .table-list-cell.name {width: 30%;} -#content table.list-simple {table-layout:fixed;} -#content table.list-simple td {white-space:nowrap; overflow:hidden; text-overflow: ellipsis; text-align:left;} -#content table.list-simple th.id, #content table.list-simple th.project {width:18%;} -#content table.list-simple th.status {width:14%;} - table.messages td.last_message {text-align:left;} #query_form_content {font-size:90%;} From 6eaceed7b5557e12e191fe117baf4e8f81251c6a Mon Sep 17 00:00:00 2001 From: Jean-Philippe Lang Date: Tue, 14 Mar 2017 18:20:47 +0000 Subject: [PATCH 0722/1117] Delete :issue_query from session instead of :query. git-svn-id: http://svn.redmine.org/redmine/trunk@16402 e93f8b46-1217-0410-a6f0-8f06a7374b81 --- app/controllers/application_controller.rb | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/app/controllers/application_controller.rb b/app/controllers/application_controller.rb index dcc693f50..73e332617 100644 --- a/app/controllers/application_controller.rb +++ b/app/controllers/application_controller.rb @@ -642,8 +642,7 @@ class ApplicationController < ActionController::Base # Rescues an invalid query statement. Just in case... def query_statement_invalid(exception) logger.error "Query::StatementInvalid: #{exception.message}" if logger - session.delete(:query) - sort_clear if respond_to?(:sort_clear) + session.delete(:issue_query) render_error "An error occurred while executing the query and has been logged. Please report this error to your Redmine administrator." end From 6bc537f6f9d8318615fcc0098745645bb6ad79da Mon Sep 17 00:00:00 2001 From: Jean-Philippe Lang Date: Tue, 14 Mar 2017 18:25:23 +0000 Subject: [PATCH 0723/1117] Adds titles on icon links. git-svn-id: http://svn.redmine.org/redmine/trunk@16403 e93f8b46-1217-0410-a6f0-8f06a7374b81 --- app/helpers/my_helper.rb | 7 +++++-- app/views/my/blocks/_issues.erb | 2 +- app/views/my/blocks/_timelog.html.erb | 2 +- 3 files changed, 7 insertions(+), 4 deletions(-) diff --git a/app/helpers/my_helper.rb b/app/helpers/my_helper.rb index 2a20a7bf2..5181def2d 100644 --- a/app/helpers/my_helper.rb +++ b/app/helpers/my_helper.rb @@ -34,8 +34,11 @@ module MyHelper def render_block(block, user) content = render_block_content(block, user) if content.present? - handle = content_tag('span', '', :class => 'sort-handle') - close = link_to(l(:button_delete), {:action => "remove_block", :block => block}, :remote => true, :method => 'post', :class => "icon-only icon-close") + handle = content_tag('span', '', :class => 'sort-handle', :title => l(:button_move)) + close = link_to(l(:button_delete), + {:action => "remove_block", :block => block}, + :remote => true, :method => 'post', + :class => "icon-only icon-close", :title => l(:button_delete)) content = content_tag('div', handle + close, :class => 'contextual') + content content_tag('div', content, :class => "mypage-box", :id => "block-#{block}") diff --git a/app/views/my/blocks/_issues.erb b/app/views/my/blocks/_issues.erb index bbd10af33..1b208a297 100644 --- a/app/views/my/blocks/_issues.erb +++ b/app/views/my/blocks/_issues.erb @@ -1,7 +1,7 @@ <% issues, query = issues_items(block, settings) %>
          - <%= link_to_function l(:label_options), "$('##{block}-settings').toggle();", :class => 'icon-only icon-settings' %> + <%= link_to_function l(:label_options), "$('##{block}-settings').toggle();", :class => 'icon-only icon-settings', :title => l(:label_options) %>

          diff --git a/app/views/my/blocks/_timelog.html.erb b/app/views/my/blocks/_timelog.html.erb index 23ccc8271..e5e36612d 100644 --- a/app/views/my/blocks/_timelog.html.erb +++ b/app/views/my/blocks/_timelog.html.erb @@ -5,7 +5,7 @@ entries_by_day = entries.group_by(&:spent_on)
          <%= link_to l(:button_log_time), new_time_entry_path, :class => "icon icon-add" if User.current.allowed_to?(:log_time, nil, :global => true) %> - <%= link_to_function l(:label_options), "$('#timelog-settings').toggle();", :class => 'icon-only icon-settings' %> + <%= link_to_function l(:label_options), "$('#timelog-settings').toggle();", :class => 'icon-only icon-settings', :title => l(:label_options) %>

          From 945f3f949d40ef3ef2e0a394b6f9062818029127 Mon Sep 17 00:00:00 2001 From: Jean-Philippe Lang Date: Tue, 14 Mar 2017 18:42:09 +0000 Subject: [PATCH 0724/1117] Adds UI test for sorting issues on "My page" (#1565). git-svn-id: http://svn.redmine.org/redmine/trunk@16404 e93f8b46-1217-0410-a6f0-8f06a7374b81 --- test/ui/my_page_test_ui.rb | 54 ++++++++++++++++++++++++++++++++++++++ 1 file changed, 54 insertions(+) create mode 100644 test/ui/my_page_test_ui.rb diff --git a/test/ui/my_page_test_ui.rb b/test/ui/my_page_test_ui.rb new file mode 100644 index 000000000..1f690ec41 --- /dev/null +++ b/test/ui/my_page_test_ui.rb @@ -0,0 +1,54 @@ +# Redmine - project management software +# Copyright (C) 2006-2016 Jean-Philippe Lang +# +# This program is free software; you can redistribute it and/or +# modify it under the terms of the GNU General Public License +# as published by the Free Software Foundation; either version 2 +# of the License, or (at your option) any later version. +# +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU General Public License for more details. +# +# You should have received a copy of the GNU General Public License +# along with this program; if not, write to the Free Software +# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. + +require File.expand_path('../base', __FILE__) + +class Redmine::UiTest::MyPageTest < Redmine::UiTest::Base + fixtures :projects, :users, :email_addresses, :roles, :members, :member_roles, + :trackers, :projects_trackers, :enabled_modules, :issue_statuses, :issues, + :enumerations, :custom_fields, :custom_values, :custom_fields_trackers, + :watchers, :journals, :journal_details + + def test_sort_assigned_issues + preferences = User.find(2).pref + preferences.my_page_layout = {'top' => ['issuesassignedtome']} + preferences.my_page_settings = {'issuesassignedtome' => {:columns => ['tracker', 'subject', 'due_date'], :sort => 'id:desc'}} + preferences.save! + + log_user('jsmith', 'jsmith') + visit '/my/page' + assert page.has_css?('table.issues.sort-by-id') + assert page.has_css?('table.issues.sort-desc') + + within('#block-issuesassignedtome') do + # sort by tracker asc + click_link 'Tracker' + assert page.has_css?('table.issues.sort-by-tracker') + assert page.has_css?('table.issues.sort-asc') + + # and desc + click_link 'Tracker' + assert page.has_css?('table.issues.sort-by-tracker') + assert page.has_css?('table.issues.sort-desc') + end + + # reload the page, sort order should be preserved + visit '/my/page' + assert page.has_css?('table.issues.sort-by-tracker') + assert page.has_css?('table.issues.sort-desc') + end +end From d21627b70f5431de33a8c532b7b73799c5ae1700 Mon Sep 17 00:00:00 2001 From: Jean-Philippe Lang Date: Wed, 15 Mar 2017 17:52:41 +0000 Subject: [PATCH 0725/1117] Clear settings for blocks that are no longer used. git-svn-id: http://svn.redmine.org/redmine/trunk@16405 e93f8b46-1217-0410-a6f0-8f06a7374b81 --- app/models/user_preference.rb | 8 +++++++- test/functional/my_controller_test.rb | 9 +++++---- test/unit/user_preference_test.rb | 11 +++++++++++ 3 files changed, 23 insertions(+), 5 deletions(-) diff --git a/app/models/user_preference.rb b/app/models/user_preference.rb index 0ebafa839..e0b17631c 100644 --- a/app/models/user_preference.rb +++ b/app/models/user_preference.rb @@ -23,7 +23,7 @@ class UserPreference < ActiveRecord::Base attr_protected :others, :user_id - before_save :set_others_hash + before_save :set_others_hash, :clear_unused_block_settings safe_attributes 'hide_mail', 'time_zone', @@ -132,4 +132,10 @@ class UserPreference < ActiveRecord::Base block_settings = my_page_settings(block).merge(settings.symbolize_keys) my_page_settings[block] = block_settings end + + def clear_unused_block_settings + blocks = my_page_layout.values.flatten + my_page_settings.keep_if {|block, settings| blocks.include?(block)} + end + private :clear_unused_block_settings end diff --git a/test/functional/my_controller_test.rb b/test/functional/my_controller_test.rb index f79cca5d9..f6c9d5ab2 100644 --- a/test/functional/my_controller_test.rb +++ b/test/functional/my_controller_test.rb @@ -266,12 +266,12 @@ class MyControllerTest < Redmine::ControllerTest user = User.generate!(:language => 'en') @request.session[:user_id] = user.id - xhr :post, :update_page, :settings => {'timelog' => {'days' => '14'}} + xhr :post, :update_page, :settings => {'issuesassignedtome' => {'columns' => ['subject', 'due_date']}} assert_response :success - assert_include '$("#block-timelog").replaceWith(', response.body - assert_include '14 days', response.body + assert_include '$("#block-issuesassignedtome").replaceWith(', response.body + assert_include 'Due date', response.body - assert_equal({:days => "14"}, user.reload.pref.my_page_settings('timelog')) + assert_equal({:columns => ['subject', 'due_date']}, user.reload.pref.my_page_settings('issuesassignedtome')) end def test_add_block @@ -321,6 +321,7 @@ class MyControllerTest < Redmine::ControllerTest end def test_reset_rss_key_without_existing_key + Token.delete_all assert_nil User.find(2).rss_token post :reset_rss_key diff --git a/test/unit/user_preference_test.rb b/test/unit/user_preference_test.rb index bbf5f70ba..757a795d9 100644 --- a/test/unit/user_preference_test.rb +++ b/test/unit/user_preference_test.rb @@ -93,4 +93,15 @@ class UserPreferenceTest < ActiveSupport::TestCase up[:foo] = 'bar' assert_equal 'bar', up[:foo] end + + def test_removing_a_block_should_clear_its_settings + up = User.find(2).pref + up.my_page_layout = {'top' => ['news', 'documents']} + up.my_page_settings = {'news' => {:foo => 'bar'}, 'documents' => {:baz => 'quz'}} + up.save! + + up.remove_block 'news' + up.save! + assert_equal ['documents'], up.my_page_settings.keys + end end From f828a985ae49d2de6aa6aef1705778cfd3d7b433 Mon Sep 17 00:00:00 2001 From: Jean-Philippe Lang Date: Wed, 15 Mar 2017 17:59:31 +0000 Subject: [PATCH 0726/1117] Let user display a custom query on "My page" (#1565). git-svn-id: http://svn.redmine.org/redmine/trunk@16406 e93f8b46-1217-0410-a6f0-8f06a7374b81 --- app/helpers/my_helper.rb | 11 ++++++ app/views/my/blocks/_issues.erb | 26 +++++++++++++ lib/redmine/my_page.rb | 1 + test/functional/my_controller_test.rb | 54 ++++++++++++++++++++++++++- 4 files changed, 91 insertions(+), 1 deletion(-) diff --git a/app/helpers/my_helper.rb b/app/helpers/my_helper.rb index 5181def2d..2fa127226 100644 --- a/app/helpers/my_helper.rb +++ b/app/helpers/my_helper.rb @@ -118,6 +118,17 @@ module MyHelper return issues, query end + def issuequery_items(settings) + query = IssueQuery.visible.find_by_id(settings[:query_id]) + return unless query + + query.column_names = settings[:columns] if settings[:columns].present? + query.sort_criteria = settings[:sort] if settings[:sort].present? + issues = query.issues(:limit => 10) + + return issues, query + end + def news_items News.visible. where(:project_id => User.current.projects.map(&:id)). diff --git a/app/views/my/blocks/_issues.erb b/app/views/my/blocks/_issues.erb index 1b208a297..0174bac2e 100644 --- a/app/views/my/blocks/_issues.erb +++ b/app/views/my/blocks/_issues.erb @@ -1,5 +1,6 @@ <% issues, query = issues_items(block, settings) %> +<% if query %>
          <%= link_to_function l(:label_options), "$('##{block}-settings').toggle();", :class => 'icon-only icon-settings', :title => l(:label_options) %>
          @@ -40,3 +41,28 @@ issues_path(query.as_params.merge(:format => 'atom', :key => User.current.rss_key)), {:title => query.name}) %> <% end %> + +<% else %> +<% visible_queries = IssueQuery.visible.sorted %> + +

          + <%= l(:label_issue_plural) %> +

          + +
          + <%= form_tag(my_page_path, :remote => true) do %> +
          +

          + +

          +
          +

          + <%= submit_tag l(:button_save) %> +

          + <% end %> +
          + +<% end %> diff --git a/lib/redmine/my_page.rb b/lib/redmine/my_page.rb index 06f750f4e..dc9c6928f 100644 --- a/lib/redmine/my_page.rb +++ b/lib/redmine/my_page.rb @@ -23,6 +23,7 @@ module Redmine 'issuesassignedtome' => {:label => :label_assigned_to_me_issues, :partial => 'my/blocks/issues'}, 'issuesreportedbyme' => {:label => :label_reported_issues, :partial => 'my/blocks/issues'}, 'issueswatched' => {:label => :label_watched_issues, :partial => 'my/blocks/issues'}, + 'issuequery' => {:label => :label_issue_plural, :partial => 'my/blocks/issues'}, 'news' => {:label => :label_news_latest, :partial => 'my/blocks/news'}, 'calendar' => {:label => :label_calendar, :partial => 'my/blocks/calendar'}, 'documents' => {:label => :label_document_plural, :partial => 'my/blocks/documents'}, diff --git a/test/functional/my_controller_test.rb b/test/functional/my_controller_test.rb index f6c9d5ab2..f6771a1f5 100644 --- a/test/functional/my_controller_test.rb +++ b/test/functional/my_controller_test.rb @@ -19,7 +19,7 @@ require File.expand_path('../../test_helper', __FILE__) class MyControllerTest < Redmine::ControllerTest fixtures :users, :email_addresses, :user_preferences, :roles, :projects, :members, :member_roles, - :issues, :issue_statuses, :trackers, :enumerations, :custom_fields, :auth_sources + :issues, :issue_statuses, :trackers, :enumerations, :custom_fields, :auth_sources, :queries def setup @request.session[:user_id] = 2 @@ -91,6 +91,58 @@ class MyControllerTest < Redmine::ControllerTest assert_select 'table.issues.sort-by-due-date' end end + + def test_page_with_issuequery_block_and_no_settings + user = User.find(2) + user.pref.my_page_layout = {'top' => ['issuequery']} + user.pref.save! + + get :page + assert_response :success + + assert_select '#block-issuequery' do + assert_select 'h3', :text => 'Issues' + assert_select 'select[name=?]', 'settings[issuequery][query_id]' do + assert_select 'option[value="5"]', :text => 'Open issues by priority and tracker' + end + end + end + + def test_page_with_issuequery_block_and_selected_query + user = User.find(2) + query = IssueQuery.create!(:name => 'All issues', :user => user, :column_names => [:tracker, :subject, :status, :assigned_to]) + user.pref.my_page_layout = {'top' => ['issuequery']} + user.pref.my_page_settings = {'issuequery' => {:query_id => query.id}} + user.pref.save! + + get :page + assert_response :success + + assert_select '#block-issuequery' do + # assert number of columns (columns from query + id column + checkbox column) + assert_select 'table.issues th', 6 + # assert results limit + assert_select 'table.issues tr.issue', 10 + assert_select 'table.issues td.assigned_to' + end + end + + def test_page_with_issuequery_block_and_selected_query_and_custom_columns + user = User.find(2) + query = IssueQuery.create!(:name => 'All issues', :user => user, :column_names => [:tracker, :subject, :status, :assigned_to]) + user.pref.my_page_layout = {'top' => ['issuequery']} + user.pref.my_page_settings = {'issuequery' => {:query_id => query.id, :columns => [:subject, :due_date]}} + user.pref.save! + + get :page + assert_response :success + + assert_select '#block-issuequery' do + # assert number of columns (columns from query + id column + checkbox column) + assert_select 'table.issues th', 4 + assert_select 'table.issues th', :text => 'Due date' + end + end def test_page_with_all_blocks blocks = Redmine::MyPage.blocks.keys From cb35ff95c5e2316d826c0817ba7f7aac43443abd Mon Sep 17 00:00:00 2001 From: Jean-Philippe Lang Date: Wed, 15 Mar 2017 18:01:19 +0000 Subject: [PATCH 0727/1117] Move the "Log time" link on My page. git-svn-id: http://svn.redmine.org/redmine/trunk@16407 e93f8b46-1217-0410-a6f0-8f06a7374b81 --- app/views/my/blocks/_timelog.html.erb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app/views/my/blocks/_timelog.html.erb b/app/views/my/blocks/_timelog.html.erb index e5e36612d..83716d35e 100644 --- a/app/views/my/blocks/_timelog.html.erb +++ b/app/views/my/blocks/_timelog.html.erb @@ -4,13 +4,13 @@ entries_by_day = entries.group_by(&:spent_on) %>
          - <%= link_to l(:button_log_time), new_time_entry_path, :class => "icon icon-add" if User.current.allowed_to?(:log_time, nil, :global => true) %> <%= link_to_function l(:label_options), "$('#timelog-settings').toggle();", :class => 'icon-only icon-settings', :title => l(:label_options) %>

          <%= link_to l(:label_spent_time), time_entries_path(:user_id => 'me') %> (<%= l(:label_last_n_days, days) %>: <%= l_hours_short entries.sum(&:hours) %>) + <%= link_to l(:button_log_time), new_time_entry_path, :class => "icon-only icon-add", :title => l(:button_log_time) if User.current.allowed_to?(:log_time, nil, :global => true) %>

          From 674e1752e6fc6fc09efbf8a7a2b916c77c03bcee Mon Sep 17 00:00:00 2001 From: Jean-Philippe Lang Date: Wed, 15 Mar 2017 18:03:27 +0000 Subject: [PATCH 0728/1117] Show icons only when cursor is over the box. git-svn-id: http://svn.redmine.org/redmine/trunk@16408 e93f8b46-1217-0410-a6f0-8f06a7374b81 --- public/stylesheets/application.css | 3 +++ 1 file changed, 3 insertions(+) diff --git a/public/stylesheets/application.css b/public/stylesheets/application.css index 99a034a2f..406989c3f 100644 --- a/public/stylesheets/application.css +++ b/public/stylesheets/application.css @@ -1125,6 +1125,9 @@ div.wiki img {vertical-align:middle; max-width:100%;} line-height:1.5em; } +.mypage-box>.contextual {opacity:0; transition: opacity 0.2s;} +.mypage-box:hover>.contextual {opacity:1;} + .handle {cursor: move;} #my-page .list th.checkbox, #my-page .list td.checkbox {display:none;} From c23f126f1fa233c8bccddb7e4e113a20610e4252 Mon Sep 17 00:00:00 2001 From: Jean-Philippe Lang Date: Wed, 15 Mar 2017 18:14:58 +0000 Subject: [PATCH 0729/1117] Fix link to issues when displaying a project query (#1565). git-svn-id: http://svn.redmine.org/redmine/trunk@16409 e93f8b46-1217-0410-a6f0-8f06a7374b81 --- app/models/query.rb | 28 +++++++++++++++------------ app/views/my/blocks/_issues.erb | 5 +++-- test/functional/my_controller_test.rb | 25 ++++++++++++++++++++++-- 3 files changed, 42 insertions(+), 16 deletions(-) diff --git a/app/models/query.rb b/app/models/query.rb index 23eca0278..a0f1969e3 100644 --- a/app/models/query.rb +++ b/app/models/query.rb @@ -387,19 +387,23 @@ class Query < ActiveRecord::Base end def as_params - params = {} - filters.each do |field, options| - params[:f] ||= [] - params[:f] << field - params[:op] ||= {} - params[:op][field] = options[:operator] - params[:v] ||= {} - params[:v][field] = options[:values] + if new_record? + params = {} + filters.each do |field, options| + params[:f] ||= [] + params[:f] << field + params[:op] ||= {} + params[:op][field] = options[:operator] + params[:v] ||= {} + params[:v][field] = options[:values] + end + params[:c] = column_names + params[:sort] = sort_criteria.to_param + params[:set_filter] = 1 + params + else + {:query_id => id} end - params[:c] = column_names - params[:sort] = sort_criteria.to_param - params[:set_filter] = 1 - params end def validate_query_filters diff --git a/app/views/my/blocks/_issues.erb b/app/views/my/blocks/_issues.erb index 0174bac2e..47fb28136 100644 --- a/app/views/my/blocks/_issues.erb +++ b/app/views/my/blocks/_issues.erb @@ -6,7 +6,8 @@

          - <%= link_to query.name, issues_path(query.as_params) %> + <%= "#{query.project} |" if query.project %> + <%= link_to query.name, _project_issues_path(query.project, query.as_params) %> (<%= query.issue_count %>)

          @@ -38,7 +39,7 @@ <% content_for :header_tags do %> <%= auto_discovery_link_tag(:atom, - issues_path(query.as_params.merge(:format => 'atom', :key => User.current.rss_key)), + _project_issues_path(query.project, query.as_params.merge(:format => 'atom', :key => User.current.rss_key)), {:title => query.name}) %> <% end %> diff --git a/test/functional/my_controller_test.rb b/test/functional/my_controller_test.rb index f6771a1f5..09cb1a834 100644 --- a/test/functional/my_controller_test.rb +++ b/test/functional/my_controller_test.rb @@ -108,7 +108,7 @@ class MyControllerTest < Redmine::ControllerTest end end - def test_page_with_issuequery_block_and_selected_query + def test_page_with_issuequery_block_and_global_query user = User.find(2) query = IssueQuery.create!(:name => 'All issues', :user => user, :column_names => [:tracker, :subject, :status, :assigned_to]) user.pref.my_page_layout = {'top' => ['issuequery']} @@ -119,6 +119,7 @@ class MyControllerTest < Redmine::ControllerTest assert_response :success assert_select '#block-issuequery' do + assert_select 'a[href=?]', "/issues?query_id=#{query.id}" # assert number of columns (columns from query + id column + checkbox column) assert_select 'table.issues th', 6 # assert results limit @@ -127,7 +128,27 @@ class MyControllerTest < Redmine::ControllerTest end end - def test_page_with_issuequery_block_and_selected_query_and_custom_columns + def test_page_with_issuequery_block_and_project_query + user = User.find(2) + query = IssueQuery.create!(:name => 'All issues', :project => Project.find(1), :user => user, :column_names => [:tracker, :subject, :status, :assigned_to]) + user.pref.my_page_layout = {'top' => ['issuequery']} + user.pref.my_page_settings = {'issuequery' => {:query_id => query.id}} + user.pref.save! + + get :page + assert_response :success + + assert_select '#block-issuequery' do + assert_select 'a[href=?]', "/projects/ecookbook/issues?query_id=#{query.id}" + # assert number of columns (columns from query + id column + checkbox column) + assert_select 'table.issues th', 6 + # assert results limit + assert_select 'table.issues tr.issue', 10 + assert_select 'table.issues td.assigned_to' + end + end + + def test_page_with_issuequery_block_and_query_should_display_custom_columns user = User.find(2) query = IssueQuery.create!(:name => 'All issues', :user => user, :column_names => [:tracker, :subject, :status, :assigned_to]) user.pref.my_page_layout = {'top' => ['issuequery']} From 7d1070526982967264c134f8723d0b5c2ce79faa Mon Sep 17 00:00:00 2001 From: Toshi MARUYAMA Date: Thu, 16 Mar 2017 11:08:42 +0000 Subject: [PATCH 0730/1117] Ukrainian translation updated by Anton Oslyak (#25019) git-svn-id: http://svn.redmine.org/redmine/trunk@16410 e93f8b46-1217-0410-a6f0-8f06a7374b81 --- config/locales/uk.yml | 1253 +++++++++-------- .../uk/wiki_syntax_detailed_markdown.html | 236 ++-- .../help/uk/wiki_syntax_detailed_textile.html | 234 +-- public/help/uk/wiki_syntax_markdown.html | 49 +- public/help/uk/wiki_syntax_textile.html | 61 +- .../jstoolbar/lang/jstoolbar-uk.js | 32 +- 6 files changed, 934 insertions(+), 931 deletions(-) diff --git a/config/locales/uk.yml b/config/locales/uk.yml index c5711ae40..c4c8ef7b9 100644 --- a/config/locales/uk.yml +++ b/config/locales/uk.yml @@ -9,12 +9,12 @@ uk: short: "%b %d" long: "%B %d, %Y" - day_names: [Sunday, Monday, Tuesday, Wednesday, Thursday, Friday, Saturday] - abbr_day_names: [Sun, Mon, Tue, Wed, Thu, Fri, Sat] + day_names: [неділя, понеділок, вівторок, середа, четвер, пятниця, субота] + abbr_day_names: [Нд, Пн, Вт, Ср, Чт, Пт, Сб] # Don't forget the nil at the beginning; there's no such thing as a 0th month - month_names: [~, January, February, March, April, May, June, July, August, September, October, November, December] - abbr_month_names: [~, Jan, Feb, Mar, Apr, May, Jun, Jul, Aug, Sep, Oct, Nov, Dec] + month_names: [~, січня, лютого, березня, квітня, травня, червня, липня, серпня, вересня, жовтня, листопада, грудня] + abbr_month_names: [~, січ., лют., бер., квіт., трав., чер., лип., серп., вер., жовт., лист., груд.] # Used in date_select and datime_select. order: - :year @@ -27,48 +27,64 @@ uk: time: "%H:%M" short: "%d %b %H:%M" long: "%B %d, %Y %H:%M" - am: "am" - pm: "pm" + am: "ранку" + pm: "вечора" datetime: distance_in_words: - half_a_minute: "half a minute" + half_a_minute: "менше хвилини" less_than_x_seconds: - one: "less than 1 second" - other: "less than %{count} seconds" + one: "менше ніж за 1 секунду" + few: "менш %{count} секунд" + many: "менш %{count} секунд" + other: "менше ніж за %{count} секунди" x_seconds: - one: "1 second" - other: "%{count} seconds" + one: "1 секунда" + few: "%{count} секунди" + many: "%{count} секунд" + other: "%{count} секунд" less_than_x_minutes: - one: "less than a minute" - other: "less than %{count} minutes" + one: "менше ніж за хвилину" + few: "менше %{count} хвилин" + many: "менше %{count} хвилин" + other: "менш ніж за %{count} хвилин" x_minutes: - one: "1 minute" - other: "%{count} minutes" + one: "1 хвилина" + few: "%{count} хвилини" + many: "%{count} хвилин" + other: "%{count} хвилини" about_x_hours: - one: "about 1 hour" - other: "about %{count} hours" + one: "близько 1 години" + other: "близько %{count} годин" x_hours: - one: "1 hour" - other: "%{count} hours" + one: "1 година" + few: "%{count} години" + many: "%{count} годин" + other: "%{count} години" x_days: - one: "1 day" - other: "%{count} days" + one: "1 день" + few: "%{count} дня" + many: "%{count} днів" + other: "%{count} днів" about_x_months: - one: "about 1 month" - other: "about %{count} months" + one: "близько 1 місяця" + other: "близько %{count} місяців" x_months: - one: "1 month" - other: "%{count} months" + one: "1 місяць" + few: "%{count} місяця" + many: "%{count} місяців" + other: "%{count} місяців" about_x_years: - one: "about 1 year" - other: "about %{count} years" + one: "близько 1 року" + other: "близько %{count} років" over_x_years: - one: "over 1 year" - other: "over %{count} years" + one: "більше 1 року" + other: "більше %{count} років" almost_x_years: - one: "almost 1 year" - other: "almost %{count} years" + one: "майже 1 рік" + few: "майже %{count} року" + many: "майже %{count} років" + other: "майже %{count} років" number: format: @@ -82,26 +98,26 @@ uk: storage_units: format: "%n %u" units: - kb: KB - tb: TB - gb: GB + kb: КБ + tb: ТБ + gb: ГБ byte: - one: Byte - other: Bytes - mb: MB + one: Байт + other: Байтів + mb: МБ # Used in array.to_sentence. support: array: - sentence_connector: "and" + sentence_connector: "і" skip_last_comma: false activerecord: errors: template: header: - one: "1 error prohibited this %{model} from being saved" - other: "%{count} errors prohibited this %{model} from being saved" + one: "1 помилка не дозволяє зберегти %{model}" + other: "%{count} помилок не дозволяють зберегти %{model}" messages: inclusion: "немає в списку" exclusion: "зарезервовано" @@ -116,20 +132,20 @@ uk: taken: "вже використовується" not_a_number: "не є числом" not_a_date: "є недійсною датою" - greater_than: "must be greater than %{count}" - greater_than_or_equal_to: "must be greater than or equal to %{count}" - equal_to: "must be equal to %{count}" - less_than: "must be less than %{count}" - less_than_or_equal_to: "must be less than or equal to %{count}" - odd: "must be odd" - even: "must be even" + greater_than: "значення має бути більшим ніж %{count}" + greater_than_or_equal_to: "значення має бути більшим або дорівнювати %{count}" + equal_to: "значення має дорівнювати %{count}" + less_than: "значення має бути меншим ніж %{count}" + less_than_or_equal_to: "значення має бути меншим або дорівнювати %{count}" + odd: "може мати тільки непарне значення" + even: "може мати тільки парне значення" greater_than_start_date: "повинна бути пізніша за дату початку" not_same_project: "не відносяться до одного проекту" circular_dependency: "Такий зв'язок приведе до циклічної залежності" - cant_link_an_issue_with_a_descendant: "An issue can not be linked to one of its subtasks" - earlier_than_minimum_start_date: "cannot be earlier than %{date} because of preceding issues" - not_a_regexp: "is not a valid regular expression" - open_issue_with_closed_parent: "An open issue cannot be attached to a closed parent task" + cant_link_an_issue_with_a_descendant: "Задача не може бути зв'язана зі своїми підзадачами" + earlier_than_minimum_start_date: "не може бути раніше ніж %{date} через попередні задачі" + not_a_regexp: "недопустимий регулярний вираз" + open_issue_with_closed_parent: "Відкрите завдання не може бути приєднано до закритого батьківського завдання" actionview_instancetag_blank_option: Оберіть @@ -212,7 +228,7 @@ uk: field_due_date: Дата виконання field_assigned_to: Призначена до field_priority: Пріоритет - field_fixed_version: Target version + field_fixed_version: Версія field_user: Користувач field_role: Роль field_homepage: Домашня сторінка @@ -294,9 +310,9 @@ uk: label_project_new: Новий проект label_project_plural: Проекти label_x_projects: - zero: no projects - one: 1 project - other: "%{count} projects" + zero: немає проектів + one: 1 проект + other: "%{count} проектів" label_project_all: Усі проекти label_project_latest: Останні проекти label_issue: Питання @@ -393,13 +409,13 @@ uk: label_closed_issues: закрите label_closed_issues_plural: закриті label_x_open_issues_abbr: - zero: 0 open - one: 1 open - other: "%{count} open" + zero: 0 відкрито + one: 1 відкрита + other: "%{count} відкрито" label_x_closed_issues_abbr: - zero: 0 closed - one: 1 closed - other: "%{count} closed" + zero: 0 закрито + one: 1 закрита + other: "%{count} закрито" label_total: Всього label_permissions: Права доступу label_current_status: Поточний статус @@ -421,9 +437,9 @@ uk: label_comment: Коментувати label_comment_plural: Коментарі label_x_comments: - zero: no comments - one: 1 comment - other: "%{count} comments" + zero: немає коментарів + one: 1 коментар + other: "%{count} коментарів" label_comment_add: Залишити коментар label_comment_added: Коментар додано label_comment_delete: Видалити коментарі @@ -588,7 +604,7 @@ uk: status_locked: Заблокований text_select_mail_notifications: Виберіть дії, на які відсилатиметься повідомлення на електронну пошту. - text_regexp_info: eg. ^[A-Z0-9]+$ + text_regexp_info: наприклад ^[A-Z0-9]+$ text_min_max_length_info: 0 означає відсутність заборон text_project_destroy_confirmation: Ви наполягаєте на видаленні цього проекту і всієї інформації, що відноситься до нього? text_workflow_edit: Виберіть роль і координатор для редагування послідовності дій @@ -603,8 +619,8 @@ uk: text_unallowed_characters: Заборонені символи text_comma_separated: Допустимі декілька значень (розділені комою). text_issues_ref_in_commit_messages: Посилання та зміна питань у повідомленнях до подавань - text_issue_added: "Issue %{id} has been reported by %{author}." - text_issue_updated: "Issue %{id} has been updated by %{author}." + text_issue_added: "Задача %{id} була додана %{author}." + text_issue_updated: "Задача %{id} була оновлена %{author}." text_wiki_destroy_confirmation: Ви впевнені, що хочете видалити цю wiki і весь зміст? text_issue_category_destroy_question: "Декілька питань (%{count}) призначено в цю категорію. Що ви хочете зробити?" text_issue_category_destroy_assignments: Видалити призначення категорії @@ -620,7 +636,7 @@ uk: default_tracker_feature: Властивість default_tracker_support: Підтримка default_issue_status_new: Новий - default_issue_status_in_progress: In Progress + default_issue_status_in_progress: В процесі default_issue_status_resolved: Вирішено default_issue_status_feedback: Зворотний зв'язок default_issue_status_closed: Зачинено @@ -638,582 +654,567 @@ uk: enumeration_issue_priorities: Пріоритети питань enumeration_doc_categories: Категорії документів enumeration_activities: Дії (облік часу) - text_status_changed_by_changeset: "Applied in changeset %{value}." - label_display_per_page: "Per page: %{value}" - label_issue_added: Issue added - label_issue_updated: Issue updated - setting_per_page_options: Objects per page options - notice_default_data_loaded: Default configuration successfully loaded. - error_scm_not_found: "Entry and/or revision doesn't exist in the repository." - label_associated_revisions: Associated revisions - label_document_added: Document added - label_message_posted: Message added - text_issues_destroy_confirmation: 'Are you sure you want to delete the selected issue(s) ?' - error_scm_command_failed: "An error occurred when trying to access the repository: %{value}" - setting_user_format: Users display format - label_age: Age - label_file_added: File added - field_default_value: Default value - label_scm: SCM - label_general: General - button_update: Update - text_select_project_modules: 'Select modules to enable for this project:' - label_change_properties: Change properties - text_load_default_configuration: Load the default configuration - text_no_configuration_data: "Roles, trackers, issue statuses and workflow have not been configured yet.\nIt is highly recommended to load the default configuration. You will be able to modify it once loaded." - label_news_added: News added - label_repository_plural: Repositories - error_can_t_load_default_data: "Default configuration could not be loaded: %{value}" - project_module_boards: Boards - project_module_issue_tracking: Issue tracking + text_status_changed_by_changeset: "Реалізовано в редакції %{value}." + label_display_per_page: "На сторінку: %{value}" + label_issue_added: Задача додана + label_issue_updated: Задача оновлена + setting_per_page_options: Кількість записів на сторінку + notice_default_data_loaded: Конфігурація по замовчуванню була завантажена. + error_scm_not_found: "Сховище не містить записів і/чи виправлень." + label_associated_revisions: Пов'язані редакції + label_document_added: Документ додано + label_message_posted: Повідомлення додано + text_issues_destroy_confirmation: 'Ви впевнені, що хочете видалити вибрані задачі?' + error_scm_command_failed: "Помилка доступу до сховища: %{value}" + setting_user_format: Формат відображення часу + label_age: Вік + label_file_added: Файл додано + field_default_value: Значення по замовчуванню + label_scm: Тип сховища + label_general: Загальне + button_update: Оновити + text_select_project_modules: 'Виберіть модулі, які будуть використані в проекті:' + label_change_properties: Змінити властивості + text_load_default_configuration: Завантажити Конфігурацію по замовчуванню + text_no_configuration_data: "Ролі, трекери, статуси задач і оперативний план не були сконфігуровані.\nНаполегливо рекомендується завантажити конфігурацію по-замовчуванню. Ви зможете її змінити згодом." + label_news_added: Додана новина + label_repository_plural: Сховища + error_can_t_load_default_data: "Конфігурація по замовчуванню не може бути завантажена: %{value}" + project_module_boards: Форуми + project_module_issue_tracking: Задачі project_module_wiki: Wiki - project_module_files: Files - project_module_documents: Documents - project_module_repository: Repository - project_module_news: News - project_module_time_tracking: Time tracking - text_file_repository_writable: File repository writable - text_default_administrator_account_changed: Default administrator account changed - text_rmagick_available: RMagick available (optional) - button_configure: Configure - label_plugins: Plugins - label_ldap_authentication: LDAP authentication - label_downloads_abbr: D/L - label_this_month: this month - label_last_n_days: "last %{count} days" - label_all_time: all time - label_this_year: this year - label_date_range: Date range - label_last_week: last week - label_yesterday: yesterday - label_last_month: last month - label_add_another_file: Add another file - label_optional_description: Optional description - text_destroy_time_entries_question: "%{hours} hours were reported on the issues you are about to delete. What do you want to do ?" - error_issue_not_found_in_project: 'The issue was not found or does not belong to this project' - text_assign_time_entries_to_project: Assign reported hours to the project - text_destroy_time_entries: Delete reported hours - text_reassign_time_entries: 'Reassign reported hours to this issue:' - setting_activity_days_default: Days displayed on project activity - label_chronological_order: In chronological order - field_comments_sorting: Display comments - label_reverse_chronological_order: In reverse chronological order - label_preferences: Preferences - setting_display_subprojects_issues: Display subprojects issues on main projects by default - label_overall_activity: Overall activity - setting_default_projects_public: New projects are public by default - error_scm_annotate: "The entry does not exist or can not be annotated." - text_subprojects_destroy_warning: "Its subproject(s): %{value} will be also deleted." - label_and_its_subprojects: "%{value} and its subprojects" - mail_body_reminder: "%{count} issue(s) that are assigned to you are due in the next %{days} days:" - mail_subject_reminder: "%{count} issue(s) due in the next %{days} days" - text_user_wrote: "%{value} wrote:" - label_duplicated_by: duplicated by - setting_enabled_scm: Enabled SCM - text_enumeration_category_reassign_to: 'Reassign them to this value:' - text_enumeration_destroy_question: "%{count} objects are assigned to this value." - label_incoming_emails: Incoming emails - label_generate_key: Generate a key - setting_mail_handler_api_enabled: Enable WS for incoming emails - setting_mail_handler_api_key: API key - text_email_delivery_not_configured: "Email delivery is not configured, and notifications are disabled.\nConfigure your SMTP server in config/configuration.yml and restart the application to enable them." - field_parent_title: Parent page - label_issue_watchers: Watchers - button_quote: Quote - setting_sequential_project_identifiers: Generate sequential project identifiers - notice_unable_delete_version: Unable to delete version - label_renamed: renamed - label_copied: copied - setting_plain_text_mail: plain text only (no HTML) - permission_view_files: View files - permission_edit_issues: Edit issues - permission_edit_own_time_entries: Edit own time logs - permission_manage_public_queries: Manage public queries - permission_add_issues: Add issues - permission_log_time: Log spent time - permission_view_changesets: View changesets - permission_view_time_entries: View spent time - permission_manage_versions: Manage versions - permission_manage_wiki: Manage wiki - permission_manage_categories: Manage issue categories - permission_protect_wiki_pages: Protect wiki pages - permission_comment_news: Comment news - permission_delete_messages: Delete messages - permission_select_project_modules: Select project modules - permission_edit_wiki_pages: Edit wiki pages - permission_add_issue_watchers: Add watchers - permission_view_gantt: View gantt chart - permission_move_issues: Move issues - permission_manage_issue_relations: Manage issue relations - permission_delete_wiki_pages: Delete wiki pages - permission_manage_boards: Manage boards - permission_delete_wiki_pages_attachments: Delete attachments - permission_view_wiki_edits: View wiki history - permission_add_messages: Post messages - permission_view_messages: View messages - permission_manage_files: Manage files - permission_edit_issue_notes: Edit notes - permission_manage_news: Manage news - permission_view_calendar: View calendrier - permission_manage_members: Manage members - permission_edit_messages: Edit messages - permission_delete_issues: Delete issues - permission_view_issue_watchers: View watchers list - permission_manage_repository: Manage repository - permission_commit_access: Commit access - permission_browse_repository: Browse repository - permission_view_documents: View documents - permission_edit_project: Edit project - permission_add_issue_notes: Add notes - permission_save_queries: Save queries - permission_view_wiki_pages: View wiki - permission_rename_wiki_pages: Rename wiki pages - permission_edit_time_entries: Edit time logs - permission_edit_own_issue_notes: Edit own notes - setting_gravatar_enabled: Use Gravatar user icons - label_example: Example - text_repository_usernames_mapping: "Select ou update the Redmine user mapped to each username found in the repository log.\nUsers with the same Redmine and repository username or email are automatically mapped." - permission_edit_own_messages: Edit own messages - permission_delete_own_messages: Delete own messages - label_user_activity: "%{value}'s activity" - label_updated_time_by: "Updated by %{author} %{age} ago" - text_diff_truncated: '... This diff was truncated because it exceeds the maximum size that can be displayed.' - setting_diff_max_lines_displayed: Max number of diff lines displayed - text_plugin_assets_writable: Plugin assets directory writable - warning_attachments_not_saved: "%{count} file(s) could not be saved." - button_create_and_continue: Create and continue - text_custom_field_possible_values_info: 'One line for each value' - label_display: Display - field_editable: Editable - setting_repository_log_display_limit: Maximum number of revisions displayed on file log - setting_file_max_size_displayed: Max size of text files displayed inline - field_watcher: Watcher - setting_openid: Allow OpenID login and registration + project_module_files: Файли + project_module_documents: Документи + project_module_repository: Сховище + project_module_news: Новини + project_module_time_tracking: Відстеження часу + text_file_repository_writable: Сховище файлів доступне для записів + text_default_administrator_account_changed: Обліковий запис адміністратора по замовчуванню змінений + text_rmagick_available: Доступно використання RMagick (опційно) + button_configure: Налаштування + label_plugins: Модулі + label_ldap_authentication: Авторизація за допомогою LDAP + label_downloads_abbr: Завантажень + label_this_month: цей місяць + label_last_n_days: "останні %{count} днів" + label_all_time: весь час + label_this_year: цей рік + label_date_range: інтервал часу + label_last_week: попередній тиждень + label_yesterday: вчора + label_last_month: попередній місяць + label_add_another_file: Додати ще один файл + label_optional_description: Опис (не обов'язково) + text_destroy_time_entries_question: "На дану задачу зареєстровано %{hours} години(ин) трудовитрат. Що Ви хочете зробити?" + error_issue_not_found_in_project: 'Задача не була знайдена або не стосується даного проекту' + text_assign_time_entries_to_project: Додати зареєстрований час до проекту + text_destroy_time_entries: Видалити зареєстрований час + text_reassign_time_entries: 'Перенести зареєстрований час на наступну задачу:' + setting_activity_days_default: Кількість днів, відображених в Діях + label_chronological_order: В хронологічному порядку + field_comments_sorting: Відображення коментарів + label_reverse_chronological_order: В зворотньому порядку + label_preferences: Переваги + setting_display_subprojects_issues: Відображення підпроектів по замовчуванню + label_overall_activity: Зведений звіт дій + setting_default_projects_public: Нові проекти є загальнодоступними + error_scm_annotate: "Коментар неможливий через перевищення максимального розміру текстового файлу." + text_subprojects_destroy_warning: "Підпроекти: %{value} також будуть видалені." + label_and_its_subprojects: "%{value} і всі підпроекти" + mail_body_reminder: "%{count} призначених на Вас задач на наступні %{days} днів:" + mail_subject_reminder: "%{count} призначених на Вас задач в найближчі %{days} дні" + text_user_wrote: "%{value} писав(ла):" + label_duplicated_by: дублюється + setting_enabled_scm: Увімкнені SCM + text_enumeration_category_reassign_to: 'Надати їм наступне значення:' + text_enumeration_destroy_question: "%{count} об'єкт(а,ів) зв'язані з цим значенням." + label_incoming_emails: Прийом повідомлень + label_generate_key: Згенерувати ключ + setting_mail_handler_api_enabled: Увімкнути веб-сервіс для вхідних повідомлень + setting_mail_handler_api_key: API ключ + text_email_delivery_not_configured: "Параметри роботи з поштовим сервером не налаштовані і функція сповіщення по email не активна.\nНалаштувати параметри для Вашого SMTP-сервера Ви можете в файлі config/configuration.yml. Для застосування змін перезапустіть програму." + field_parent_title: Домашня сторінка + label_issue_watchers: Спостерігачі + button_quote: Цитувати + setting_sequential_project_identifiers: Генерувати послідовні ідентифікатори проектів + notice_unable_delete_version: Неможливо видалити версію. + label_renamed: перейменовано + label_copied: скопійовано в + setting_plain_text_mail: Тільки простий текст (без HTML) + permission_view_files: Перегляд файлів + permission_edit_issues: Редагування задач + permission_edit_own_time_entries: Редагування власного обліку часу + permission_manage_public_queries: Управління загальними запитами + permission_add_issues: Додавання задач + permission_log_time: Облік трудовитрат + permission_view_changesets: Перегляд змін сховища + permission_view_time_entries: Перегляд трудовитрат + permission_manage_versions: Управління версіями + permission_manage_wiki: Управління wiki + permission_manage_categories: Управління категоріями задач + permission_protect_wiki_pages: Блокування wiki-сторінок + permission_comment_news: Коментування новин + permission_delete_messages: Видалення повідомлень + permission_select_project_modules: Вибір модулів проекту + permission_edit_wiki_pages: Редагування wiki-сторінок + permission_add_issue_watchers: Додати спостерігачів + permission_view_gantt: Перегляд діаграми Ганта + permission_move_issues: Перенесення задач + permission_manage_issue_relations: Управління зв'язуванням задач + permission_delete_wiki_pages: Видалення wiki-сторінок + permission_manage_boards: Управління форумами + permission_delete_wiki_pages_attachments: Видалення прикріплених файлів + permission_view_wiki_edits: Перегляд історії wiki + permission_add_messages: Відправка повідомлень + permission_view_messages: Перегляд повідомлень + permission_manage_files: Управління файлами + permission_edit_issue_notes: Редагування нотаток + permission_manage_news: Управління новинами + permission_view_calendar: Перегляд календаря + permission_manage_members: Управління учасниками + permission_edit_messages: Редагування повідомлень + permission_delete_issues: Видалення задач + permission_view_issue_watchers: Перегляд списку спостерігачів + permission_manage_repository: Управління сховищем + permission_commit_access: Зміна файлів в сховищі + permission_browse_repository: Перегляд сховища + permission_view_documents: Перегляд документів + permission_edit_project: Редагування проектів + permission_add_issue_notes: Додавання нотаток + permission_save_queries: Збереження запитів + permission_view_wiki_pages: Перегляд wiki + permission_rename_wiki_pages: Перейменування wiki-сторінок + permission_edit_time_entries: Редагування обліку часу + permission_edit_own_issue_notes: Редагування власних нотаток + setting_gravatar_enabled: Використовувати аватар користувача із Gravatar + label_example: Зразок + text_repository_usernames_mapping: "Виберіть або оновіть користувача Redmine, пов'язаного зі знайденими іменами в журналі сховища.\nКористувачі з одинаковими іменами або email в Redmine і сховищі пов'язуються автоматично." + permission_edit_own_messages: Редагування власних повідомлень + permission_delete_own_messages: Видалення власних повідомлень + label_user_activity: "Дії користувача %{value}" + label_updated_time_by: "Оновлено %{author} %{age} назад" + text_diff_truncated: '... Цей diff обмежений, так як перевищує максимальний розмір, що може бути відображений.' + setting_diff_max_lines_displayed: Максимальна кількість рядків для diff + text_plugin_assets_writable: Каталог ресурсів модулів доступний для запису + warning_attachments_not_saved: "%{count} файл(ів) неможливо зберегти." + button_create_and_continue: Створити та продовжити + text_custom_field_possible_values_info: 'По одному значенню в кожному рядку' + label_display: Відображення + field_editable: Доступно до редагування + setting_repository_log_display_limit: Максимальна кількість редакцій, відображених в журналі змін + setting_file_max_size_displayed: Максимальний розмір текстового файлу для відображення + field_watcher: Спостерігач + setting_openid: Дозволити OpenID для входу та реєстрації field_identity_url: OpenID URL - label_login_with_open_id_option: or login with OpenID - field_content: Content - label_descending: Descending - label_sort: Sort - label_ascending: Ascending - label_date_from_to: From %{start} to %{end} + label_login_with_open_id_option: або війти з допомогою OpenID + field_content: Вміст + label_descending: За спаданням + label_sort: Сортувати + label_ascending: За зростанням + label_date_from_to: З %{start} по %{end} label_greater_or_equal: ">=" label_less_or_equal: <= - text_wiki_page_destroy_question: This page has %{descendants} child page(s) and descendant(s). What do you want to do? - text_wiki_page_reassign_children: Reassign child pages to this parent page - text_wiki_page_nullify_children: Keep child pages as root pages - text_wiki_page_destroy_children: Delete child pages and all their descendants - setting_password_min_length: Minimum password length - field_group_by: Group results by - mail_subject_wiki_content_updated: "'%{id}' wiki page has been updated" - label_wiki_content_added: Wiki page added - mail_subject_wiki_content_added: "'%{id}' wiki page has been added" - mail_body_wiki_content_added: The '%{id}' wiki page has been added by %{author}. - label_wiki_content_updated: Wiki page updated - mail_body_wiki_content_updated: The '%{id}' wiki page has been updated by %{author}. - permission_add_project: Create project - setting_new_project_user_role_id: Role given to a non-admin user who creates a project - label_view_all_revisions: View all revisions - label_tag: Tag - label_branch: Branch - error_no_tracker_in_project: No tracker is associated to this project. Please check the Project settings. - error_no_default_issue_status: No default issue status is defined. Please check your configuration (Go to "Administration -> Issue statuses"). - text_journal_changed: "%{label} changed from %{old} to %{new}" - text_journal_set_to: "%{label} set to %{value}" - text_journal_deleted: "%{label} deleted (%{old})" - label_group_plural: Groups - label_group: Group - label_group_new: New group - label_time_entry_plural: Spent time - text_journal_added: "%{label} %{value} added" - field_active: Active - enumeration_system_activity: System Activity - permission_delete_issue_watchers: Delete watchers - version_status_closed: closed - version_status_locked: locked - version_status_open: open - error_can_not_reopen_issue_on_closed_version: An issue assigned to a closed version can not be reopened - label_user_anonymous: Anonymous - button_move_and_follow: Move and follow - setting_default_projects_modules: Default enabled modules for new projects - setting_gravatar_default: Default Gravatar image - field_sharing: Sharing - label_version_sharing_hierarchy: With project hierarchy - label_version_sharing_system: With all projects - label_version_sharing_descendants: With subprojects - label_version_sharing_tree: With project tree - label_version_sharing_none: Not shared - error_can_not_archive_project: This project can not be archived - button_duplicate: Duplicate - button_copy_and_follow: Copy and follow - label_copy_source: Source - setting_issue_done_ratio: Calculate the issue done ratio with - setting_issue_done_ratio_issue_status: Use the issue status - error_issue_done_ratios_not_updated: Issue done ratios not updated. - error_workflow_copy_target: Please select target tracker(s) and role(s) - setting_issue_done_ratio_issue_field: Use the issue field - label_copy_same_as_target: Same as target - label_copy_target: Target - notice_issue_done_ratios_updated: Issue done ratios updated. - error_workflow_copy_source: Please select a source tracker or role - label_update_issue_done_ratios: Update issue done ratios - setting_start_of_week: Start calendars on - permission_view_issues: View Issues - label_display_used_statuses_only: Only display statuses that are used by this tracker - label_revision_id: Revision %{value} - label_api_access_key: API access key - label_api_access_key_created_on: API access key created %{value} ago - label_feeds_access_key: Atom access key - notice_api_access_key_reseted: Your API access key was reset. - setting_rest_api_enabled: Enable REST web service - label_missing_api_access_key: Missing an API access key - label_missing_feeds_access_key: Missing a Atom access key - button_show: Show - text_line_separated: Multiple values allowed (one line for each value). - setting_mail_handler_body_delimiters: Truncate emails after one of these lines - permission_add_subprojects: Create subprojects - label_subproject_new: New subproject + text_wiki_page_destroy_question: Ця сторінка має %{descendants} дочірних сторінок і їх нащадків. Що Ви хочете зробити? + text_wiki_page_reassign_children: Переоприділити дочірні сторінки та поточту сторінку + text_wiki_page_nullify_children: Зробити дочірні сторінки головними сторінками + text_wiki_page_destroy_children: Видалити дочірні сторінки і всіх їх нащадків + setting_password_min_length: Мінімальна довжина паролю + field_group_by: Групувати результати по + mail_subject_wiki_content_updated: "Wiki-сторінка '%{id}' була оновлена" + label_wiki_content_added: Wiki-сторінка додана + mail_subject_wiki_content_added: "Wiki-сторінка '%{id}' була додана" + mail_body_wiki_content_added: "%{author} додав(ла) wiki-сторінку %{id}." + label_wiki_content_updated: Wiki-сторінка оновлена + mail_body_wiki_content_updated: "%{author} оновив(ла) wiki-сторінку %{id}." + permission_add_project: Створення проекту + setting_new_project_user_role_id: Роль, що призначається користувачу, створившому проект + label_view_all_revisions: Показати всі ревізії + label_tag: Мітка + label_branch: Гілка + error_no_tracker_in_project: З цим проектом не асоційований ні один трекер. Будь ласка, перевірте налаштування проекту. + error_no_default_issue_status: Не визначений статус задач за замовчуванням. Будь ласка, перевірте налаштування (див. "Адміністрування -> Статуси задач"). + text_journal_changed: "Параметр %{label} змінився з %{old} на %{new}" + text_journal_set_to: "Параметр %{label} змінився на %{value}" + text_journal_deleted: "Значення %{old} параметру %{label} видалено" + label_group_plural: Групи + label_group: Група + label_group_new: Нова група + label_time_entry_plural: Трудовитрати + text_journal_added: "%{label} %{value} доданий" + field_active: Активно + enumeration_system_activity: Системне + permission_delete_issue_watchers: Видалення спостерігачів + version_status_closed: закритий + version_status_locked: заблокований + version_status_open: відкритий + error_can_not_reopen_issue_on_closed_version: Задача, призначена до закритої версії, не зможе бути відкрита знову + label_user_anonymous: Анонім + button_move_and_follow: Перемістити і перейти + setting_default_projects_modules: Включені по замовчуванню модулі для нових проектів + setting_gravatar_default: Зображення Gravatar за замовчуванням + field_sharing: Сумісне використання + label_version_sharing_hierarchy: З ієрархією пректів + label_version_sharing_system: З усіма проектами + label_version_sharing_descendants: З підпроектами + label_version_sharing_tree: З деревом проектів + label_version_sharing_none: Без сумісного доступу + error_can_not_archive_project: Цей проект не може бути заархівований + button_duplicate: Дублювати + button_copy_and_follow: Скопіювати та продовжити + label_copy_source: Джерело + setting_issue_done_ratio: Розраховувати готовність задачі з допомогою поля + setting_issue_done_ratio_issue_status: Статус задачі + error_issue_done_ratios_not_updated: Параметр готовність задач не оновлений. + error_workflow_copy_target: Оберіть цільові трекери і ролі + setting_issue_done_ratio_issue_field: Готовність задачі + label_copy_same_as_target: Те саме, що і у цілі + label_copy_target: Ціль + notice_issue_done_ratios_updated: Параметр «готовність» оновлений. + error_workflow_copy_source: Будь ласка, виберіть початковий трекер або роль + label_update_issue_done_ratios: Оновити готовність задач + setting_start_of_week: День початку тижня + permission_view_issues: Перегляд задач + label_display_used_statuses_only: Відображати тільки ті статуси, які використовуються в цьому трекері + label_revision_id: Ревізія %{value} + label_api_access_key: Ключ доступу до API + label_api_access_key_created_on: Ключ доступу до API створено %{value} назад + label_feeds_access_key: Ключ доступу до Atom + notice_api_access_key_reseted: Ваш ключ доступу до API був скинутий. + setting_rest_api_enabled: Включити веб-сервіс REST + label_missing_api_access_key: Відсутній ключ доступу до API + label_missing_feeds_access_key: Відсутній ключ доступу до Atom + button_show: Показати + text_line_separated: Дозволено кілька значень (по одному значенню в рядок). + setting_mail_handler_body_delimiters: Урізати лист після одного з цих рядків + permission_add_subprojects: Створення підпроектів + label_subproject_new: Новий підпроект text_own_membership_delete_confirmation: |- - You are about to remove some or all of your permissions and may no longer be able to edit this project after that. - Are you sure you want to continue? - label_close_versions: Close completed versions - label_board_sticky: Sticky - label_board_locked: Locked - permission_export_wiki_pages: Export wiki pages - setting_cache_formatted_text: Cache formatted text - permission_manage_project_activities: Manage project activities - error_unable_delete_issue_status: Unable to delete issue status - label_profile: Profile - permission_manage_subtasks: Manage subtasks - field_parent_issue: Parent task - label_subtask_plural: Subtasks - label_project_copy_notifications: Send email notifications during the project copy - error_can_not_delete_custom_field: Unable to delete custom field - error_unable_to_connect: Unable to connect (%{value}) - error_can_not_remove_role: This role is in use and can not be deleted. - error_can_not_delete_tracker: This tracker contains issues and cannot be deleted. - field_principal: Principal - notice_failed_to_save_members: "Failed to save member(s): %{errors}." - text_zoom_out: Zoom out - text_zoom_in: Zoom in - notice_unable_delete_time_entry: Unable to delete time log entry. - label_overall_spent_time: Overall spent time - field_time_entries: Log time - project_module_gantt: Gantt - project_module_calendar: Calendar - button_edit_associated_wikipage: "Edit associated Wiki page: %{page_title}" - field_text: Text field - setting_default_notification_option: Default notification option - label_user_mail_option_only_my_events: Only for things I watch or I'm involved in - label_user_mail_option_none: No events - field_member_of_group: Assignee's group - field_assigned_to_role: Assignee's role - notice_not_authorized_archived_project: The project you're trying to access has been archived. - label_principal_search: "Search for user or group:" - label_user_search: "Search for user:" - field_visible: Visible - setting_commit_logtime_activity_id: Activity for logged time - text_time_logged_by_changeset: Applied in changeset %{value}. - setting_commit_logtime_enabled: Enable time logging - notice_gantt_chart_truncated: The chart was truncated because it exceeds the maximum number of items that can be displayed (%{max}) - setting_gantt_items_limit: Maximum number of items displayed on the gantt chart - field_warn_on_leaving_unsaved: Warn me when leaving a page with unsaved text - text_warn_on_leaving_unsaved: The current page contains unsaved text that will be lost if you leave this page. - label_my_queries: My custom queries - text_journal_changed_no_detail: "%{label} updated" - label_news_comment_added: Comment added to a news - button_expand_all: Expand all - button_collapse_all: Collapse all - label_additional_workflow_transitions_for_assignee: Additional transitions allowed when the user is the assignee - label_additional_workflow_transitions_for_author: Additional transitions allowed when the user is the author - label_bulk_edit_selected_time_entries: Bulk edit selected time entries - text_time_entries_destroy_confirmation: Are you sure you want to delete the selected time entr(y/ies)? - label_role_anonymous: Anonymous - label_role_non_member: Non member - label_issue_note_added: Note added - label_issue_status_updated: Status updated - label_issue_priority_updated: Priority updated - label_issues_visibility_own: Issues created by or assigned to the user - field_issues_visibility: Issues visibility - label_issues_visibility_all: All issues - permission_set_own_issues_private: Set own issues public or private - field_is_private: Private - permission_set_issues_private: Set issues public or private - label_issues_visibility_public: All non private issues - text_issues_destroy_descendants_confirmation: This will also delete %{count} subtask(s). - field_commit_logs_encoding: Commit messages encoding - field_scm_path_encoding: Path encoding - text_scm_path_encoding_note: "Default: UTF-8" - field_path_to_repository: Path to repository - field_root_directory: Root directory - field_cvs_module: Module + Ви збираєтесь видалити деякі або всі права, через що можуть зникнути права на редагування цього проекту. + Ви впевнені що хочете продовжити? + label_close_versions: Закрити завершені версії + label_board_sticky: Прикріплена + label_board_locked: Заблокована + permission_export_wiki_pages: Експорт wiki-сторінок + setting_cache_formatted_text: Кешувати форматований текст + permission_manage_project_activities: Управління типами дій для проекту + error_unable_delete_issue_status: Неможливо видалити статус задачі + label_profile: Профіль + permission_manage_subtasks: Управління підзадачами + field_parent_issue: Батьківська задача + label_subtask_plural: Підзадачі + label_project_copy_notifications: Відправляти сповіщення по електронній пошті при копіюванні проекту + error_can_not_delete_custom_field: Неможливо видалити налаштовуване поле + error_unable_to_connect: Неможливо підключитись (%{value}) + error_can_not_remove_role: Ця роль використовується і не може бути видалена. + error_can_not_delete_tracker: Цей трекер містить задачі і не може бути видалений. + field_principal: Ім'я + notice_failed_to_save_members: "Не вдалось зберегти учасника(ів): %{errors}." + text_zoom_out: Віддалити + text_zoom_in: Наблизити + notice_unable_delete_time_entry: Неможливо видалити запис журналу. + label_overall_spent_time: Всього витраченого часу (трудовитрати) + field_time_entries: Видимість трудовитрат + project_module_gantt: Діаграма Ганта + project_module_calendar: Календар + button_edit_associated_wikipage: "Редагувати пов'язану Wiki сторінку: %{page_title}" + field_text: Текстове поле + setting_default_notification_option: Спосіб сповіщення за замовчуванням + label_user_mail_option_only_my_events: Тільки для задач, які я відслідковую чи беру участь + label_user_mail_option_none: Немає подій + field_member_of_group: Група виконавця + field_assigned_to_role: Роль виконавця + notice_not_authorized_archived_project: Даний проект заархівований. + label_principal_search: "Знайти користувача або групу:" + label_user_search: "Знайти користувача:" + field_visible: Видимий + setting_commit_logtime_activity_id: Для для обліку часу + text_time_logged_by_changeset: Взято до уваги в редакції %{value}. + setting_commit_logtime_enabled: Включити облік часу + notice_gantt_chart_truncated: Діаграма буде обрізана, так як перевищено максимальну к-сть елементів для відображення (%{max}) + setting_gantt_items_limit: Максимальна к-сть елементів для відображення на діаграмі Ганта + field_warn_on_leaving_unsaved: Попереджувати при закритті сторінки з незбереженим текстом + text_warn_on_leaving_unsaved: Дана сторінка містить незбережений текст, який буде втрачено при закритті сторінки. + label_my_queries: Мої збережені запити + text_journal_changed_no_detail: "%{label} оновлено" + label_news_comment_added: Добавлено новий коментар до новини + button_expand_all: Розвернути все + button_collapse_all: Звернути все + label_additional_workflow_transitions_for_assignee: Додаткові переходи дозволені користувачу, який є виконавцем + label_additional_workflow_transitions_for_author: Додаткові переходи дозволені користувачу, який є автором + label_bulk_edit_selected_time_entries: Масова зміна вибраних записів трудовитрат + text_time_entries_destroy_confirmation: Ви впевнені, що хочете видалити вибрати трудовитрати? + label_role_anonymous: Анонім + label_role_non_member: Не учасник + label_issue_note_added: Примітку додано + label_issue_status_updated: Статус оновлено + label_issue_priority_updated: Пріоритет оновлено + label_issues_visibility_own: Створені або призначені задачі для користувача + field_issues_visibility: Видимість задач + label_issues_visibility_all: Всі задачі + permission_set_own_issues_private: Встановити видимість (повна/чаткова) для власних задач + field_is_private: Приватна + permission_set_issues_private: Встановити видимість (повна/чаткова) для задач + label_issues_visibility_public: Тільки загальні задачі + text_issues_destroy_descendants_confirmation: Також буде видалено %{count} задача(і). + field_commit_logs_encoding: Кодування коментарів у сховищі + field_scm_path_encoding: Кодування шляху + text_scm_path_encoding_note: "По замовчуванню: UTF-8" + field_path_to_repository: Шлях до сховища + field_root_directory: Коренева директорія + field_cvs_module: Модуль field_cvsroot: CVSROOT - text_mercurial_repository_note: Local repository (e.g. /hgrepo, c:\hgrepo) - text_scm_command: Command - text_scm_command_version: Version - label_git_report_last_commit: Report last commit for files and directories - notice_issue_successful_create: Issue %{id} created. - label_between: between - setting_issue_group_assignment: Allow issue assignment to groups - label_diff: diff - text_git_repository_note: Repository is bare and local (e.g. /gitrepo, c:\gitrepo) - description_query_sort_criteria_direction: Sort direction - description_project_scope: Search scope - description_filter: Filter - description_user_mail_notification: Mail notification settings - description_message_content: Message content - description_available_columns: Available Columns - description_issue_category_reassign: Choose issue category - description_search: Searchfield - description_notes: Notes - description_choose_project: Projects - description_query_sort_criteria_attribute: Sort attribute - description_wiki_subpages_reassign: Choose new parent page - description_selected_columns: Selected Columns - label_parent_revision: Parent - label_child_revision: Child - error_scm_annotate_big_text_file: The entry cannot be annotated, as it exceeds the maximum text file size. - setting_default_issue_start_date_to_creation_date: Use current date as start date for new issues - button_edit_section: Edit this section - setting_repositories_encodings: Attachments and repositories encodings - description_all_columns: All Columns - button_export: Export - label_export_options: "%{export_format} export options" - error_attachment_too_big: This file cannot be uploaded because it exceeds the maximum allowed file size (%{max_size}) - notice_failed_to_save_time_entries: "Failed to save %{count} time entrie(s) on %{total} selected: %{ids}." + text_mercurial_repository_note: Локальне сховище (наприклад. /hgrepo, c:\hgrepo) + text_scm_command: Команда + text_scm_command_version: Версія + label_git_report_last_commit: Зазначати останні зміни для файлів та директорій + notice_issue_successful_create: Задача %{id} створена. + label_between: між + setting_issue_group_assignment: Надавати доступ до створення задача групам користувачів + label_diff: різниця + text_git_repository_note: Сховище пусте та локальнеl (тобто. /gitrepo, c:\gitrepo) + description_query_sort_criteria_direction: Порядок сортування + description_project_scope: Область пошуку + description_filter: Фільтр + description_user_mail_notification: Настройки поштових сповіщень + description_message_content: Зміст повідомлення + description_available_columns: Доступні колонки + description_issue_category_reassign: Виберіть категорію задачі + description_search: Поле пошуку + description_notes: Примітки + description_choose_project: Проекти + description_query_sort_criteria_attribute: Критерій сортування + description_wiki_subpages_reassign: Виберіть батьківську сторінку + description_selected_columns: Вибрані колонки + label_parent_revision: Батьківський + label_child_revision: Підпорядкований + error_scm_annotate_big_text_file: Неможливо додати коментарій через перевищення максимального розміру текстового файлу. + setting_default_issue_start_date_to_creation_date: Використовувати поточну дату, як дату початку нових задач + button_edit_section: Редагувати дану секцію + setting_repositories_encodings: Кодування вкладень та сховищ + description_all_columns: Всі колонки + button_export: Експорт + label_export_options: "%{export_format} параметри екпортування" + error_attachment_too_big: Неможливо завантажити файл, він перевищує максимальний дозволений розмір (%{max_size}) + notice_failed_to_save_time_entries: "Не вдалось зберегти %{count} трудовитрати %{total} вибраних: %{ids}." label_x_issues: zero: 0 Питання one: 1 Питання other: "%{count} Питання" - label_repository_new: New repository - field_repository_is_default: Main repository - label_copy_attachments: Copy attachments + label_repository_new: Нове сховище + field_repository_is_default: Сховище за замовчуванням + label_copy_attachments: Скопіювати вкладення label_item_position: "%{position}/%{count}" - label_completed_versions: Completed versions - text_project_identifier_info: Only lower case letters (a-z), numbers, dashes and underscores are allowed.
          Once saved, the identifier cannot be changed. - field_multiple: Multiple values - setting_commit_cross_project_ref: Allow issues of all the other projects to be referenced and fixed - text_issue_conflict_resolution_add_notes: Add my notes and discard my other changes - text_issue_conflict_resolution_overwrite: Apply my changes anyway (previous notes will be kept but some changes may be overwritten) - notice_issue_update_conflict: The issue has been updated by an other user while you were editing it. - text_issue_conflict_resolution_cancel: Discard all my changes and redisplay %{link} - permission_manage_related_issues: Manage related issues - field_auth_source_ldap_filter: LDAP filter - label_search_for_watchers: Search for watchers to add - notice_account_deleted: "Ваш обліковій запис повністю видалений" - setting_unsubscribe: "Дозволити користувачам видаляти свої облікові записи" - button_delete_my_account: "Видалити мій обліковий запис" - text_account_destroy_confirmation: "Ваш обліковий запис буде повністю видалений без можливості відновлення.\nВи певні, что бажаете продовжити?" - error_session_expired: Your session has expired. Please login again. - text_session_expiration_settings: "Warning: changing these settings may expire the current sessions including yours." - setting_session_lifetime: Session maximum lifetime - setting_session_timeout: Session inactivity timeout - label_session_expiration: Session expiration - permission_close_project: Close / reopen the project - label_show_closed_projects: View closed projects - button_close: Close - button_reopen: Reopen - project_status_active: active - project_status_closed: closed - project_status_archived: archived - text_project_closed: This project is closed and read-only. - notice_user_successful_create: User %{id} created. - field_core_fields: Standard fields - field_timeout: Timeout (in seconds) - setting_thumbnails_enabled: Display attachment thumbnails - setting_thumbnails_size: Thumbnails size (in pixels) - label_status_transitions: Status transitions - label_fields_permissions: Fields permissions - label_readonly: Read-only - label_required: Required - text_repository_identifier_info: Only lower case letters (a-z), numbers, dashes and underscores are allowed.
          Once saved, the identifier cannot be changed. - field_board_parent: Parent forum - label_attribute_of_project: Project's %{name} - label_attribute_of_author: Author's %{name} - label_attribute_of_assigned_to: Assignee's %{name} - label_attribute_of_fixed_version: Target version's %{name} - label_copy_subtasks: Copy subtasks - label_copied_to: copied to - label_copied_from: copied from - label_any_issues_in_project: any issues in project - label_any_issues_not_in_project: any issues not in project - field_private_notes: Private notes - permission_view_private_notes: View private notes - permission_set_notes_private: Set notes as private - label_no_issues_in_project: no issues in project + label_completed_versions: Завершені версії + text_project_identifier_info: Допускаються тільки рядкові малі букви (a-z), цифри, тире та підкреслення (нижнє тире).
          Після збереження ідентифікатор заборонено редагувати. + field_multiple: Множинні значення + setting_commit_cross_project_ref: Дозволяти посилання та редагування задач у всіх інших проектах + text_issue_conflict_resolution_add_notes: Додати мої примітки та відмовитись від моїх змін + text_issue_conflict_resolution_overwrite: Застосувати мої зміни (всі попередні примітки будуть збережені, але деякі зміни зможуть бути перезаписані) + notice_issue_update_conflict: Хтось змінив задачу, поки ви її редагували + text_issue_conflict_resolution_cancel: Скасувати мої зміни та показати та повторно показати задачу %{link} + permission_manage_related_issues: Управління пов'язаними задачами + field_auth_source_ldap_filter: Фільтр LDAP + label_search_for_watchers: Знайти спостерігачів + notice_account_deleted: "Ваш обліковій запис повністю видалений" + setting_unsubscribe: "Дозволити користувачам видаляти свої облікові записи" + button_delete_my_account: "Видалити мій обліковий запис" + text_account_destroy_confirmation: "Ваш обліковий запис буде повністю видалений без можливості відновлення.\nВи впевнені, що бажаете продовжити?" + error_session_expired: Сеанс вичерпано. Будь ласка, ввійдіть ще раз. + text_session_expiration_settings: "Увага!: зміна даних налаштувань може спричинити завершення поточного сеансу, включаючи поточний." + setting_session_lifetime: Максимальна тривалість сеансу + setting_session_timeout: Таймаут сеансу + label_session_expiration: Термін закінчення сеансу + permission_close_project: Закривати/відкривати проекти + label_show_closed_projects: Переглянути закриті проекти + button_close: Закрити + button_reopen: Відкрити + project_status_active: Відкриті(ий) + project_status_closed: Закриті(ий) + project_status_archived: Заархівовані(ий) + text_project_closed: Проект закрито. Доступний лише в режимі читання. + notice_user_successful_create: Користувача %{id} створено. + field_core_fields: Стандартні поля + field_timeout: Таймаут (в секундах) + setting_thumbnails_enabled: Відображати попередній перегляд для вкладень + setting_thumbnails_size: Розмір попереднього перегляду (в пікселях) + label_status_transitions: Статус-переходи + label_fields_permissions: Права на редагування полів + label_readonly: Тільки для перегляду + label_required: Обов'язкове + text_repository_identifier_info: Допускаються тільки рядкові малі букви (a-z), цифри, тире та підкреслення (нижнє тире).
          Після збереження ідентифікатор заборонено редагувати. + field_board_parent: Батьківський форум + label_attribute_of_project: Проект %{name} + label_attribute_of_author: Ім'я автора %{name} + label_attribute_of_assigned_to: Призначено %{name} + label_attribute_of_fixed_version: Версія %{name} + label_copy_subtasks: Скопіювати підзадачі + label_copied_to: Скопійовано в + label_copied_from: Скопійовано з + label_any_issues_in_project: будь-які задачі в проекті + label_any_issues_not_in_project: будь-які задачі не в проекті + field_private_notes: Приватні коментарі + permission_view_private_notes: Перегляд приватних коментарів + permission_set_notes_private: Розміщення приватних коментарів + label_no_issues_in_project: в проекті немає задач label_any: Усі - label_last_n_weeks: last %{count} weeks - setting_cross_project_subtasks: Allow cross-project subtasks - label_cross_project_descendants: With subprojects - label_cross_project_tree: With project tree - label_cross_project_hierarchy: With project hierarchy - label_cross_project_system: With all projects - button_hide: Hide - setting_non_working_week_days: Non-working days - label_in_the_next_days: in the next - label_in_the_past_days: in the past - label_attribute_of_user: User's %{name} - text_turning_multiple_off: If you disable multiple values, multiple values will be - removed in order to preserve only one value per item. - label_attribute_of_issue: Issue's %{name} - permission_add_documents: Add documents - permission_edit_documents: Edit documents - permission_delete_documents: Delete documents - label_gantt_progress_line: Progress line - setting_jsonp_enabled: Enable JSONP support - field_inherit_members: Inherit members - field_closed_on: Closed - field_generate_password: Generate password - setting_default_projects_tracker_ids: Default trackers for new projects + label_last_n_weeks: минулий(і) %{count} тиждень(ні) + setting_cross_project_subtasks: Дозволити підзадачі між проектами + label_cross_project_descendants: З підпроектами + label_cross_project_tree: З деревом проектів + label_cross_project_hierarchy: З ієрархією проектів + label_cross_project_system: З усіма проектами + button_hide: Сховати + setting_non_working_week_days: Неробочі дні + label_in_the_next_days: в наступні дні + label_in_the_past_days: минулі дні + label_attribute_of_user: Користувач %{name} + text_turning_multiple_off: Якщо відключити множинні значення, зайві значення будуть видалені зі списку, так аби залишилось тільки по одному значенню. + label_attribute_of_issue: Задача %{name} + permission_add_documents: Додати документи + permission_edit_documents: Редагувати документи + permission_delete_documents: Видалити документи + label_gantt_progress_line: Лінія прогресу + setting_jsonp_enabled: Включити JSONP підтримку + field_inherit_members: Наслідувати учасників + field_closed_on: Закрито + field_generate_password: Створити пароль + setting_default_projects_tracker_ids: Трекери по замовчуванню для нових проектів label_total_time: Всього - text_scm_config: You can configure your SCM commands in config/configuration.yml. Please restart the application after editing it. - text_scm_command_not_available: SCM command is not available. Please check settings on the administration panel. - setting_emails_header: Email header - notice_account_not_activated_yet: You haven't activated your account yet. If you want - to receive a new activation email, please click this link. - notice_account_locked: Your account is locked. - label_hidden: Hidden - label_visibility_private: to me only - label_visibility_roles: to these roles only - label_visibility_public: to any users - field_must_change_passwd: Must change password at next logon - notice_new_password_must_be_different: The new password must be different from the - current password - setting_mail_handler_excluded_filenames: Exclude attachments by name - text_convert_available: ImageMagick convert available (optional) - label_link: Link - label_only: only - label_drop_down_list: drop-down list - label_checkboxes: checkboxes - label_link_values_to: Link values to URL - setting_force_default_language_for_anonymous: Force default language for anonymous - users - setting_force_default_language_for_loggedin: Force default language for logged-in - users - label_custom_field_select_type: Select the type of object to which the custom field - is to be attached - label_issue_assigned_to_updated: Assignee updated - label_check_for_updates: Check for updates - label_latest_compatible_version: Latest compatible version - label_unknown_plugin: Unknown plugin - label_radio_buttons: radio buttons - label_group_anonymous: Anonymous users - label_group_non_member: Non member users - label_add_projects: Add projects - field_default_status: Default status - text_subversion_repository_note: 'Examples: file:///, http://, https://, svn://, svn+[tunnelscheme]://' - field_users_visibility: Users visibility - label_users_visibility_all: All active users - label_users_visibility_members_of_visible_projects: Members of visible projects - label_edit_attachments: Edit attached files - setting_link_copied_issue: Link issues on copy - label_link_copied_issue: Link copied issue - label_ask: Ask - label_search_attachments_yes: Search attachment filenames and descriptions - label_search_attachments_no: Do not search attachments - label_search_attachments_only: Search attachments only - label_search_open_issues_only: Open issues only + text_scm_config: Ви можете налаштувати команди SCM в файлі config/configuration.yml. Будь ласка, перезавантажте додаток після редагування даного файлу. + text_scm_command_not_available: SCM команада недоступна. Будь ласка, перевірте налаштування в адміністративній панелі. + setting_emails_header: Заголовок листа + notice_account_not_activated_yet: Поки що ви не маєте активованих облікових записів. Для того аби отримати лист з активацією, перейдіть по click this link. + notice_account_locked: Ваш обліковий запис заблоковано. + label_hidden: Схований + label_visibility_private: тільки для мене + label_visibility_roles: тільки для даних ролей + label_visibility_public: всім користувачам + field_must_change_passwd: Змінити пароль при наступному вході + notice_new_password_must_be_different: Новий пароль повинен відрізнятись від існуючого + setting_mail_handler_excluded_filenames: Виключити вкладення по імені + text_convert_available: ImageMagick використання доступно (опціонально) + label_link: Посилання + label_only: тільки + label_drop_down_list: випадаючий список + label_checkboxes: чекбокси + label_link_values_to: Значення посилань для URL + setting_force_default_language_for_anonymous: Не визначати мову для анонімних користувачів + setting_force_default_language_for_loggedin: Не визначати мову для зареєстрованих користувачів + label_custom_field_select_type: Виберіть тип об'єкта, для якого буде створено поле для налаштування + label_issue_assigned_to_updated: Виконавець оновлений + label_check_for_updates: Перевірити оновлення + label_latest_compatible_version: Остання сумісна версія + label_unknown_plugin: Невідомий плагін + label_radio_buttons: радіо-кнопки + label_group_anonymous: Анонімні користувачі + label_group_non_member: Користувачі неучасники + label_add_projects: Додати проекти + field_default_status: Статус по замовчуванню + text_subversion_repository_note: 'наприклад:///, http://, https://, svn://, svn+[tunnelscheme]://' + field_users_visibility: Видимість користувачів + label_users_visibility_all: Всі активні користувачі + label_users_visibility_members_of_visible_projects: Учасники видимих проектів + label_edit_attachments: Редагувати прикріплені файли + setting_link_copied_issue: Зв'язати задачі при копіюванні + label_link_copied_issue: Зв'язати скопійовану задачу + label_ask: Спитати + label_search_attachments_yes: Шукати в назвах прикріплених файлів та описах + label_search_attachments_no: Не шукати в прикріплених файлах + label_search_attachments_only: Шукати тільки в прикріплених файлах + label_search_open_issues_only: Тільки у відкритих задачах field_address: Ел. пошта - setting_max_additional_emails: Maximum number of additional email addresses + setting_max_additional_emails: Максимальна кількість додаткрвих email адрес label_email_address_plural: Emails - label_email_address_add: Add email address - label_enable_notifications: Enable notifications - label_disable_notifications: Disable notifications - setting_search_results_per_page: Search results per page - label_blank_value: blank - permission_copy_issues: Copy issues - error_password_expired: Your password has expired or the administrator requires you - to change it. - field_time_entries_visibility: Time logs visibility - setting_password_max_age: Require password change after - label_parent_task_attributes: Parent tasks attributes - label_parent_task_attributes_derived: Calculated from subtasks - label_parent_task_attributes_independent: Independent of subtasks - label_time_entries_visibility_all: All time entries - label_time_entries_visibility_own: Time entries created by the user - label_member_management: Member management - label_member_management_all_roles: All roles - label_member_management_selected_roles_only: Only these roles - label_password_required: Confirm your password to continue - label_total_spent_time: Overall spent time - notice_import_finished: "%{count} items have been imported" - notice_import_finished_with_errors: "%{count} out of %{total} items could not be imported" - error_invalid_file_encoding: The file is not a valid %{encoding} encoded file - error_invalid_csv_file_or_settings: The file is not a CSV file or does not match the - settings below - error_can_not_read_import_file: An error occurred while reading the file to import - permission_import_issues: Import issues - label_import_issues: Import issues - label_select_file_to_import: Select the file to import - label_fields_separator: Field separator - label_fields_wrapper: Field wrapper - label_encoding: Encoding - label_comma_char: Comma - label_semi_colon_char: Semicolon - label_quote_char: Quote - label_double_quote_char: Double quote - label_fields_mapping: Fields mapping - label_file_content_preview: File content preview - label_create_missing_values: Create missing values - button_import: Import - field_total_estimated_hours: Total estimated time + label_email_address_add: Додати email адреси + label_enable_notifications: Увімкнути сповіщення + label_disable_notifications: Вимкнути сповіщення + setting_search_results_per_page: Кількість знайдених результатів на сторінку + label_blank_value: пусто + permission_copy_issues: Копіювання задач + error_password_expired: Термін дії вашого паролю закінчився або адміністратор запросив поміняти його. + field_time_entries_visibility: Видимість трудовитрат + setting_password_max_age: Портребувати заміну пароля по завершенню + label_parent_task_attributes: Атрибути батьківської задачі + label_parent_task_attributes_derived: З урахуванням підзадач + label_parent_task_attributes_independent: Без урахування підзадач + label_time_entries_visibility_all: Всі трудовитрати + label_time_entries_visibility_own: Тільки власні трудовитрати + label_member_management: Управління учасниками + label_member_management_all_roles: Всі ролі + label_member_management_selected_roles_only: Тільки дані ролі + label_password_required: Підтвердіть ваш пароль для продовження + label_total_spent_time: Всього затрачено часу + notice_import_finished: "%{count} елементи(ів) було імпортовано" + notice_import_finished_with_errors: "%{count} з %{total} елементи(ів) неможливо імпортувати" + error_invalid_file_encoding: Кодування файлу не відповідає видраній(ому) %{encoding} + error_invalid_csv_file_or_settings: Файл не є файлом CSV або не відповідає вибраним налаштуванням + error_can_not_read_import_file: Під час читання файлу для імпорту виникла помилка + permission_import_issues: Імпорт задач + label_import_issues: Імпорт задач + label_select_file_to_import: Виберіть файл для імпорту + label_fields_separator: Розділювач + label_fields_wrapper: Обмежувач + label_encoding: Кодування + label_comma_char: Кома + label_semi_colon_char: Крапка з комою + label_quote_char: Дужки + label_double_quote_char: Подвійні дужки + label_fields_mapping: Відповідність полів + label_file_content_preview: Попередній перегляд вмісту файлу + label_create_missing_values: Створити відсутні значення + button_import: Імпорт + field_total_estimated_hours: Всього залишилось часу label_api: API - label_total_plural: Totals - label_assigned_issues: Assigned issues - label_field_format_enumeration: Key/value list - label_f_hour_short: '%{value} h' - field_default_version: Default version - error_attachment_extension_not_allowed: Attachment extension %{extension} is not allowed - setting_attachment_extensions_allowed: Allowed extensions - setting_attachment_extensions_denied: Disallowed extensions - label_any_open_issues: any open issues - label_no_open_issues: no open issues - label_default_values_for_new_users: Default values for new users - error_ldap_bind_credentials: Invalid LDAP Account/Password - setting_sys_api_key: API key + label_total_plural: Висновки + label_assigned_issues: Призначені задачі + label_field_format_enumeration: Ключ/значення список + label_f_hour_short: '%{value} г' + field_default_version: Версія за замовчуванням + error_attachment_extension_not_allowed: Дане розширення %{extension} заборонено + setting_attachment_extensions_allowed: Дозволені розширенні + setting_attachment_extensions_denied: Заборонені розширення + label_any_open_issues: будь-які відкриті задачі + label_no_open_issues: немає відкритих задач + label_default_values_for_new_users: Значення за замовчуванням для нових користувачів + error_ldap_bind_credentials: Неправильний обліковий запис LDAP /Пароль + setting_sys_api_key: API ключ setting_lost_password: Забули пароль - mail_subject_security_notification: Security notification - mail_body_security_notification_change: ! '%{field} was changed.' - mail_body_security_notification_change_to: ! '%{field} was changed to %{value}.' - mail_body_security_notification_add: ! '%{field} %{value} was added.' - mail_body_security_notification_remove: ! '%{field} %{value} was removed.' - mail_body_security_notification_notify_enabled: Email address %{value} now receives - notifications. - mail_body_security_notification_notify_disabled: Email address %{value} no longer - receives notifications. - mail_body_settings_updated: ! 'The following settings were changed:' - field_remote_ip: IP address - label_wiki_page_new: New wiki page - label_relations: Relations - button_filter: Filter - mail_body_password_updated: Your password has been changed. - label_no_preview: No preview available - error_no_tracker_allowed_for_new_issue_in_project: The project doesn't have any trackers - for which you can create an issue - label_tracker_all: All trackers - label_new_project_issue_tab_enabled: Display the "New issue" tab - setting_new_item_menu_tab: Project menu tab for creating new objects - label_new_object_tab_enabled: Display the "+" drop-down - error_no_projects_with_tracker_allowed_for_new_issue: There are no projects with trackers - for which you can create an issue - field_textarea_font: Font used for text areas - label_font_default: Default font - label_font_monospace: Monospaced font - label_font_proportional: Proportional font - setting_timespan_format: Time span format - label_table_of_contents: Table of contents - setting_commit_logs_formatting: Apply text formatting to commit messages - setting_mail_handler_enable_regex_delimiters: Enable regular expressions - error_move_of_child_not_possible: 'Subtask %{child} could not be moved to the new - project: %{errors}' - error_cannot_reassign_time_entries_to_an_issue_about_to_be_deleted: Spent time cannot - be reassigned to an issue that is about to be deleted - setting_timelog_required_fields: Required fields for time logs + mail_subject_security_notification: Сповіщення безпеки + mail_body_security_notification_change: ! '%{field} змінено.' + mail_body_security_notification_change_to: ! '%{field} було змінено на %{value}.' + mail_body_security_notification_add: ! '%{field} %{value} додано.' + mail_body_security_notification_remove: ! '%{field} %{value} видалено.' + mail_body_security_notification_notify_enabled: Email адреса %{value} зараз отримує сповіщення. + mail_body_security_notification_notify_disabled: Email адреса %{value} більше не отримує сповіщення. + mail_body_settings_updated: ! 'Наступні налаштування було змінено:' + field_remote_ip: IP адреси + label_wiki_page_new: Нова wiki сторінка + label_relations: Зв'язки + button_filter: Фільтр + mail_body_password_updated: Ваш пароль змінено. + label_no_preview: Попередній перегляд недоступний + error_no_tracker_allowed_for_new_issue_in_project: Проект не містить трекерів, для яких можна створити задачу + label_tracker_all: Всі трекери + label_new_project_issue_tab_enabled: Відображати вкладку "Нова задача" + setting_new_item_menu_tab: Вкладка "меню проекту" для створення нових об'єктів + label_new_object_tab_enabled: Відображати випадаючий список "+" + error_no_projects_with_tracker_allowed_for_new_issue: Немає проектів з трекерами, для яких можна було б створити задачу + field_textarea_font: Шрифт, який використовується для текстових полів + label_font_default: Шрифт за замовчуванням + label_font_monospace: Моноширинний шрифт + label_font_proportional: Пропорційний шрифт + setting_timespan_format: Формат часового діапазону + label_table_of_contents: Зміст + setting_commit_logs_formatting: Застосувати форматування тексту для повідомлення + setting_mail_handler_enable_regex_delimiters: Використовувати регулярні вирази + error_move_of_child_not_possible: 'Підзадача %{child} не може бути перенесена в новий проект: %{errors}' + error_cannot_reassign_time_entries_to_an_issue_about_to_be_deleted: Витрачений час не можна перенести на задачу, яка має бути видалена + setting_timelog_required_fields: Обов'язкові поля для журналу часу label_attribute_of_object: '%{object_name}''s %{name}' + warning_fields_cleared_on_bulk_edit: Зміни приведуть до автоматичного видалення значень з одного або декількох полів на обраних об'єктах + field_updated_by: Оновлено + field_last_updated_by: Востаннє оновлено + field_full_width_layout: Макет на повну ширину label_user_mail_option_only_assigned: Only for things I watch or I am assigned to label_user_mail_option_only_owner: Only for things I watch or I am the owner of - warning_fields_cleared_on_bulk_edit: Changes will result in the automatic deletion - of values from one or more fields on the selected objects - field_updated_by: Updated by - field_last_updated_by: Last updated by - field_full_width_layout: Full width layout label_last_notes: Last notes diff --git a/public/help/uk/wiki_syntax_detailed_markdown.html b/public/help/uk/wiki_syntax_detailed_markdown.html index e150d95c7..d846cfb3b 100644 --- a/public/help/uk/wiki_syntax_detailed_markdown.html +++ b/public/help/uk/wiki_syntax_detailed_markdown.html @@ -1,279 +1,279 @@ -RedmineWikiFormatting (Markdown) +Redmine - форматування вікі сторінок (Markdown) -

          Wiki formatting (Markdown)

          +

          Форматування вікі сторінок (Markdown)

          -

          Links

          +

          Лінки(посилання)

          -

          Redmine links

          +

          Redmine лінки(посилання)

          -

          Redmine allows hyperlinking between resources (issues, changesets, wiki pages...) from anywhere wiki formatting is used.

          +

          Redmine дозволяє гіперпосилання між ресурсами (завданнями, змінами, вікі-сторінками ...) з будь-якого місця, де використовується вікі-форматування.

            -
          • Link to an issue: #124 (displays #124, link is striked-through if the issue is closed)
          • -
          • Link to an issue note: #124-6, or #124#note-6
          • +
          • Посилання на завдання: #124 (Відображає #124, посилання закресленим, якщо завдання закрите)
          • +
          • Посилання на примітку до завдання: #124-6, or #124#note-6
          -

          Wiki links:

          +

          Вікі посилання:

            -
          • [[Guide]] displays a link to the page named 'Guide': Guide
          • -
          • [[Guide#further-reading]] takes you to the anchor "further-reading". Headings get automatically assigned anchors so that you can refer to them: Guide
          • -
          • [[Guide|User manual]] displays a link to the same page but with a different text: User manual
          • +
          • [[Керівництво користувача]] відображає посилання на сторінку під назвою 'Керівництво користувача': Керівництво користувача
          • +
          • [[Guide#further-reading]] приведе вас до якоря "further-reading". Заголовкам автоматично призначаються якоря так, що Ви можете звернутися до них: Guide
          • +
          • [[Guide|User manual]] відображає посилання на ту ж саму сторінку, але з іншим текстом: User manual
          -

          You can also link to pages of an other project wiki:

          +

          Ви також можете посилатися на сторінки з вікі іншого проекту:

            -
          • [[sandbox:some page]] displays a link to the page named 'Some page' of the Sandbox wiki
          • -
          • [[sandbox:]] displays a link to the Sandbox wiki main page
          • +
          • [[sandbox:some page]] відображає посилання на сторінку з назвою 'Some page' з вікі Sandbox
          • +
          • [[sandbox:]] відображає посилання на головну сторінку вікі Sandbox
          -

          Wiki links are displayed in red if the page doesn't exist yet, eg: Nonexistent page.

          +

          Вікі посилання відображаються червоним кольором, якщо сторінка ще не існує: Неіснуюча сторінка.

          -

          Links to other resources:

          +

          Посилання на інші ресурси:

            -
          • Documents: +
          • Документи:
              -
            • document#17 (link to document with id 17)
            • -
            • document:Greetings (link to the document with title "Greetings")
            • -
            • document:"Some document" (double quotes can be used when document title contains spaces)
            • -
            • sandbox:document:"Some document" (link to a document with title "Some document" in other project "sandbox")
            • +
            • document#17 (посилання на документ з id 17)
            • +
            • document:Привітання (посилання на документ з заголовком "Привітання")
            • +
            • document:"Деякий документ" (подвійні лапки можна використовувати, якщо заголовок документа містить пропуски)
            • +
            • sandbox:document:"Деякий документ" (посилання на документ з заголовком "Деякий документ" з іншого проекту "sandbox")
            -
          • Versions: +
          • Версії:
              -
            • version#3 (link to version with id 3)
            • -
            • version:1.0.0 (link to version named "1.0.0")
            • +
            • version#3 (посилання на версію з id 3)
            • +
            • version:1.0.0 (посилання на версію з назвою "1.0.0")
            • version:"1.0 beta 2"
            • -
            • sandbox:version:1.0.0 (link to version "1.0.0" in the project "sandbox")
            • +
            • sandbox:version:1.0.0 (посилання на версію "1.0.0" з проекту "sandbox")
            -
          • Attachments: +
          • Вкладенні файли:
              -
            • attachment:file.zip (link to the attachment of the current object named file.zip)
            • -
            • For now, attachments of the current object can be referenced only (if you're on an issue, it's possible to reference attachments of this issue only)
            • +
            • attachment:file.zip (посилання на вкладенний файл з ім'ям file.zip)
            • +
            • На даний момент можливо посилатись тільки на вкладення з поточного об'єкту (якщо ви працюєте з завданням, ви можете посилатись тільки на вкладення поточного завдання)
            -
          • Changesets: +
          • Зміни:
              -
            • r758 (link to a changeset)
            • -
            • commit:c6f4d0fd (link to a changeset with a non-numeric hash)
            • -
            • svn1|r758 (link to a changeset of a specific repository, for projects with multiple repositories)
            • -
            • commit:hg|c6f4d0fd (link to a changeset with a non-numeric hash of a specific repository)
            • -
            • sandbox:r758 (link to a changeset of another project)
            • -
            • sandbox:commit:c6f4d0fd (link to a changeset with a non-numeric hash of another project)
            • +
            • r758 (посилання на зміни)
            • +
            • commit:c6f4d0fd (посилання на зміни з нечисловим хешем)
            • +
            • svn1|r758 (посилання на зміни вказаного сховища(репозиторія), для проектів з декількома сховищами(репозиторіями))
            • +
            • commit:hg|c6f4d0fd (посилання на зміни з нечисловим хешем вказаного репозиторія)
            • +
            • sandbox:r758 (посилання на зміни іншого проекту)
            • +
            • sandbox:commit:c6f4d0fd (посилання на зміни з нечисловим іншого проекту)
            -
          • Repository files: +
          • Файли у сховищах(репозиторіях):
              -
            • source:some/file (link to the file located at /some/file in the project's repository)
            • -
            • source:some/file@52 (link to the file's revision 52)
            • -
            • source:some/file#L120 (link to line 120 of the file)
            • -
            • source:some/file@52#L120 (link to line 120 of the file's revision 52)
            • -
            • source:"some file@52#L120" (use double quotes when the URL contains spaces
            • -
            • export:some/file (force the download of the file)
            • -
            • source:svn1|some/file (link to a file of a specific repository, for projects with multiple repositories)
            • -
            • sandbox:source:some/file (link to the file located at /some/file in the repository of the project "sandbox")
            • -
            • sandbox:export:some/file (force the download of the file)
            • +
            • source:some/file (посилання на файл за шляхом /some/file у сховищі проекту)
            • +
            • source:some/file@52 (посилання на file з ревізії 52)
            • +
            • source:some/file#L120 (посилання на рядок 120 з file)
            • +
            • source:some/file@52#L120 (посилання на рядок 120 з file ревізії 52)
            • +
            • source:"some file@52#L120" (використовуте подвійні лапки у випадках, коли URL містить пропуски
            • +
            • export:some/file (примусове завантаження файлу file)
            • +
            • source:svn1|some/file (посилання на file вказаного сховища, для проектів в яких використовується декілька сховищь)
            • +
            • sandbox:source:some/file (посилання на файл за шляхом /some/file з сховища проекту "sandbox")
            • +
            • sandbox:export:some/file (примусове завантаження файлу file)
            -
          • Forums: +
          • Форуми:
              -
            • forum#1 (link to forum with id 1
            • -
            • forum:Support (link to forum named Support)
            • -
            • forum:"Technical Support" (use double quotes if forum name contains spaces)
            • +
            • forum#1 (посилання на форум з id 1
            • +
            • forum:Support (посилання на форум з назвою Support)
            • +
            • forum:"Технічна підтримка" (використовуте подвійні лапки у випадках, коли назва форуму містить пропуски)
            -
          • Forum messages: +
          • Повідомленя на форумах:
              -
            • message#1218 (link to message with id 1218)
            • +
            • message#1218 (посилання на повідомлення з id 1218)
            -
          • Projects: +
          • Проекти:
              -
            • project#3 (link to project with id 3)
            • -
            • project:some-project (link to project with name or slug of "some-project")
            • -
            • project:"Some Project" (use double quotes for project name containing spaces)
            • -
            -
          • -
          - -
            -
          • News: -
              -
            • news#2 (link to news item with id 2)
            • -
            • news:Greetings (link to news item named "Greetings")
            • -
            • news:"First Release" (use double quotes if news item name contains spaces)
            • +
            • project#3 (посилання на проект з id 3)
            • +
            • project:some-project (посилання на проект з назвою або ідентифікатором "some-project")
            • +
            • project:"Some Project" (використовуте подвійні лапки у випадках, коли назва проекту містить пропуски))
          -

          Escaping:

          +
            +
          • Новини: +
              +
            • news#2 (посилання на новину з id 2)
            • +
            • news:Greetings (посилання на новину з заголовком "Greetings")
            • +
            • news:"First Release" (використовуте подвійні лапки у випадках, коли назва новини містить пропуски)
            • +
            +
          • +
          + +

          Запобігання перетворенню(escaping):

            -
          • You can prevent Redmine links from being parsed by preceding them with an exclamation mark: !
          • +
          • Ви можете запобігти, щоб Redmine перетворював посилання, поставивши перед посиланням знак оклику: !
          -

          External links

          +

          Зовнішні посилання

          -

          HTTP URLs and email addresses are automatically turned into clickable links:

          +

          HTTP URL-адреси і адреси електронної пошти автоматично форматуються в активні посилання:

           http://www.redmine.org, someone@foo.bar
           
          -

          displays: http://www.redmine.org,

          +

          відображаються як: http://www.redmine.org,

          -

          If you want to display a specific text instead of the URL, you can use the standard markdown syntax:

          +

          Якщо ви хочете, відобразити текст замість URL, ви можете використовувати стандартний markdown синтаксис:

           [Redmine web site](http://www.redmine.org)
           
          -

          displays: Redmine web site

          +

          відображається як: Redmine web site

          -

          Text formatting

          +

          Форматування тексту

          -

          For things such as headlines, bold, tables, lists, Redmine supports Markdown syntax. See http://daringfireball.net/projects/markdown/syntax for information on using any of these features. A few samples are included below, but the engine is capable of much more of that.

          +

          Для таких речей як: заголовки, жирний текст, таблиці, списки, Redmine підтримує Markdown синтаксис. Перегляньте http://daringfireball.net/projects/markdown/syntax для отримання інформації як цим користуватись. Нижче наводиться декілька прикладів, але можливості Markdown набагато більщі ніж у наведених прикладах.

          -

          Font style

          +

          Стиль шрифту

          -* **bold**
          -* *Italic*
          -* ***bold italic***
          -* ~~strike-through~~
          +* **Жирний**
          +* *Курсив*
          +* ***Жирний курсив***
          +* ~~Закреслений~~
           
          -

          Display:

          +

          Відображення:

            -
          • bold
          • -
          • italic
          • -
          • bold italic
          • -
          • strike-through
          • +
          • Жирний
          • +
          • Курсив
          • +
          • Жирний курсив
          • +
          • Закреслений
          -

          Inline images

          +

          Вбудовані(inline) зображення

            -
          • ![](image_url) displays an image located at image_url (markdown syntax)
          • -
          • If you have an image attached to your wiki page, it can be displayed inline using its filename: ![](attached_image)
          • +
          • ![](image_url) виводить зображення, розташоване за адресою image_url (markdown синтаксис)
          • +
          • ![](attached_image) зображення яке додане до вашої сторінки вікі, може бути відображено, з використанням ім'я файлу
          -

          Headings

          +

          Заголовоки

          -# Heading
          -## Subheading
          -### Subsubheading
          +# Заголовок
          +## Підзаголовок
          +### Підзаголовок
           
          -

          Redmine assigns an anchor to each of those headings thus you can link to them with "#Heading", "#Subheading" and so forth.

          +

          Redmine призначає якір кожному з цих заголовків, таким чином, ви можете посилатись на них з "#Заголовок", "#Підзаголовок" і так далі.

          -

          Blockquotes

          +

          Цитати

          -

          Start the paragraph with >

          +

          Почніть параграф з >

          -> Rails is a full-stack framework for developing database-backed web applications according to the Model-View-Control pattern.
          -To go live, all you need to add is a database and a web server.
          +> Redmine — серверний веб-додаток з відкритим кодом для управління проектами та відстежування помилок. До системи входить календар-планувальник та діаграми Ганта
          +для візуального представлення ходу робіт за проектом та строків виконання.
           
          -

          Display:

          +

          Відображається:

          -

          Rails is a full-stack framework for developing database-backed web applications according to the Model-View-Control pattern.
          To go live, all you need to add is a database and a web server.

          +

          Redmine — серверний веб-додаток з відкритим кодом для управління проектами та відстежування помилок. До системи входить календар-планувальник та діаграми Ганта
          для візуального представлення ходу робіт за проектом та строків виконання.

          -

          Table of content

          +

          Таблиці змісту сторінки

           {{toc}} => left aligned toc
           {{>toc}} => right aligned toc
           
          -

          Horizontal Rule

          +

          Горизонтальна лінія

           ---
           
          -

          Macros

          +

          Макроси

          -

          Redmine has the following builtin macros:

          +

          Redmine має наступні вбудовані макроси:

          hello_world
          -

          Sample macro.

          +

          Приклад макросу.

          macro_list
          -

          Displays a list of all available macros, including description if available.

          +

          Відображає список всіх доступних макросів, в тому числі опис, якщо такий є.

          child_pages
          -

          Displays a list of child pages. With no argument, it displays the child pages of the current wiki page. Examples:

          -
          {{child_pages}} -- can be used from a wiki page only
          -{{child_pages(depth=2)}} -- display 2 levels nesting only
          +

          Відображає список дочірніх сторінок. Без аргументів, він відображає дочірні сторінки поточної сторінки вікі. Приклад:

          +
          {{child_pages}} -- може бути використаний тільки на вікі-сторінці
          +{{child_pages(depth=2)}} -- відображає тільки 2 рівня вкладень
          include
          -

          Include a wiki page. Example:

          +

          Вставити вікі-сторінку. Приклад:

          {{include(Foo)}}
          -

          or to include a page of a specific project wiki:

          +

          або вставити сторінку з конкретного проекту вікі:

          {{include(projectname:Foo)}}
          collapse
          -

          Inserts of collapsed block of text. Example:

          -
          {{collapse(View details...)
          -This is a block of text that is collapsed by default.
          -It can be expanded by clicking a link.
          +      

          Втавте блок тексту, який має з'являтись при натисканні на "Детальніше...". Приклад:

          +
          {{collapse(Детальніше...)
          +Це блок тексту прихований по замовчуванню.
          +Його можливо показати натиснувши на посилання
           }}
          thumbnail
          -

          Displays a clickable thumbnail of an attached image. Examples:

          +

          Відображає інтерактивні мініатюри вкладеного зображення. Приклади:

          {{thumbnail(image.png)}}
           {{thumbnail(image.png, size=300, title=Thumbnail)}}

          -

          Code highlighting

          +

          Підсвітка синтаксису коду

          -

          Default code highlightment relies on CodeRay, a fast syntax highlighting library written completely in Ruby. It currently supports c, clojure, cpp (c++, cplusplus), css, delphi (pascal), diff (patch), erb (eruby, rhtml), go, groovy, haml, html (xhtml), java, javascript (ecmascript, ecma_script, java_script, js), json, lua, php, python, ruby (irb), sass, sql, taskpaper, text (plain, plaintext), xml and yaml (yml) languages, where the names inside parentheses are aliases.

          +

          За замовчуванням підсвічування коду використовує CodeRay, швидка бібліотека для підсвітки синтаксису цілком розроблена на Ruby. На даний час вона підтримує синтаксис: c, clojure, cpp (c++, cplusplus), css, delphi (pascal), diff (patch), erb (eruby, rhtml), go, groovy, haml, html (xhtml), java, javascript (ecmascript, ecma_script, java_script, js), json, lua, php, python, ruby (irb), sass, sql, taskpaper, text (plain, plaintext), xml and yaml (yml) мови, де імена в дужках є псевдонімами.

          -

          You can highlight code at any place that supports wiki formatting using this syntax (note that the language name or alias is case-insensitive):

          +

          Ви можете виділити підсвіткою код в будь-якому місці, яке підтримує вікі-форматування, використовуючи наступний синтаксис (зверніть увагу, що назва мови або псевдонім не чутливі до регістру):

           ~~~ ruby
          @@ -281,7 +281,7 @@ It can be expanded by clicking a link.
           ~~~
           
          -

          Example:

          +

          Приклад:

          # The Greeter class
           class Greeter
          diff --git a/public/help/uk/wiki_syntax_detailed_textile.html b/public/help/uk/wiki_syntax_detailed_textile.html
          index 1d38d2abb..41983ff71 100644
          --- a/public/help/uk/wiki_syntax_detailed_textile.html
          +++ b/public/help/uk/wiki_syntax_detailed_textile.html
          @@ -1,283 +1,283 @@
           
           
           
          -RedmineWikiFormatting
          +Redmine - форматування вікі сторінок
           
           
           
           
           
          -

          Wiki formatting

          +

          Форматування вікі сторінок

          -

          Links

          +

          Лінки(посилання)

          -

          Redmine links

          +

          Redmine лінки(посилання)

          -

          Redmine allows hyperlinking between resources (issues, changesets, wiki pages...) from anywhere wiki formatting is used.

          +

          Redmine дозволяє гіперпосилання між ресурсами (завданнями, змінами, вікі-сторінками ...) з будь-якого місця, де використовується вікі-форматування.

            -
          • Link to an issue: #124 (displays #124, link is striked-through if the issue is closed)
          • -
          • Link to an issue note: #124-6, or #124#note-6
          • +
          • Посилання на завдання: #124 (відображає #124, посилання закресленим, якщо завдання закрите)
          • +
          • Посилання на примітку до завдання: #124-6, or #124#note-6
          -

          Wiki links:

          +

          Вікі посилання:

            -
          • [[Guide]] displays a link to the page named 'Guide': Guide
          • -
          • [[Guide#further-reading]] takes you to the anchor "further-reading". Headings get automatically assigned anchors so that you can refer to them: Guide
          • -
          • [[Guide|User manual]] displays a link to the same page but with a different text: User manual
          • +
          • [[Керівництво користувача]] відображає посилання на сторінку під назвою 'Керівництво користувача': Керівництво користувача
          • +
          • [[Guide#further-reading]] приведе вас до якоря "further-reading". Заголовкам автоматично призначаються якоря так, що Ви можете звернутися до них: Guide
          • +
          • [[Guide|User manual]] відображає посилання на ту ж саму сторінку, але з іншим текстом: User manual
          -

          You can also link to pages of an other project wiki:

          +

          Ви також можете посилатися на сторінки з вікі іншого проекту:

            -
          • [[sandbox:some page]] displays a link to the page named 'Some page' of the Sandbox wiki
          • -
          • [[sandbox:]] displays a link to the Sandbox wiki main page
          • +
          • [[sandbox:some page]] відображає посилання на сторінку з назвою 'Some page' з вікі Sandbox
          • +
          • [[sandbox:]] відображає посилання на головну сторінку вікі Sandbox
          -

          Wiki links are displayed in red if the page doesn't exist yet, eg: Nonexistent page.

          +

          Вікі посилання відображаються червоним кольором, якщо сторінка ще не існує: Неіснуюча сторінка.

          -

          Links to other resources:

          +

          Посилання на інші ресурси:

            -
          • Documents: +
          • Документи:
              -
            • document#17 (link to document with id 17)
            • -
            • document:Greetings (link to the document with title "Greetings")
            • -
            • document:"Some document" (double quotes can be used when document title contains spaces)
            • -
            • sandbox:document:"Some document" (link to a document with title "Some document" in other project "sandbox")
            • +
            • document#17 (посилання на документ з id 17)
            • +
            • document:Привітання (посилання на документ з заголовком "Привітання")
            • +
            • document:"Деякий документ" (подвійні лапки можна використовувати, якщо заголовок документа містить пропуски)
            • +
            • sandbox:document:"Деякий документ" (посилання на документ з заголовком "Деякий документ" з іншого проекту "sandbox")
            -
          • Versions: +
          • Версії:
              -
            • version#3 (link to version with id 3)
            • -
            • version:1.0.0 (link to version named "1.0.0")
            • +
            • version#3 (посилання на версію з id 3)
            • +
            • version:1.0.0 (посилання на версію з назвою "1.0.0")
            • version:"1.0 beta 2"
            • -
            • sandbox:version:1.0.0 (link to version "1.0.0" in the project "sandbox")
            • +
            • sandbox:version:1.0.0 (посилання на версію "1.0.0" з проекту "sandbox")
            -
          • Attachments: +
          • Вкладенні файли:
              -
            • attachment:file.zip (link to the attachment of the current object named file.zip)
            • -
            • For now, attachments of the current object can be referenced only (if you're on an issue, it's possible to reference attachments of this issue only)
            • +
            • attachment:file.zip (посилання на вкладенний файл з ім'ям file.zip)
            • +
            • На даний момент можливо посилатись тільки на вкладення з поточного об'єкту (якщо ви працюєте з завданням, ви можете посилатись тільки на вкладення поточного завдання)
            -
          • Changesets: +
          • Зміни:
              -
            • r758 (link to a changeset)
            • -
            • commit:c6f4d0fd (link to a changeset with a non-numeric hash)
            • -
            • svn1|r758 (link to a changeset of a specific repository, for projects with multiple repositories)
            • -
            • commit:hg|c6f4d0fd (link to a changeset with a non-numeric hash of a specific repository)
            • -
            • sandbox:r758 (link to a changeset of another project)
            • -
            • sandbox:commit:c6f4d0fd (link to a changeset with a non-numeric hash of another project)
            • +
            • r758 (посилання на зміни)
            • +
            • commit:c6f4d0fd (посилання на зміни з нечисловим хешем)
            • +
            • svn1|r758 (посилання на зміни вказаного сховища(репозиторія), для проектів з декількома сховищами(репозиторіями))
            • +
            • commit:hg|c6f4d0fd (посилання на зміни з нечисловим хешем вказаного репозиторія)
            • +
            • sandbox:r758 (посилання на зміни іншого проекту)
            • +
            • sandbox:commit:c6f4d0fd (посилання на зміни з нечисловим іншого проекту)
            -
          • Repository files: +
          • Файли у сховищах(репозиторіях):
              -
            • source:some/file (link to the file located at /some/file in the project's repository)
            • -
            • source:some/file@52 (link to the file's revision 52)
            • -
            • source:some/file#L120 (link to line 120 of the file)
            • -
            • source:some/file@52#L120 (link to line 120 of the file's revision 52)
            • -
            • source:"some file@52#L120" (use double quotes when the URL contains spaces
            • -
            • export:some/file (force the download of the file)
            • -
            • source:svn1|some/file (link to a file of a specific repository, for projects with multiple repositories)
            • -
            • sandbox:source:some/file (link to the file located at /some/file in the repository of the project "sandbox")
            • -
            • sandbox:export:some/file (force the download of the file)
            • +
            • source:some/file (посилання на файл за шляхом /some/file у сховищі проекту)
            • +
            • source:some/file@52 (посилання на file з ревізії 52)
            • +
            • source:some/file#L120 (посилання на рядок 120 з file)
            • +
            • source:some/file@52#L120 (посилання на рядок 120 з file ревізії 52)
            • +
            • source:"some file@52#L120" (використовуте подвійні лапки у випадках, коли URL містить пропуски
            • +
            • export:some/file (примусове завантаження файлу file)
            • +
            • source:svn1|some/file (посилання на file вказаного сховища, для проектів в яких використовується декілька сховищь)
            • +
            • sandbox:source:some/file (посилання на файл за шляхом /some/file з сховища проекту "sandbox")
            • +
            • sandbox:export:some/file (примусове завантаження файлу file)
            -
          • Forums: +
          • Форуми:
              -
            • forum#1 (link to forum with id 1
            • -
            • forum:Support (link to forum named Support)
            • -
            • forum:"Technical Support" (use double quotes if forum name contains spaces)
            • +
            • forum#1 (посилання на форум з id 1
            • +
            • forum:Support (посилання на форум з назвою Support)
            • +
            • forum:"Технічна підтримка" (використовуте подвійні лапки у випадках, коли назва форуму містить пропуски)
            -
          • Forum messages: +
          • Повідомленя на форумах:
              -
            • message#1218 (link to message with id 1218)
            • +
            • message#1218 (посилання на повідомлення з id 1218)
            -
          • Projects: +
          • Проекти:
              -
            • project#3 (link to project with id 3)
            • -
            • project:some-project (link to project with name or slug of "some-project")
            • -
            • project:"Some Project" (use double quotes for project name containing spaces)
            • +
            • project#3 (посилання на проект з id 3)
            • +
            • project:some-project (посилання на проект з назвою або ідентифікатором "some-project")
            • +
            • project:"Some Project" (використовуте подвійні лапки у випадках, коли назва проекту містить пропуски))
            -
          • News: +
          • Новини:
              -
            • news#2 (link to news item with id 2)
            • -
            • news:Greetings (link to news item named "Greetings")
            • -
            • news:"First Release" (use double quotes if news item name contains spaces)
            • +
            • news#2 (посилання на новину з id 2)
            • +
            • news:Greetings (посилання на новину з заголовком "Greetings")
            • +
            • news:"First Release" (використовуте подвійні лапки у випадках, коли назва новини містить пропуски)
          -

          Escaping:

          +

          Запобігання перетворенню(escaping):

            -
          • You can prevent Redmine links from being parsed by preceding them with an exclamation mark: !
          • +
          • Ви можете запобігти, щоб Redmine перетворював посилання, поставивши перед посиланням знак оклику: !
          -

          External links

          +

          Зовнішні посилання

          -

          HTTP URLs and email addresses are automatically turned into clickable links:

          +

          HTTP URL-адреси і адреси електронної пошти автоматично форматуються в активні посилання:

           http://www.redmine.org, someone@foo.bar
           
          -

          displays: http://www.redmine.org,

          +

          відображається як: http://www.redmine.org,

          -

          If you want to display a specific text instead of the URL, you can use the standard textile syntax:

          +

          Якщо ви хочете, відобразити текст замість URL, ви можете використовувати дужки:

           "Redmine web site":http://www.redmine.org
           
          -

          displays: Redmine web site

          +

          відображається як: Redmine web site

          -

          Text formatting

          +

          Форматування тексту

          -

          For things such as headlines, bold, tables, lists, Redmine supports Textile syntax. See http://en.wikipedia.org/wiki/Textile_(markup_language) for information on using any of these features. A few samples are included below, but the engine is capable of much more of that.

          +

          Для таких речей як: заголовки, жирний текст, таблиці, списки, Redmine підтримує Textile синтаксис. Перегляньте https://uk.wikipedia.org/wiki/Textile для отримання інформації як цим користуватись. Нижче наводиться декілька прикладів, але можливості Textile набагато більщі ніж у наведених прикладах.

          -

          Font style

          +

          Стиль шрифту

          -* *bold*
          -* _italic_
          -* _*bold italic*_
          -* +underline+
          -* -strike-through-
          +* *Жирний*
          +* _Курсив_
          +* _*Жирний курсив*_
          +* +Підкреслений+
          +* -Закреслений-
           
          -

          Display:

          +

          Відображення:

            -
          • bold
          • -
          • italic
          • -
          • bold italic
          • -
          • underline
          • -
          • strike-through
          • +
          • Жирний
          • +
          • Курсив
          • +
          • Жирний курсив
          • +
          • Підкреслений
          • +
          • Закреслений
          -

          Inline images

          +

          Вбудовані(inline) зображення

            -
          • !image_url! displays an image located at image_url (textile syntax)
          • -
          • !>image_url! right floating image
          • -
          • If you have an image attached to your wiki page, it can be displayed inline using its filename: !attached_image.png!
          • +
          • !image_url! виводить зображення, розташоване за адресою image_url (textile syntax)
          • +
          • !>image_url! зображення відображається з права(right floating)
          • +
          • !attached_image.png! зображення яке додане до вашої сторінки вікі, може бути відображено, з використанням ім'я файлу
          -

          Headings

          +

          Заголовки

          -h1. Heading
          -h2. Subheading
          -h3. Subsubheading
          +h1. Заголовок
          +h2. Підзаголовок
          +h3. Підзаголовок
           
          -

          Redmine assigns an anchor to each of those headings thus you can link to them with "#Heading", "#Subheading" and so forth.

          +

          Redmine призначає якір кожному з цих заголовків, таким чином, ви можете посилатись на них з "#Заголовок", "#Підзаголовок" і так далі.

          -

          Paragraphs

          +

          Параграфи

           p>. right aligned
           p=. centered
           
          -

          This is a centered paragraph.

          +

          Це центрований абзац.

          -

          Blockquotes

          +

          Цитати

          -

          Start the paragraph with bq.

          +

          Почніть параграф з bq.

          -bq. Rails is a full-stack framework for developing database-backed web applications according to the Model-View-Control pattern.
          -To go live, all you need to add is a database and a web server.
          +bq. Redmine — серверний веб-додаток з відкритим кодом для управління проектами та відстежування помилок. До системи входить календар-планувальник та діаграми Ганта
          +для візуального представлення ходу робіт за проектом та строків виконання.
           
          -

          Display:

          +

          Відображається:

          -

          Rails is a full-stack framework for developing database-backed web applications according to the Model-View-Control pattern.
          To go live, all you need to add is a database and a web server.

          +

          Redmine — серверний веб-додаток з відкритим кодом для управління проектами та відстежування помилок. До системи входить календар-планувальник та діаграми Ганта
          для візуального представлення ходу робіт за проектом та строків виконання.

          -

          Table of content

          +

          Таблиці змісту сторінки

           {{toc}} => left aligned toc
           {{>toc}} => right aligned toc
           
          -

          Horizontal Rule

          +

          Горизонтальна лінія

           ---
           
          -

          Macros

          +

          Макроси

          -

          Redmine has the following builtin macros:

          +

          Redmine має наступні вбудовані макроси:

          hello_world
          -

          Sample macro.

          +

          Приклад макросу.

          macro_list
          -

          Displays a list of all available macros, including description if available.

          +

          Відображає список всіх доступних макросів, в тому числі опис, якщо такий є.

          child_pages
          -

          Displays a list of child pages. With no argument, it displays the child pages of the current wiki page. Examples:

          -
          {{child_pages}} -- can be used from a wiki page only
          -{{child_pages(depth=2)}} -- display 2 levels nesting only
          +

          Відображає список дочірніх сторінок. Без аргументів, він відображає дочірні сторінки поточної сторінки вікі. Приклад:

          +
          {{child_pages}} -- може бути використаний тільки на вікі-сторінці
          +{{child_pages(depth=2)}} -- відображає тільки 2 рівня вкладень
          include
          -

          Include a wiki page. Example:

          +

          Вставити вікі-сторінку. Приклад:

          {{include(Foo)}}
          -

          or to include a page of a specific project wiki:

          +

          або вставити сторінку з конкретного проекту вікі:

          {{include(projectname:Foo)}}
          collapse
          -

          Inserts of collapsed block of text. Example:

          -
          {{collapse(View details...)
          -This is a block of text that is collapsed by default.
          -It can be expanded by clicking a link.
          +      

          Втавте блок тексту, який має з'являтись при натисканні на "Детальніше...". Приклад:

          +
          {{collapse(Детальніше...)
          +Це блок тексту прихований по замовчуванню.
          +Його можливо показати натиснувши на посилання
           }}
          thumbnail
          -

          Displays a clickable thumbnail of an attached image. Examples:

          +

          Відображає інтерактивні мініатюри вкладеного зображення. Приклади:

          {{thumbnail(image.png)}}
           {{thumbnail(image.png, size=300, title=Thumbnail)}}

          -

          Code highlighting

          +

          Підсвітка синтаксису коду

          -

          Default code highlightment relies on CodeRay, a fast syntax highlighting library written completely in Ruby. It currently supports c, clojure, cpp (c++, cplusplus), css, delphi (pascal), diff (patch), erb (eruby, rhtml), go, groovy, haml, html (xhtml), java, javascript (ecmascript, ecma_script, java_script, js), json, lua, php, python, ruby (irb), sass, sql, taskpaper, text (plain, plaintext), xml and yaml (yml) languages, where the names inside parentheses are aliases.

          +

          За замовчуванням підсвічування коду використовує CodeRay, швидка бібліотека для підсвітки синтаксису цілком розроблена на Ruby. На даний час вона підтримує синтаксис: c, clojure, cpp (c++, cplusplus), css, delphi (pascal), diff (patch), erb (eruby, rhtml), go, groovy, haml, html (xhtml), java, javascript (ecmascript, ecma_script, java_script, js), json, lua, php, python, ruby (irb), sass, sql, taskpaper, text (plain, plaintext), xml and yaml (yml) мови, де імена в дужках є псевдонімами.

          -

          You can highlight code at any place that supports wiki formatting using this syntax (note that the language name or alias is case-insensitive):

          +

          Ви можете виділити підсвіткою код в будь-якому місці, яке підтримує вікі-форматування, використовуючи наступний синтаксис (зверніть увагу, що назва мови або псевдонім не чутливі до регістру):

           <pre><code class="ruby">
          @@ -285,7 +285,7 @@ It can be expanded by clicking a link.
           </code></pre>
           
          -

          Example:

          +

          Приклад:

          # The Greeter class
           class Greeter
          diff --git a/public/help/uk/wiki_syntax_markdown.html b/public/help/uk/wiki_syntax_markdown.html
          index 39f8a3c26..af138db46 100644
          --- a/public/help/uk/wiki_syntax_markdown.html
          +++ b/public/help/uk/wiki_syntax_markdown.html
          @@ -2,51 +2,52 @@
           
           
           
          -Wiki formatting
          +Вікі синтаксис (Markdown)
           
           
           
           
          -

          Wiki Syntax Quick Reference (Markdown)

          +

          Вікі синтаксис швидка підказка (Markdown)

          - - - - - - + + + + + - - - + + + - - - - + + + + - + - - - + + + - + - + @@ -63,7 +64,7 @@
          Font Styles
          Strong**Strong**Strong
          Italic*Italic*Italic
          Deleted~~Deleted~~Deleted
          Inline Code`Inline Code`Inline Code
          Preformatted text~~~
           lines
           of code
          ~~~
          +
          Cтилі шрифтів
          Жирний**Жирний**Жирний
          Курсив*Курсив*Курсив
          Закреслений~~Закреслений~~Закреслений
          Інлайн код`Інлайн код`Інлайн код
          Попередньо відформатований текст~~~
           Попередньо
           відформатований
           текст
          ~~~
          - lines
          - of code
          + Попередньо
          + відформатований
          + текст
           
          Lists
          Unordered list* Item 1
            * Sub
          * Item 2
          • Item 1
            • Sub
          • Item 2
          Ordered list1. Item 1
             1. Sub
          2. Item 2
          1. Item 1
            1. Sub
          2. Item 2
          Списки
          Ненумерованний список* Пункт
            * Підпункт
          * Пункт
          • Пункт
            • Підпункт
          • Пункт
          Нумерований список1. Пункт
             1. Підпункт
          2. Пункт
          1. Пункт
            1. Підпункт
          2. Пункт
          Headings
          Heading 1# Title 1

          Title 1

          Heading 2## Title 2

          Title 2

          Heading 3### Title 3

          Title 3

          Заголовоки
          Заголовок 1# Заголовок 1

          Заголовок 1

          Заголовок 2## Заголовок 2

          Заголовок 2

          Заголовок 3### Заголовок 3

          Заголовок 3

          Links
          Лінки(посилання)
          http://foo.barhttp://foo.bar
          [Foo](http://foo.bar)Foo
          Redmine links
          Link to a Wiki page[[Wiki page]]Wiki page
          Issue #12Issue #12
          Redmine посилання
          Посилання на вікі сторінку[[Вікі сторінка]]Вікі сторінка
          Завдання #12Завдання #12
          Revision r43Revision r43
          commit:f30e13e43f30e13e4
          source:some/filesource:some/file
          Inline images
          Вбудовані(inline) зображення
          Image![](image_url)
          ![](attached_image)
          Tables
          Таблиці
          | A | B | C |
          |---|---|---|
          | A | B | C |
          | D | E | F |
          -

          More Information

          +

          Детальніша інформація

          diff --git a/public/help/uk/wiki_syntax_textile.html b/public/help/uk/wiki_syntax_textile.html index 6f544d2a0..a74662499 100644 --- a/public/help/uk/wiki_syntax_textile.html +++ b/public/help/uk/wiki_syntax_textile.html @@ -2,63 +2,64 @@ -Wiki formatting +Вікі синтаксис -

          Wiki Syntax Quick Reference

          +

          Вікі синтаксис швидка підказка

          - - - - - - - - + + + + + + + - - - + + + - - - - + + + + - + - - - + + + - - + + - + - + @@ -66,7 +67,7 @@
          Font Styles
          Strong*Strong*Strong
          Italic_Italic_Italic
          Underline+Underline+Underline
          Deleted-Deleted-Deleted
          ??Quote??Quote
          Inline Code@Inline Code@Inline Code
          Preformatted text<pre>
           lines
           of code
          </pre>
          +
          Cтилі шрифтів
          Жирний*Жирний*Жирний
          Курсив_Курсив_Курсив
          Підкреслений+Підкреслений+Підкреслений
          Закреслений-Закреслений-Закреслений
          ??Цитування??Цитування
          Інлайн код@Інлайн код@Інлайн код
          Попередньо відформатований текст<pre>
           Попередньо
           відформатований
           текст
          </pre>
          - lines
          - of code
          + Попередньо
          + відформатований
          + текст
           
          Lists
          Unordered list* Item 1
          ** Sub
          * Item 2
          • Item 1
            • Sub
          • Item 2
          Ordered list# Item 1
          ## Sub
          # Item 2
          1. Item 1
            1. Sub
          2. Item 2
          Списки
          Ненумерованний список* Пункт
          ** Підпункт
          * Пункт
          • Пункт
            • Підпункт
          • Пункт
          Нумерований список# Пункт
          ## Підпункт
          # Пункт
          1. Пункт
            1. Підпункт
          2. Пункт
          Headings
          Heading 1h1. Title 1

          Title 1

          Heading 2h2. Title 2

          Title 2

          Heading 3h3. Title 3

          Title 3

          Заголовоки
          Заголовок 1h1. Заголовок 1

          Заголовок 1

          Заголовок 2h2. Заголовок 2

          Заголовок 2

          Заголовок 3h3. Заголовок 3

          Заголовок 3

          Links
          Лінки(посилання)
          http://foo.barhttp://foo.bar
          "Foo":http://foo.barFoo
          Redmine links
          Link to a Wiki page[[Wiki page]]Wiki page
          Issue #12Issue #12
          Redmine посилання
          Посилання на вікі сторінку[[Вікі сторінка]]Вікі сторінка
          Завдання #12Завдання #12
          Revision r43Revision r43
          commit:f30e13e43f30e13e4
          source:some/filesource:some/file
          Inline images
          Image!image_url!
          Вбудоване(inline) зображення
          Зображення!image_url!
          !attached_image!
          Tables
          Таблиці
          |_. A |_. B |_. C |
          | A | B | C |
          |/2. row span | B | C |
          |\2. col span |
          |_. A |_. B |_. C |
          | A | B | C |
          |/2. об. рядки | B | C |
          |\2. об. колонки |
          - - + +
          ABC
          ABC
          row spanBC
          col span
          об'єднані рядкиBC
          об'єднані колонки
          -

          More Information

          +

          Детальніша інформація

          diff --git a/public/javascripts/jstoolbar/lang/jstoolbar-uk.js b/public/javascripts/jstoolbar/lang/jstoolbar-uk.js index 4f72f087e..5adb4b644 100644 --- a/public/javascripts/jstoolbar/lang/jstoolbar-uk.js +++ b/public/javascripts/jstoolbar/lang/jstoolbar-uk.js @@ -1,17 +1,17 @@ jsToolBar.strings = {}; -jsToolBar.strings['Strong'] = 'Strong'; -jsToolBar.strings['Italic'] = 'Italic'; -jsToolBar.strings['Underline'] = 'Underline'; -jsToolBar.strings['Deleted'] = 'Deleted'; -jsToolBar.strings['Code'] = 'Inline Code'; -jsToolBar.strings['Heading 1'] = 'Heading 1'; -jsToolBar.strings['Heading 2'] = 'Heading 2'; -jsToolBar.strings['Heading 3'] = 'Heading 3'; -jsToolBar.strings['Highlighted code'] = 'Highlighted code'; -jsToolBar.strings['Unordered list'] = 'Unordered list'; -jsToolBar.strings['Ordered list'] = 'Ordered list'; -jsToolBar.strings['Quote'] = 'Quote'; -jsToolBar.strings['Unquote'] = 'Remove Quote'; -jsToolBar.strings['Preformatted text'] = 'Preformatted text'; -jsToolBar.strings['Wiki link'] = 'Link to a Wiki page'; -jsToolBar.strings['Image'] = 'Image'; +jsToolBar.strings['Strong'] = 'Жирний'; +jsToolBar.strings['Italic'] = 'Курсив'; +jsToolBar.strings['Underline'] = 'Підкреслений'; +jsToolBar.strings['Deleted'] = 'Закреслений'; +jsToolBar.strings['Code'] = 'Інлайн код'; +jsToolBar.strings['Heading 1'] = 'Заголовок 1'; +jsToolBar.strings['Heading 2'] = 'Заголовок 2'; +jsToolBar.strings['Heading 3'] = 'Заголовок 3'; +jsToolBar.strings['Highlighted code'] = 'Виділений код'; +jsToolBar.strings['Unordered list'] = 'Ненумерованний список'; +jsToolBar.strings['Ordered list'] = 'Нумерований список'; +jsToolBar.strings['Quote'] = 'Цитування'; +jsToolBar.strings['Unquote'] = 'Видалити цитування'; +jsToolBar.strings['Preformatted text'] = 'Попередньо відформатований текст'; +jsToolBar.strings['Wiki link'] = 'Посилання на сторінку Wiki'; +jsToolBar.strings['Image'] = 'Зображення'; From ba735a1f4bbf21762619e533f51ef7709698d9fa Mon Sep 17 00:00:00 2001 From: Toshi MARUYAMA Date: Thu, 16 Mar 2017 11:29:14 +0000 Subject: [PATCH 0731/1117] Japanese translation updated by Go MAEDA (#25264) git-svn-id: http://svn.redmine.org/redmine/trunk@16411 e93f8b46-1217-0410-a6f0-8f06a7374b81 --- config/locales/ja.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/config/locales/ja.yml b/config/locales/ja.yml index a6fbfd3c2..cabb5011c 100644 --- a/config/locales/ja.yml +++ b/config/locales/ja.yml @@ -1228,4 +1228,4 @@ ja: field_updated_by: 更新者 field_last_updated_by: 最終更新者 field_full_width_layout: ワイド表示 - label_last_notes: Last notes + label_last_notes: 最新の注記 From 1a180a67be5c205653e5d006fd027c0cafb3b597 Mon Sep 17 00:00:00 2001 From: Toshi MARUYAMA Date: Thu, 16 Mar 2017 11:29:29 +0000 Subject: [PATCH 0732/1117] Traditional Chinese translation updated by ChunChang Lo (#25341) git-svn-id: http://svn.redmine.org/redmine/trunk@16412 e93f8b46-1217-0410-a6f0-8f06a7374b81 --- config/locales/zh-TW.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/config/locales/zh-TW.yml b/config/locales/zh-TW.yml index bfe0adf41..673808914 100644 --- a/config/locales/zh-TW.yml +++ b/config/locales/zh-TW.yml @@ -1096,6 +1096,7 @@ label_font_default: 預設字型 label_font_monospace: 等寬字型 label_font_proportional: 調和間距字型 + label_last_notes: 最後一則筆記 button_login: 登入 button_submit: 送出 @@ -1288,4 +1289,3 @@ description_issue_category_reassign: 選擇議題分類 description_wiki_subpages_reassign: 選擇新的父頁面 text_repository_identifier_info: '僅允許使用小寫英文字母 (a-z), 阿拉伯數字, 虛線與底線。
          一旦儲存之後, 代碼便無法再次被更改。' - label_last_notes: Last notes From 4cfd5133733a08ebf5ba89aa3994e4a86679c809 Mon Sep 17 00:00:00 2001 From: Jean-Philippe Lang Date: Thu, 16 Mar 2017 18:02:43 +0000 Subject: [PATCH 0733/1117] Allow multiple instances of custom queries on My page (#1565). git-svn-id: http://svn.redmine.org/redmine/trunk@16413 e93f8b46-1217-0410-a6f0-8f06a7374b81 --- app/helpers/my_helper.rb | 51 ++++++++++--------- app/models/user_preference.rb | 6 ++- .../my/blocks/_issue_query_selection.html.erb | 21 ++++++++ app/views/my/blocks/_issues.erb | 28 ---------- lib/redmine/my_page.rb | 33 +++++++++--- test/functional/my_controller_test.rb | 37 ++++++++++++-- 6 files changed, 114 insertions(+), 62 deletions(-) create mode 100644 app/views/my/blocks/_issue_query_selection.html.erb diff --git a/app/helpers/my_helper.rb b/app/helpers/my_helper.rb index 2fa127226..e40ccc27d 100644 --- a/app/helpers/my_helper.rb +++ b/app/helpers/my_helper.rb @@ -47,26 +47,29 @@ module MyHelper # Renders a single block content def render_block_content(block, user) - unless block_definition = Redmine::MyPage.blocks[block] + unless block_definition = Redmine::MyPage.find_block(block) Rails.logger.warn("Unknown block \"#{block}\" found in #{user.login} (id=#{user.id}) preferences") return end settings = user.pref.my_page_settings(block) - partial = block_definition[:partial] - begin - render(:partial => partial, :locals => {:user => user, :settings => settings, :block => block}) - rescue ActionView::MissingTemplate - Rails.logger.warn("Partial \"#{partial}\" missing for block \"#{block}\" found in #{user.login} (id=#{user.id}) preferences") - return nil + if partial = block_definition[:partial] + begin + render(:partial => partial, :locals => {:user => user, :settings => settings, :block => block}) + rescue ActionView::MissingTemplate + Rails.logger.warn("Partial \"#{partial}\" missing for block \"#{block}\" found in #{user.login} (id=#{user.id}) preferences") + return nil + end + else + send "render_#{block_definition[:name]}_block", block, settings end end def block_select_tag(user) - disabled = user.pref.my_page_layout.values.flatten + blocks_in_use = user.pref.my_page_layout.values.flatten options = content_tag('option') - Redmine::MyPage.block_options.each do |label, block| - options << content_tag('option', label, :value => block, :disabled => disabled.include?(block)) + Redmine::MyPage.block_options(blocks_in_use).each do |label, block| + options << content_tag('option', label, :value => block, :disabled => block.blank?) end select_tag('block', options, :id => "block-select", :onchange => "$('#block-form').submit();") end @@ -88,45 +91,47 @@ module MyHelper send "#{block}_items", settings end - def issuesassignedtome_items(settings) + def render_issuesassignedtome_block(block, settings) query = IssueQuery.new(:name => l(:label_assigned_to_me_issues), :user => User.current) query.add_filter 'assigned_to_id', '=', ['me'] query.column_names = settings[:columns].presence || ['project', 'tracker', 'status', 'subject'] query.sort_criteria = settings[:sort].presence || [['priority', 'desc'], ['updated_on', 'desc']] issues = query.issues(:limit => 10) - return issues, query + render :partial => 'my/blocks/issues', :locals => {:query => query, :issues => issues, :block => block} end - def issuesreportedbyme_items(settings) + def render_issuesreportedbyme_block(block, settings) query = IssueQuery.new(:name => l(:label_reported_issues), :user => User.current) query.add_filter 'author_id', '=', ['me'] query.column_names = settings[:columns].presence || ['project', 'tracker', 'status', 'subject'] query.sort_criteria = settings[:sort].presence || [['updated_on', 'desc']] issues = query.issues(:limit => 10) - return issues, query + render :partial => 'my/blocks/issues', :locals => {:query => query, :issues => issues, :block => block} end - def issueswatched_items(settings) + def render_issueswatched_block(block, settings) query = IssueQuery.new(:name => l(:label_watched_issues), :user => User.current) query.add_filter 'watcher_id', '=', ['me'] query.column_names = settings[:columns].presence || ['project', 'tracker', 'status', 'subject'] query.sort_criteria = settings[:sort].presence || [['updated_on', 'desc']] issues = query.issues(:limit => 10) - return issues, query + render :partial => 'my/blocks/issues', :locals => {:query => query, :issues => issues, :block => block} end - def issuequery_items(settings) + def render_issuequery_block(block, settings) query = IssueQuery.visible.find_by_id(settings[:query_id]) - return unless query - query.column_names = settings[:columns] if settings[:columns].present? - query.sort_criteria = settings[:sort] if settings[:sort].present? - issues = query.issues(:limit => 10) - - return issues, query + if query + query.column_names = settings[:columns] if settings[:columns].present? + query.sort_criteria = settings[:sort] if settings[:sort].present? + issues = query.issues(:limit => 10) + render :partial => 'my/blocks/issues', :locals => {:query => query, :issues => issues, :block => block, :settings => settings} + else + render :partial => 'my/blocks/issue_query_selection', :locals => {:block => block, :settings => settings} + end end def news_items diff --git a/app/models/user_preference.rb b/app/models/user_preference.rb index e0b17631c..836ad3978 100644 --- a/app/models/user_preference.rb +++ b/app/models/user_preference.rb @@ -109,6 +109,7 @@ class UserPreference < ActiveRecord::Base self[:my_page_settings] = arg end + # Removes block from the user page layout def remove_block(block) block = block.to_s.underscore %w(top left right).each do |f| @@ -117,9 +118,12 @@ class UserPreference < ActiveRecord::Base my_page_layout end + # Adds block to the user page layout + # Returns nil if block is not valid or if it's already + # present in the user page layout def add_block(block) block = block.to_s.underscore - return unless Redmine::MyPage.blocks.key?(block) + return unless Redmine::MyPage.valid_block?(block, my_page_layout.values.flatten) remove_block(block) # add it on top diff --git a/app/views/my/blocks/_issue_query_selection.html.erb b/app/views/my/blocks/_issue_query_selection.html.erb new file mode 100644 index 000000000..64a3f32af --- /dev/null +++ b/app/views/my/blocks/_issue_query_selection.html.erb @@ -0,0 +1,21 @@ +<% visible_queries = IssueQuery.visible.sorted %> + +

          + <%= l(:label_issue_plural) %> +

          + +
          + <%= form_tag(my_page_path, :remote => true) do %> +
          +

          + +

          +
          +

          + <%= submit_tag l(:button_save) %> +

          + <% end %> +
          diff --git a/app/views/my/blocks/_issues.erb b/app/views/my/blocks/_issues.erb index 47fb28136..845ef5b85 100644 --- a/app/views/my/blocks/_issues.erb +++ b/app/views/my/blocks/_issues.erb @@ -1,6 +1,3 @@ -<% issues, query = issues_items(block, settings) %> - -<% if query %>
          <%= link_to_function l(:label_options), "$('##{block}-settings').toggle();", :class => 'icon-only icon-settings', :title => l(:label_options) %>
          @@ -42,28 +39,3 @@ _project_issues_path(query.project, query.as_params.merge(:format => 'atom', :key => User.current.rss_key)), {:title => query.name}) %> <% end %> - -<% else %> -<% visible_queries = IssueQuery.visible.sorted %> - -

          - <%= l(:label_issue_plural) %> -

          - -
          - <%= form_tag(my_page_path, :remote => true) do %> -
          -

          - -

          -
          -

          - <%= submit_tag l(:button_save) %> -

          - <% end %> -
          - -<% end %> diff --git a/lib/redmine/my_page.rb b/lib/redmine/my_page.rb index dc9c6928f..34195bbcd 100644 --- a/lib/redmine/my_page.rb +++ b/lib/redmine/my_page.rb @@ -20,10 +20,10 @@ module Redmine include Redmine::I18n CORE_BLOCKS = { - 'issuesassignedtome' => {:label => :label_assigned_to_me_issues, :partial => 'my/blocks/issues'}, - 'issuesreportedbyme' => {:label => :label_reported_issues, :partial => 'my/blocks/issues'}, - 'issueswatched' => {:label => :label_watched_issues, :partial => 'my/blocks/issues'}, - 'issuequery' => {:label => :label_issue_plural, :partial => 'my/blocks/issues'}, + 'issuesassignedtome' => {:label => :label_assigned_to_me_issues}, + 'issuesreportedbyme' => {:label => :label_reported_issues}, + 'issueswatched' => {:label => :label_watched_issues}, + 'issuequery' => {:label => :label_issue_plural, :max_occurs => 3}, 'news' => {:label => :label_news_latest, :partial => 'my/blocks/news'}, 'calendar' => {:label => :label_calendar, :partial => 'my/blocks/calendar'}, 'documents' => {:label => :label_document_plural, :partial => 'my/blocks/documents'}, @@ -35,15 +35,36 @@ module Redmine CORE_BLOCKS.merge(additional_blocks).freeze end - def self.block_options + def self.block_options(blocks_in_use=[]) options = [] blocks.each do |block, block_options| + indexes = blocks_in_use.map {|n| + if n =~ /\A#{block}(__(\d+))?\z/ + $2.to_i + end + }.compact + + occurs = indexes.size + block_id = indexes.any? ? "#{block}__#{indexes.max + 1}" : block + disabled = (occurs >= (Redmine::MyPage.blocks[block][:max_occurs] || 1)) + block_id = nil if disabled + label = block_options[:label] - options << [l("my.blocks.#{label}", :default => [label, label.to_s.humanize]), block.dasherize] + options << [l("my.blocks.#{label}", :default => [label, label.to_s.humanize]), block_id] end options end + def self.valid_block?(block, blocks_in_use=[]) + block.present? && block_options(blocks_in_use).map(&:last).include?(block) + end + + def self.find_block(block) + block.to_s =~ /\A(.*?)(__\d+)?\z/ + name = $1 + blocks.has_key?(name) ? blocks[name].merge(:name => name) : nil + end + # Returns the additional blocks that are defined by plugin partials def self.additional_blocks @@additional_blocks ||= Dir.glob("#{Redmine::Plugin.directory}/*/app/views/my/blocks/_*.{rhtml,erb}").inject({}) do |h,file| diff --git a/test/functional/my_controller_test.rb b/test/functional/my_controller_test.rb index 09cb1a834..5e3e9e940 100644 --- a/test/functional/my_controller_test.rb +++ b/test/functional/my_controller_test.rb @@ -165,6 +165,35 @@ class MyControllerTest < Redmine::ControllerTest end end + def test_page_with_multiple_issuequery_blocks + user = User.find(2) + query1 = IssueQuery.create!(:name => 'All issues', :user => user, :column_names => [:tracker, :subject, :status, :assigned_to]) + query2 = IssueQuery.create!(:name => 'Other issues', :user => user, :column_names => [:tracker, :subject, :priority]) + user.pref.my_page_layout = {'top' => ['issuequery__1', 'issuequery']} + user.pref.my_page_settings = { + 'issuequery' => {:query_id => query1.id, :columns => [:subject, :due_date]}, + 'issuequery__1' => {:query_id => query2.id} + } + user.pref.save! + + get :page + assert_response :success + + assert_select '#block-issuequery' do + assert_select 'h3', :text => /All issues/ + assert_select 'table.issues th', :text => 'Due date' + end + + assert_select '#block-issuequery__1' do + assert_select 'h3', :text => /Other issues/ + assert_select 'table.issues th', :text => 'Priority' + end + + assert_select '#block-select' do + assert_select 'option[value=?]:not([disabled])', 'issuequery__2', :text => 'Issues' + end + end + def test_page_with_all_blocks blocks = Redmine::MyPage.blocks.keys preferences = User.find(2).pref @@ -348,15 +377,15 @@ class MyControllerTest < Redmine::ControllerTest end def test_add_block - post :add_block, :block => 'issuesreportedbyme' + post :add_block, :block => 'issueswatched' assert_redirected_to '/my/page' - assert User.find(2).pref[:my_page_layout]['top'].include?('issuesreportedbyme') + assert User.find(2).pref[:my_page_layout]['top'].include?('issueswatched') end def test_add_block_xhr - xhr :post, :add_block, :block => 'issuesreportedbyme' + xhr :post, :add_block, :block => 'issueswatched' assert_response :success - assert_include 'issuesreportedbyme', User.find(2).pref[:my_page_layout]['top'] + assert_include 'issueswatched', User.find(2).pref[:my_page_layout]['top'] end def test_add_invalid_block_should_error From 23131d14f5ed86cac904a695df34dbcd011ecdd0 Mon Sep 17 00:00:00 2001 From: Jean-Philippe Lang Date: Thu, 16 Mar 2017 18:26:43 +0000 Subject: [PATCH 0734/1117] Use helper methods for rendering blocks. git-svn-id: http://svn.redmine.org/redmine/trunk@16414 e93f8b46-1217-0410-a6f0-8f06a7374b81 --- app/helpers/my_helper.rb | 29 +++++++++++++++---------- app/views/my/blocks/_calendar.html.erb | 3 --- app/views/my/blocks/_documents.html.erb | 2 +- app/views/my/blocks/_news.html.erb | 2 +- app/views/my/blocks/_timelog.html.erb | 5 ----- lib/redmine/my_page.rb | 8 +++---- 6 files changed, 23 insertions(+), 26 deletions(-) diff --git a/app/helpers/my_helper.rb b/app/helpers/my_helper.rb index e40ccc27d..e49afc21b 100644 --- a/app/helpers/my_helper.rb +++ b/app/helpers/my_helper.rb @@ -65,6 +65,7 @@ module MyHelper end end + # Returns the select tag used to add a block to My page def block_select_tag(user) blocks_in_use = user.pref.my_page_layout.values.flatten options = content_tag('option') @@ -74,21 +75,22 @@ module MyHelper select_tag('block', options, :id => "block-select", :onchange => "$('#block-form').submit();") end - def calendar_items(startdt, enddt) - Issue.visible. + def render_calendar_block(block, settings) + calendar = Redmine::Helpers::Calendar.new(User.current.today, current_language, :week) + calendar.events = Issue.visible. where(:project_id => User.current.projects.map(&:id)). - where("(start_date>=? and start_date<=?) or (due_date>=? and due_date<=?)", startdt, enddt, startdt, enddt). + where("(start_date>=? and start_date<=?) or (due_date>=? and due_date<=?)", calendar.startdt, calendar.enddt, calendar.startdt, calendar.enddt). includes(:project, :tracker, :priority, :assigned_to). references(:project, :tracker, :priority, :assigned_to). to_a + + render :partial => 'my/blocks/calendar', :locals => {:calendar => calendar, :block => block} end - def documents_items - Document.visible.order("#{Document.table_name}.created_on DESC").limit(10).to_a - end + def render_documents_block(block, settings) + documents = Document.visible.order("#{Document.table_name}.created_on DESC").limit(10).to_a - def issues_items(block, settings) - send "#{block}_items", settings + render :partial => 'my/blocks/documents', :locals => {:block => block, :documents => documents} end def render_issuesassignedtome_block(block, settings) @@ -134,17 +136,19 @@ module MyHelper end end - def news_items - News.visible. + def render_news_block(block, settings) + news = News.visible. where(:project_id => User.current.projects.map(&:id)). limit(10). includes(:project, :author). references(:project, :author). order("#{News.table_name}.created_on DESC"). to_a + + render :partial => 'my/blocks/news', :locals => {:block => block, :news => news} end - def timelog_items(settings={}) + def render_timelog_block(block, settings) days = settings[:days].to_i days = 7 if days < 1 || days > 365 @@ -155,7 +159,8 @@ module MyHelper includes(:issue => [:tracker, :status]). order("#{TimeEntry.table_name}.spent_on DESC, #{Project.table_name}.name ASC, #{Tracker.table_name}.position ASC, #{Issue.table_name}.id ASC"). to_a + entries_by_day = entries.group_by(&:spent_on) - return entries, days + render :partial => 'my/blocks/timelog', :locals => {:block => block, :entries => entries, :entries_by_day => entries_by_day, :days => days} end end diff --git a/app/views/my/blocks/_calendar.html.erb b/app/views/my/blocks/_calendar.html.erb index 89dde0e01..c85190f2a 100644 --- a/app/views/my/blocks/_calendar.html.erb +++ b/app/views/my/blocks/_calendar.html.erb @@ -1,6 +1,3 @@

          <%= l(:label_calendar) %>

          -<% calendar = Redmine::Helpers::Calendar.new(User.current.today, current_language, :week) - calendar.events = calendar_items(calendar.startdt, calendar.enddt) %> - <%= render :partial => 'common/calendar', :locals => {:calendar => calendar } %> diff --git a/app/views/my/blocks/_documents.html.erb b/app/views/my/blocks/_documents.html.erb index a55094cf1..560adca1e 100644 --- a/app/views/my/blocks/_documents.html.erb +++ b/app/views/my/blocks/_documents.html.erb @@ -1,3 +1,3 @@

          <%=l(:label_document_plural)%>

          -<%= render :partial => 'documents/document', :collection => documents_items %> +<%= render :partial => 'documents/document', :collection => documents %> diff --git a/app/views/my/blocks/_news.html.erb b/app/views/my/blocks/_news.html.erb index c478e4196..62a618617 100644 --- a/app/views/my/blocks/_news.html.erb +++ b/app/views/my/blocks/_news.html.erb @@ -1,3 +1,3 @@

          <%=l(:label_news_latest)%>

          -<%= render :partial => 'news/news', :collection => news_items %> +<%= render :partial => 'news/news', :collection => news %> diff --git a/app/views/my/blocks/_timelog.html.erb b/app/views/my/blocks/_timelog.html.erb index 83716d35e..da181c27e 100644 --- a/app/views/my/blocks/_timelog.html.erb +++ b/app/views/my/blocks/_timelog.html.erb @@ -1,8 +1,3 @@ -<% -entries, days = timelog_items(settings) -entries_by_day = entries.group_by(&:spent_on) -%> -
          <%= link_to_function l(:label_options), "$('#timelog-settings').toggle();", :class => 'icon-only icon-settings', :title => l(:label_options) %>
          diff --git a/lib/redmine/my_page.rb b/lib/redmine/my_page.rb index 34195bbcd..02feb54bb 100644 --- a/lib/redmine/my_page.rb +++ b/lib/redmine/my_page.rb @@ -24,10 +24,10 @@ module Redmine 'issuesreportedbyme' => {:label => :label_reported_issues}, 'issueswatched' => {:label => :label_watched_issues}, 'issuequery' => {:label => :label_issue_plural, :max_occurs => 3}, - 'news' => {:label => :label_news_latest, :partial => 'my/blocks/news'}, - 'calendar' => {:label => :label_calendar, :partial => 'my/blocks/calendar'}, - 'documents' => {:label => :label_document_plural, :partial => 'my/blocks/documents'}, - 'timelog' => {:label => :label_spent_time, :partial => 'my/blocks/timelog'} + 'news' => {:label => :label_news_latest}, + 'calendar' => {:label => :label_calendar}, + 'documents' => {:label => :label_document_plural}, + 'timelog' => {:label => :label_spent_time} } # Returns the available blocks From e7400dfbba3eb0ea2b0483852939bf7c7f9920d6 Mon Sep 17 00:00:00 2001 From: Jean-Philippe Lang Date: Thu, 16 Mar 2017 20:16:51 +0000 Subject: [PATCH 0735/1117] Fix tests (#1565). git-svn-id: http://svn.redmine.org/redmine/trunk@16415 e93f8b46-1217-0410-a6f0-8f06a7374b81 --- app/views/my/blocks/_timelog.html.erb | 2 +- test/functional/my_controller_test.rb | 8 +++-- test/unit/helpers/my_helper_test.rb | 49 --------------------------- 3 files changed, 7 insertions(+), 52 deletions(-) delete mode 100644 test/unit/helpers/my_helper_test.rb diff --git a/app/views/my/blocks/_timelog.html.erb b/app/views/my/blocks/_timelog.html.erb index da181c27e..350cbaec8 100644 --- a/app/views/my/blocks/_timelog.html.erb +++ b/app/views/my/blocks/_timelog.html.erb @@ -44,7 +44,7 @@ <%= html_hours(format_hours(entries_by_day[day].sum(&:hours))) %> <% entries_by_day[day].each do |entry| -%> - + <%= check_box_tag("ids[]", entry.id, false, :style => 'display:none;', :id => nil) %> <%= entry.activity %> diff --git a/test/functional/my_controller_test.rb b/test/functional/my_controller_test.rb index 5e3e9e940..92f5f8fa2 100644 --- a/test/functional/my_controller_test.rb +++ b/test/functional/my_controller_test.rb @@ -41,14 +41,18 @@ class MyControllerTest < Redmine::ControllerTest preferences = User.find(2).pref preferences[:my_page_layout] = {'top' => ['timelog']} preferences.save! - TimeEntry.create!(:user => User.find(2), :spent_on => Date.yesterday, :issue_id => 1, :hours => 2.5, :activity_id => 10) + with_issue = TimeEntry.create!(:user => User.find(2), :spent_on => Date.yesterday, :hours => 2.5, :activity_id => 10, :issue_id => 1) + without_issue = TimeEntry.create!(:user => User.find(2), :spent_on => Date.yesterday, :hours => 3.5, :activity_id => 10, :project_id => 1) get :page assert_response :success - assert_select 'tr.time-entry' do + assert_select "tr#time-entry-#{with_issue.id}" do assert_select 'td.subject a[href="/issues/1"]' assert_select 'td.hours', :text => '2.50' end + assert_select "tr#time-entry-#{without_issue.id}" do + assert_select 'td.hours', :text => '3.50' + end end def test_page_with_assigned_issues_block_and_no_custom_settings diff --git a/test/unit/helpers/my_helper_test.rb b/test/unit/helpers/my_helper_test.rb deleted file mode 100644 index d79525dd0..000000000 --- a/test/unit/helpers/my_helper_test.rb +++ /dev/null @@ -1,49 +0,0 @@ -# Redmine - project management software -# Copyright (C) 2006-2016 Jean-Philippe Lang -# -# This program is free software; you can redistribute it and/or -# modify it under the terms of the GNU General Public License -# as published by the Free Software Foundation; either version 2 -# of the License, or (at your option) any later version. -# -# This program is distributed in the hope that it will be useful, -# but WITHOUT ANY WARRANTY; without even the implied warranty of -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -# GNU General Public License for more details. -# -# You should have received a copy of the GNU General Public License -# along with this program; if not, write to the Free Software -# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. - -require File.expand_path('../../../test_helper', __FILE__) - -class MyHelperTest < Redmine::HelperTest - include ERB::Util - include MyHelper - - - fixtures :projects, :trackers, :issue_statuses, :issues, - :enumerations, :users, :issue_categories, - :projects_trackers, - :roles, - :member_roles, - :members, - :enabled_modules, - :versions - - def test_timelog_items_should_include_time_entries_without_issue - User.current = User.find(2) - entry = TimeEntry.generate!(:spent_on => Date.today, :user_id => 2, :project_id => 1) - assert_nil entry.issue - - assert_include entry, timelog_items.first - end - - def test_timelog_items_should_include_time_entries_with_issue - User.current = User.find(2) - entry = TimeEntry.generate!(:spent_on => Date.today, :user_id => 2, :project_id => 1, :issue_id => 1) - assert_not_nil entry.issue - - assert_include entry, timelog_items.first - end -end From ea26846b81babd4ee9cda1c2baf1cedc77439161 Mon Sep 17 00:00:00 2001 From: Jean-Philippe Lang Date: Sat, 18 Mar 2017 08:36:52 +0000 Subject: [PATCH 0736/1117] Load queries from the helper. git-svn-id: http://svn.redmine.org/redmine/trunk@16416 e93f8b46-1217-0410-a6f0-8f06a7374b81 --- app/helpers/my_helper.rb | 3 ++- app/views/my/blocks/_issue_query_selection.html.erb | 4 +--- 2 files changed, 3 insertions(+), 4 deletions(-) diff --git a/app/helpers/my_helper.rb b/app/helpers/my_helper.rb index e49afc21b..c16fe09f9 100644 --- a/app/helpers/my_helper.rb +++ b/app/helpers/my_helper.rb @@ -132,7 +132,8 @@ module MyHelper issues = query.issues(:limit => 10) render :partial => 'my/blocks/issues', :locals => {:query => query, :issues => issues, :block => block, :settings => settings} else - render :partial => 'my/blocks/issue_query_selection', :locals => {:block => block, :settings => settings} + queries = IssueQuery.visible.sorted + render :partial => 'my/blocks/issue_query_selection', :locals => {:queries => queries, :block => block, :settings => settings} end end diff --git a/app/views/my/blocks/_issue_query_selection.html.erb b/app/views/my/blocks/_issue_query_selection.html.erb index 64a3f32af..640f049b0 100644 --- a/app/views/my/blocks/_issue_query_selection.html.erb +++ b/app/views/my/blocks/_issue_query_selection.html.erb @@ -1,5 +1,3 @@ -<% visible_queries = IssueQuery.visible.sorted %> -

          <%= l(:label_issue_plural) %>

          @@ -10,7 +8,7 @@

          From 88baaa5d3b6e8954df4b7ff51137f619ba5390ef Mon Sep 17 00:00:00 2001 From: Jean-Philippe Lang Date: Sat, 18 Mar 2017 08:39:27 +0000 Subject: [PATCH 0737/1117] Remove initial indentation of blockquotes for better readability (#25320). Patch by Jan Schulz-Hofen. git-svn-id: http://svn.redmine.org/redmine/trunk@16417 e93f8b46-1217-0410-a6f0-8f06a7374b81 --- app/views/layouts/mailer.html.erb | 2 +- public/stylesheets/application.css | 2 +- public/stylesheets/rtl.css | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/app/views/layouts/mailer.html.erb b/app/views/layouts/mailer.html.erb index 6be9d71c9..a7d289f98 100644 --- a/app/views/layouts/mailer.html.erb +++ b/app/views/layouts/mailer.html.erb @@ -25,7 +25,7 @@ span.footer { font-size: 0.8em; font-style: italic; } -blockquote { font-style: italic; border-left: 3px solid #e0e0e0; padding-left: 0.6em; margin-left: 1.2em;} +blockquote { font-style: italic; border-left: 3px solid #e0e0e0; padding-left: 0.6em; margin-left: 0;} blockquote blockquote { margin-left: 0;} pre, code {font-family: Consolas, Menlo, "Liberation Mono", Courier, monospace;} pre { diff --git a/public/stylesheets/application.css b/public/stylesheets/application.css index 406989c3f..03545c6c5 100644 --- a/public/stylesheets/application.css +++ b/public/stylesheets/application.css @@ -435,7 +435,7 @@ input[type="submit"] { -webkit-appearance: button; } fieldset {border: 1px solid #e4e4e4; margin:0;} legend {color: #333;} hr { width: 100%; height: 1px; background: #ccc; border: 0;} -blockquote { font-style: italic; border-left: 3px solid #e0e0e0; padding-left: 0.6em; margin-left: 2.4em;} +blockquote { font-style: italic; border-left: 3px solid #e0e0e0; padding-left: 0.6em; margin-left: 0;} blockquote blockquote { margin-left: 0;} abbr, span.field-description[title] { border-bottom: 1px dotted #aaa; cursor: help; } textarea.wiki-edit {width:99%; resize:vertical;} diff --git a/public/stylesheets/rtl.css b/public/stylesheets/rtl.css index fba9ef424..dc485026a 100644 --- a/public/stylesheets/rtl.css +++ b/public/stylesheets/rtl.css @@ -126,7 +126,7 @@ div.square {float:right;} .splitcontentleft{float:right;} .splitcontentright{float:left;} -blockquote {border-left:0px solid #e0e0e0; padding-left:0em; margin-left:2em; border-right:3px solid #e0e0e0; padding-right:0.6em; margin-right:2.4em;} +blockquote {border-left:0px solid #e0e0e0; padding-left:0em; margin-left:2em; border-right:3px solid #e0e0e0; padding-right:0.6em; margin-right:0;} blockquote blockquote { margin-right:0;} div.issue div.subject div div {padding-left:0px; padding-right:16px;} From 04e67ed04177f4f789784d7851741e816c42746b Mon Sep 17 00:00:00 2001 From: Jean-Philippe Lang Date: Sat, 18 Mar 2017 08:45:09 +0000 Subject: [PATCH 0738/1117] Make project custom fields available as columns on time logs (#24157). Patch by Jan Schulz-Hofen. git-svn-id: http://svn.redmine.org/redmine/trunk@16418 e93f8b46-1217-0410-a6f0-8f06a7374b81 --- app/models/time_entry_query.rb | 2 ++ 1 file changed, 2 insertions(+) diff --git a/app/models/time_entry_query.rb b/app/models/time_entry_query.rb index 3d37e94da..656415d66 100644 --- a/app/models/time_entry_query.rb +++ b/app/models/time_entry_query.rb @@ -91,6 +91,8 @@ class TimeEntryQuery < Query map {|cf| QueryCustomFieldColumn.new(cf) } @available_columns += issue_custom_fields.visible. map {|cf| QueryAssociationCustomFieldColumn.new(:issue, cf, :totalable => false) } + @available_columns += ProjectCustomField.visible. + map {|cf| QueryAssociationCustomFieldColumn.new(:project, cf) } @available_columns end From 6f03e7fdd7ea1179f4cd20cb546d1d1a69be9405 Mon Sep 17 00:00:00 2001 From: Jean-Philippe Lang Date: Sat, 18 Mar 2017 08:52:15 +0000 Subject: [PATCH 0739/1117] Change translation for label_send_information (#25249). git-svn-id: http://svn.redmine.org/redmine/trunk@16419 e93f8b46-1217-0410-a6f0-8f06a7374b81 --- config/locales/en-GB.yml | 2 +- config/locales/en.yml | 2 +- config/locales/fr.yml | 2 +- config/locales/ja.yml | 2 +- config/locales/ru.yml | 2 +- 5 files changed, 5 insertions(+), 5 deletions(-) diff --git a/config/locales/en-GB.yml b/config/locales/en-GB.yml index b626aaf9d..fa367aebb 100644 --- a/config/locales/en-GB.yml +++ b/config/locales/en-GB.yml @@ -712,7 +712,7 @@ en-GB: label_message_new: New message label_message_posted: Message added label_reply_plural: Replies - label_send_information: Send account information to the user + label_send_information: Send new password to the user label_year: Year label_month: Month label_week: Week diff --git a/config/locales/en.yml b/config/locales/en.yml index 531081f78..0eb31a804 100644 --- a/config/locales/en.yml +++ b/config/locales/en.yml @@ -837,7 +837,7 @@ en: label_message_new: New message label_message_posted: Message added label_reply_plural: Replies - label_send_information: Send account information to the user + label_send_information: Send new password to the user label_year: Year label_month: Month label_week: Week diff --git a/config/locales/fr.yml b/config/locales/fr.yml index 4721028f2..c3df32b8f 100644 --- a/config/locales/fr.yml +++ b/config/locales/fr.yml @@ -848,7 +848,7 @@ fr: label_message_new: Nouveau message label_message_posted: Message ajouté label_reply_plural: Réponses - label_send_information: Envoyer les informations à l'utilisateur + label_send_information: Envoyer le mot de passe à l'utilisateur par email label_year: Année label_month: Mois label_week: Semaine diff --git a/config/locales/ja.yml b/config/locales/ja.yml index cabb5011c..6350698c9 100644 --- a/config/locales/ja.yml +++ b/config/locales/ja.yml @@ -734,7 +734,7 @@ ja: label_message_new: 新しいメッセージ label_message_posted: メッセージの追加 label_reply_plural: 返答 - label_send_information: アカウント情報をユーザーに送信 + label_send_information: 新しいパスワードをユーザーに送信 label_year: 年 label_month: 月 label_week: 週 diff --git a/config/locales/ru.yml b/config/locales/ru.yml index c2d76339d..f44b0fbcc 100644 --- a/config/locales/ru.yml +++ b/config/locales/ru.yml @@ -655,7 +655,7 @@ ru: label_scm: Тип хранилища label_search: Поиск label_search_titles_only: Искать только в названиях - label_send_information: Отправить пользователю информацию по учётной записи + label_send_information: Отправить новый пароль пользователю label_send_test_email: Послать email для проверки label_settings: Настройки label_show_completed_versions: Показывать завершённые версии From 23ed66be430f24cb5326e1e2588379945115cfc9 Mon Sep 17 00:00:00 2001 From: Jean-Philippe Lang Date: Sat, 18 Mar 2017 09:11:30 +0000 Subject: [PATCH 0740/1117] Reverts r16419. git-svn-id: http://svn.redmine.org/redmine/trunk@16420 e93f8b46-1217-0410-a6f0-8f06a7374b81 --- config/locales/en-GB.yml | 2 +- config/locales/en.yml | 2 +- config/locales/fr.yml | 2 +- config/locales/ja.yml | 2 +- config/locales/ru.yml | 2 +- 5 files changed, 5 insertions(+), 5 deletions(-) diff --git a/config/locales/en-GB.yml b/config/locales/en-GB.yml index fa367aebb..b626aaf9d 100644 --- a/config/locales/en-GB.yml +++ b/config/locales/en-GB.yml @@ -712,7 +712,7 @@ en-GB: label_message_new: New message label_message_posted: Message added label_reply_plural: Replies - label_send_information: Send new password to the user + label_send_information: Send account information to the user label_year: Year label_month: Month label_week: Week diff --git a/config/locales/en.yml b/config/locales/en.yml index 0eb31a804..531081f78 100644 --- a/config/locales/en.yml +++ b/config/locales/en.yml @@ -837,7 +837,7 @@ en: label_message_new: New message label_message_posted: Message added label_reply_plural: Replies - label_send_information: Send new password to the user + label_send_information: Send account information to the user label_year: Year label_month: Month label_week: Week diff --git a/config/locales/fr.yml b/config/locales/fr.yml index c3df32b8f..4721028f2 100644 --- a/config/locales/fr.yml +++ b/config/locales/fr.yml @@ -848,7 +848,7 @@ fr: label_message_new: Nouveau message label_message_posted: Message ajouté label_reply_plural: Réponses - label_send_information: Envoyer le mot de passe à l'utilisateur par email + label_send_information: Envoyer les informations à l'utilisateur label_year: Année label_month: Mois label_week: Semaine diff --git a/config/locales/ja.yml b/config/locales/ja.yml index 6350698c9..cabb5011c 100644 --- a/config/locales/ja.yml +++ b/config/locales/ja.yml @@ -734,7 +734,7 @@ ja: label_message_new: 新しいメッセージ label_message_posted: メッセージの追加 label_reply_plural: 返答 - label_send_information: 新しいパスワードをユーザーに送信 + label_send_information: アカウント情報をユーザーに送信 label_year: 年 label_month: 月 label_week: 週 diff --git a/config/locales/ru.yml b/config/locales/ru.yml index f44b0fbcc..c2d76339d 100644 --- a/config/locales/ru.yml +++ b/config/locales/ru.yml @@ -655,7 +655,7 @@ ru: label_scm: Тип хранилища label_search: Поиск label_search_titles_only: Искать только в названиях - label_send_information: Отправить новый пароль пользователю + label_send_information: Отправить пользователю информацию по учётной записи label_send_test_email: Послать email для проверки label_settings: Настройки label_show_completed_versions: Показывать завершённые версии From 064067fbf248ca6df9ff3046d4c505811e91a59c Mon Sep 17 00:00:00 2001 From: Toshi MARUYAMA Date: Mon, 20 Mar 2017 17:17:44 +0000 Subject: [PATCH 0741/1117] set "warning = false" for "rake test:scm:units" and "rake test:scm:functionals" git-svn-id: http://svn.redmine.org/redmine/trunk@16421 e93f8b46-1217-0410-a6f0-8f06a7374b81 --- lib/tasks/testing.rake | 2 ++ 1 file changed, 2 insertions(+) diff --git a/lib/tasks/testing.rake b/lib/tasks/testing.rake index f87ffc1fd..831f4d316 100644 --- a/lib/tasks/testing.rake +++ b/lib/tasks/testing.rake @@ -82,6 +82,7 @@ namespace :test do Rake::TestTask.new(:units => "db:test:prepare") do |t| t.libs << "test" t.verbose = true + t.warning = false t.test_files = FileList['test/unit/repository*_test.rb'] + FileList['test/unit/lib/redmine/scm/**/*_test.rb'] end Rake::Task['test:scm:units'].comment = "Run the scm unit tests" @@ -89,6 +90,7 @@ namespace :test do Rake::TestTask.new(:functionals => "db:test:prepare") do |t| t.libs << "test" t.verbose = true + t.warning = false t.test_files = FileList['test/functional/repositories*_test.rb'] end Rake::Task['test:scm:functionals'].comment = "Run the scm functional tests" From 47dff4427889e8fc82b616a2b5579e0e8709dc1c Mon Sep 17 00:00:00 2001 From: Toshi MARUYAMA Date: Mon, 20 Mar 2017 17:17:55 +0000 Subject: [PATCH 0742/1117] Git 2.9 compatibility (#25371) git-svn-id: http://svn.redmine.org/redmine/trunk@16422 e93f8b46-1217-0410-a6f0-8f06a7374b81 --- lib/redmine/scm/adapters/git_adapter.rb | 3 +++ 1 file changed, 3 insertions(+) diff --git a/lib/redmine/scm/adapters/git_adapter.rb b/lib/redmine/scm/adapters/git_adapter.rb index 52ecf691f..574fc30a0 100644 --- a/lib/redmine/scm/adapters/git_adapter.rb +++ b/lib/redmine/scm/adapters/git_adapter.rb @@ -166,6 +166,7 @@ module Redmine def lastrev(path, rev) return nil if path.nil? cmd_args = %w|log --no-color --encoding=UTF-8 --date=iso --pretty=fuller --no-merges -n 1| + cmd_args << '--no-renames' if self.class.client_version_above?([2, 9]) cmd_args << rev if rev cmd_args << "--" << path unless path.empty? lines = [] @@ -194,6 +195,7 @@ module Redmine def revisions(path, identifier_from, identifier_to, options={}) revs = Revisions.new cmd_args = %w|log --no-color --encoding=UTF-8 --raw --date=iso --pretty=fuller --parents --stdin| + cmd_args << '--no-renames' if self.class.client_version_above?([2, 9]) cmd_args << "--reverse" if options[:reverse] cmd_args << "-n" << "#{options[:limit].to_i}" if options[:limit] cmd_args << "--" << scm_iconv(@path_encoding, 'UTF-8', path) if path && !path.empty? @@ -312,6 +314,7 @@ module Redmine cmd_args = [] if identifier_to cmd_args << "diff" << "--no-color" << identifier_to << identifier_from + cmd_args << '--no-renames' if self.class.client_version_above?([2, 9]) else cmd_args << "show" << "--no-color" << identifier_from end From 3554ef44d6107ad1ccb517f394145ee6ae4e35d7 Mon Sep 17 00:00:00 2001 From: Toshi MARUYAMA Date: Mon, 20 Mar 2017 17:46:38 +0000 Subject: [PATCH 0743/1117] remove empty line including trailing white space from test/unit/document_test.rb git-svn-id: http://svn.redmine.org/redmine/trunk@16423 e93f8b46-1217-0410-a6f0-8f06a7374b81 --- test/unit/document_test.rb | 1 - 1 file changed, 1 deletion(-) diff --git a/test/unit/document_test.rb b/test/unit/document_test.rb index b576cf477..c4bef56f4 100644 --- a/test/unit/document_test.rb +++ b/test/unit/document_test.rb @@ -37,7 +37,6 @@ class DocumentTest < ActiveSupport::TestCase def test_create_should_send_email_notification ActionMailer::Base.deliveries.clear - with_settings :notified_events => %w(document_added) do doc = Document.new(:project => Project.find(1), :title => 'New document', :category => Enumeration.find_by_name('User documentation')) assert doc.save From 749e26098050f8115c5668ac7f60c3edbea7a0cd Mon Sep 17 00:00:00 2001 From: Toshi MARUYAMA Date: Tue, 21 Mar 2017 11:29:56 +0000 Subject: [PATCH 0744/1117] add missing fixtures to test/integration/api_test/api_test.rb git-svn-id: http://svn.redmine.org/redmine/trunk@16426 e93f8b46-1217-0410-a6f0-8f06a7374b81 --- test/integration/api_test/api_test.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/test/integration/api_test/api_test.rb b/test/integration/api_test/api_test.rb index 5048f7e9b..74e95d24d 100644 --- a/test/integration/api_test/api_test.rb +++ b/test/integration/api_test/api_test.rb @@ -18,7 +18,7 @@ require File.expand_path('../../../test_helper', __FILE__) class Redmine::ApiTest::ApiTest < Redmine::ApiTest::Base - fixtures :users + fixtures :users, :email_addresses, :members, :member_roles, :roles, :projects def test_api_should_work_with_protect_from_forgery ActionController::Base.allow_forgery_protection = true From 21f8ce885df7991b77ca3c4c22634456ba18474a Mon Sep 17 00:00:00 2001 From: Toshi MARUYAMA Date: Tue, 21 Mar 2017 11:41:00 +0000 Subject: [PATCH 0745/1117] add missing fixtures to test/integration/attachments_test.rb git-svn-id: http://svn.redmine.org/redmine/trunk@16427 e93f8b46-1217-0410-a6f0-8f06a7374b81 --- test/integration/attachments_test.rb | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/test/integration/attachments_test.rb b/test/integration/attachments_test.rb index 4a5da1b99..76219e1a0 100644 --- a/test/integration/attachments_test.rb +++ b/test/integration/attachments_test.rb @@ -22,7 +22,8 @@ class AttachmentsTest < Redmine::IntegrationTest :users, :email_addresses, :roles, :members, :member_roles, :trackers, :projects_trackers, - :issues, :issue_statuses, :enumerations + :issues, :issue_statuses, :enumerations, + :attachments def test_upload_should_set_default_content_type log_user('jsmith', 'jsmith') From 14cfe2c67a5683c8cdbcaf73c043a8c23b6e68d8 Mon Sep 17 00:00:00 2001 From: Toshi MARUYAMA Date: Fri, 24 Mar 2017 15:53:04 +0000 Subject: [PATCH 0746/1117] git: use '--no-renames' option in 'show' command (#25371) git-svn-id: http://svn.redmine.org/redmine/trunk@16428 e93f8b46-1217-0410-a6f0-8f06a7374b81 --- lib/redmine/scm/adapters/git_adapter.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/redmine/scm/adapters/git_adapter.rb b/lib/redmine/scm/adapters/git_adapter.rb index 574fc30a0..1dd317d72 100644 --- a/lib/redmine/scm/adapters/git_adapter.rb +++ b/lib/redmine/scm/adapters/git_adapter.rb @@ -314,10 +314,10 @@ module Redmine cmd_args = [] if identifier_to cmd_args << "diff" << "--no-color" << identifier_to << identifier_from - cmd_args << '--no-renames' if self.class.client_version_above?([2, 9]) else cmd_args << "show" << "--no-color" << identifier_from end + cmd_args << '--no-renames' if self.class.client_version_above?([2, 9]) cmd_args << "--" << scm_iconv(@path_encoding, 'UTF-8', path) unless path.empty? diff = [] git_cmd(cmd_args) do |io| From 7f0ebb4f16e95b1e943161cb5a2f4f8d92017a6d Mon Sep 17 00:00:00 2001 From: Toshi MARUYAMA Date: Wed, 29 Mar 2017 04:47:17 +0000 Subject: [PATCH 0747/1117] remove duplicate empty line from config/locales/pt.yml git-svn-id: http://svn.redmine.org/redmine/trunk@16432 e93f8b46-1217-0410-a6f0-8f06a7374b81 --- config/locales/pt.yml | 2 -- 1 file changed, 2 deletions(-) diff --git a/config/locales/pt.yml b/config/locales/pt.yml index bf4aec580..b6c22b47b 100644 --- a/config/locales/pt.yml +++ b/config/locales/pt.yml @@ -142,7 +142,6 @@ pt: not_a_regexp: "is not a valid regular expression" open_issue_with_closed_parent: "An open issue cannot be attached to a closed parent task" - actionview_instancetag_blank_option: Selecione general_text_No: 'Não' @@ -199,7 +198,6 @@ pt: mail_subject_reminder: "Tem %{count} tarefa(s) para entregar nos próximos %{days} dias" mail_body_reminder: "%{count} tarefa(s) que estão atribuídas a si estão agendadas para estarem completas nos próximos %{days} dias:" - field_name: Nome field_description: Descrição field_summary: Sumário From 1441252259e30c2b03297f022257e19da920f7da Mon Sep 17 00:00:00 2001 From: Toshi MARUYAMA Date: Wed, 29 Mar 2017 04:47:28 +0000 Subject: [PATCH 0748/1117] Portuguese translation for 3.2-stable updated by Rui Rebelo (#25204, #25458) git-svn-id: http://svn.redmine.org/redmine/trunk@16433 e93f8b46-1217-0410-a6f0-8f06a7374b81 --- config/locales/pt.yml | 17 ++++++++--------- 1 file changed, 8 insertions(+), 9 deletions(-) diff --git a/config/locales/pt.yml b/config/locales/pt.yml index b6c22b47b..ccc166acd 100644 --- a/config/locales/pt.yml +++ b/config/locales/pt.yml @@ -1168,13 +1168,13 @@ pt: label_assigned_issues: Assigned issues label_field_format_enumeration: Key/value list label_f_hour_short: '%{value} h' - field_default_version: Default version - error_attachment_extension_not_allowed: Attachment extension %{extension} is not allowed - setting_attachment_extensions_allowed: Allowed extensions - setting_attachment_extensions_denied: Disallowed extensions - label_any_open_issues: any open issues - label_no_open_issues: no open issues - label_default_values_for_new_users: Default values for new users + field_default_version: Versão por defeito + error_attachment_extension_not_allowed: A extensão %{extension} do ficheiro anexado não é permitida + setting_attachment_extensions_allowed: Extensões permitidas + setting_attachment_extensions_denied: Extensões não permitidas + label_any_open_issues: Quaisquer tarefas abertas + label_no_open_issues: Sem tarefas abertas + label_default_values_for_new_users: Valores por defeito para novo utilizadores setting_sys_api_key: Chave da API setting_lost_password: Perdi a palavra-chave mail_subject_security_notification: Security notification @@ -1211,8 +1211,7 @@ pt: setting_mail_handler_enable_regex_delimiters: Enable regular expressions error_move_of_child_not_possible: 'Subtask %{child} could not be moved to the new project: %{errors}' - error_cannot_reassign_time_entries_to_an_issue_about_to_be_deleted: Spent time cannot - be reassigned to an issue that is about to be deleted + error_cannot_reassign_time_entries_to_an_issue_about_to_be_deleted: O tempo gasto não pode ser alterado numa tarefa que será apagada setting_timelog_required_fields: Required fields for time logs label_attribute_of_object: '%{object_name}''s %{name}' label_user_mail_option_only_assigned: Only for things I watch or I am assigned to From 6bc546dd2cb273b88004f3ec7aa1a20b3f414a71 Mon Sep 17 00:00:00 2001 From: Toshi MARUYAMA Date: Wed, 29 Mar 2017 04:47:39 +0000 Subject: [PATCH 0749/1117] Portuguese translation for 3.3-stable updated by Rui Rebelo (#25204, #25459) git-svn-id: http://svn.redmine.org/redmine/trunk@16434 e93f8b46-1217-0410-a6f0-8f06a7374b81 --- config/locales/pt.yml | 44 ++++++++++++++++++++----------------------- 1 file changed, 20 insertions(+), 24 deletions(-) diff --git a/config/locales/pt.yml b/config/locales/pt.yml index ccc166acd..08617d9fc 100644 --- a/config/locales/pt.yml +++ b/config/locales/pt.yml @@ -1177,30 +1177,26 @@ pt: label_default_values_for_new_users: Valores por defeito para novo utilizadores setting_sys_api_key: Chave da API setting_lost_password: Perdi a palavra-chave - mail_subject_security_notification: Security notification - mail_body_security_notification_change: ! '%{field} was changed.' - mail_body_security_notification_change_to: ! '%{field} was changed to %{value}.' - mail_body_security_notification_add: ! '%{field} %{value} was added.' - mail_body_security_notification_remove: ! '%{field} %{value} was removed.' - mail_body_security_notification_notify_enabled: Email address %{value} now receives - notifications. - mail_body_security_notification_notify_disabled: Email address %{value} no longer - receives notifications. - mail_body_settings_updated: ! 'The following settings were changed:' - field_remote_ip: IP address - label_wiki_page_new: New wiki page - label_relations: Relations - button_filter: Filter - mail_body_password_updated: Your password has been changed. - label_no_preview: No preview available - error_no_tracker_allowed_for_new_issue_in_project: The project doesn't have any trackers - for which you can create an issue - label_tracker_all: All trackers - label_new_project_issue_tab_enabled: Display the "New issue" tab - setting_new_item_menu_tab: Project menu tab for creating new objects - label_new_object_tab_enabled: Display the "+" drop-down - error_no_projects_with_tracker_allowed_for_new_issue: There are no projects with trackers - for which you can create an issue + mail_subject_security_notification: Notificação de segurança + mail_body_security_notification_change: ! '%{field} foi modificado.' + mail_body_security_notification_change_to: ! '%{field} foi modificado para %{value}.' + mail_body_security_notification_add: ! '%{field} %{value} foi adicionado.' + mail_body_security_notification_remove: ! '%{field} %{value} foi removido.' + mail_body_security_notification_notify_enabled: O email %{value} agora recebe notificações. + mail_body_security_notification_notify_disabled: O email %{value} já não recebe notificações. + mail_body_settings_updated: ! 'As seguintes configurações foram modificadas:' + field_remote_ip: Endereço IP + label_wiki_page_new: Nova página wiki + label_relations: Relações + button_filter: Filtro + mail_body_password_updated: A sua palavra-chave foi atualizada. + label_no_preview: Sem pré-visualização disponível + error_no_tracker_allowed_for_new_issue_in_project: O projeto não possui nenhum tipo de tarefa para o qual você pode criar uma tarefa + label_tracker_all: Todos os tipos de tarefa + label_new_project_issue_tab_enabled: Apresentar a aba "Nova tarefa" + setting_new_item_menu_tab: Aba de Projeto para criar novos objetos + label_new_object_tab_enabled: Apresentar a aba "+" + error_no_projects_with_tracker_allowed_for_new_issue: Não há projetos com tipos de tarefa para os quais você pode criar uma tarefa field_textarea_font: Font used for text areas label_font_default: Default font label_font_monospace: Monospaced font From 12bddc5fc954fb43bd0c5cbfd7b1b9a7c562af4f Mon Sep 17 00:00:00 2001 From: Toshi MARUYAMA Date: Wed, 29 Mar 2017 05:47:31 +0000 Subject: [PATCH 0750/1117] Portuguese translation for 3.2-stable updated by Rui Rebelo (#25204, #25458) git-svn-id: http://svn.redmine.org/redmine/trunk@16438 e93f8b46-1217-0410-a6f0-8f06a7374b81 --- config/locales/pt.yml | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/config/locales/pt.yml b/config/locales/pt.yml index 08617d9fc..df7847b7c 100644 --- a/config/locales/pt.yml +++ b/config/locales/pt.yml @@ -1164,9 +1164,9 @@ pt: button_import: Importar field_total_estimated_hours: Total de tempo estimado label_api: API - label_total_plural: Totals - label_assigned_issues: Assigned issues - label_field_format_enumeration: Key/value list + label_total_plural: Totais + label_assigned_issues: Tarefas atribuídas + label_field_format_enumeration: Lista chave/valor label_f_hour_short: '%{value} h' field_default_version: Versão por defeito error_attachment_extension_not_allowed: A extensão %{extension} do ficheiro anexado não é permitida From 5b8df756b6d3ea00ca3a97e57c56346c2b1bfe85 Mon Sep 17 00:00:00 2001 From: Toshi MARUYAMA Date: Wed, 29 Mar 2017 06:27:41 +0000 Subject: [PATCH 0751/1117] Portuguese translation changed by Rui Rebelo (#25204) git-svn-id: http://svn.redmine.org/redmine/trunk@16443 e93f8b46-1217-0410-a6f0-8f06a7374b81 --- config/locales/pt.yml | 50 +++++++++++++++++++++---------------------- 1 file changed, 24 insertions(+), 26 deletions(-) diff --git a/config/locales/pt.yml b/config/locales/pt.yml index df7847b7c..7c4ce6c43 100644 --- a/config/locales/pt.yml +++ b/config/locales/pt.yml @@ -196,7 +196,7 @@ pt: mail_subject_account_activation_request: "Pedido de ativação da conta %{value}" mail_body_account_activation_request: "Um novo utilizador (%{value}) registou-se. A sua conta está à espera de aprovação:" mail_subject_reminder: "Tem %{count} tarefa(s) para entregar nos próximos %{days} dias" - mail_body_reminder: "%{count} tarefa(s) que estão atribuídas a si estão agendadas para estarem completas nos próximos %{days} dias:" + mail_body_reminder: "%{count} tarefa(s) que estão atribuídas a si estão agendadas para serem terminadas nos próximos %{days} dias:" field_name: Nome field_description: Descrição @@ -558,13 +558,13 @@ pt: label_loading: A carregar... label_relation_new: Nova relação label_relation_delete: Apagar relação - label_relates_to: relacionado a - label_duplicates: duplica - label_duplicated_by: duplicado por - label_blocks: bloqueia - label_blocked_by: bloqueado por - label_precedes: precede - label_follows: segue + label_relates_to: Relacionado a + label_duplicates: Duplica + label_duplicated_by: Duplicado por + label_blocks: Bloqueia + label_blocked_by: Bloqueada por + label_precedes: Precede + label_follows: Segue label_stay_logged_in: Guardar sessão label_disabled: desativado label_show_completed_versions: Mostrar versões acabadas @@ -580,13 +580,13 @@ pt: label_reply_plural: Respostas label_send_information: Enviar dados da conta para o utilizador label_year: Ano - label_month: mês + label_month: Mês label_week: Semana label_date_from: De - label_date_to: Para + label_date_to: A label_language_based: Baseado na língua do utilizador label_sort_by: "Ordenar por %{value}" - label_send_test_email: enviar um e-mail de teste + label_send_test_email: Enviar um e-mail de teste label_feeds_access_key_created_on: "Chave Atom criada há %{value} atrás" label_module_plural: Módulos label_added_time_by: "Adicionado por %{author} há %{age} atrás" @@ -600,8 +600,8 @@ pt: label_theme: Tema label_default: Padrão label_search_titles_only: Procurar apenas em títulos - label_user_mail_option_all: "Para qualquer evento em todos os meus projetos" - label_user_mail_option_selected: "Para qualquer evento apenas nos projetos selecionados..." + label_user_mail_option_all: "Qualquer evento em todos os meus projetos" + label_user_mail_option_selected: "Qualquer evento mas apenas nos projetos selecionados" label_user_mail_no_self_notified: "Não quero ser notificado de alterações feitas por mim" label_registration_activation_by_email: Ativação da conta por e-mail label_registration_manual_activation: Ativação manual da conta @@ -673,9 +673,9 @@ pt: text_subprojects_destroy_warning: "O(s) seu(s) sub-projeto(s): %{value} também será/serão apagado(s)." text_workflow_edit: Selecione uma função e um tipo de tarefa para editar o fluxo de trabalho text_are_you_sure: Tem a certeza? - text_tip_issue_begin_day: tarefa a começar neste dia - text_tip_issue_end_day: tarefa a acabar neste dia - text_tip_issue_begin_end_day: tarefa a começar e acabar neste dia + text_tip_issue_begin_day: tarefa inicia neste dia + text_tip_issue_end_day: tarefa termina neste dia + text_tip_issue_begin_end_day: tarefa a iniciar e terminar neste dia text_caracters_maximum: "máximo %{count} caráteres." text_caracters_minimum: "Deve ter pelo menos %{count} caráteres." text_length_between: "Deve ter entre %{min} e %{max} caráteres." @@ -705,7 +705,7 @@ pt: text_user_wrote: "%{value} escreveu:" text_enumeration_destroy_question: "%{count} objetos estão atribuídos a este valor." text_enumeration_category_reassign_to: 'Re-atribuí-los para este valor:' - text_email_delivery_not_configured: "Entrega por e-mail não está configurada, e as notificação estão desativadas.\nConfigure o seu servidor de SMTP em config/configuration.yml e reinicie a aplicação para ativar estas funcionalidades." + text_email_delivery_not_configured: "O envio de e-mail não está configurado, e as notificação estão desativadas.\nConfigure o seu servidor de SMTP em config/configuration.yml e reinicie a aplicação para ativar estas funcionalidades." default_role_manager: Gestor default_role_developer: Programador @@ -750,7 +750,7 @@ pt: permission_select_project_modules: Selecionar módulos do projeto permission_edit_wiki_pages: Editar páginas da wiki permission_add_issue_watchers: Adicionar observadores - permission_view_gantt: ver diagrama de Gantt + permission_view_gantt: Ver diagrama de Gantt permission_move_issues: Mover tarefas permission_manage_issue_relations: Gerir relações de tarefas permission_delete_wiki_pages: Apagar páginas de wiki @@ -777,7 +777,7 @@ pt: permission_view_wiki_pages: Ver wiki permission_rename_wiki_pages: Renomear páginas de wiki permission_edit_time_entries: Editar entradas de tempo - permission_edit_own_issue_notes: Editar as prórpias notas + permission_edit_own_issue_notes: Editar as próprias notas setting_gravatar_enabled: Utilizar ícones Gravatar label_example: Exemplo text_repository_usernames_mapping: "Selecionar ou atualizar o utilizador de Redmine mapeado a cada nome de utilizador encontrado no repositório.\nUtilizadores com o mesmo nome de utilizador ou e-mail no Redmine e no repositório são mapeados automaticamente." @@ -866,7 +866,7 @@ pt: label_update_issue_done_ratios: Atualizar percentagens de progresso da tarefa setting_start_of_week: Iniciar calendários a permission_view_issues: Ver tarefas - label_display_used_statuses_only: Só exibir estados empregues por este tipo de tarefa + label_display_used_statuses_only: Exibir apenas estados utilizados por este tipo de tarefa label_revision_id: Revisão %{value} label_api_access_key: Chave de acesso API label_api_access_key_created_on: Chave de acesso API criada há %{value} @@ -1045,8 +1045,8 @@ pt: label_attribute_of_assigned_to: "%{name} do utilizador titular" label_attribute_of_fixed_version: "%{name} da Versão" label_copy_subtasks: Copiar sub-tarefas - label_copied_to: copiado para - label_copied_from: copiado de + label_copied_to: Copiado para + label_copied_from: Copiado de label_any_issues_in_project: tarefas do projeto label_any_issues_not_in_project: tarefas sem projeto field_private_notes: Notas privadas @@ -1081,8 +1081,7 @@ pt: notice_account_not_activated_yet: Ainda não ativou a sua conta. Se desejar receber um novo e-mail de ativação, por favor clique nesta ligação. notice_account_locked: A sua conta está bloqueada. - notice_account_register_done: A conta foi criada com sucesso! Um e-mail contendo - as instruções para ativar a sua conta foi enviado para %{email}. + notice_account_register_done: A conta foi criada com sucesso! Um e-mail contendo as instruções para ativar a sua conta foi enviado para %{email}. label_hidden: Escondido label_visibility_private: apenas para mim label_visibility_roles: apenas para estas funções @@ -1098,8 +1097,7 @@ pt: label_link_values_to: Ligação de valores ao URL setting_force_default_language_for_anonymous: Forçar língua por omissão para utilizadores anónimos setting_force_default_language_for_loggedin: Forçar língua por omissão para utilizadores registados - label_custom_field_select_type: Selecione o tipo de objeto ao qual o campo personalizado - será atribuído + label_custom_field_select_type: Selecione o tipo de objeto ao qual o campo personalizado será atribuído label_issue_assigned_to_updated: Utilizador titular atualizado label_check_for_updates: Verificar atualizações label_latest_compatible_version: Última versão compatível From adce697d9964be3092b358ea5fc10b399964cb19 Mon Sep 17 00:00:00 2001 From: Toshi MARUYAMA Date: Wed, 29 Mar 2017 06:27:52 +0000 Subject: [PATCH 0752/1117] Portuguese translation for trunk updated by Rui Rebelo (#25204) git-svn-id: http://svn.redmine.org/redmine/trunk@16444 e93f8b46-1217-0410-a6f0-8f06a7374b81 --- config/locales/pt.yml | 37 ++++++++++++++++++------------------- 1 file changed, 18 insertions(+), 19 deletions(-) diff --git a/config/locales/pt.yml b/config/locales/pt.yml index 7c4ce6c43..3bde52b77 100644 --- a/config/locales/pt.yml +++ b/config/locales/pt.yml @@ -139,8 +139,8 @@ pt: circular_dependency: "Esta relação iria criar uma dependência circular" cant_link_an_issue_with_a_descendant: "Não é possível ligar uma tarefa a uma sub-tarefa que lhe é pertencente" earlier_than_minimum_start_date: "não pode ser antes de %{date} devido a tarefas precedentes" - not_a_regexp: "is not a valid regular expression" - open_issue_with_closed_parent: "An open issue cannot be attached to a closed parent task" + not_a_regexp: "não é uma expressão regular válida" + open_issue_with_closed_parent: "Uma tarefa aberta não pode ser relacionada com uma tarefa pai fechada" actionview_instancetag_blank_option: Selecione @@ -1195,24 +1195,23 @@ pt: setting_new_item_menu_tab: Aba de Projeto para criar novos objetos label_new_object_tab_enabled: Apresentar a aba "+" error_no_projects_with_tracker_allowed_for_new_issue: Não há projetos com tipos de tarefa para os quais você pode criar uma tarefa - field_textarea_font: Font used for text areas + field_textarea_font: Fonte para áreas de texto label_font_default: Default font - label_font_monospace: Monospaced font - label_font_proportional: Proportional font - setting_timespan_format: Time span format - label_table_of_contents: Table of contents - setting_commit_logs_formatting: Apply text formatting to commit messages - setting_mail_handler_enable_regex_delimiters: Enable regular expressions - error_move_of_child_not_possible: 'Subtask %{child} could not be moved to the new + label_font_monospace: Fonte Monospaced + label_font_proportional: Fonte proporcional + setting_timespan_format: Formato de Data/Hora + label_table_of_contents: Índice + setting_commit_logs_formatting: Aplicar formatação de texto às mensagens de commit + setting_mail_handler_enable_regex_delimiters: Ativar a utilização de expressões regulares + error_move_of_child_not_possible: 'A sub-tarefa %{child} não pode ser movida para o novo project: %{errors}' error_cannot_reassign_time_entries_to_an_issue_about_to_be_deleted: O tempo gasto não pode ser alterado numa tarefa que será apagada - setting_timelog_required_fields: Required fields for time logs - label_attribute_of_object: '%{object_name}''s %{name}' - label_user_mail_option_only_assigned: Only for things I watch or I am assigned to - label_user_mail_option_only_owner: Only for things I watch or I am the owner of - warning_fields_cleared_on_bulk_edit: Changes will result in the automatic deletion - of values from one or more fields on the selected objects - field_updated_by: Updated by - field_last_updated_by: Last updated by - field_full_width_layout: Full width layout + setting_timelog_required_fields: Campos obrigatórios para o registo de tempo + label_attribute_of_object: '%{object_name} %{name}' + label_user_mail_option_only_assigned: Apenas para tarefas que observo ou que me estão atribuídas + label_user_mail_option_only_owner: Apenas para tarefas que observo ou que eu criei + warning_fields_cleared_on_bulk_edit: As alterações vão apagar valores de um ou mais campos nos objetos selecionados + field_updated_by: Atualizado por + field_last_updated_by: Última atualização por + field_full_width_layout: Layout utiliza toda a largura label_last_notes: Last notes From 6139e0033a0435f526f16b5df9b1e597402d3377 Mon Sep 17 00:00:00 2001 From: Toshi MARUYAMA Date: Sun, 2 Apr 2017 03:34:44 +0000 Subject: [PATCH 0753/1117] spelling fixes (#25495) git-svn-id: http://svn.redmine.org/redmine/trunk@16445 e93f8b46-1217-0410-a6f0-8f06a7374b81 --- app/controllers/account_controller.rb | 2 +- app/controllers/application_controller.rb | 2 +- app/controllers/comments_controller.rb | 2 +- app/models/enumeration.rb | 6 +++--- app/models/member.rb | 2 +- app/models/repository/cvs.rb | 4 ++-- config/application.rb | 2 +- extra/mail_handler/rdm-mailhandler.rb | 4 ++-- extra/svn/Redmine.pm | 2 +- lib/SVG/Graph/Graph.rb | 2 +- lib/SVG/Graph/Schedule.rb | 4 ++-- .../lib/acts_as_activity_provider.rb | 2 +- lib/redmine/sudo_mode.rb | 2 +- lib/tasks/locales.rake | 2 +- test/unit/lib/redmine/helpers/gantt_test.rb | 2 +- test/unit/user_test.rb | 6 +++--- 16 files changed, 23 insertions(+), 23 deletions(-) diff --git a/app/controllers/account_controller.rb b/app/controllers/account_controller.rb index f98603270..6bd7e02f5 100644 --- a/app/controllers/account_controller.rb +++ b/app/controllers/account_controller.rb @@ -42,7 +42,7 @@ class AccountController < ApplicationController authenticate_user end rescue AuthSourceException => e - logger.error "An error occured when authenticating #{params[:username]}: #{e.message}" + logger.error "An error occurred when authenticating #{params[:username]}: #{e.message}" render_error :message => e.message end diff --git a/app/controllers/application_controller.rb b/app/controllers/application_controller.rb index 73e332617..d3f549e46 100644 --- a/app/controllers/application_controller.rb +++ b/app/controllers/application_controller.rb @@ -646,7 +646,7 @@ class ApplicationController < ActionController::Base render_error "An error occurred while executing the query and has been logged. Please report this error to your Redmine administrator." end - # Renders a 200 response for successfull updates or deletions via the API + # Renders a 200 response for successful updates or deletions via the API def render_api_ok render_api_head :ok end diff --git a/app/controllers/comments_controller.rb b/app/controllers/comments_controller.rb index 9544caa1d..20cde9463 100644 --- a/app/controllers/comments_controller.rb +++ b/app/controllers/comments_controller.rb @@ -43,7 +43,7 @@ class CommentsController < ApplicationController private # ApplicationController's find_model_object sets it based on the controller - # name so it needs to be overriden and set to @news instead + # name so it needs to be overridden and set to @news instead def find_model_object super @news = @object diff --git a/app/models/enumeration.rb b/app/models/enumeration.rb index fc8486174..7b20394b2 100644 --- a/app/models/enumeration.rb +++ b/app/models/enumeration.rb @@ -136,7 +136,7 @@ class Enumeration < ActiveRecord::Base end # Overrides Redmine::Acts::Positioned#set_default_position so that enumeration overrides - # get the same position as the overriden enumeration + # get the same position as the overridden enumeration def set_default_position if position.nil? && parent self.position = parent.position @@ -145,7 +145,7 @@ class Enumeration < ActiveRecord::Base end # Overrides Redmine::Acts::Positioned#update_position so that overrides get the same - # position as the overriden enumeration + # position as the overridden enumeration def update_position super if position_changed? @@ -159,7 +159,7 @@ class Enumeration < ActiveRecord::Base end # Overrides Redmine::Acts::Positioned#remove_position so that enumeration overrides - # get the same position as the overriden enumeration + # get the same position as the overridden enumeration def remove_position if parent_id.blank? super diff --git a/app/models/member.rb b/app/models/member.rb index d709f5ff7..24376d303 100644 --- a/app/models/member.rb +++ b/app/models/member.rb @@ -194,7 +194,7 @@ class Member < ActiveRecord::Base members end - # Finds or initilizes a Member for the given project and principal + # Finds or initializes a Member for the given project and principal def self.find_or_new(project, principal) project_id = project.is_a?(Project) ? project.id : project principal_id = principal.is_a?(Principal) ? principal.id : principal diff --git a/app/models/repository/cvs.rb b/app/models/repository/cvs.rb index 565c3b3f8..ca0be52de 100644 --- a/app/models/repository/cvs.rb +++ b/app/models/repository/cvs.rb @@ -151,7 +151,7 @@ class Repository::Cvs < Repository # create a new changeset.... unless cs # we use a temporary revision number here (just for inserting) - # later on, we calculate a continous positive number + # later on, we calculate a continuous positive number tmp_time2 = tmp_time.clone.gmtime branch = revision.paths[0][:branch] scmid = branch + "-" + tmp_time2.strftime("%Y%m%d-%H%M%S") @@ -163,7 +163,7 @@ class Repository::Cvs < Repository :comments => revision.message) tmp_rev_num += 1 end - # convert CVS-File-States to internal Action-abbrevations + # convert CVS-File-States to internal Action-abbreviations # default action is (M)odified action = "M" if revision.paths[0][:action] == "Exp" && revision.paths[0][:revision] == "1.1" diff --git a/config/application.rb b/config/application.rb index 965edcec2..e1a416ae7 100644 --- a/config/application.rb +++ b/config/application.rb @@ -47,7 +47,7 @@ module RedmineApp # Do not include all helpers config.action_controller.include_all_helpers = false - # Do not supress errors in after_rollback and after_commit callbacks + # Do not suppress errors in after_rollback and after_commit callbacks config.active_record.raise_in_transactional_callbacks = true # XML parameter parser removed from core in Rails 4.0 diff --git a/extra/mail_handler/rdm-mailhandler.rb b/extra/mail_handler/rdm-mailhandler.rb index 5d4a10632..cc8ad4f19 100644 --- a/extra/mail_handler/rdm-mailhandler.rb +++ b/extra/mail_handler/rdm-mailhandler.rb @@ -117,7 +117,7 @@ Overrides: Examples: No project specified, emails MUST contain the 'Project' keyword, otherwise - they will be dropped (not recommanded): + they will be dropped (not recommended): rdm-mailhandler.rb --url http://redmine.domain.foo --key secret @@ -165,7 +165,7 @@ END_DESC begin response = Net::HTTPS.post_form(URI.parse(uri), data, headers, :no_check_certificate => no_check_certificate, :certificate_bundle => certificate_bundle) rescue SystemCallError, IOError => e # connection refused, etc. - warn "An error occured while contacting your Redmine server: #{e.message}" + warn "An error occurred while contacting your Redmine server: #{e.message}" return 75 # temporary failure end debug "Response received: #{response.code}" diff --git a/extra/svn/Redmine.pm b/extra/svn/Redmine.pm index 2652ceae1..96b2aa63d 100644 --- a/extra/svn/Redmine.pm +++ b/extra/svn/Redmine.pm @@ -58,7 +58,7 @@ Authen::Simple::LDAP (and IO::Socket::SSL if LDAPS is used): RedmineDbUser "redmine" RedmineDbPass "password" ## Optional where clause (fulltext search would be slow and - ## database dependant). + ## database dependent). # RedmineDbWhereClause "and members.role_id IN (1,2)" ## Optional credentials cache size # RedmineCacheCredsMax 50 diff --git a/lib/SVG/Graph/Graph.rb b/lib/SVG/Graph/Graph.rb index f048ac382..f5b0f61bf 100644 --- a/lib/SVG/Graph/Graph.rb +++ b/lib/SVG/Graph/Graph.rb @@ -234,7 +234,7 @@ module SVG # scales to fix the space. attr_accessor :width # Set the path to an external stylesheet, set to '' if - # you want to revert back to using the defaut internal version. + # you want to revert back to using the default internal version. # # To create an external stylesheet create a graph using the # default internal version and copy the stylesheet section to diff --git a/lib/SVG/Graph/Schedule.rb b/lib/SVG/Graph/Schedule.rb index 70bb519d7..87d12cb53 100644 --- a/lib/SVG/Graph/Schedule.rb +++ b/lib/SVG/Graph/Schedule.rb @@ -51,7 +51,7 @@ module SVG # # = Notes # - # The default stylesheet handles upto 10 data sets, if you + # The default stylesheet handles up to 10 data sets, if you # use more you must create your own stylesheet and add the # additional settings for the extra data sets. You will know # if you go over 10 data sets as they will have no style and @@ -138,7 +138,7 @@ module SVG # Note that the data must be in time,value pairs, and that the date format # may be any date that is parseable by ParseDate. # Also note that, in this example, we're mixing scales; the data from d1 - # will probably not be discernable if both data sets are plotted on the same + # will probably not be discernible if both data sets are plotted on the same # graph, since d1 is too granular. def add_data data @data = [] unless @data diff --git a/lib/plugins/acts_as_activity_provider/lib/acts_as_activity_provider.rb b/lib/plugins/acts_as_activity_provider/lib/acts_as_activity_provider.rb index 8f65eb720..8cdd91b61 100644 --- a/lib/plugins/acts_as_activity_provider/lib/acts_as_activity_provider.rb +++ b/lib/plugins/acts_as_activity_provider/lib/acts_as_activity_provider.rb @@ -48,7 +48,7 @@ module Redmine end module ClassMethods - # Returns events of type event_type visible by user that occured between from and to + # Returns events of type event_type visible by user that occurred between from and to def find_events(event_type, user, from, to, options) provider_options = activity_provider_options[event_type] raise "#{self.name} can not provide #{event_type} events." if provider_options.nil? diff --git a/lib/redmine/sudo_mode.rb b/lib/redmine/sudo_mode.rb index c85310091..eddbc04ce 100644 --- a/lib/redmine/sudo_mode.rb +++ b/lib/redmine/sudo_mode.rb @@ -183,7 +183,7 @@ module Redmine # # Calling this method also turns was_used? to true, therefore # it is important to only call this when sudo is actually needed, as the last - # condition to determine wether a change can be done or not. + # condition to determine whether a change can be done or not. # # If you do it wrong, timeout of the sudo mode will happen too late or not at # all. diff --git a/lib/tasks/locales.rake b/lib/tasks/locales.rake index 7d2ecfe80..028a25154 100644 --- a/lib/tasks/locales.rake +++ b/lib/tasks/locales.rake @@ -111,7 +111,7 @@ END_DESC files.each do |path| # Skip certain locales (puts "Skipping #{path}"; next) if File.basename(path, ".yml") =~ skips - # TODO: Check for dupliate/existing keys + # TODO: Check for duplicate/existing keys puts "Adding #{key_list} to #{path}" File.open(path, 'a') do |file| adds.each do |kv| diff --git a/test/unit/lib/redmine/helpers/gantt_test.rb b/test/unit/lib/redmine/helpers/gantt_test.rb index eb1338af6..fda2948c9 100644 --- a/test/unit/lib/redmine/helpers/gantt_test.rb +++ b/test/unit/lib/redmine/helpers/gantt_test.rb @@ -59,7 +59,7 @@ class Redmine::Helpers::GanttHelperTest < Redmine::HelperTest assert_equal 2, @gantt.number_of_rows end - test "#number_of_rows with no project should return the total number of rows for all the projects, resursively" do + test "#number_of_rows with no project should return the total number of rows for all the projects, recursively" do p1, p2 = Project.generate!, Project.generate! create_gantt(nil) # fix the return value of #number_of_rows_on_project() to an arbitrary value diff --git a/test/unit/user_test.rb b/test/unit/user_test.rb index ebc7d6532..655a8affc 100644 --- a/test/unit/user_test.rb +++ b/test/unit/user_test.rb @@ -1099,7 +1099,7 @@ class UserTest < ActiveSupport::TestCase test "#allowed_to? for normal users" do project = Project.find(1) assert_equal true, @jsmith.allowed_to?(:delete_messages, project) #Manager - assert_equal false, @dlopper.allowed_to?(:delete_messages, project) #Developper + assert_equal false, @dlopper.allowed_to?(:delete_messages, project) #Developer end test "#allowed_to? with empty array should return false" do @@ -1114,7 +1114,7 @@ class UserTest < ActiveSupport::TestCase end test "#allowed_to? with with options[:global] should return true if user has one role with the permission" do - @dlopper2 = User.find(5) #only Developper on a project, not Manager anywhere + @dlopper2 = User.find(5) #only Developer on a project, not Manager anywhere @anonymous = User.find(6) assert_equal true, @jsmith.allowed_to?(:delete_issue_watchers, nil, :global => true) assert_equal false, @dlopper2.allowed_to?(:delete_issue_watchers, nil, :global => true) @@ -1125,7 +1125,7 @@ class UserTest < ActiveSupport::TestCase # this is just a proxy method, the test only calls it to ensure it doesn't break trivially test "#allowed_to_globally?" do - @dlopper2 = User.find(5) #only Developper on a project, not Manager anywhere + @dlopper2 = User.find(5) #only Developer on a project, not Manager anywhere @anonymous = User.find(6) assert_equal true, @jsmith.allowed_to_globally?(:delete_issue_watchers) assert_equal false, @dlopper2.allowed_to_globally?(:delete_issue_watchers) From 69ba7667e16987a8f8a9ce54d31c90a832bff6a4 Mon Sep 17 00:00:00 2001 From: Jean-Philippe Lang Date: Mon, 3 Apr 2017 05:32:48 +0000 Subject: [PATCH 0754/1117] Change extra_info to long text (#14626). Patch by Go MAEDA. git-svn-id: http://svn.redmine.org/redmine/trunk@16446 e93f8b46-1217-0410-a6f0-8f06a7374b81 --- ...320051650_change_repositories_extra_info_limit.rb | 12 ++++++++++++ 1 file changed, 12 insertions(+) create mode 100644 db/migrate/20170320051650_change_repositories_extra_info_limit.rb diff --git a/db/migrate/20170320051650_change_repositories_extra_info_limit.rb b/db/migrate/20170320051650_change_repositories_extra_info_limit.rb new file mode 100644 index 000000000..3b5654a6d --- /dev/null +++ b/db/migrate/20170320051650_change_repositories_extra_info_limit.rb @@ -0,0 +1,12 @@ +class ChangeRepositoriesExtraInfoLimit < ActiveRecord::Migration + def up + if ActiveRecord::Base.connection.adapter_name =~ /mysql/i + max_size = 16.megabytes + change_column :repositories, :extra_info, :text, :limit => max_size + end + end + + def down + # no-op + end +end From 3701f0cd5fdcd0d43e2ba3def031326bef53570a Mon Sep 17 00:00:00 2001 From: Jean-Philippe Lang Date: Mon, 3 Apr 2017 05:35:23 +0000 Subject: [PATCH 0755/1117] Working external URLs not documented (#21375). Patch by Go MAEDA. git-svn-id: http://svn.redmine.org/redmine/trunk@16447 e93f8b46-1217-0410-a6f0-8f06a7374b81 --- public/help/ar/wiki_syntax_detailed_markdown.html | 2 +- public/help/ar/wiki_syntax_detailed_textile.html | 2 +- public/help/az/wiki_syntax_detailed_markdown.html | 2 +- public/help/az/wiki_syntax_detailed_textile.html | 2 +- public/help/bg/wiki_syntax_detailed_markdown.html | 2 +- public/help/bg/wiki_syntax_detailed_textile.html | 2 +- public/help/bs/wiki_syntax_detailed_markdown.html | 2 +- public/help/bs/wiki_syntax_detailed_textile.html | 2 +- public/help/ca/wiki_syntax_detailed_markdown.html | 2 +- public/help/ca/wiki_syntax_detailed_textile.html | 2 +- public/help/cs/wiki_syntax_detailed_markdown.html | 2 +- public/help/cs/wiki_syntax_detailed_textile.html | 2 +- public/help/da/wiki_syntax_detailed_markdown.html | 2 +- public/help/da/wiki_syntax_detailed_textile.html | 2 +- public/help/de/wiki_syntax_detailed_markdown.html | 2 +- public/help/de/wiki_syntax_detailed_textile.html | 2 +- public/help/el/wiki_syntax_detailed_markdown.html | 2 +- public/help/el/wiki_syntax_detailed_textile.html | 2 +- public/help/en-gb/wiki_syntax_detailed_markdown.html | 2 +- public/help/en-gb/wiki_syntax_detailed_textile.html | 2 +- public/help/en/wiki_syntax_detailed_markdown.html | 2 +- public/help/en/wiki_syntax_detailed_textile.html | 2 +- public/help/es-pa/wiki_syntax_detailed_markdown.html | 2 +- public/help/es-pa/wiki_syntax_detailed_textile.html | 2 +- public/help/es/wiki_syntax_detailed_markdown.html | 2 +- public/help/es/wiki_syntax_detailed_textile.html | 2 +- public/help/et/wiki_syntax_detailed_markdown.html | 2 +- public/help/et/wiki_syntax_detailed_textile.html | 2 +- public/help/eu/wiki_syntax_detailed_markdown.html | 2 +- public/help/eu/wiki_syntax_detailed_textile.html | 2 +- public/help/fa/wiki_syntax_detailed_markdown.html | 2 +- public/help/fa/wiki_syntax_detailed_textile.html | 2 +- public/help/fi/wiki_syntax_detailed_markdown.html | 2 +- public/help/fi/wiki_syntax_detailed_textile.html | 2 +- public/help/fr/wiki_syntax_detailed_markdown.html | 2 +- public/help/fr/wiki_syntax_detailed_textile.html | 2 +- public/help/gl/wiki_syntax_detailed_markdown.html | 2 +- public/help/gl/wiki_syntax_detailed_textile.html | 2 +- public/help/he/wiki_syntax_detailed_markdown.html | 2 +- public/help/he/wiki_syntax_detailed_textile.html | 2 +- public/help/hr/wiki_syntax_detailed_markdown.html | 2 +- public/help/hr/wiki_syntax_detailed_textile.html | 2 +- public/help/hu/wiki_syntax_detailed_markdown.html | 2 +- public/help/hu/wiki_syntax_detailed_textile.html | 2 +- public/help/id/wiki_syntax_detailed_markdown.html | 2 +- public/help/id/wiki_syntax_detailed_textile.html | 2 +- public/help/it/wiki_syntax_detailed_markdown.html | 2 +- public/help/it/wiki_syntax_detailed_textile.html | 2 +- public/help/ja/wiki_syntax_detailed_markdown.html | 2 +- public/help/ja/wiki_syntax_detailed_textile.html | 2 +- public/help/ko/wiki_syntax_detailed_markdown.html | 2 +- public/help/ko/wiki_syntax_detailed_textile.html | 2 +- public/help/lt/wiki_syntax_detailed_markdown.html | 2 +- public/help/lt/wiki_syntax_detailed_textile.html | 2 +- public/help/lv/wiki_syntax_detailed_markdown.html | 2 +- public/help/lv/wiki_syntax_detailed_textile.html | 2 +- public/help/mk/wiki_syntax_detailed_markdown.html | 2 +- public/help/mk/wiki_syntax_detailed_textile.html | 2 +- public/help/mn/wiki_syntax_detailed_markdown.html | 2 +- public/help/mn/wiki_syntax_detailed_textile.html | 2 +- public/help/nl/wiki_syntax_detailed_markdown.html | 2 +- public/help/nl/wiki_syntax_detailed_textile.html | 2 +- public/help/no/wiki_syntax_detailed_markdown.html | 2 +- public/help/no/wiki_syntax_detailed_textile.html | 2 +- public/help/pl/wiki_syntax_detailed_markdown.html | 2 +- public/help/pl/wiki_syntax_detailed_textile.html | 2 +- public/help/pt-br/wiki_syntax_detailed_markdown.html | 2 +- public/help/pt-br/wiki_syntax_detailed_textile.html | 2 +- public/help/pt/wiki_syntax_detailed_markdown.html | 2 +- public/help/pt/wiki_syntax_detailed_textile.html | 2 +- public/help/ro/wiki_syntax_detailed_markdown.html | 2 +- public/help/ro/wiki_syntax_detailed_textile.html | 2 +- public/help/ru/wiki_syntax_detailed_markdown.html | 2 +- public/help/ru/wiki_syntax_detailed_textile.html | 2 +- public/help/sk/wiki_syntax_detailed_markdown.html | 2 +- public/help/sk/wiki_syntax_detailed_textile.html | 2 +- public/help/sl/wiki_syntax_detailed_markdown.html | 2 +- public/help/sl/wiki_syntax_detailed_textile.html | 2 +- public/help/sq/wiki_syntax_detailed_markdown.html | 2 +- public/help/sq/wiki_syntax_detailed_textile.html | 2 +- public/help/sr-yu/wiki_syntax_detailed_markdown.html | 2 +- public/help/sr-yu/wiki_syntax_detailed_textile.html | 2 +- public/help/sr/wiki_syntax_detailed_markdown.html | 2 +- public/help/sr/wiki_syntax_detailed_textile.html | 2 +- public/help/sv/wiki_syntax_detailed_markdown.html | 2 +- public/help/sv/wiki_syntax_detailed_textile.html | 2 +- public/help/th/wiki_syntax_detailed_markdown.html | 2 +- public/help/th/wiki_syntax_detailed_textile.html | 2 +- public/help/tr/wiki_syntax_detailed_markdown.html | 2 +- public/help/tr/wiki_syntax_detailed_textile.html | 2 +- public/help/uk/wiki_syntax_detailed_markdown.html | 2 +- public/help/uk/wiki_syntax_detailed_textile.html | 2 +- public/help/vi/wiki_syntax_detailed_markdown.html | 2 +- public/help/vi/wiki_syntax_detailed_textile.html | 2 +- public/help/zh-tw/wiki_syntax_detailed_markdown.html | 2 +- public/help/zh-tw/wiki_syntax_detailed_textile.html | 2 +- public/help/zh/wiki_syntax_detailed_markdown.html | 2 +- public/help/zh/wiki_syntax_detailed_textile.html | 2 +- 98 files changed, 98 insertions(+), 98 deletions(-) diff --git a/public/help/ar/wiki_syntax_detailed_markdown.html b/public/help/ar/wiki_syntax_detailed_markdown.html index e150d95c7..a5b3f959c 100644 --- a/public/help/ar/wiki_syntax_detailed_markdown.html +++ b/public/help/ar/wiki_syntax_detailed_markdown.html @@ -145,7 +145,7 @@

          External links

          -

          HTTP URLs and email addresses are automatically turned into clickable links:

          +

          URLs (http, https, ftp, and ftps) and email addresses are automatically turned into clickable links:

           http://www.redmine.org, someone@foo.bar
          diff --git a/public/help/ar/wiki_syntax_detailed_textile.html b/public/help/ar/wiki_syntax_detailed_textile.html
          index 1d38d2abb..b708ac3ec 100644
          --- a/public/help/ar/wiki_syntax_detailed_textile.html
          +++ b/public/help/ar/wiki_syntax_detailed_textile.html
          @@ -136,7 +136,7 @@
           
                   

          External links

          -

          HTTP URLs and email addresses are automatically turned into clickable links:

          +

          URLs (http, https, ftp and ftps) and email addresses are automatically turned into clickable links:

           http://www.redmine.org, someone@foo.bar
          diff --git a/public/help/az/wiki_syntax_detailed_markdown.html b/public/help/az/wiki_syntax_detailed_markdown.html
          index e150d95c7..a5b3f959c 100644
          --- a/public/help/az/wiki_syntax_detailed_markdown.html
          +++ b/public/help/az/wiki_syntax_detailed_markdown.html
          @@ -145,7 +145,7 @@
           
                   

          External links

          -

          HTTP URLs and email addresses are automatically turned into clickable links:

          +

          URLs (http, https, ftp, and ftps) and email addresses are automatically turned into clickable links:

           http://www.redmine.org, someone@foo.bar
          diff --git a/public/help/az/wiki_syntax_detailed_textile.html b/public/help/az/wiki_syntax_detailed_textile.html
          index 1d38d2abb..b708ac3ec 100644
          --- a/public/help/az/wiki_syntax_detailed_textile.html
          +++ b/public/help/az/wiki_syntax_detailed_textile.html
          @@ -136,7 +136,7 @@
           
                   

          External links

          -

          HTTP URLs and email addresses are automatically turned into clickable links:

          +

          URLs (http, https, ftp and ftps) and email addresses are automatically turned into clickable links:

           http://www.redmine.org, someone@foo.bar
          diff --git a/public/help/bg/wiki_syntax_detailed_markdown.html b/public/help/bg/wiki_syntax_detailed_markdown.html
          index e150d95c7..a5b3f959c 100644
          --- a/public/help/bg/wiki_syntax_detailed_markdown.html
          +++ b/public/help/bg/wiki_syntax_detailed_markdown.html
          @@ -145,7 +145,7 @@
           
                   

          External links

          -

          HTTP URLs and email addresses are automatically turned into clickable links:

          +

          URLs (http, https, ftp, and ftps) and email addresses are automatically turned into clickable links:

           http://www.redmine.org, someone@foo.bar
          diff --git a/public/help/bg/wiki_syntax_detailed_textile.html b/public/help/bg/wiki_syntax_detailed_textile.html
          index 1d38d2abb..b708ac3ec 100644
          --- a/public/help/bg/wiki_syntax_detailed_textile.html
          +++ b/public/help/bg/wiki_syntax_detailed_textile.html
          @@ -136,7 +136,7 @@
           
                   

          External links

          -

          HTTP URLs and email addresses are automatically turned into clickable links:

          +

          URLs (http, https, ftp and ftps) and email addresses are automatically turned into clickable links:

           http://www.redmine.org, someone@foo.bar
          diff --git a/public/help/bs/wiki_syntax_detailed_markdown.html b/public/help/bs/wiki_syntax_detailed_markdown.html
          index e150d95c7..a5b3f959c 100644
          --- a/public/help/bs/wiki_syntax_detailed_markdown.html
          +++ b/public/help/bs/wiki_syntax_detailed_markdown.html
          @@ -145,7 +145,7 @@
           
                   

          External links

          -

          HTTP URLs and email addresses are automatically turned into clickable links:

          +

          URLs (http, https, ftp, and ftps) and email addresses are automatically turned into clickable links:

           http://www.redmine.org, someone@foo.bar
          diff --git a/public/help/bs/wiki_syntax_detailed_textile.html b/public/help/bs/wiki_syntax_detailed_textile.html
          index 1d38d2abb..b708ac3ec 100644
          --- a/public/help/bs/wiki_syntax_detailed_textile.html
          +++ b/public/help/bs/wiki_syntax_detailed_textile.html
          @@ -136,7 +136,7 @@
           
                   

          External links

          -

          HTTP URLs and email addresses are automatically turned into clickable links:

          +

          URLs (http, https, ftp and ftps) and email addresses are automatically turned into clickable links:

           http://www.redmine.org, someone@foo.bar
          diff --git a/public/help/ca/wiki_syntax_detailed_markdown.html b/public/help/ca/wiki_syntax_detailed_markdown.html
          index e150d95c7..a5b3f959c 100644
          --- a/public/help/ca/wiki_syntax_detailed_markdown.html
          +++ b/public/help/ca/wiki_syntax_detailed_markdown.html
          @@ -145,7 +145,7 @@
           
                   

          External links

          -

          HTTP URLs and email addresses are automatically turned into clickable links:

          +

          URLs (http, https, ftp, and ftps) and email addresses are automatically turned into clickable links:

           http://www.redmine.org, someone@foo.bar
          diff --git a/public/help/ca/wiki_syntax_detailed_textile.html b/public/help/ca/wiki_syntax_detailed_textile.html
          index 1d38d2abb..b708ac3ec 100644
          --- a/public/help/ca/wiki_syntax_detailed_textile.html
          +++ b/public/help/ca/wiki_syntax_detailed_textile.html
          @@ -136,7 +136,7 @@
           
                   

          External links

          -

          HTTP URLs and email addresses are automatically turned into clickable links:

          +

          URLs (http, https, ftp and ftps) and email addresses are automatically turned into clickable links:

           http://www.redmine.org, someone@foo.bar
          diff --git a/public/help/cs/wiki_syntax_detailed_markdown.html b/public/help/cs/wiki_syntax_detailed_markdown.html
          index 6764d78af..80044fe2f 100644
          --- a/public/help/cs/wiki_syntax_detailed_markdown.html
          +++ b/public/help/cs/wiki_syntax_detailed_markdown.html
          @@ -141,7 +141,7 @@
           
                   

          Externí odkazy

          -

          URL odkazy a emaily jsou automaticky zobrazeny jako klikací odkaz:

          +

          URLs (http, https, ftp, and ftps) and email addresses are automatically turned into clickable links:

           http://www.redmine.org, someone@foo.bar
          diff --git a/public/help/cs/wiki_syntax_detailed_textile.html b/public/help/cs/wiki_syntax_detailed_textile.html
          index e7e3c146a..4ae106871 100644
          --- a/public/help/cs/wiki_syntax_detailed_textile.html
          +++ b/public/help/cs/wiki_syntax_detailed_textile.html
          @@ -136,7 +136,7 @@
           
                   

          Externí odkazy

          -

          URL odkazy a emaily jsou automaticky zobrazeny jako klikací odkaz:

          +

          URLs (http, https, ftp, and ftps) and email addresses are automatically turned into clickable links:

           http://www.redmine.org, someone@foo.bar
          diff --git a/public/help/da/wiki_syntax_detailed_markdown.html b/public/help/da/wiki_syntax_detailed_markdown.html
          index e150d95c7..a5b3f959c 100644
          --- a/public/help/da/wiki_syntax_detailed_markdown.html
          +++ b/public/help/da/wiki_syntax_detailed_markdown.html
          @@ -145,7 +145,7 @@
           
                   

          External links

          -

          HTTP URLs and email addresses are automatically turned into clickable links:

          +

          URLs (http, https, ftp, and ftps) and email addresses are automatically turned into clickable links:

           http://www.redmine.org, someone@foo.bar
          diff --git a/public/help/da/wiki_syntax_detailed_textile.html b/public/help/da/wiki_syntax_detailed_textile.html
          index 1d38d2abb..b708ac3ec 100644
          --- a/public/help/da/wiki_syntax_detailed_textile.html
          +++ b/public/help/da/wiki_syntax_detailed_textile.html
          @@ -136,7 +136,7 @@
           
                   

          External links

          -

          HTTP URLs and email addresses are automatically turned into clickable links:

          +

          URLs (http, https, ftp and ftps) and email addresses are automatically turned into clickable links:

           http://www.redmine.org, someone@foo.bar
          diff --git a/public/help/de/wiki_syntax_detailed_markdown.html b/public/help/de/wiki_syntax_detailed_markdown.html
          index e150d95c7..a5b3f959c 100644
          --- a/public/help/de/wiki_syntax_detailed_markdown.html
          +++ b/public/help/de/wiki_syntax_detailed_markdown.html
          @@ -145,7 +145,7 @@
           
                   

          External links

          -

          HTTP URLs and email addresses are automatically turned into clickable links:

          +

          URLs (http, https, ftp, and ftps) and email addresses are automatically turned into clickable links:

           http://www.redmine.org, someone@foo.bar
          diff --git a/public/help/de/wiki_syntax_detailed_textile.html b/public/help/de/wiki_syntax_detailed_textile.html
          index 1d38d2abb..b708ac3ec 100644
          --- a/public/help/de/wiki_syntax_detailed_textile.html
          +++ b/public/help/de/wiki_syntax_detailed_textile.html
          @@ -136,7 +136,7 @@
           
                   

          External links

          -

          HTTP URLs and email addresses are automatically turned into clickable links:

          +

          URLs (http, https, ftp and ftps) and email addresses are automatically turned into clickable links:

           http://www.redmine.org, someone@foo.bar
          diff --git a/public/help/el/wiki_syntax_detailed_markdown.html b/public/help/el/wiki_syntax_detailed_markdown.html
          index e150d95c7..a5b3f959c 100644
          --- a/public/help/el/wiki_syntax_detailed_markdown.html
          +++ b/public/help/el/wiki_syntax_detailed_markdown.html
          @@ -145,7 +145,7 @@
           
                   

          External links

          -

          HTTP URLs and email addresses are automatically turned into clickable links:

          +

          URLs (http, https, ftp, and ftps) and email addresses are automatically turned into clickable links:

           http://www.redmine.org, someone@foo.bar
          diff --git a/public/help/el/wiki_syntax_detailed_textile.html b/public/help/el/wiki_syntax_detailed_textile.html
          index 1d38d2abb..b708ac3ec 100644
          --- a/public/help/el/wiki_syntax_detailed_textile.html
          +++ b/public/help/el/wiki_syntax_detailed_textile.html
          @@ -136,7 +136,7 @@
           
                   

          External links

          -

          HTTP URLs and email addresses are automatically turned into clickable links:

          +

          URLs (http, https, ftp and ftps) and email addresses are automatically turned into clickable links:

           http://www.redmine.org, someone@foo.bar
          diff --git a/public/help/en-gb/wiki_syntax_detailed_markdown.html b/public/help/en-gb/wiki_syntax_detailed_markdown.html
          index e150d95c7..a5b3f959c 100644
          --- a/public/help/en-gb/wiki_syntax_detailed_markdown.html
          +++ b/public/help/en-gb/wiki_syntax_detailed_markdown.html
          @@ -145,7 +145,7 @@
           
                   

          External links

          -

          HTTP URLs and email addresses are automatically turned into clickable links:

          +

          URLs (http, https, ftp, and ftps) and email addresses are automatically turned into clickable links:

           http://www.redmine.org, someone@foo.bar
          diff --git a/public/help/en-gb/wiki_syntax_detailed_textile.html b/public/help/en-gb/wiki_syntax_detailed_textile.html
          index 1d38d2abb..b708ac3ec 100644
          --- a/public/help/en-gb/wiki_syntax_detailed_textile.html
          +++ b/public/help/en-gb/wiki_syntax_detailed_textile.html
          @@ -136,7 +136,7 @@
           
                   

          External links

          -

          HTTP URLs and email addresses are automatically turned into clickable links:

          +

          URLs (http, https, ftp and ftps) and email addresses are automatically turned into clickable links:

           http://www.redmine.org, someone@foo.bar
          diff --git a/public/help/en/wiki_syntax_detailed_markdown.html b/public/help/en/wiki_syntax_detailed_markdown.html
          index e150d95c7..a5b3f959c 100644
          --- a/public/help/en/wiki_syntax_detailed_markdown.html
          +++ b/public/help/en/wiki_syntax_detailed_markdown.html
          @@ -145,7 +145,7 @@
           
                   

          External links

          -

          HTTP URLs and email addresses are automatically turned into clickable links:

          +

          URLs (http, https, ftp, and ftps) and email addresses are automatically turned into clickable links:

           http://www.redmine.org, someone@foo.bar
          diff --git a/public/help/en/wiki_syntax_detailed_textile.html b/public/help/en/wiki_syntax_detailed_textile.html
          index 1d38d2abb..b708ac3ec 100644
          --- a/public/help/en/wiki_syntax_detailed_textile.html
          +++ b/public/help/en/wiki_syntax_detailed_textile.html
          @@ -136,7 +136,7 @@
           
                   

          External links

          -

          HTTP URLs and email addresses are automatically turned into clickable links:

          +

          URLs (http, https, ftp and ftps) and email addresses are automatically turned into clickable links:

           http://www.redmine.org, someone@foo.bar
          diff --git a/public/help/es-pa/wiki_syntax_detailed_markdown.html b/public/help/es-pa/wiki_syntax_detailed_markdown.html
          index e150d95c7..a5b3f959c 100644
          --- a/public/help/es-pa/wiki_syntax_detailed_markdown.html
          +++ b/public/help/es-pa/wiki_syntax_detailed_markdown.html
          @@ -145,7 +145,7 @@
           
                   

          External links

          -

          HTTP URLs and email addresses are automatically turned into clickable links:

          +

          URLs (http, https, ftp, and ftps) and email addresses are automatically turned into clickable links:

           http://www.redmine.org, someone@foo.bar
          diff --git a/public/help/es-pa/wiki_syntax_detailed_textile.html b/public/help/es-pa/wiki_syntax_detailed_textile.html
          index 1d38d2abb..b708ac3ec 100644
          --- a/public/help/es-pa/wiki_syntax_detailed_textile.html
          +++ b/public/help/es-pa/wiki_syntax_detailed_textile.html
          @@ -136,7 +136,7 @@
           
                   

          External links

          -

          HTTP URLs and email addresses are automatically turned into clickable links:

          +

          URLs (http, https, ftp and ftps) and email addresses are automatically turned into clickable links:

           http://www.redmine.org, someone@foo.bar
          diff --git a/public/help/es/wiki_syntax_detailed_markdown.html b/public/help/es/wiki_syntax_detailed_markdown.html
          index e150d95c7..a5b3f959c 100644
          --- a/public/help/es/wiki_syntax_detailed_markdown.html
          +++ b/public/help/es/wiki_syntax_detailed_markdown.html
          @@ -145,7 +145,7 @@
           
                   

          External links

          -

          HTTP URLs and email addresses are automatically turned into clickable links:

          +

          URLs (http, https, ftp, and ftps) and email addresses are automatically turned into clickable links:

           http://www.redmine.org, someone@foo.bar
          diff --git a/public/help/es/wiki_syntax_detailed_textile.html b/public/help/es/wiki_syntax_detailed_textile.html
          index 1d38d2abb..b708ac3ec 100644
          --- a/public/help/es/wiki_syntax_detailed_textile.html
          +++ b/public/help/es/wiki_syntax_detailed_textile.html
          @@ -136,7 +136,7 @@
           
                   

          External links

          -

          HTTP URLs and email addresses are automatically turned into clickable links:

          +

          URLs (http, https, ftp and ftps) and email addresses are automatically turned into clickable links:

           http://www.redmine.org, someone@foo.bar
          diff --git a/public/help/et/wiki_syntax_detailed_markdown.html b/public/help/et/wiki_syntax_detailed_markdown.html
          index e150d95c7..a5b3f959c 100644
          --- a/public/help/et/wiki_syntax_detailed_markdown.html
          +++ b/public/help/et/wiki_syntax_detailed_markdown.html
          @@ -145,7 +145,7 @@
           
                   

          External links

          -

          HTTP URLs and email addresses are automatically turned into clickable links:

          +

          URLs (http, https, ftp, and ftps) and email addresses are automatically turned into clickable links:

           http://www.redmine.org, someone@foo.bar
          diff --git a/public/help/et/wiki_syntax_detailed_textile.html b/public/help/et/wiki_syntax_detailed_textile.html
          index 1d38d2abb..b708ac3ec 100644
          --- a/public/help/et/wiki_syntax_detailed_textile.html
          +++ b/public/help/et/wiki_syntax_detailed_textile.html
          @@ -136,7 +136,7 @@
           
                   

          External links

          -

          HTTP URLs and email addresses are automatically turned into clickable links:

          +

          URLs (http, https, ftp and ftps) and email addresses are automatically turned into clickable links:

           http://www.redmine.org, someone@foo.bar
          diff --git a/public/help/eu/wiki_syntax_detailed_markdown.html b/public/help/eu/wiki_syntax_detailed_markdown.html
          index e150d95c7..a5b3f959c 100644
          --- a/public/help/eu/wiki_syntax_detailed_markdown.html
          +++ b/public/help/eu/wiki_syntax_detailed_markdown.html
          @@ -145,7 +145,7 @@
           
                   

          External links

          -

          HTTP URLs and email addresses are automatically turned into clickable links:

          +

          URLs (http, https, ftp, and ftps) and email addresses are automatically turned into clickable links:

           http://www.redmine.org, someone@foo.bar
          diff --git a/public/help/eu/wiki_syntax_detailed_textile.html b/public/help/eu/wiki_syntax_detailed_textile.html
          index 1d38d2abb..b708ac3ec 100644
          --- a/public/help/eu/wiki_syntax_detailed_textile.html
          +++ b/public/help/eu/wiki_syntax_detailed_textile.html
          @@ -136,7 +136,7 @@
           
                   

          External links

          -

          HTTP URLs and email addresses are automatically turned into clickable links:

          +

          URLs (http, https, ftp and ftps) and email addresses are automatically turned into clickable links:

           http://www.redmine.org, someone@foo.bar
          diff --git a/public/help/fa/wiki_syntax_detailed_markdown.html b/public/help/fa/wiki_syntax_detailed_markdown.html
          index e150d95c7..a5b3f959c 100644
          --- a/public/help/fa/wiki_syntax_detailed_markdown.html
          +++ b/public/help/fa/wiki_syntax_detailed_markdown.html
          @@ -145,7 +145,7 @@
           
                   

          External links

          -

          HTTP URLs and email addresses are automatically turned into clickable links:

          +

          URLs (http, https, ftp, and ftps) and email addresses are automatically turned into clickable links:

           http://www.redmine.org, someone@foo.bar
          diff --git a/public/help/fa/wiki_syntax_detailed_textile.html b/public/help/fa/wiki_syntax_detailed_textile.html
          index 1d38d2abb..b708ac3ec 100644
          --- a/public/help/fa/wiki_syntax_detailed_textile.html
          +++ b/public/help/fa/wiki_syntax_detailed_textile.html
          @@ -136,7 +136,7 @@
           
                   

          External links

          -

          HTTP URLs and email addresses are automatically turned into clickable links:

          +

          URLs (http, https, ftp and ftps) and email addresses are automatically turned into clickable links:

           http://www.redmine.org, someone@foo.bar
          diff --git a/public/help/fi/wiki_syntax_detailed_markdown.html b/public/help/fi/wiki_syntax_detailed_markdown.html
          index e150d95c7..a5b3f959c 100644
          --- a/public/help/fi/wiki_syntax_detailed_markdown.html
          +++ b/public/help/fi/wiki_syntax_detailed_markdown.html
          @@ -145,7 +145,7 @@
           
                   

          External links

          -

          HTTP URLs and email addresses are automatically turned into clickable links:

          +

          URLs (http, https, ftp, and ftps) and email addresses are automatically turned into clickable links:

           http://www.redmine.org, someone@foo.bar
          diff --git a/public/help/fi/wiki_syntax_detailed_textile.html b/public/help/fi/wiki_syntax_detailed_textile.html
          index 1d38d2abb..b708ac3ec 100644
          --- a/public/help/fi/wiki_syntax_detailed_textile.html
          +++ b/public/help/fi/wiki_syntax_detailed_textile.html
          @@ -136,7 +136,7 @@
           
                   

          External links

          -

          HTTP URLs and email addresses are automatically turned into clickable links:

          +

          URLs (http, https, ftp and ftps) and email addresses are automatically turned into clickable links:

           http://www.redmine.org, someone@foo.bar
          diff --git a/public/help/fr/wiki_syntax_detailed_markdown.html b/public/help/fr/wiki_syntax_detailed_markdown.html
          index e150d95c7..a5b3f959c 100644
          --- a/public/help/fr/wiki_syntax_detailed_markdown.html
          +++ b/public/help/fr/wiki_syntax_detailed_markdown.html
          @@ -145,7 +145,7 @@
           
                   

          External links

          -

          HTTP URLs and email addresses are automatically turned into clickable links:

          +

          URLs (http, https, ftp, and ftps) and email addresses are automatically turned into clickable links:

           http://www.redmine.org, someone@foo.bar
          diff --git a/public/help/fr/wiki_syntax_detailed_textile.html b/public/help/fr/wiki_syntax_detailed_textile.html
          index 8a030b7df..ec9789f10 100644
          --- a/public/help/fr/wiki_syntax_detailed_textile.html
          +++ b/public/help/fr/wiki_syntax_detailed_textile.html
          @@ -136,7 +136,7 @@
           
                   

          Liens externes

          -

          Les URLs HTTP et les adresses email sont automatiquement transformé en liens:

          +

          URLs (http, https, ftp, and ftps) and email addresses are automatically turned into clickable links:

           http://www.redmine.org, someone@foo.bar
          diff --git a/public/help/gl/wiki_syntax_detailed_markdown.html b/public/help/gl/wiki_syntax_detailed_markdown.html
          index e150d95c7..a5b3f959c 100644
          --- a/public/help/gl/wiki_syntax_detailed_markdown.html
          +++ b/public/help/gl/wiki_syntax_detailed_markdown.html
          @@ -145,7 +145,7 @@
           
                   

          External links

          -

          HTTP URLs and email addresses are automatically turned into clickable links:

          +

          URLs (http, https, ftp, and ftps) and email addresses are automatically turned into clickable links:

           http://www.redmine.org, someone@foo.bar
          diff --git a/public/help/gl/wiki_syntax_detailed_textile.html b/public/help/gl/wiki_syntax_detailed_textile.html
          index 1d38d2abb..b708ac3ec 100644
          --- a/public/help/gl/wiki_syntax_detailed_textile.html
          +++ b/public/help/gl/wiki_syntax_detailed_textile.html
          @@ -136,7 +136,7 @@
           
                   

          External links

          -

          HTTP URLs and email addresses are automatically turned into clickable links:

          +

          URLs (http, https, ftp and ftps) and email addresses are automatically turned into clickable links:

           http://www.redmine.org, someone@foo.bar
          diff --git a/public/help/he/wiki_syntax_detailed_markdown.html b/public/help/he/wiki_syntax_detailed_markdown.html
          index e150d95c7..a5b3f959c 100644
          --- a/public/help/he/wiki_syntax_detailed_markdown.html
          +++ b/public/help/he/wiki_syntax_detailed_markdown.html
          @@ -145,7 +145,7 @@
           
                   

          External links

          -

          HTTP URLs and email addresses are automatically turned into clickable links:

          +

          URLs (http, https, ftp, and ftps) and email addresses are automatically turned into clickable links:

           http://www.redmine.org, someone@foo.bar
          diff --git a/public/help/he/wiki_syntax_detailed_textile.html b/public/help/he/wiki_syntax_detailed_textile.html
          index 1d38d2abb..b708ac3ec 100644
          --- a/public/help/he/wiki_syntax_detailed_textile.html
          +++ b/public/help/he/wiki_syntax_detailed_textile.html
          @@ -136,7 +136,7 @@
           
                   

          External links

          -

          HTTP URLs and email addresses are automatically turned into clickable links:

          +

          URLs (http, https, ftp and ftps) and email addresses are automatically turned into clickable links:

           http://www.redmine.org, someone@foo.bar
          diff --git a/public/help/hr/wiki_syntax_detailed_markdown.html b/public/help/hr/wiki_syntax_detailed_markdown.html
          index e150d95c7..a5b3f959c 100644
          --- a/public/help/hr/wiki_syntax_detailed_markdown.html
          +++ b/public/help/hr/wiki_syntax_detailed_markdown.html
          @@ -145,7 +145,7 @@
           
                   

          External links

          -

          HTTP URLs and email addresses are automatically turned into clickable links:

          +

          URLs (http, https, ftp, and ftps) and email addresses are automatically turned into clickable links:

           http://www.redmine.org, someone@foo.bar
          diff --git a/public/help/hr/wiki_syntax_detailed_textile.html b/public/help/hr/wiki_syntax_detailed_textile.html
          index 1d38d2abb..b708ac3ec 100644
          --- a/public/help/hr/wiki_syntax_detailed_textile.html
          +++ b/public/help/hr/wiki_syntax_detailed_textile.html
          @@ -136,7 +136,7 @@
           
                   

          External links

          -

          HTTP URLs and email addresses are automatically turned into clickable links:

          +

          URLs (http, https, ftp and ftps) and email addresses are automatically turned into clickable links:

           http://www.redmine.org, someone@foo.bar
          diff --git a/public/help/hu/wiki_syntax_detailed_markdown.html b/public/help/hu/wiki_syntax_detailed_markdown.html
          index e150d95c7..a5b3f959c 100644
          --- a/public/help/hu/wiki_syntax_detailed_markdown.html
          +++ b/public/help/hu/wiki_syntax_detailed_markdown.html
          @@ -145,7 +145,7 @@
           
                   

          External links

          -

          HTTP URLs and email addresses are automatically turned into clickable links:

          +

          URLs (http, https, ftp, and ftps) and email addresses are automatically turned into clickable links:

           http://www.redmine.org, someone@foo.bar
          diff --git a/public/help/hu/wiki_syntax_detailed_textile.html b/public/help/hu/wiki_syntax_detailed_textile.html
          index 1d38d2abb..b708ac3ec 100644
          --- a/public/help/hu/wiki_syntax_detailed_textile.html
          +++ b/public/help/hu/wiki_syntax_detailed_textile.html
          @@ -136,7 +136,7 @@
           
                   

          External links

          -

          HTTP URLs and email addresses are automatically turned into clickable links:

          +

          URLs (http, https, ftp and ftps) and email addresses are automatically turned into clickable links:

           http://www.redmine.org, someone@foo.bar
          diff --git a/public/help/id/wiki_syntax_detailed_markdown.html b/public/help/id/wiki_syntax_detailed_markdown.html
          index e150d95c7..a5b3f959c 100644
          --- a/public/help/id/wiki_syntax_detailed_markdown.html
          +++ b/public/help/id/wiki_syntax_detailed_markdown.html
          @@ -145,7 +145,7 @@
           
                   

          External links

          -

          HTTP URLs and email addresses are automatically turned into clickable links:

          +

          URLs (http, https, ftp, and ftps) and email addresses are automatically turned into clickable links:

           http://www.redmine.org, someone@foo.bar
          diff --git a/public/help/id/wiki_syntax_detailed_textile.html b/public/help/id/wiki_syntax_detailed_textile.html
          index 1d38d2abb..b708ac3ec 100644
          --- a/public/help/id/wiki_syntax_detailed_textile.html
          +++ b/public/help/id/wiki_syntax_detailed_textile.html
          @@ -136,7 +136,7 @@
           
                   

          External links

          -

          HTTP URLs and email addresses are automatically turned into clickable links:

          +

          URLs (http, https, ftp and ftps) and email addresses are automatically turned into clickable links:

           http://www.redmine.org, someone@foo.bar
          diff --git a/public/help/it/wiki_syntax_detailed_markdown.html b/public/help/it/wiki_syntax_detailed_markdown.html
          index e150d95c7..a5b3f959c 100644
          --- a/public/help/it/wiki_syntax_detailed_markdown.html
          +++ b/public/help/it/wiki_syntax_detailed_markdown.html
          @@ -145,7 +145,7 @@
           
                   

          External links

          -

          HTTP URLs and email addresses are automatically turned into clickable links:

          +

          URLs (http, https, ftp, and ftps) and email addresses are automatically turned into clickable links:

           http://www.redmine.org, someone@foo.bar
          diff --git a/public/help/it/wiki_syntax_detailed_textile.html b/public/help/it/wiki_syntax_detailed_textile.html
          index 1d38d2abb..b708ac3ec 100644
          --- a/public/help/it/wiki_syntax_detailed_textile.html
          +++ b/public/help/it/wiki_syntax_detailed_textile.html
          @@ -136,7 +136,7 @@
           
                   

          External links

          -

          HTTP URLs and email addresses are automatically turned into clickable links:

          +

          URLs (http, https, ftp and ftps) and email addresses are automatically turned into clickable links:

           http://www.redmine.org, someone@foo.bar
          diff --git a/public/help/ja/wiki_syntax_detailed_markdown.html b/public/help/ja/wiki_syntax_detailed_markdown.html
          index f4cf48357..d1746a6da 100644
          --- a/public/help/ja/wiki_syntax_detailed_markdown.html
          +++ b/public/help/ja/wiki_syntax_detailed_markdown.html
          @@ -145,7 +145,7 @@
           
                   

          外部リンク

          -

          HTTP URLとメールアドレスは自動的にリンクになります:

          +

          URL(http, https, ftp, ftps)とメールアドレスは自動的にリンクになります:

           http://www.redmine.org, someone@foo.bar
          diff --git a/public/help/ja/wiki_syntax_detailed_textile.html b/public/help/ja/wiki_syntax_detailed_textile.html
          index 468f166c1..39f3b962e 100644
          --- a/public/help/ja/wiki_syntax_detailed_textile.html
          +++ b/public/help/ja/wiki_syntax_detailed_textile.html
          @@ -136,7 +136,7 @@
           
                   

          外部リンク

          -

          HTTP URLとメールアドレスは自動的にリンクになります:

          +

          >URL(http, https, ftp, ftps)とメールアドレスは自動的にリンクになります:

           http://www.redmine.org, someone@foo.bar
          diff --git a/public/help/ko/wiki_syntax_detailed_markdown.html b/public/help/ko/wiki_syntax_detailed_markdown.html
          index e150d95c7..a5b3f959c 100644
          --- a/public/help/ko/wiki_syntax_detailed_markdown.html
          +++ b/public/help/ko/wiki_syntax_detailed_markdown.html
          @@ -145,7 +145,7 @@
           
                   

          External links

          -

          HTTP URLs and email addresses are automatically turned into clickable links:

          +

          URLs (http, https, ftp, and ftps) and email addresses are automatically turned into clickable links:

           http://www.redmine.org, someone@foo.bar
          diff --git a/public/help/ko/wiki_syntax_detailed_textile.html b/public/help/ko/wiki_syntax_detailed_textile.html
          index 1d38d2abb..b708ac3ec 100644
          --- a/public/help/ko/wiki_syntax_detailed_textile.html
          +++ b/public/help/ko/wiki_syntax_detailed_textile.html
          @@ -136,7 +136,7 @@
           
                   

          External links

          -

          HTTP URLs and email addresses are automatically turned into clickable links:

          +

          URLs (http, https, ftp and ftps) and email addresses are automatically turned into clickable links:

           http://www.redmine.org, someone@foo.bar
          diff --git a/public/help/lt/wiki_syntax_detailed_markdown.html b/public/help/lt/wiki_syntax_detailed_markdown.html
          index e150d95c7..a5b3f959c 100644
          --- a/public/help/lt/wiki_syntax_detailed_markdown.html
          +++ b/public/help/lt/wiki_syntax_detailed_markdown.html
          @@ -145,7 +145,7 @@
           
                   

          External links

          -

          HTTP URLs and email addresses are automatically turned into clickable links:

          +

          URLs (http, https, ftp, and ftps) and email addresses are automatically turned into clickable links:

           http://www.redmine.org, someone@foo.bar
          diff --git a/public/help/lt/wiki_syntax_detailed_textile.html b/public/help/lt/wiki_syntax_detailed_textile.html
          index 1d38d2abb..b708ac3ec 100644
          --- a/public/help/lt/wiki_syntax_detailed_textile.html
          +++ b/public/help/lt/wiki_syntax_detailed_textile.html
          @@ -136,7 +136,7 @@
           
                   

          External links

          -

          HTTP URLs and email addresses are automatically turned into clickable links:

          +

          URLs (http, https, ftp and ftps) and email addresses are automatically turned into clickable links:

           http://www.redmine.org, someone@foo.bar
          diff --git a/public/help/lv/wiki_syntax_detailed_markdown.html b/public/help/lv/wiki_syntax_detailed_markdown.html
          index e150d95c7..a5b3f959c 100644
          --- a/public/help/lv/wiki_syntax_detailed_markdown.html
          +++ b/public/help/lv/wiki_syntax_detailed_markdown.html
          @@ -145,7 +145,7 @@
           
                   

          External links

          -

          HTTP URLs and email addresses are automatically turned into clickable links:

          +

          URLs (http, https, ftp, and ftps) and email addresses are automatically turned into clickable links:

           http://www.redmine.org, someone@foo.bar
          diff --git a/public/help/lv/wiki_syntax_detailed_textile.html b/public/help/lv/wiki_syntax_detailed_textile.html
          index 1d38d2abb..b708ac3ec 100644
          --- a/public/help/lv/wiki_syntax_detailed_textile.html
          +++ b/public/help/lv/wiki_syntax_detailed_textile.html
          @@ -136,7 +136,7 @@
           
                   

          External links

          -

          HTTP URLs and email addresses are automatically turned into clickable links:

          +

          URLs (http, https, ftp and ftps) and email addresses are automatically turned into clickable links:

           http://www.redmine.org, someone@foo.bar
          diff --git a/public/help/mk/wiki_syntax_detailed_markdown.html b/public/help/mk/wiki_syntax_detailed_markdown.html
          index e150d95c7..a5b3f959c 100644
          --- a/public/help/mk/wiki_syntax_detailed_markdown.html
          +++ b/public/help/mk/wiki_syntax_detailed_markdown.html
          @@ -145,7 +145,7 @@
           
                   

          External links

          -

          HTTP URLs and email addresses are automatically turned into clickable links:

          +

          URLs (http, https, ftp, and ftps) and email addresses are automatically turned into clickable links:

           http://www.redmine.org, someone@foo.bar
          diff --git a/public/help/mk/wiki_syntax_detailed_textile.html b/public/help/mk/wiki_syntax_detailed_textile.html
          index 1d38d2abb..b708ac3ec 100644
          --- a/public/help/mk/wiki_syntax_detailed_textile.html
          +++ b/public/help/mk/wiki_syntax_detailed_textile.html
          @@ -136,7 +136,7 @@
           
                   

          External links

          -

          HTTP URLs and email addresses are automatically turned into clickable links:

          +

          URLs (http, https, ftp and ftps) and email addresses are automatically turned into clickable links:

           http://www.redmine.org, someone@foo.bar
          diff --git a/public/help/mn/wiki_syntax_detailed_markdown.html b/public/help/mn/wiki_syntax_detailed_markdown.html
          index e150d95c7..a5b3f959c 100644
          --- a/public/help/mn/wiki_syntax_detailed_markdown.html
          +++ b/public/help/mn/wiki_syntax_detailed_markdown.html
          @@ -145,7 +145,7 @@
           
                   

          External links

          -

          HTTP URLs and email addresses are automatically turned into clickable links:

          +

          URLs (http, https, ftp, and ftps) and email addresses are automatically turned into clickable links:

           http://www.redmine.org, someone@foo.bar
          diff --git a/public/help/mn/wiki_syntax_detailed_textile.html b/public/help/mn/wiki_syntax_detailed_textile.html
          index 1d38d2abb..b708ac3ec 100644
          --- a/public/help/mn/wiki_syntax_detailed_textile.html
          +++ b/public/help/mn/wiki_syntax_detailed_textile.html
          @@ -136,7 +136,7 @@
           
                   

          External links

          -

          HTTP URLs and email addresses are automatically turned into clickable links:

          +

          URLs (http, https, ftp and ftps) and email addresses are automatically turned into clickable links:

           http://www.redmine.org, someone@foo.bar
          diff --git a/public/help/nl/wiki_syntax_detailed_markdown.html b/public/help/nl/wiki_syntax_detailed_markdown.html
          index e150d95c7..a5b3f959c 100644
          --- a/public/help/nl/wiki_syntax_detailed_markdown.html
          +++ b/public/help/nl/wiki_syntax_detailed_markdown.html
          @@ -145,7 +145,7 @@
           
                   

          External links

          -

          HTTP URLs and email addresses are automatically turned into clickable links:

          +

          URLs (http, https, ftp, and ftps) and email addresses are automatically turned into clickable links:

           http://www.redmine.org, someone@foo.bar
          diff --git a/public/help/nl/wiki_syntax_detailed_textile.html b/public/help/nl/wiki_syntax_detailed_textile.html
          index 1d38d2abb..b708ac3ec 100644
          --- a/public/help/nl/wiki_syntax_detailed_textile.html
          +++ b/public/help/nl/wiki_syntax_detailed_textile.html
          @@ -136,7 +136,7 @@
           
                   

          External links

          -

          HTTP URLs and email addresses are automatically turned into clickable links:

          +

          URLs (http, https, ftp and ftps) and email addresses are automatically turned into clickable links:

           http://www.redmine.org, someone@foo.bar
          diff --git a/public/help/no/wiki_syntax_detailed_markdown.html b/public/help/no/wiki_syntax_detailed_markdown.html
          index e150d95c7..a5b3f959c 100644
          --- a/public/help/no/wiki_syntax_detailed_markdown.html
          +++ b/public/help/no/wiki_syntax_detailed_markdown.html
          @@ -145,7 +145,7 @@
           
                   

          External links

          -

          HTTP URLs and email addresses are automatically turned into clickable links:

          +

          URLs (http, https, ftp, and ftps) and email addresses are automatically turned into clickable links:

           http://www.redmine.org, someone@foo.bar
          diff --git a/public/help/no/wiki_syntax_detailed_textile.html b/public/help/no/wiki_syntax_detailed_textile.html
          index 1d38d2abb..b708ac3ec 100644
          --- a/public/help/no/wiki_syntax_detailed_textile.html
          +++ b/public/help/no/wiki_syntax_detailed_textile.html
          @@ -136,7 +136,7 @@
           
                   

          External links

          -

          HTTP URLs and email addresses are automatically turned into clickable links:

          +

          URLs (http, https, ftp and ftps) and email addresses are automatically turned into clickable links:

           http://www.redmine.org, someone@foo.bar
          diff --git a/public/help/pl/wiki_syntax_detailed_markdown.html b/public/help/pl/wiki_syntax_detailed_markdown.html
          index e150d95c7..a5b3f959c 100644
          --- a/public/help/pl/wiki_syntax_detailed_markdown.html
          +++ b/public/help/pl/wiki_syntax_detailed_markdown.html
          @@ -145,7 +145,7 @@
           
                   

          External links

          -

          HTTP URLs and email addresses are automatically turned into clickable links:

          +

          URLs (http, https, ftp, and ftps) and email addresses are automatically turned into clickable links:

           http://www.redmine.org, someone@foo.bar
          diff --git a/public/help/pl/wiki_syntax_detailed_textile.html b/public/help/pl/wiki_syntax_detailed_textile.html
          index 1d38d2abb..b708ac3ec 100644
          --- a/public/help/pl/wiki_syntax_detailed_textile.html
          +++ b/public/help/pl/wiki_syntax_detailed_textile.html
          @@ -136,7 +136,7 @@
           
                   

          External links

          -

          HTTP URLs and email addresses are automatically turned into clickable links:

          +

          URLs (http, https, ftp and ftps) and email addresses are automatically turned into clickable links:

           http://www.redmine.org, someone@foo.bar
          diff --git a/public/help/pt-br/wiki_syntax_detailed_markdown.html b/public/help/pt-br/wiki_syntax_detailed_markdown.html
          index e150d95c7..a5b3f959c 100644
          --- a/public/help/pt-br/wiki_syntax_detailed_markdown.html
          +++ b/public/help/pt-br/wiki_syntax_detailed_markdown.html
          @@ -145,7 +145,7 @@
           
                   

          External links

          -

          HTTP URLs and email addresses are automatically turned into clickable links:

          +

          URLs (http, https, ftp, and ftps) and email addresses are automatically turned into clickable links:

           http://www.redmine.org, someone@foo.bar
          diff --git a/public/help/pt-br/wiki_syntax_detailed_textile.html b/public/help/pt-br/wiki_syntax_detailed_textile.html
          index 1d38d2abb..b708ac3ec 100644
          --- a/public/help/pt-br/wiki_syntax_detailed_textile.html
          +++ b/public/help/pt-br/wiki_syntax_detailed_textile.html
          @@ -136,7 +136,7 @@
           
                   

          External links

          -

          HTTP URLs and email addresses are automatically turned into clickable links:

          +

          URLs (http, https, ftp and ftps) and email addresses are automatically turned into clickable links:

           http://www.redmine.org, someone@foo.bar
          diff --git a/public/help/pt/wiki_syntax_detailed_markdown.html b/public/help/pt/wiki_syntax_detailed_markdown.html
          index e150d95c7..a5b3f959c 100644
          --- a/public/help/pt/wiki_syntax_detailed_markdown.html
          +++ b/public/help/pt/wiki_syntax_detailed_markdown.html
          @@ -145,7 +145,7 @@
           
                   

          External links

          -

          HTTP URLs and email addresses are automatically turned into clickable links:

          +

          URLs (http, https, ftp, and ftps) and email addresses are automatically turned into clickable links:

           http://www.redmine.org, someone@foo.bar
          diff --git a/public/help/pt/wiki_syntax_detailed_textile.html b/public/help/pt/wiki_syntax_detailed_textile.html
          index 1d38d2abb..b708ac3ec 100644
          --- a/public/help/pt/wiki_syntax_detailed_textile.html
          +++ b/public/help/pt/wiki_syntax_detailed_textile.html
          @@ -136,7 +136,7 @@
           
                   

          External links

          -

          HTTP URLs and email addresses are automatically turned into clickable links:

          +

          URLs (http, https, ftp and ftps) and email addresses are automatically turned into clickable links:

           http://www.redmine.org, someone@foo.bar
          diff --git a/public/help/ro/wiki_syntax_detailed_markdown.html b/public/help/ro/wiki_syntax_detailed_markdown.html
          index e150d95c7..a5b3f959c 100644
          --- a/public/help/ro/wiki_syntax_detailed_markdown.html
          +++ b/public/help/ro/wiki_syntax_detailed_markdown.html
          @@ -145,7 +145,7 @@
           
                   

          External links

          -

          HTTP URLs and email addresses are automatically turned into clickable links:

          +

          URLs (http, https, ftp, and ftps) and email addresses are automatically turned into clickable links:

           http://www.redmine.org, someone@foo.bar
          diff --git a/public/help/ro/wiki_syntax_detailed_textile.html b/public/help/ro/wiki_syntax_detailed_textile.html
          index 1d38d2abb..b708ac3ec 100644
          --- a/public/help/ro/wiki_syntax_detailed_textile.html
          +++ b/public/help/ro/wiki_syntax_detailed_textile.html
          @@ -136,7 +136,7 @@
           
                   

          External links

          -

          HTTP URLs and email addresses are automatically turned into clickable links:

          +

          URLs (http, https, ftp and ftps) and email addresses are automatically turned into clickable links:

           http://www.redmine.org, someone@foo.bar
          diff --git a/public/help/ru/wiki_syntax_detailed_markdown.html b/public/help/ru/wiki_syntax_detailed_markdown.html
          index e150d95c7..a5b3f959c 100644
          --- a/public/help/ru/wiki_syntax_detailed_markdown.html
          +++ b/public/help/ru/wiki_syntax_detailed_markdown.html
          @@ -145,7 +145,7 @@
           
                   

          External links

          -

          HTTP URLs and email addresses are automatically turned into clickable links:

          +

          URLs (http, https, ftp, and ftps) and email addresses are automatically turned into clickable links:

           http://www.redmine.org, someone@foo.bar
          diff --git a/public/help/ru/wiki_syntax_detailed_textile.html b/public/help/ru/wiki_syntax_detailed_textile.html
          index 7f9de089a..1d665078a 100644
          --- a/public/help/ru/wiki_syntax_detailed_textile.html
          +++ b/public/help/ru/wiki_syntax_detailed_textile.html
          @@ -161,7 +161,7 @@
           
           

          Внешние ссылки

          -

          HTTP и почтовые адреса автоматически транслируются в ссылки:

          +

          URLs (http, https, ftp, and ftps) and email addresses are automatically turned into clickable links:

           http://www.redmine.org, someone@foo.bar
          diff --git a/public/help/sk/wiki_syntax_detailed_markdown.html b/public/help/sk/wiki_syntax_detailed_markdown.html
          index e150d95c7..a5b3f959c 100644
          --- a/public/help/sk/wiki_syntax_detailed_markdown.html
          +++ b/public/help/sk/wiki_syntax_detailed_markdown.html
          @@ -145,7 +145,7 @@
           
                   

          External links

          -

          HTTP URLs and email addresses are automatically turned into clickable links:

          +

          URLs (http, https, ftp, and ftps) and email addresses are automatically turned into clickable links:

           http://www.redmine.org, someone@foo.bar
          diff --git a/public/help/sk/wiki_syntax_detailed_textile.html b/public/help/sk/wiki_syntax_detailed_textile.html
          index 1d38d2abb..b708ac3ec 100644
          --- a/public/help/sk/wiki_syntax_detailed_textile.html
          +++ b/public/help/sk/wiki_syntax_detailed_textile.html
          @@ -136,7 +136,7 @@
           
                   

          External links

          -

          HTTP URLs and email addresses are automatically turned into clickable links:

          +

          URLs (http, https, ftp and ftps) and email addresses are automatically turned into clickable links:

           http://www.redmine.org, someone@foo.bar
          diff --git a/public/help/sl/wiki_syntax_detailed_markdown.html b/public/help/sl/wiki_syntax_detailed_markdown.html
          index e150d95c7..a5b3f959c 100644
          --- a/public/help/sl/wiki_syntax_detailed_markdown.html
          +++ b/public/help/sl/wiki_syntax_detailed_markdown.html
          @@ -145,7 +145,7 @@
           
                   

          External links

          -

          HTTP URLs and email addresses are automatically turned into clickable links:

          +

          URLs (http, https, ftp, and ftps) and email addresses are automatically turned into clickable links:

           http://www.redmine.org, someone@foo.bar
          diff --git a/public/help/sl/wiki_syntax_detailed_textile.html b/public/help/sl/wiki_syntax_detailed_textile.html
          index 1d38d2abb..b708ac3ec 100644
          --- a/public/help/sl/wiki_syntax_detailed_textile.html
          +++ b/public/help/sl/wiki_syntax_detailed_textile.html
          @@ -136,7 +136,7 @@
           
                   

          External links

          -

          HTTP URLs and email addresses are automatically turned into clickable links:

          +

          URLs (http, https, ftp and ftps) and email addresses are automatically turned into clickable links:

           http://www.redmine.org, someone@foo.bar
          diff --git a/public/help/sq/wiki_syntax_detailed_markdown.html b/public/help/sq/wiki_syntax_detailed_markdown.html
          index e150d95c7..a5b3f959c 100644
          --- a/public/help/sq/wiki_syntax_detailed_markdown.html
          +++ b/public/help/sq/wiki_syntax_detailed_markdown.html
          @@ -145,7 +145,7 @@
           
                   

          External links

          -

          HTTP URLs and email addresses are automatically turned into clickable links:

          +

          URLs (http, https, ftp, and ftps) and email addresses are automatically turned into clickable links:

           http://www.redmine.org, someone@foo.bar
          diff --git a/public/help/sq/wiki_syntax_detailed_textile.html b/public/help/sq/wiki_syntax_detailed_textile.html
          index 1d38d2abb..b708ac3ec 100644
          --- a/public/help/sq/wiki_syntax_detailed_textile.html
          +++ b/public/help/sq/wiki_syntax_detailed_textile.html
          @@ -136,7 +136,7 @@
           
                   

          External links

          -

          HTTP URLs and email addresses are automatically turned into clickable links:

          +

          URLs (http, https, ftp and ftps) and email addresses are automatically turned into clickable links:

           http://www.redmine.org, someone@foo.bar
          diff --git a/public/help/sr-yu/wiki_syntax_detailed_markdown.html b/public/help/sr-yu/wiki_syntax_detailed_markdown.html
          index e150d95c7..a5b3f959c 100644
          --- a/public/help/sr-yu/wiki_syntax_detailed_markdown.html
          +++ b/public/help/sr-yu/wiki_syntax_detailed_markdown.html
          @@ -145,7 +145,7 @@
           
                   

          External links

          -

          HTTP URLs and email addresses are automatically turned into clickable links:

          +

          URLs (http, https, ftp, and ftps) and email addresses are automatically turned into clickable links:

           http://www.redmine.org, someone@foo.bar
          diff --git a/public/help/sr-yu/wiki_syntax_detailed_textile.html b/public/help/sr-yu/wiki_syntax_detailed_textile.html
          index 1d38d2abb..b708ac3ec 100644
          --- a/public/help/sr-yu/wiki_syntax_detailed_textile.html
          +++ b/public/help/sr-yu/wiki_syntax_detailed_textile.html
          @@ -136,7 +136,7 @@
           
                   

          External links

          -

          HTTP URLs and email addresses are automatically turned into clickable links:

          +

          URLs (http, https, ftp and ftps) and email addresses are automatically turned into clickable links:

           http://www.redmine.org, someone@foo.bar
          diff --git a/public/help/sr/wiki_syntax_detailed_markdown.html b/public/help/sr/wiki_syntax_detailed_markdown.html
          index e150d95c7..a5b3f959c 100644
          --- a/public/help/sr/wiki_syntax_detailed_markdown.html
          +++ b/public/help/sr/wiki_syntax_detailed_markdown.html
          @@ -145,7 +145,7 @@
           
                   

          External links

          -

          HTTP URLs and email addresses are automatically turned into clickable links:

          +

          URLs (http, https, ftp, and ftps) and email addresses are automatically turned into clickable links:

           http://www.redmine.org, someone@foo.bar
          diff --git a/public/help/sr/wiki_syntax_detailed_textile.html b/public/help/sr/wiki_syntax_detailed_textile.html
          index 1d38d2abb..b708ac3ec 100644
          --- a/public/help/sr/wiki_syntax_detailed_textile.html
          +++ b/public/help/sr/wiki_syntax_detailed_textile.html
          @@ -136,7 +136,7 @@
           
                   

          External links

          -

          HTTP URLs and email addresses are automatically turned into clickable links:

          +

          URLs (http, https, ftp and ftps) and email addresses are automatically turned into clickable links:

           http://www.redmine.org, someone@foo.bar
          diff --git a/public/help/sv/wiki_syntax_detailed_markdown.html b/public/help/sv/wiki_syntax_detailed_markdown.html
          index e150d95c7..a5b3f959c 100644
          --- a/public/help/sv/wiki_syntax_detailed_markdown.html
          +++ b/public/help/sv/wiki_syntax_detailed_markdown.html
          @@ -145,7 +145,7 @@
           
                   

          External links

          -

          HTTP URLs and email addresses are automatically turned into clickable links:

          +

          URLs (http, https, ftp, and ftps) and email addresses are automatically turned into clickable links:

           http://www.redmine.org, someone@foo.bar
          diff --git a/public/help/sv/wiki_syntax_detailed_textile.html b/public/help/sv/wiki_syntax_detailed_textile.html
          index 1d38d2abb..b708ac3ec 100644
          --- a/public/help/sv/wiki_syntax_detailed_textile.html
          +++ b/public/help/sv/wiki_syntax_detailed_textile.html
          @@ -136,7 +136,7 @@
           
                   

          External links

          -

          HTTP URLs and email addresses are automatically turned into clickable links:

          +

          URLs (http, https, ftp and ftps) and email addresses are automatically turned into clickable links:

           http://www.redmine.org, someone@foo.bar
          diff --git a/public/help/th/wiki_syntax_detailed_markdown.html b/public/help/th/wiki_syntax_detailed_markdown.html
          index e150d95c7..a5b3f959c 100644
          --- a/public/help/th/wiki_syntax_detailed_markdown.html
          +++ b/public/help/th/wiki_syntax_detailed_markdown.html
          @@ -145,7 +145,7 @@
           
                   

          External links

          -

          HTTP URLs and email addresses are automatically turned into clickable links:

          +

          URLs (http, https, ftp, and ftps) and email addresses are automatically turned into clickable links:

           http://www.redmine.org, someone@foo.bar
          diff --git a/public/help/th/wiki_syntax_detailed_textile.html b/public/help/th/wiki_syntax_detailed_textile.html
          index 1d38d2abb..b708ac3ec 100644
          --- a/public/help/th/wiki_syntax_detailed_textile.html
          +++ b/public/help/th/wiki_syntax_detailed_textile.html
          @@ -136,7 +136,7 @@
           
                   

          External links

          -

          HTTP URLs and email addresses are automatically turned into clickable links:

          +

          URLs (http, https, ftp and ftps) and email addresses are automatically turned into clickable links:

           http://www.redmine.org, someone@foo.bar
          diff --git a/public/help/tr/wiki_syntax_detailed_markdown.html b/public/help/tr/wiki_syntax_detailed_markdown.html
          index e150d95c7..a5b3f959c 100644
          --- a/public/help/tr/wiki_syntax_detailed_markdown.html
          +++ b/public/help/tr/wiki_syntax_detailed_markdown.html
          @@ -145,7 +145,7 @@
           
                   

          External links

          -

          HTTP URLs and email addresses are automatically turned into clickable links:

          +

          URLs (http, https, ftp, and ftps) and email addresses are automatically turned into clickable links:

           http://www.redmine.org, someone@foo.bar
          diff --git a/public/help/tr/wiki_syntax_detailed_textile.html b/public/help/tr/wiki_syntax_detailed_textile.html
          index 1d38d2abb..b708ac3ec 100644
          --- a/public/help/tr/wiki_syntax_detailed_textile.html
          +++ b/public/help/tr/wiki_syntax_detailed_textile.html
          @@ -136,7 +136,7 @@
           
                   

          External links

          -

          HTTP URLs and email addresses are automatically turned into clickable links:

          +

          URLs (http, https, ftp and ftps) and email addresses are automatically turned into clickable links:

           http://www.redmine.org, someone@foo.bar
          diff --git a/public/help/uk/wiki_syntax_detailed_markdown.html b/public/help/uk/wiki_syntax_detailed_markdown.html
          index d846cfb3b..d084bad95 100644
          --- a/public/help/uk/wiki_syntax_detailed_markdown.html
          +++ b/public/help/uk/wiki_syntax_detailed_markdown.html
          @@ -145,7 +145,7 @@
           
                   

          Зовнішні посилання

          -

          HTTP URL-адреси і адреси електронної пошти автоматично форматуються в активні посилання:

          +

          URLs (http, https, ftp, and ftps) and email addresses are automatically turned into clickable links:

           http://www.redmine.org, someone@foo.bar
          diff --git a/public/help/uk/wiki_syntax_detailed_textile.html b/public/help/uk/wiki_syntax_detailed_textile.html
          index 41983ff71..9bd28f80c 100644
          --- a/public/help/uk/wiki_syntax_detailed_textile.html
          +++ b/public/help/uk/wiki_syntax_detailed_textile.html
          @@ -136,7 +136,7 @@
           
                   

          Зовнішні посилання

          -

          HTTP URL-адреси і адреси електронної пошти автоматично форматуються в активні посилання:

          +

          URLs (http, https, ftp, and ftps) and email addresses are automatically turned into clickable links:

           http://www.redmine.org, someone@foo.bar
          diff --git a/public/help/vi/wiki_syntax_detailed_markdown.html b/public/help/vi/wiki_syntax_detailed_markdown.html
          index e150d95c7..a5b3f959c 100644
          --- a/public/help/vi/wiki_syntax_detailed_markdown.html
          +++ b/public/help/vi/wiki_syntax_detailed_markdown.html
          @@ -145,7 +145,7 @@
           
                   

          External links

          -

          HTTP URLs and email addresses are automatically turned into clickable links:

          +

          URLs (http, https, ftp, and ftps) and email addresses are automatically turned into clickable links:

           http://www.redmine.org, someone@foo.bar
          diff --git a/public/help/vi/wiki_syntax_detailed_textile.html b/public/help/vi/wiki_syntax_detailed_textile.html
          index 1d38d2abb..b708ac3ec 100644
          --- a/public/help/vi/wiki_syntax_detailed_textile.html
          +++ b/public/help/vi/wiki_syntax_detailed_textile.html
          @@ -136,7 +136,7 @@
           
                   

          External links

          -

          HTTP URLs and email addresses are automatically turned into clickable links:

          +

          URLs (http, https, ftp and ftps) and email addresses are automatically turned into clickable links:

           http://www.redmine.org, someone@foo.bar
          diff --git a/public/help/zh-tw/wiki_syntax_detailed_markdown.html b/public/help/zh-tw/wiki_syntax_detailed_markdown.html
          index bb1174b0c..8db884791 100644
          --- a/public/help/zh-tw/wiki_syntax_detailed_markdown.html
          +++ b/public/help/zh-tw/wiki_syntax_detailed_markdown.html
          @@ -145,7 +145,7 @@
           
                   

          外部連結

          -

          HTTP URLs 與電子郵件地址會自動被轉換成可被點擊的連結:

          +

          URLs (http, https, ftp, and ftps) and email addresses are automatically turned into clickable links:

           http://www.redmine.org, someone@foo.bar
          diff --git a/public/help/zh-tw/wiki_syntax_detailed_textile.html b/public/help/zh-tw/wiki_syntax_detailed_textile.html
          index 626c54845..b2cde87c1 100644
          --- a/public/help/zh-tw/wiki_syntax_detailed_textile.html
          +++ b/public/help/zh-tw/wiki_syntax_detailed_textile.html
          @@ -136,7 +136,7 @@
           
                   

          外部連結

          -

          HTTP URLs 與電子郵件地址會自動被轉換成可被點擊的連結:

          +

          URLs (http, https, ftp, and ftps) and email addresses are automatically turned into clickable links:

           http://www.redmine.org, someone@foo.bar
          diff --git a/public/help/zh/wiki_syntax_detailed_markdown.html b/public/help/zh/wiki_syntax_detailed_markdown.html
          index e150d95c7..a5b3f959c 100644
          --- a/public/help/zh/wiki_syntax_detailed_markdown.html
          +++ b/public/help/zh/wiki_syntax_detailed_markdown.html
          @@ -145,7 +145,7 @@
           
                   

          External links

          -

          HTTP URLs and email addresses are automatically turned into clickable links:

          +

          URLs (http, https, ftp, and ftps) and email addresses are automatically turned into clickable links:

           http://www.redmine.org, someone@foo.bar
          diff --git a/public/help/zh/wiki_syntax_detailed_textile.html b/public/help/zh/wiki_syntax_detailed_textile.html
          index cffe8a52c..88c4669c5 100644
          --- a/public/help/zh/wiki_syntax_detailed_textile.html
          +++ b/public/help/zh/wiki_syntax_detailed_textile.html
          @@ -136,7 +136,7 @@
           
                   

          外部链接

          -

          HTTP链接和Email地址可以被自动转换成可点击的链接:

          +

          URLs (http, https, ftp, and ftps) and email addresses are automatically turned into clickable links:

           http://www.redmine.org, someone@foo.bar
          
          From df347c5c017d50a503c4c0b630fd45bb77452b44 Mon Sep 17 00:00:00 2001
          From: Jean-Philippe Lang 
          Date: Mon, 3 Apr 2017 05:49:16 +0000
          Subject: [PATCH 0756/1117] Restore timestamp in asset paths (#24617).
          
          Patch by Hiroshi Shirosaki.
          
          git-svn-id: http://svn.redmine.org/redmine/trunk@16448 e93f8b46-1217-0410-a6f0-8f06a7374b81
          ---
           config/initializers/10-patches.rb | 51 +++++++++++++++++++++++++++++++
           test/integration/layout_test.rb   |  2 +-
           2 files changed, 52 insertions(+), 1 deletion(-)
          
          diff --git a/config/initializers/10-patches.rb b/config/initializers/10-patches.rb
          index 671b6df40..2693f83f4 100644
          --- a/config/initializers/10-patches.rb
          +++ b/config/initializers/10-patches.rb
          @@ -187,3 +187,54 @@ module ActionController
               end
             end
           end
          +
          +# Adds asset_id parameters to assets like Rails 3 to invalidate caches in browser
          +module ActionView
          +  module Helpers
          +    module AssetUrlHelper
          +      @@cache_asset_timestamps = Rails.env.production?
          +      @@asset_timestamps_cache = {}
          +      @@asset_timestamps_cache_guard = Mutex.new
          +
          +      def asset_path_with_asset_id(source, options = {})
          +        asset_id = rails_asset_id(source, options)
          +        unless asset_id.blank?
          +          source += "?#{asset_id}"
          +        end
          +        asset_path(source, options)
          +      end
          +      alias :path_to_asset :asset_path_with_asset_id
          +
          +      def rails_asset_id(source, options = {})
          +        if asset_id = ENV["RAILS_ASSET_ID"]
          +          asset_id
          +        else
          +          if @@cache_asset_timestamps && (asset_id = @@asset_timestamps_cache[source])
          +            asset_id
          +          else
          +            extname = compute_asset_extname(source, options)
          +            path = File.join(Rails.public_path, "#{source}#{extname}")
          +            exist = false
          +            if File.exist? path
          +              exist = true
          +            else
          +              path = File.join(Rails.public_path, compute_asset_path("#{source}#{extname}", options))
          +              if File.exist? path
          +                exist = true
          +              end
          +            end
          +            asset_id = exist ? File.mtime(path).to_i.to_s : ''
          +
          +            if @@cache_asset_timestamps
          +              @@asset_timestamps_cache_guard.synchronize do
          +                @@asset_timestamps_cache[source] = asset_id
          +              end
          +            end
          +
          +            asset_id
          +          end
          +        end
          +      end
          +    end
          +  end
          +end
          \ No newline at end of file
          diff --git a/test/integration/layout_test.rb b/test/integration/layout_test.rb
          index 2fcf6dab6..1fe1a355e 100644
          --- a/test/integration/layout_test.rb
          +++ b/test/integration/layout_test.rb
          @@ -63,7 +63,7 @@ class LayoutTest < Redmine::IntegrationTest
               Role.anonymous.add_permission! :add_issues
           
               get '/projects/ecookbook/issues/new'
          -    assert_select 'head script[src=?]', '/javascripts/jstoolbar/jstoolbar-textile.min.js'
          +    assert_select 'head script[src^=?]', '/javascripts/jstoolbar/jstoolbar-textile.min.js?'
             end
           
             def test_calendar_header_tags
          
          From 1ab58b6aa580326f6841cd897fc1675bd2c5cb82 Mon Sep 17 00:00:00 2001
          From: Jean-Philippe Lang 
          Date: Mon, 3 Apr 2017 06:49:06 +0000
          Subject: [PATCH 0757/1117] Adds a User.admin scope (#25416).
          
          git-svn-id: http://svn.redmine.org/redmine/trunk@16449 e93f8b46-1217-0410-a6f0-8f06a7374b81
          ---
           app/models/user.rb     |  6 +++++-
           test/unit/user_test.rb | 20 +++++++++++++++++++-
           2 files changed, 24 insertions(+), 2 deletions(-)
          
          diff --git a/app/models/user.rb b/app/models/user.rb
          index 150cc27bb..815a6d343 100644
          --- a/app/models/user.rb
          +++ b/app/models/user.rb
          @@ -129,6 +129,10 @@ class User < Principal
             after_save :update_notified_project_ids, :destroy_tokens, :deliver_security_notification
             after_destroy :deliver_security_notification
           
          +  scope :admin, lambda {|*args|
          +    admin = args.size > 0 ? !!args.first : true
          +    where(:admin => admin)
          +  }
             scope :in_group, lambda {|group|
               group_id = group.is_a?(Group) ? group.id : group.to_i
               where("#{User.table_name}.id IN (SELECT gu.user_id FROM #{table_name_prefix}groups_users#{table_name_suffix} gu WHERE gu.group_id = ?)", group_id)
          @@ -707,7 +711,7 @@ class User < Principal
             # Returns true if the user is allowed to delete the user's own account
             def own_account_deletable?
               Setting.unsubscribe? &&
          -      (!admin? || User.active.where("admin = ? AND id <> ?", true, id).exists?)
          +      (!admin? || User.active.admin.where("id <> ?", id).exists?)
             end
           
             safe_attributes 'firstname',
          diff --git a/test/unit/user_test.rb b/test/unit/user_test.rb
          index 655a8affc..48c4cb3d4 100644
          --- a/test/unit/user_test.rb
          +++ b/test/unit/user_test.rb
          @@ -36,6 +36,24 @@ class UserTest < ActiveSupport::TestCase
               @dlopper = User.find(3)
             end
           
          +  def test_admin_scope_without_args_should_return_admin_users
          +    users = User.admin.to_a
          +    assert users.any?
          +    assert users.all? {|u| u.admin == true}
          +  end
          +
          +  def test_admin_scope_with_true_should_return_admin_users
          +    users = User.admin(true).to_a
          +    assert users.any?
          +    assert users.all? {|u| u.admin == true}
          +  end
          +
          +  def test_admin_scope_with_false_should_return_non_admin_users
          +    users = User.admin(false).to_a
          +    assert users.any?
          +    assert users.all? {|u| u.admin == false}
          +  end
          +
             def test_sorted_scope_should_sort_user_by_display_name
               # Use .active to ignore anonymous with localized display name
               assert_equal User.active.map(&:name).map(&:downcase).sort,
          @@ -1049,7 +1067,7 @@ class UserTest < ActiveSupport::TestCase
             end
           
             def test_own_account_deletable_should_be_false_for_a_single_admin
          -    User.where(["admin = ? AND id <> ?", true, 1]).delete_all
          +    User.admin.where("id <> ?", 1).delete_all
           
               with_settings :unsubscribe => '1' do
                 assert_equal false, User.find(1).own_account_deletable?
          
          From 2879071f3b73e597b8b0eca490e8710a9de8dbca Mon Sep 17 00:00:00 2001
          From: Jean-Philippe Lang 
          Date: Mon, 3 Apr 2017 09:33:27 +0000
          Subject: [PATCH 0758/1117] Timelog move between projects (#588).
          
          Patch by Marius BALTEANU.
          
          git-svn-id: http://svn.redmine.org/redmine/trunk@16450 e93f8b46-1217-0410-a6f0-8f06a7374b81
          ---
           app/views/timelog/_form.html.erb           | 24 +++++++------
           app/views/timelog/edit.js.erb              |  1 +
           test/functional/timelog_controller_test.rb | 39 ++++++++++++++++++++++
           3 files changed, 53 insertions(+), 11 deletions(-)
          
          diff --git a/app/views/timelog/_form.html.erb b/app/views/timelog/_form.html.erb
          index 2d1134c4c..aa62ffc78 100644
          --- a/app/views/timelog/_form.html.erb
          +++ b/app/views/timelog/_form.html.erb
          @@ -2,15 +2,14 @@
           <%= back_url_hidden_field_tag %>
           
           
          - <% if @time_entry.new_record? %> - <% if params[:project_id] %> - <%= hidden_field_tag 'project_id', params[:project_id] %> - <% elsif params[:issue_id] %> - <%= hidden_field_tag 'issue_id', params[:issue_id] %> - <% else %> -

          <%= f.select :project_id, project_tree_options_for_select(Project.allowed_to(:log_time).to_a, :selected => @time_entry.project, :include_blank => true), :required => true %>

          - <% end %> + <% if @time_entry.new_record? && params[:project_id] %> + <%= hidden_field_tag 'project_id', params[:project_id] %> + <% elsif @time_entry.new_record? && params[:issue_id] %> + <%= hidden_field_tag 'issue_id', params[:issue_id] %> + <% else %> +

          <%= f.select :project_id, project_tree_options_for_select(Project.allowed_to(:log_time).to_a, :selected => @time_entry.project, :include_blank => true), :required => true %>

          <% end %> +

          <%= f.text_field :issue_id, :size => 6, :required => Setting.timelog_required_fields.include?('issue_id') %> @@ -29,6 +28,9 @@ <%= javascript_tag do %> $(document).ready(function(){ + $('#time_entry_project_id').change(function(){ + $('#time_entry_issue_id').val(''); + }); $('#time_entry_project_id, #time_entry_issue_id').change(function(){ $.ajax({ url: '<%= escape_javascript(@time_entry.new_record? ? new_time_entry_path(:format => 'js') : edit_time_entry_path(:format => 'js')) %>', @@ -45,10 +47,10 @@ term: request.term }; var project_id; - <% if @project %> - project_id = '<%= @project.id %>'; + <% if @time_entry.new_record? && @project %> + project_id = '<%= @project.id %>'; <% else %> - project_id = $('#time_entry_project_id').val(); + project_id = $('#time_entry_project_id').val(); <% end %> if(project_id){ data['project_id'] = project_id; diff --git a/app/views/timelog/edit.js.erb b/app/views/timelog/edit.js.erb index cd7861140..4cba8cfe6 100644 --- a/app/views/timelog/edit.js.erb +++ b/app/views/timelog/edit.js.erb @@ -1 +1,2 @@ +$('#time_entry_activity_id').html('<%= escape_javascript options_for_select(activity_collection_for_select_options(@time_entry), @time_entry.activity_id) %>'); $('#time_entry_issue').html('<%= escape_javascript link_to_issue(@time_entry.issue) if @time_entry.issue.try(:visible?) %>'); diff --git a/test/functional/timelog_controller_test.rb b/test/functional/timelog_controller_test.rb index baad0c95d..ead919006 100644 --- a/test/functional/timelog_controller_test.rb +++ b/test/functional/timelog_controller_test.rb @@ -125,6 +125,14 @@ class TimelogControllerTest < Redmine::ControllerTest assert_select 'option', :text => '--- Please select ---' end + def test_get_edit_should_show_projects_select + @request.session[:user_id] = 2 + get :edit, :params => {:id => 2, :project_id => nil} + assert_response :success + + assert_select 'select[name=?]', 'time_entry[project_id]' + end + def test_post_create @request.session[:user_id] = 3 assert_difference 'TimeEntry.count' do @@ -489,6 +497,37 @@ class TimelogControllerTest < Redmine::ControllerTest assert_select_error /Issue is invalid/ end + def test_update_should_allow_to_change_project + entry = TimeEntry.generate!(:project_id => 1) + + @request.session[:user_id] = 1 + put :update, :params => { + :id => entry.id, + :time_entry => { + :project_id => '2' + } + } + assert_response 302 + entry.reload + + assert_equal 2, entry.project_id + end + + def test_update_should_fail_with_issue_from_another_project + entry = TimeEntry.generate!(:project_id => 1, :issue_id => 1) + + @request.session[:user_id] = 1 + put :update, :params => { + :id => entry.id, + :time_entry => { + :project_id => '2' + } + } + + assert_response :success + assert_select_error /Issue is invalid/ + end + def test_get_bulk_edit @request.session[:user_id] = 2 From 756a102820968a1ef7f0fbc4a79a0937f4f9867d Mon Sep 17 00:00:00 2001 From: Jean-Philippe Lang Date: Mon, 3 Apr 2017 10:30:29 +0000 Subject: [PATCH 0759/1117] Reset status when copying issues (#23610). git-svn-id: http://svn.redmine.org/redmine/trunk@16451 e93f8b46-1217-0410-a6f0-8f06a7374b81 --- app/models/issue.rb | 10 ++++------ app/models/project.rb | 2 +- test/fixtures/workflows.yml | 7 +++++++ test/functional/issues_controller_test.rb | 2 +- test/unit/issue_test.rb | 12 ++++++------ 5 files changed, 19 insertions(+), 14 deletions(-) diff --git a/app/models/issue.rb b/app/models/issue.rb index 6141780a5..d7ef5eded 100644 --- a/app/models/issue.rb +++ b/app/models/issue.rb @@ -265,9 +265,11 @@ class Issue < ActiveRecord::Base # Copies attributes from another issue, arg can be an id or an Issue def copy_from(arg, options={}) issue = arg.is_a?(Issue) ? arg : Issue.visible.find(arg) - self.attributes = issue.attributes.dup.except("id", "root_id", "parent_id", "lft", "rgt", "created_on", "updated_on", "closed_on") + self.attributes = issue.attributes.dup.except("id", "root_id", "parent_id", "lft", "rgt", "created_on", "updated_on", "status_id", "closed_on") self.custom_field_values = issue.custom_field_values.inject({}) {|h,v| h[v.custom_field_id] = v.value; h} - self.status = issue.status + if options[:keep_status] + self.status = issue.status + end self.author = User.current unless options[:attachments] == false self.attachments = issue.attachments.map do |attachement| @@ -973,10 +975,6 @@ class Issue < ActiveRecord::Base statuses << initial_status unless statuses.empty? statuses << default_status if include_default || (new_record? && statuses.empty?) - if new_record? && @copied_from - statuses << @copied_from.status - end - statuses = statuses.compact.uniq.sort if blocked? || descendants.open.any? # cannot close a blocked issue or a parent with open subtasks diff --git a/app/models/project.rb b/app/models/project.rb index 942affe11..3d8878ca2 100644 --- a/app/models/project.rb +++ b/app/models/project.rb @@ -952,7 +952,7 @@ class Project < ActiveRecord::Base # get copied before their children project.issues.reorder('root_id, lft').each do |issue| new_issue = Issue.new - new_issue.copy_from(issue, :subtasks => false, :link => false) + new_issue.copy_from(issue, :subtasks => false, :link => false, :keep_status => true) new_issue.project = self # Changing project resets the custom field values # TODO: handle this in Issue#project= diff --git a/test/fixtures/workflows.yml b/test/fixtures/workflows.yml index c6ae675fa..b249c948d 100644 --- a/test/fixtures/workflows.yml +++ b/test/fixtures/workflows.yml @@ -1924,3 +1924,10 @@ WorkflowTransitions_276: id: 276 tracker_id: 2 type: WorkflowTransition +WorkflowTransitions_277: + new_status_id: 1 + role_id: 2 + old_status_id: 0 + id: 277 + tracker_id: 1 + type: WorkflowTransition diff --git a/test/functional/issues_controller_test.rb b/test/functional/issues_controller_test.rb index 10ed24c1c..a6f7cd13a 100644 --- a/test/functional/issues_controller_test.rb +++ b/test/functional/issues_controller_test.rb @@ -4581,7 +4581,7 @@ class IssuesControllerTest < Redmine::ControllerTest assert_not_nil copy assert_equal orig.project_id, copy.project_id assert_equal orig.tracker_id, copy.tracker_id - assert_equal orig.status_id, copy.status_id + assert_equal 1, copy.status_id if orig.assigned_to_id assert_equal orig.assigned_to_id, copy.assigned_to_id else diff --git a/test/unit/issue_test.rb b/test/unit/issue_test.rb index 60ba42f80..36cbc6dcb 100644 --- a/test/unit/issue_test.rb +++ b/test/unit/issue_test.rb @@ -794,13 +794,13 @@ class IssueTest < ActiveSupport::TestCase assert_equal expected_statuses, issue.new_statuses_allowed_to(admin) end - def test_new_statuses_allowed_to_should_return_allowed_statuses_and_current_status_when_copying + def test_new_statuses_allowed_to_should_return_allowed_statuses_when_copying Tracker.find(1).generate_transitions! :role_id => 1, :clear => true, 0 => [1, 3] orig = Issue.generate!(:project_id => 1, :tracker_id => 1, :status_id => 4) issue = orig.copy - assert_equal [1, 3, 4], issue.new_statuses_allowed_to(User.find(2)).map(&:id) - assert_equal 4, issue.status_id + assert_equal [1, 3], issue.new_statuses_allowed_to(User.find(2)).map(&:id) + assert_equal 1, issue.status_id end def test_safe_attributes_names_should_not_include_disabled_field @@ -1225,11 +1225,11 @@ class IssueTest < ActiveSupport::TestCase assert_nil issue.assigned_to end - def test_copy_should_copy_status + def test_copy_with_keep_status_should_copy_status orig = Issue.find(8) assert orig.status != orig.default_status - issue = Issue.new.copy_from(orig) + issue = Issue.new.copy_from(orig, :keep_status => true) assert issue.save issue.reload assert_equal orig.status, issue.status @@ -1331,7 +1331,7 @@ class IssueTest < ActiveSupport::TestCase assert copied_open.save assert_nil copied_open.closed_on - copied_closed = Issue.find(8).copy + copied_closed = Issue.find(8).copy({}, :keep_status => 1) assert copied_closed.save assert_not_nil copied_closed.closed_on end From 91e24303012163d1fcdf91361486c3a80d1a1a4c Mon Sep 17 00:00:00 2001 From: Jean-Philippe Lang Date: Mon, 3 Apr 2017 10:36:26 +0000 Subject: [PATCH 0760/1117] Renaming "duplicates" and "duplicated by" to something less confusing (#10250). git-svn-id: http://svn.redmine.org/redmine/trunk@16452 e93f8b46-1217-0410-a6f0-8f06a7374b81 --- config/locales/en-GB.yml | 4 ++-- config/locales/en.yml | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/config/locales/en-GB.yml b/config/locales/en-GB.yml index b626aaf9d..9f8d254be 100644 --- a/config/locales/en-GB.yml +++ b/config/locales/en-GB.yml @@ -691,8 +691,8 @@ en-GB: label_relation_new: New relation label_relation_delete: Delete relation label_relates_to: related to - label_duplicates: duplicates - label_duplicated_by: duplicated by + label_duplicates: is duplicate of + label_duplicated_by: has duplicate label_blocks: blocks label_blocked_by: blocked by label_precedes: precedes diff --git a/config/locales/en.yml b/config/locales/en.yml index 531081f78..8388d4216 100644 --- a/config/locales/en.yml +++ b/config/locales/en.yml @@ -814,8 +814,8 @@ en: label_relation_new: New relation label_relation_delete: Delete relation label_relates_to: Related to - label_duplicates: Duplicates - label_duplicated_by: Duplicated by + label_duplicates: Is duplicate of + label_duplicated_by: Has duplicate label_blocks: Blocks label_blocked_by: Blocked by label_precedes: Precedes From 9441ab0ca8e8c4a51bf6716dbdaae0aea4f3fa21 Mon Sep 17 00:00:00 2001 From: Jean-Philippe Lang Date: Mon, 3 Apr 2017 10:48:59 +0000 Subject: [PATCH 0761/1117] Send email even if password is not changed (#7577). git-svn-id: http://svn.redmine.org/redmine/trunk@16453 e93f8b46-1217-0410-a6f0-8f06a7374b81 --- app/controllers/users_controller.rb | 2 +- app/views/mailer/account_information.html.erb | 2 ++ app/views/mailer/account_information.text.erb | 2 +- app/views/users/_general.html.erb | 2 +- app/views/users/new.html.erb | 2 +- 5 files changed, 6 insertions(+), 4 deletions(-) diff --git a/app/controllers/users_controller.rb b/app/controllers/users_controller.rb index 60600a252..7dcaa7962 100644 --- a/app/controllers/users_controller.rb +++ b/app/controllers/users_controller.rb @@ -140,7 +140,7 @@ class UsersController < ApplicationController if was_activated Mailer.account_activated(@user).deliver - elsif @user.active? && params[:send_information] && @user.password.present? && @user.auth_source_id.nil? && @user != User.current + elsif @user.active? && params[:send_information] && @user != User.current Mailer.account_information(@user, @user.password).deliver end diff --git a/app/views/mailer/account_information.html.erb b/app/views/mailer/account_information.html.erb index 4d4066d65..d010431ab 100644 --- a/app/views/mailer/account_information.html.erb +++ b/app/views/mailer/account_information.html.erb @@ -4,7 +4,9 @@

          <%= l(:mail_body_account_information) %>:

          • <%= l(:field_login) %>: <%= @user.login %>
          • + <% if @password %>
          • <%= l(:field_password) %>: <%= @password %>
          • + <% end %>
          <% end %> diff --git a/app/views/mailer/account_information.text.erb b/app/views/mailer/account_information.text.erb index 0a02566d9..f2f37d9c3 100644 --- a/app/views/mailer/account_information.text.erb +++ b/app/views/mailer/account_information.text.erb @@ -1,6 +1,6 @@ <% if @user.auth_source %><%= l(:mail_body_account_information_external, @user.auth_source.name) %> <% else %><%= l(:mail_body_account_information) %>: * <%= l(:field_login) %>: <%= @user.login %> -* <%= l(:field_password) %>: <%= @password %> +<% if @password %>* <%= l(:field_password) %>: <%= @password %><% end %> <% end %> <%= l(:label_login) %>: <%= @login_url %> diff --git a/app/views/users/_general.html.erb b/app/views/users/_general.html.erb index fddea54bb..c9398577c 100644 --- a/app/views/users/_general.html.erb +++ b/app/views/users/_general.html.erb @@ -1,7 +1,7 @@ <%= labelled_form_for @user, :html => {:multipart => true} do |f| %> <%= render :partial => 'form', :locals => { :f => f } %> <% if @user.active? && email_delivery_enabled? && @user != User.current -%> -

          +

          <% end -%>

          <%= submit_tag l(:button_save) %>

          <% end %> diff --git a/app/views/users/new.html.erb b/app/views/users/new.html.erb index e9eb102f8..088f272e4 100644 --- a/app/views/users/new.html.erb +++ b/app/views/users/new.html.erb @@ -3,7 +3,7 @@ <%= labelled_form_for @user, :html => {:multipart => true} do |f| %> <%= render :partial => 'form', :locals => { :f => f } %> <% if email_delivery_enabled? %> -

          +

          <% end %>

          <%= submit_tag l(:button_create) %> From 30f7be9c19777d2b8ec88507a466bd35ffa523e3 Mon Sep 17 00:00:00 2001 From: Jean-Philippe Lang Date: Mon, 3 Apr 2017 11:11:36 +0000 Subject: [PATCH 0762/1117] Changes the digest used for attachments to SHA256 (#25240). Patch by Jens Kraemer. git-svn-id: http://svn.redmine.org/redmine/trunk@16454 e93f8b46-1217-0410-a6f0-8f06a7374b81 --- app/models/attachment.rb | 10 +++++----- ...0302015225_change_attachments_digest_limit_to_64.rb | 8 ++++++++ test/unit/attachment_test.rb | 4 ++-- test/unit/mail_handler_test.rb | 10 +++++----- 4 files changed, 20 insertions(+), 12 deletions(-) create mode 100644 db/migrate/20170302015225_change_attachments_digest_limit_to_64.rb diff --git a/app/models/attachment.rb b/app/models/attachment.rb index 52c782521..3bfecfc7b 100644 --- a/app/models/attachment.rb +++ b/app/models/attachment.rb @@ -15,7 +15,7 @@ # along with this program; if not, write to the Free Software # Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. -require "digest/md5" +require "digest" require "fileutils" class Attachment < ActiveRecord::Base @@ -116,20 +116,20 @@ class Attachment < ActiveRecord::Base unless File.directory?(path) FileUtils.mkdir_p(path) end - md5 = Digest::MD5.new + sha = Digest::SHA256.new File.open(diskfile, "wb") do |f| if @temp_file.respond_to?(:read) buffer = "" while (buffer = @temp_file.read(8192)) f.write(buffer) - md5.update(buffer) + sha.update(buffer) end else f.write(@temp_file) - md5.update(@temp_file) + sha.update(@temp_file) end end - self.digest = md5.hexdigest + self.digest = sha.hexdigest end @temp_file = nil diff --git a/db/migrate/20170302015225_change_attachments_digest_limit_to_64.rb b/db/migrate/20170302015225_change_attachments_digest_limit_to_64.rb new file mode 100644 index 000000000..df710e82c --- /dev/null +++ b/db/migrate/20170302015225_change_attachments_digest_limit_to_64.rb @@ -0,0 +1,8 @@ +class ChangeAttachmentsDigestLimitTo64 < ActiveRecord::Migration + def up + change_column :attachments, :digest, :string, limit: 64 + end + def down + change_column :attachments, :digest, :string, limit: 40 + end +end diff --git a/test/unit/attachment_test.rb b/test/unit/attachment_test.rb index 81d7e3cbd..a70009d23 100644 --- a/test/unit/attachment_test.rb +++ b/test/unit/attachment_test.rb @@ -62,7 +62,7 @@ class AttachmentTest < ActiveSupport::TestCase assert_equal 59, a.filesize assert_equal 'text/plain', a.content_type assert_equal 0, a.downloads - assert_equal '1478adae0d4eb06d35897518540e25d6', a.digest + assert_equal '6bc2eb7e87cfbf9145065689aaa8b5f513089ca0af68e2dc41f9cc025473d106', a.digest assert a.disk_directory assert_match %r{\A\d{4}/\d{2}\z}, a.disk_directory @@ -188,7 +188,7 @@ class AttachmentTest < ActiveSupport::TestCase assert_equal 59, a.filesize assert_equal 'text/plain', a.content_type assert_equal 0, a.downloads - assert_equal '1478adae0d4eb06d35897518540e25d6', a.digest + assert_equal '6bc2eb7e87cfbf9145065689aaa8b5f513089ca0af68e2dc41f9cc025473d106', a.digest diskfile = a.diskfile assert File.exist?(diskfile) assert_equal 59, File.size(a.diskfile) diff --git a/test/unit/mail_handler_test.rb b/test/unit/mail_handler_test.rb index e6c20481e..cbfcfa7ad 100644 --- a/test/unit/mail_handler_test.rb +++ b/test/unit/mail_handler_test.rb @@ -522,7 +522,7 @@ class MailHandlerTest < ActiveSupport::TestCase assert_equal 10790, attachment.filesize assert File.exist?(attachment.diskfile) assert_equal 10790, File.size(attachment.diskfile) - assert_equal 'caaf384198bcbc9563ab5c058acd73cd', attachment.digest + assert_equal '4474dd534c36bdd212e2efc549507377c3e77147c9167b66dedcebfe9da8807f', attachment.digest end def test_thunderbird_with_attachment_ja @@ -538,7 +538,7 @@ class MailHandlerTest < ActiveSupport::TestCase assert_equal 5, attachment.filesize assert File.exist?(attachment.diskfile) assert_equal 5, File.size(attachment.diskfile) - assert_equal 'd8e8fca2dc0f896fd7cb4cb0031ba249', attachment.digest + assert_equal 'f2ca1bb6c7e907d06dafe4687e579fce76b37e4e93b7605022da52e6ccc26fd2', attachment.digest end def test_invalid_utf8 @@ -564,7 +564,7 @@ class MailHandlerTest < ActiveSupport::TestCase assert_equal 5, attachment.filesize assert File.exist?(attachment.diskfile) assert_equal 5, File.size(attachment.diskfile) - assert_equal 'd8e8fca2dc0f896fd7cb4cb0031ba249', attachment.digest + assert_equal 'f2ca1bb6c7e907d06dafe4687e579fce76b37e4e93b7605022da52e6ccc26fd2', attachment.digest end def test_thunderbird_with_attachment_latin1 @@ -582,7 +582,7 @@ class MailHandlerTest < ActiveSupport::TestCase assert_equal 130, attachment.filesize assert File.exist?(attachment.diskfile) assert_equal 130, File.size(attachment.diskfile) - assert_equal '4d80e667ac37dddfe05502530f152abb', attachment.digest + assert_equal '5635d67364de20432247e651dfe86fcb2265ad5e9750bd8bba7319a86363e738', attachment.digest end def test_gmail_with_attachment_latin1 @@ -600,7 +600,7 @@ class MailHandlerTest < ActiveSupport::TestCase assert_equal 5, attachment.filesize assert File.exist?(attachment.diskfile) assert_equal 5, File.size(attachment.diskfile) - assert_equal 'd8e8fca2dc0f896fd7cb4cb0031ba249', attachment.digest + assert_equal 'f2ca1bb6c7e907d06dafe4687e579fce76b37e4e93b7605022da52e6ccc26fd2', attachment.digest end def test_mail_with_attachment_latin2 From ee84b6b24ce29905f5e28613fd59e0cfd637dfcc Mon Sep 17 00:00:00 2001 From: Jean-Philippe Lang Date: Mon, 3 Apr 2017 11:38:06 +0000 Subject: [PATCH 0763/1117] Adds a rake task to update attachments digests to SHA256 (#25240). MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Patch by Jens Krämer. git-svn-id: http://svn.redmine.org/redmine/trunk@16455 e93f8b46-1217-0410-a6f0-8f06a7374b81 --- app/models/attachment.rb | 23 ++++++++++++++++++++++- lib/tasks/redmine.rake | 5 +++++ test/unit/attachment_test.rb | 9 +++++++++ 3 files changed, 36 insertions(+), 1 deletion(-) diff --git a/app/models/attachment.rb b/app/models/attachment.rb index 3bfecfc7b..d68a050c1 100644 --- a/app/models/attachment.rb +++ b/app/models/attachment.rb @@ -252,7 +252,7 @@ class Attachment < ActiveRecord::Base # Returns true if the file is readable def readable? - File.readable?(diskfile) + disk_filename.present? && File.readable?(diskfile) end # Returns the attachment token @@ -352,6 +352,27 @@ class Attachment < ActiveRecord::Base end end + # Updates digests to SHA256 for all attachments that have a MD5 digest + # (ie. created before Redmine 3.4) + def self.update_digests_to_sha256 + Attachment.where("length(digest) < 64").find_each do |attachment| + attachment.update_digest_to_sha256! + end + end + + # Updates attachment digest to SHA256 + def update_digest_to_sha256! + if readable? + sha = Digest::SHA256.new + File.open(diskfile, 'rb') do |f| + while buffer = f.read(8192) + sha.update(buffer) + end + end + update_column :digest, sha.hexdigest + end + end + # Returns true if the extension is allowed regarding allowed/denied # extensions defined in application settings, otherwise false def self.valid_extension?(extension) diff --git a/lib/tasks/redmine.rake b/lib/tasks/redmine.rake index f1827bb65..734cad0a4 100644 --- a/lib/tasks/redmine.rake +++ b/lib/tasks/redmine.rake @@ -26,6 +26,11 @@ namespace :redmine do task :move_to_subdirectories => :environment do Attachment.move_from_root_to_target_directory end + + desc 'Updates attachment digests to SHA256' + task :update_digests => :environment do + Attachment.update_digests_to_sha256 + end end namespace :tokens do diff --git a/test/unit/attachment_test.rb b/test/unit/attachment_test.rb index a70009d23..16f02e51a 100644 --- a/test/unit/attachment_test.rb +++ b/test/unit/attachment_test.rb @@ -332,6 +332,14 @@ class AttachmentTest < ActiveSupport::TestCase assert_equal 'text/plain', attachment.content_type end + def test_update_digest_to_sha256_should_update_digest + set_fixtures_attachments_directory + attachment = Attachment.find 6 + assert attachment.readable? + attachment.update_digest_to_sha256! + assert_equal 'ac5c6e99a21ae74b2e3f5b8e5b568be1b9107cd7153d139e822b9fe5caf50938', attachment.digest + end + def test_update_attachments attachments = Attachment.where(:id => [2, 3]).to_a @@ -430,4 +438,5 @@ class AttachmentTest < ActiveSupport::TestCase else puts '(ImageMagick convert not available)' end + end From 1e179a9bbca40044ca881bdd93f7311d6662978c Mon Sep 17 00:00:00 2001 From: Jean-Philippe Lang Date: Mon, 3 Apr 2017 11:41:52 +0000 Subject: [PATCH 0764/1117] Change MD5 table header to Checksum (#25240). MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Patch by Jens Krämer. git-svn-id: http://svn.redmine.org/redmine/trunk@16456 e93f8b46-1217-0410-a6f0-8f06a7374b81 --- app/models/attachment.rb | 5 +++++ app/views/files/index.html.erb | 4 ++-- config/locales/en.yml | 1 + 3 files changed, 8 insertions(+), 2 deletions(-) diff --git a/app/models/attachment.rb b/app/models/attachment.rb index d68a050c1..1e4f731e7 100644 --- a/app/models/attachment.rb +++ b/app/models/attachment.rb @@ -404,6 +404,11 @@ class Attachment < ActiveRecord::Base self.class.extension_in?(File.extname(filename), extensions) end + # returns either MD5 or SHA256 depending on the way self.digest was computed + def digest_type + digest.size < 64 ? "MD5" : "SHA256" if digest.present? + end + private # Physically deletes the file from the file system diff --git a/app/views/files/index.html.erb b/app/views/files/index.html.erb index 50e7bd966..5c827c195 100644 --- a/app/views/files/index.html.erb +++ b/app/views/files/index.html.erb @@ -12,7 +12,7 @@ <%= sort_header_tag('created_on', :caption => l(:label_date), :default_order => 'desc') %> <%= sort_header_tag('size', :caption => l(:field_filesize), :default_order => 'desc') %> <%= sort_header_tag('downloads', :caption => l(:label_downloads_abbr), :default_order => 'desc') %> - MD5 + <%= l(:field_digest) %> @@ -31,7 +31,7 @@ <%= format_time(file.created_on) %> <%= number_to_human_size(file.filesize) %> <%= file.downloads %> - <%= file.digest %> + <%= file.digest_type %>: <%= file.digest %> <%= link_to(image_tag('delete.png'), attachment_path(file), :data => {:confirm => l(:text_are_you_sure)}, :method => :delete) if delete_allowed %> diff --git a/config/locales/en.yml b/config/locales/en.yml index 8388d4216..5adcb8f8f 100644 --- a/config/locales/en.yml +++ b/config/locales/en.yml @@ -373,6 +373,7 @@ en: field_updated_by: Updated by field_last_updated_by: Last updated by field_full_width_layout: Full width layout + field_digest: Checksum setting_app_title: Application title setting_app_subtitle: Application subtitle From d65e920307c89e9ad7a1e7f85865ab7198f89cd7 Mon Sep 17 00:00:00 2001 From: Jean-Philippe Lang Date: Mon, 3 Apr 2017 11:42:53 +0000 Subject: [PATCH 0765/1117] Adds :field_digest string to locales (#25240). git-svn-id: http://svn.redmine.org/redmine/trunk@16457 e93f8b46-1217-0410-a6f0-8f06a7374b81 --- config/locales/ar.yml | 1 + config/locales/az.yml | 1 + config/locales/bg.yml | 1 + config/locales/bs.yml | 1 + config/locales/ca.yml | 1 + config/locales/cs.yml | 1 + config/locales/da.yml | 1 + config/locales/de.yml | 1 + config/locales/el.yml | 1 + config/locales/en-GB.yml | 1 + config/locales/es-PA.yml | 1 + config/locales/es.yml | 1 + config/locales/et.yml | 1 + config/locales/eu.yml | 1 + config/locales/fa.yml | 1 + config/locales/fi.yml | 1 + config/locales/fr.yml | 1 + config/locales/gl.yml | 1 + config/locales/he.yml | 1 + config/locales/hr.yml | 1 + config/locales/hu.yml | 1 + config/locales/id.yml | 1 + config/locales/it.yml | 1 + config/locales/ja.yml | 1 + config/locales/ko.yml | 1 + config/locales/lt.yml | 1 + config/locales/lv.yml | 1 + config/locales/mk.yml | 1 + config/locales/mn.yml | 1 + config/locales/nl.yml | 1 + config/locales/no.yml | 1 + config/locales/pl.yml | 1 + config/locales/pt-BR.yml | 1 + config/locales/pt.yml | 1 + config/locales/ro.yml | 1 + config/locales/ru.yml | 1 + config/locales/sk.yml | 1 + config/locales/sl.yml | 1 + config/locales/sq.yml | 1 + config/locales/sr-YU.yml | 1 + config/locales/sr.yml | 1 + config/locales/sv.yml | 1 + config/locales/th.yml | 1 + config/locales/tr.yml | 1 + config/locales/uk.yml | 1 + config/locales/vi.yml | 1 + config/locales/zh-TW.yml | 1 + config/locales/zh.yml | 1 + 48 files changed, 48 insertions(+) diff --git a/config/locales/ar.yml b/config/locales/ar.yml index ce7362e00..8dca1dbfa 100644 --- a/config/locales/ar.yml +++ b/config/locales/ar.yml @@ -1222,3 +1222,4 @@ ar: field_last_updated_by: Last updated by field_full_width_layout: Full width layout label_last_notes: Last notes + field_digest: Checksum diff --git a/config/locales/az.yml b/config/locales/az.yml index 71382570a..8fd986d98 100644 --- a/config/locales/az.yml +++ b/config/locales/az.yml @@ -1317,3 +1317,4 @@ az: field_last_updated_by: Last updated by field_full_width_layout: Full width layout label_last_notes: Last notes + field_digest: Checksum diff --git a/config/locales/bg.yml b/config/locales/bg.yml index 6a5fca6a6..69923e038 100644 --- a/config/locales/bg.yml +++ b/config/locales/bg.yml @@ -1206,3 +1206,4 @@ bg: description_all_columns: Всички колони text_repository_identifier_info: 'Позволени са малки букви (a-z), цифри, тирета и _.
          Промяна след създаването му не е възможна.' label_last_notes: Last notes + field_digest: Checksum diff --git a/config/locales/bs.yml b/config/locales/bs.yml index e25e9b331..cfb7ca8f0 100644 --- a/config/locales/bs.yml +++ b/config/locales/bs.yml @@ -1235,3 +1235,4 @@ bs: field_last_updated_by: Last updated by field_full_width_layout: Full width layout label_last_notes: Last notes + field_digest: Checksum diff --git a/config/locales/ca.yml b/config/locales/ca.yml index 79bc68f7f..3e67490ef 100644 --- a/config/locales/ca.yml +++ b/config/locales/ca.yml @@ -1212,3 +1212,4 @@ ca: field_last_updated_by: Last updated by field_full_width_layout: Full width layout label_last_notes: Last notes + field_digest: Checksum diff --git a/config/locales/cs.yml b/config/locales/cs.yml index f7908e025..dd74aa36b 100644 --- a/config/locales/cs.yml +++ b/config/locales/cs.yml @@ -1221,3 +1221,4 @@ cs: field_last_updated_by: Last updated by field_full_width_layout: Full width layout label_last_notes: Last notes + field_digest: Checksum diff --git a/config/locales/da.yml b/config/locales/da.yml index 987b8e509..81ce35801 100644 --- a/config/locales/da.yml +++ b/config/locales/da.yml @@ -1239,3 +1239,4 @@ da: field_last_updated_by: Last updated by field_full_width_layout: Full width layout label_last_notes: Last notes + field_digest: Checksum diff --git a/config/locales/de.yml b/config/locales/de.yml index 8f4e14de0..589de2a5f 100644 --- a/config/locales/de.yml +++ b/config/locales/de.yml @@ -1224,3 +1224,4 @@ de: field_last_updated_by: Last updated by field_full_width_layout: Full width layout label_last_notes: Last notes + field_digest: Checksum diff --git a/config/locales/el.yml b/config/locales/el.yml index b888d0db2..f55f7f909 100644 --- a/config/locales/el.yml +++ b/config/locales/el.yml @@ -1222,3 +1222,4 @@ el: field_last_updated_by: Last updated by field_full_width_layout: Full width layout label_last_notes: Last notes + field_digest: Checksum diff --git a/config/locales/en-GB.yml b/config/locales/en-GB.yml index 9f8d254be..eb7c8c8fc 100644 --- a/config/locales/en-GB.yml +++ b/config/locales/en-GB.yml @@ -1224,3 +1224,4 @@ en-GB: field_last_updated_by: Last updated by field_full_width_layout: Full width layout label_last_notes: Last notes + field_digest: Checksum diff --git a/config/locales/es-PA.yml b/config/locales/es-PA.yml index 29eaf88fe..b8b7bf0a9 100644 --- a/config/locales/es-PA.yml +++ b/config/locales/es-PA.yml @@ -1252,3 +1252,4 @@ es-PA: field_last_updated_by: Last updated by field_full_width_layout: Full width layout label_last_notes: Last notes + field_digest: Checksum diff --git a/config/locales/es.yml b/config/locales/es.yml index 385dd8a81..521637eb7 100644 --- a/config/locales/es.yml +++ b/config/locales/es.yml @@ -1250,3 +1250,4 @@ es: field_last_updated_by: Last updated by field_full_width_layout: Full width layout label_last_notes: Last notes + field_digest: Checksum diff --git a/config/locales/et.yml b/config/locales/et.yml index cce9c720a..d027e062c 100644 --- a/config/locales/et.yml +++ b/config/locales/et.yml @@ -1227,3 +1227,4 @@ et: field_last_updated_by: Last updated by field_full_width_layout: Full width layout label_last_notes: Last notes + field_digest: Checksum diff --git a/config/locales/eu.yml b/config/locales/eu.yml index 794797394..b08fc6e1d 100644 --- a/config/locales/eu.yml +++ b/config/locales/eu.yml @@ -1223,3 +1223,4 @@ eu: field_last_updated_by: Last updated by field_full_width_layout: Full width layout label_last_notes: Last notes + field_digest: Checksum diff --git a/config/locales/fa.yml b/config/locales/fa.yml index 953cb6ad9..db3d16ae5 100644 --- a/config/locales/fa.yml +++ b/config/locales/fa.yml @@ -1223,3 +1223,4 @@ fa: field_last_updated_by: Last updated by field_full_width_layout: Full width layout label_last_notes: Last notes + field_digest: Checksum diff --git a/config/locales/fi.yml b/config/locales/fi.yml index 83cc6187d..2f5624432 100644 --- a/config/locales/fi.yml +++ b/config/locales/fi.yml @@ -1243,3 +1243,4 @@ fi: field_last_updated_by: Last updated by field_full_width_layout: Full width layout label_last_notes: Last notes + field_digest: Checksum diff --git a/config/locales/fr.yml b/config/locales/fr.yml index 4721028f2..b4a78b20a 100644 --- a/config/locales/fr.yml +++ b/config/locales/fr.yml @@ -385,6 +385,7 @@ fr: field_updated_by: Mise à jour par field_last_updated_by: Dernière mise à jour par field_full_width_layout: Afficher sur toute la largeur + field_digest: Checksum setting_app_title: Titre de l'application setting_app_subtitle: Sous-titre de l'application diff --git a/config/locales/gl.yml b/config/locales/gl.yml index e87e6432c..5169db3d4 100644 --- a/config/locales/gl.yml +++ b/config/locales/gl.yml @@ -1230,3 +1230,4 @@ gl: field_last_updated_by: Last updated by field_full_width_layout: Full width layout label_last_notes: Last notes + field_digest: Checksum diff --git a/config/locales/he.yml b/config/locales/he.yml index 239cfe2fd..ba0f28425 100644 --- a/config/locales/he.yml +++ b/config/locales/he.yml @@ -1227,3 +1227,4 @@ he: field_last_updated_by: Last updated by field_full_width_layout: Full width layout label_last_notes: Last notes + field_digest: Checksum diff --git a/config/locales/hr.yml b/config/locales/hr.yml index cc5cc0eca..ff6d13c6b 100644 --- a/config/locales/hr.yml +++ b/config/locales/hr.yml @@ -1221,3 +1221,4 @@ hr: field_last_updated_by: Last updated by field_full_width_layout: Full width layout label_last_notes: Last notes + field_digest: Checksum diff --git a/config/locales/hu.yml b/config/locales/hu.yml index 606aff735..880a1428b 100644 --- a/config/locales/hu.yml +++ b/config/locales/hu.yml @@ -1241,3 +1241,4 @@ field_last_updated_by: Last updated by field_full_width_layout: Full width layout label_last_notes: Last notes + field_digest: Checksum diff --git a/config/locales/id.yml b/config/locales/id.yml index 7373465a8..60f25a4c6 100644 --- a/config/locales/id.yml +++ b/config/locales/id.yml @@ -1226,3 +1226,4 @@ id: field_last_updated_by: Last updated by field_full_width_layout: Full width layout label_last_notes: Last notes + field_digest: Checksum diff --git a/config/locales/it.yml b/config/locales/it.yml index ca26a9bc6..6ec135010 100644 --- a/config/locales/it.yml +++ b/config/locales/it.yml @@ -1217,3 +1217,4 @@ it: field_last_updated_by: Last updated by field_full_width_layout: Full width layout label_last_notes: Last notes + field_digest: Checksum diff --git a/config/locales/ja.yml b/config/locales/ja.yml index cabb5011c..9cc24cbd8 100644 --- a/config/locales/ja.yml +++ b/config/locales/ja.yml @@ -1229,3 +1229,4 @@ ja: field_last_updated_by: 最終更新者 field_full_width_layout: ワイド表示 label_last_notes: 最新の注記 + field_digest: Checksum diff --git a/config/locales/ko.yml b/config/locales/ko.yml index 7965137be..9e2ec8156 100644 --- a/config/locales/ko.yml +++ b/config/locales/ko.yml @@ -1261,3 +1261,4 @@ ko: field_last_updated_by: Last updated by field_full_width_layout: Full width layout label_last_notes: Last notes + field_digest: Checksum diff --git a/config/locales/lt.yml b/config/locales/lt.yml index 5061d7286..e906a2516 100644 --- a/config/locales/lt.yml +++ b/config/locales/lt.yml @@ -1211,3 +1211,4 @@ lt: field_last_updated_by: Last updated by field_full_width_layout: Full width layout label_last_notes: Last notes + field_digest: Checksum diff --git a/config/locales/lv.yml b/config/locales/lv.yml index 675f82950..534c98c27 100644 --- a/config/locales/lv.yml +++ b/config/locales/lv.yml @@ -1216,3 +1216,4 @@ lv: field_last_updated_by: Last updated by field_full_width_layout: Full width layout label_last_notes: Last notes + field_digest: Checksum diff --git a/config/locales/mk.yml b/config/locales/mk.yml index d52f0dc3d..fab961365 100644 --- a/config/locales/mk.yml +++ b/config/locales/mk.yml @@ -1222,3 +1222,4 @@ mk: field_last_updated_by: Last updated by field_full_width_layout: Full width layout label_last_notes: Last notes + field_digest: Checksum diff --git a/config/locales/mn.yml b/config/locales/mn.yml index 92b6b5eda..67c9da0b2 100644 --- a/config/locales/mn.yml +++ b/config/locales/mn.yml @@ -1223,3 +1223,4 @@ mn: field_last_updated_by: Last updated by field_full_width_layout: Full width layout label_last_notes: Last notes + field_digest: Checksum diff --git a/config/locales/nl.yml b/config/locales/nl.yml index efb3044f7..c88bde0eb 100644 --- a/config/locales/nl.yml +++ b/config/locales/nl.yml @@ -1197,3 +1197,4 @@ nl: field_last_updated_by: Last updated by field_full_width_layout: Full width layout label_last_notes: Last notes + field_digest: Checksum diff --git a/config/locales/no.yml b/config/locales/no.yml index 8ce372b8f..fc6b1b620 100644 --- a/config/locales/no.yml +++ b/config/locales/no.yml @@ -1212,3 +1212,4 @@ field_last_updated_by: Last updated by field_full_width_layout: Full width layout label_last_notes: Last notes + field_digest: Checksum diff --git a/config/locales/pl.yml b/config/locales/pl.yml index 091f14774..456940b62 100644 --- a/config/locales/pl.yml +++ b/config/locales/pl.yml @@ -1237,3 +1237,4 @@ pl: field_last_updated_by: Last updated by field_full_width_layout: Full width layout label_last_notes: Last notes + field_digest: Checksum diff --git a/config/locales/pt-BR.yml b/config/locales/pt-BR.yml index fabe33a13..17f5abf66 100644 --- a/config/locales/pt-BR.yml +++ b/config/locales/pt-BR.yml @@ -1240,3 +1240,4 @@ pt-BR: field_last_updated_by: Last updated by field_full_width_layout: Full width layout label_last_notes: Last notes + field_digest: Checksum diff --git a/config/locales/pt.yml b/config/locales/pt.yml index 3bde52b77..0ec20b11a 100644 --- a/config/locales/pt.yml +++ b/config/locales/pt.yml @@ -1215,3 +1215,4 @@ pt: field_last_updated_by: Última atualização por field_full_width_layout: Layout utiliza toda a largura label_last_notes: Last notes + field_digest: Checksum diff --git a/config/locales/ro.yml b/config/locales/ro.yml index cc17b7c19..5d48f230e 100644 --- a/config/locales/ro.yml +++ b/config/locales/ro.yml @@ -1217,3 +1217,4 @@ ro: field_last_updated_by: Last updated by field_full_width_layout: Full width layout label_last_notes: Last notes + field_digest: Checksum diff --git a/config/locales/ru.yml b/config/locales/ru.yml index c2d76339d..3743091cb 100644 --- a/config/locales/ru.yml +++ b/config/locales/ru.yml @@ -1324,3 +1324,4 @@ ru: field_last_updated_by: Last updated by field_full_width_layout: Full width layout label_last_notes: Last notes + field_digest: Checksum diff --git a/config/locales/sk.yml b/config/locales/sk.yml index 9f2d771ba..be215c055 100644 --- a/config/locales/sk.yml +++ b/config/locales/sk.yml @@ -1212,3 +1212,4 @@ sk: field_last_updated_by: Last updated by field_full_width_layout: Full width layout label_last_notes: Last notes + field_digest: Checksum diff --git a/config/locales/sl.yml b/config/locales/sl.yml index b3f1367e9..cf237fa16 100644 --- a/config/locales/sl.yml +++ b/config/locales/sl.yml @@ -1222,3 +1222,4 @@ sl: field_last_updated_by: Last updated by field_full_width_layout: Full width layout label_last_notes: Last notes + field_digest: Checksum diff --git a/config/locales/sq.yml b/config/locales/sq.yml index 629dc7883..ea883a293 100644 --- a/config/locales/sq.yml +++ b/config/locales/sq.yml @@ -1218,3 +1218,4 @@ sq: field_last_updated_by: Last updated by field_full_width_layout: Full width layout label_last_notes: Last notes + field_digest: Checksum diff --git a/config/locales/sr-YU.yml b/config/locales/sr-YU.yml index bc7a87058..3fe59fdb2 100644 --- a/config/locales/sr-YU.yml +++ b/config/locales/sr-YU.yml @@ -1224,3 +1224,4 @@ sr-YU: field_last_updated_by: Last updated by field_full_width_layout: Full width layout label_last_notes: Last notes + field_digest: Checksum diff --git a/config/locales/sr.yml b/config/locales/sr.yml index 09f496c50..0cffa676c 100644 --- a/config/locales/sr.yml +++ b/config/locales/sr.yml @@ -1223,3 +1223,4 @@ sr: field_last_updated_by: Last updated by field_full_width_layout: Full width layout label_last_notes: Last notes + field_digest: Checksum diff --git a/config/locales/sv.yml b/config/locales/sv.yml index 9c1fa0b12..710c91f5e 100644 --- a/config/locales/sv.yml +++ b/config/locales/sv.yml @@ -1255,3 +1255,4 @@ sv: field_last_updated_by: Last updated by field_full_width_layout: Full width layout label_last_notes: Last notes + field_digest: Checksum diff --git a/config/locales/th.yml b/config/locales/th.yml index 8ebf9745f..1f73f1b22 100644 --- a/config/locales/th.yml +++ b/config/locales/th.yml @@ -1219,3 +1219,4 @@ th: field_last_updated_by: Last updated by field_full_width_layout: Full width layout label_last_notes: Last notes + field_digest: Checksum diff --git a/config/locales/tr.yml b/config/locales/tr.yml index cc470e5d7..07ea20b2b 100644 --- a/config/locales/tr.yml +++ b/config/locales/tr.yml @@ -1230,3 +1230,4 @@ tr: field_last_updated_by: Last updated by field_full_width_layout: Full width layout label_last_notes: Last notes + field_digest: Checksum diff --git a/config/locales/uk.yml b/config/locales/uk.yml index c4c8ef7b9..8b0a99137 100644 --- a/config/locales/uk.yml +++ b/config/locales/uk.yml @@ -1218,3 +1218,4 @@ uk: label_user_mail_option_only_assigned: Only for things I watch or I am assigned to label_user_mail_option_only_owner: Only for things I watch or I am the owner of label_last_notes: Last notes + field_digest: Checksum diff --git a/config/locales/vi.yml b/config/locales/vi.yml index 1df6d666e..83377f285 100644 --- a/config/locales/vi.yml +++ b/config/locales/vi.yml @@ -1275,3 +1275,4 @@ vi: field_last_updated_by: Last updated by field_full_width_layout: Full width layout label_last_notes: Last notes + field_digest: Checksum diff --git a/config/locales/zh-TW.yml b/config/locales/zh-TW.yml index 673808914..ab3d23993 100644 --- a/config/locales/zh-TW.yml +++ b/config/locales/zh-TW.yml @@ -1289,3 +1289,4 @@ description_issue_category_reassign: 選擇議題分類 description_wiki_subpages_reassign: 選擇新的父頁面 text_repository_identifier_info: '僅允許使用小寫英文字母 (a-z), 阿拉伯數字, 虛線與底線。
          一旦儲存之後, 代碼便無法再次被更改。' + field_digest: Checksum diff --git a/config/locales/zh.yml b/config/locales/zh.yml index f97b40983..8de55eb4d 100644 --- a/config/locales/zh.yml +++ b/config/locales/zh.yml @@ -1215,3 +1215,4 @@ zh: field_last_updated_by: Last updated by field_full_width_layout: Full width layout label_last_notes: Last notes + field_digest: Checksum From f0e5437d27f008379b8523ce2b54d697e5e9be94 Mon Sep 17 00:00:00 2001 From: Jean-Philippe Lang Date: Mon, 3 Apr 2017 11:54:29 +0000 Subject: [PATCH 0766/1117] Reuse existing identical disk files for new attachments (#25215). Patch by Jens Kraemer. git-svn-id: http://svn.redmine.org/redmine/trunk@16458 e93f8b46-1217-0410-a6f0-8f06a7374b81 --- app/models/attachment.rb | 19 +++++++++++++++++++ test/unit/attachment_test.rb | 8 ++++++-- 2 files changed, 25 insertions(+), 2 deletions(-) diff --git a/app/models/attachment.rb b/app/models/attachment.rb index 1e4f731e7..8e8cc0ac1 100644 --- a/app/models/attachment.rb +++ b/app/models/attachment.rb @@ -56,6 +56,7 @@ class Attachment < ActiveRecord::Base before_create :files_to_final_location after_rollback :delete_from_disk, :on => :create after_commit :delete_from_disk, :on => :destroy + after_commit :reuse_existing_file_if_possible, :on => :create safe_attributes 'filename', 'content_type', 'description' @@ -411,6 +412,24 @@ class Attachment < ActiveRecord::Base private + def reuse_existing_file_if_possible + with_lock do + if existing = Attachment + .lock + .where(digest: self.digest, filesize: self.filesize) + .where('id <> ? and disk_filename <> ?', + self.id, self.disk_filename) + .first + + original_diskfile = self.diskfile + self.update_columns disk_directory: existing.disk_directory, + disk_filename: existing.disk_filename + File.delete(original_diskfile) if File.exist?(original_diskfile) + end + end + end + + # Physically deletes the file from the file system def delete_from_disk! if disk_filename.present? && File.exist?(diskfile) diff --git a/test/unit/attachment_test.rb b/test/unit/attachment_test.rb index 16f02e51a..0b188f8a1 100644 --- a/test/unit/attachment_test.rb +++ b/test/unit/attachment_test.rb @@ -94,6 +94,10 @@ class AttachmentTest < ActiveSupport::TestCase end def test_copy_should_preserve_attributes + + # prevent re-use of data from other attachments with equal contents + Attachment.where('id <> 1').destroy_all + a = Attachment.find(1) copy = a.copy @@ -220,14 +224,14 @@ class AttachmentTest < ActiveSupport::TestCase assert_equal 'text/plain', a.content_type end - def test_identical_attachments_at_the_same_time_should_not_overwrite + def test_identical_attachments_should_reuse_same_file a1 = Attachment.create!(:container => Issue.find(1), :file => uploaded_test_file("testfile.txt", ""), :author => User.find(1)) a2 = Attachment.create!(:container => Issue.find(1), :file => uploaded_test_file("testfile.txt", ""), :author => User.find(1)) - assert a1.disk_filename != a2.disk_filename + assert_equal a1.diskfile, a2.diskfile end def test_filename_should_be_basenamed From 2f83c57be4be14db565961c2b9f0ff85e3e5ff3a Mon Sep 17 00:00:00 2001 From: Jean-Philippe Lang Date: Mon, 3 Apr 2017 11:55:40 +0000 Subject: [PATCH 0767/1117] Adds file equality check to deduplication hook (#25215). Patch by Jens Kraemer. git-svn-id: http://svn.redmine.org/redmine/trunk@16459 e93f8b46-1217-0410-a6f0-8f06a7374b81 --- app/models/attachment.rb | 13 ++++++++++--- 1 file changed, 10 insertions(+), 3 deletions(-) diff --git a/app/models/attachment.rb b/app/models/attachment.rb index 8e8cc0ac1..7e6b6bd03 100644 --- a/app/models/attachment.rb +++ b/app/models/attachment.rb @@ -422,9 +422,16 @@ class Attachment < ActiveRecord::Base .first original_diskfile = self.diskfile - self.update_columns disk_directory: existing.disk_directory, - disk_filename: existing.disk_filename - File.delete(original_diskfile) if File.exist?(original_diskfile) + existing_diskfile = existing.diskfile + + if File.readable?(original_diskfile) && + File.readable?(existing_diskfile) && + FileUtils.identical?(original_diskfile, existing_diskfile) + + self.update_columns disk_directory: existing.disk_directory, + disk_filename: existing.disk_filename + File.delete(original_diskfile) + end end end end From 0e407dcf46f0436393db16b67ed6d73922302f61 Mon Sep 17 00:00:00 2001 From: Jean-Philippe Lang Date: Mon, 3 Apr 2017 12:13:07 +0000 Subject: [PATCH 0768/1117] Delete the file after the change is committed (#25215). git-svn-id: http://svn.redmine.org/redmine/trunk@16460 e93f8b46-1217-0410-a6f0-8f06a7374b81 --- app/models/attachment.rb | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/app/models/attachment.rb b/app/models/attachment.rb index 7e6b6bd03..26fe4a8b3 100644 --- a/app/models/attachment.rb +++ b/app/models/attachment.rb @@ -413,7 +413,9 @@ class Attachment < ActiveRecord::Base private def reuse_existing_file_if_possible - with_lock do + original_diskfile = nil + + reused = with_lock do if existing = Attachment .lock .where(digest: self.digest, filesize: self.filesize) @@ -430,10 +432,12 @@ class Attachment < ActiveRecord::Base self.update_columns disk_directory: existing.disk_directory, disk_filename: existing.disk_filename - File.delete(original_diskfile) end end end + if reused + File.delete(original_diskfile) + end end From 1b81a030ce5295f522a3d7fa6b70c786a801e642 Mon Sep 17 00:00:00 2001 From: Jean-Philippe Lang Date: Mon, 3 Apr 2017 12:48:58 +0000 Subject: [PATCH 0769/1117] Cleanup tests with mock files. git-svn-id: http://svn.redmine.org/redmine/trunk@16461 e93f8b46-1217-0410-a6f0-8f06a7374b81 --- test/test_helper.rb | 47 +++++++++++++++++++++--------------- test/unit/attachment_test.rb | 35 ++++++++++++--------------- 2 files changed, 43 insertions(+), 39 deletions(-) diff --git a/test/test_helper.rb b/test/test_helper.rb index 20ef4b154..4cee54472 100644 --- a/test/test_helper.rb +++ b/test/test_helper.rb @@ -52,29 +52,18 @@ class ActiveSupport::TestCase fixture_file_upload("files/#{name}", mime, true) end - # Mock out a file - def self.mock_file - file = 'a_file.png' - file.stubs(:size).returns(32) - file.stubs(:original_filename).returns('a_file.png') - file.stubs(:content_type).returns('image/png') - file.stubs(:read).returns(false) - file - end + def mock_file(options=nil) + options ||= { + :original_filename => 'a_file.png', + :content_type => 'image/png', + :size => 32 + } - def mock_file - self.class.mock_file + Redmine::MockFile.new(options) end def mock_file_with_options(options={}) - file = '' - file.stubs(:size).returns(32) - original_filename = options[:original_filename] || nil - file.stubs(:original_filename).returns(original_filename) - content_type = options[:content_type] || nil - file.stubs(:content_type).returns(content_type) - file.stubs(:read).returns(false) - file + mock_file(options) end # Use a temporary directory for attachment related tests @@ -257,6 +246,26 @@ class ActiveSupport::TestCase end module Redmine + class MockFile + attr_reader :size, :original_filename, :content_type + + def initialize(options={}) + @size = options[:size] || 32 + @original_filename = options[:original_filename] || options[:filename] + @content_type = options[:content_type] + @content = options[:content] || 'x'*size + end + + def read(*args) + if @eof + false + else + @eof = true + @content + end + end + end + class RoutingTest < ActionDispatch::IntegrationTest def should_route(arg) arg = arg.dup diff --git a/test/unit/attachment_test.rb b/test/unit/attachment_test.rb index 0b188f8a1..6d988c274 100644 --- a/test/unit/attachment_test.rb +++ b/test/unit/attachment_test.rb @@ -27,17 +27,6 @@ class AttachmentTest < ActiveSupport::TestCase # in transactional fixtures (https://github.com/rails/rails/pull/18458) self.use_transactional_fixtures = false - class MockFile - attr_reader :original_filename, :content_type, :content, :size - - def initialize(attributes) - @original_filename = attributes[:original_filename] - @content_type = attributes[:content_type] - @content = attributes[:content] || "Content" - @size = content.size - end - end - def setup set_tmp_attachments_directory end @@ -224,23 +213,29 @@ class AttachmentTest < ActiveSupport::TestCase assert_equal 'text/plain', a.content_type end - def test_identical_attachments_should_reuse_same_file - a1 = Attachment.create!(:container => Issue.find(1), - :file => uploaded_test_file("testfile.txt", ""), - :author => User.find(1)) - a2 = Attachment.create!(:container => Issue.find(1), - :file => uploaded_test_file("testfile.txt", ""), - :author => User.find(1)) + def test_attachments_with_same_content_should_reuse_same_file + a1 = Attachment.create!(:container => Issue.find(1), :author => User.find(1), + :file => mock_file(:filename => 'foo', :content => 'abcd')) + a2 = Attachment.create!(:container => Issue.find(1), :author => User.find(1), + :file => mock_file(:filename => 'bar', :content => 'abcd')) assert_equal a1.diskfile, a2.diskfile end + def test_attachments_with_same_filename_at_the_same_time_should_not_overwrite + a1 = Attachment.create!(:container => Issue.find(1), :author => User.find(1), + :file => mock_file(:filename => 'foo', :content => 'abcd')) + a2 = Attachment.create!(:container => Issue.find(1), :author => User.find(1), + :file => mock_file(:filename => 'foo', :content => 'efgh')) + assert_not_equal a1.diskfile, a2.diskfile + end + def test_filename_should_be_basenamed - a = Attachment.new(:file => MockFile.new(:original_filename => "path/to/the/file")) + a = Attachment.new(:file => mock_file(:original_filename => "path/to/the/file")) assert_equal 'file', a.filename end def test_filename_should_be_sanitized - a = Attachment.new(:file => MockFile.new(:original_filename => "valid:[] invalid:?%*|\"'<>chars")) + a = Attachment.new(:file => mock_file(:original_filename => "valid:[] invalid:?%*|\"'<>chars")) assert_equal 'valid_[] invalid_chars', a.filename end From 2660a2e5b361a09331ddb6a3067ddc643412769b Mon Sep 17 00:00:00 2001 From: Jean-Philippe Lang Date: Mon, 3 Apr 2017 12:51:13 +0000 Subject: [PATCH 0770/1117] Adds a test for when the file comparison fails (#25215). git-svn-id: http://svn.redmine.org/redmine/trunk@16462 e93f8b46-1217-0410-a6f0-8f06a7374b81 --- test/unit/attachment_test.rb | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/test/unit/attachment_test.rb b/test/unit/attachment_test.rb index 6d988c274..acecd2b18 100644 --- a/test/unit/attachment_test.rb +++ b/test/unit/attachment_test.rb @@ -221,6 +221,15 @@ class AttachmentTest < ActiveSupport::TestCase assert_equal a1.diskfile, a2.diskfile end + def test_attachments_with_same_content_should_not_reuse_same_file_if_deleted + a1 = Attachment.create!(:container => Issue.find(1), :author => User.find(1), + :file => mock_file(:filename => 'foo', :content => 'abcd')) + a1.delete_from_disk + a2 = Attachment.create!(:container => Issue.find(1), :author => User.find(1), + :file => mock_file(:filename => 'bar', :content => 'abcd')) + assert_not_equal a1.diskfile, a2.diskfile + end + def test_attachments_with_same_filename_at_the_same_time_should_not_overwrite a1 = Attachment.create!(:container => Issue.find(1), :author => User.find(1), :file => mock_file(:filename => 'foo', :content => 'abcd')) From a8d8c213bb61e702b6266b6f5ae71ad6be647614 Mon Sep 17 00:00:00 2001 From: Jean-Philippe Lang Date: Mon, 3 Apr 2017 12:53:51 +0000 Subject: [PATCH 0771/1117] Use path instead of URL of image in preview (#25295). Patch by Krzysztof Zielonka. git-svn-id: http://svn.redmine.org/redmine/trunk@16463 e93f8b46-1217-0410-a6f0-8f06a7374b81 --- app/views/attachments/image.html.erb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app/views/attachments/image.html.erb b/app/views/attachments/image.html.erb index 306458366..b0d2258d7 100644 --- a/app/views/attachments/image.html.erb +++ b/app/views/attachments/image.html.erb @@ -1,3 +1,3 @@ <%= render :layout => 'layouts/file' do %> - <%= render :partial => 'common/image', :locals => {:path => download_named_attachment_url(@attachment, @attachment.filename), :alt => @attachment.filename} %> + <%= render :partial => 'common/image', :locals => {:path => download_named_attachment_path(@attachment, @attachment.filename), :alt => @attachment.filename} %> <% end %> From 3e787f7e7d0a013376735dbe2b60054166a61499 Mon Sep 17 00:00:00 2001 From: Jean-Philippe Lang Date: Mon, 3 Apr 2017 12:59:55 +0000 Subject: [PATCH 0772/1117] Deny edit/update/delete for anonymous user (#25483). Patch by Holger Just. git-svn-id: http://svn.redmine.org/redmine/trunk@16464 e93f8b46-1217-0410-a6f0-8f06a7374b81 --- app/controllers/users_controller.rb | 7 +++++-- app/views/users/show.html.erb | 2 +- test/functional/users_controller_test.rb | 20 ++++++++++++++++++++ 3 files changed, 26 insertions(+), 3 deletions(-) diff --git a/app/controllers/users_controller.rb b/app/controllers/users_controller.rb index 7dcaa7962..f26b9b6d8 100644 --- a/app/controllers/users_controller.rb +++ b/app/controllers/users_controller.rb @@ -20,7 +20,8 @@ class UsersController < ApplicationController self.main_menu = false before_action :require_admin, :except => :show - before_action :find_user, :only => [:show, :edit, :update, :destroy] + before_action ->{ find_user(false) }, :only => :show + before_action :find_user, :only => [:edit, :update, :destroy] accept_api_auth :index, :show, :create, :update, :destroy helper :sort @@ -174,10 +175,12 @@ class UsersController < ApplicationController private - def find_user + def find_user(logged = true) if params[:id] == 'current' require_login || return @user = User.current + elsif logged + @user = User.logged.find(params[:id]) else @user = User.find(params[:id]) end diff --git a/app/views/users/show.html.erb b/app/views/users/show.html.erb index 9bb5d6667..b44ed6a3f 100644 --- a/app/views/users/show.html.erb +++ b/app/views/users/show.html.erb @@ -1,5 +1,5 @@

          -<%= link_to(l(:button_edit), edit_user_path(@user), :class => 'icon icon-edit') if User.current.admin? %> +<%= link_to(l(:button_edit), edit_user_path(@user), :class => 'icon icon-edit') if User.current.admin? && @user.logged? %>

          <%= avatar @user, :size => "50" %> <%= @user.name %>

          diff --git a/test/functional/users_controller_test.rb b/test/functional/users_controller_test.rb index 0dbd12a81..49d69f84a 100644 --- a/test/functional/users_controller_test.rb +++ b/test/functional/users_controller_test.rb @@ -342,6 +342,12 @@ class UsersControllerTest < Redmine::ControllerTest assert_select 'a', :text => 'Activate' end + def test_edit_should_be_denied_for_anonymous + assert User.find(6).anonymous? + get :edit, :params => {:id => 6} + assert_response 404 + end + def test_update ActionMailer::Base.deliveries.clear put :update, :params => { @@ -593,6 +599,12 @@ class UsersControllerTest < Redmine::ControllerTest assert_nil ActionMailer::Base.deliveries.last end + def test_update_should_be_denied_for_anonymous + assert User.find(6).anonymous? + put :update, :params => {:id => 6} + assert_response 404 + end + def test_destroy assert_difference 'User.count', -1 do delete :destroy, :params => {:id => 2} @@ -610,6 +622,14 @@ class UsersControllerTest < Redmine::ControllerTest assert_response 403 end + def test_destroy_should_be_denied_for_anonymous + assert User.find(6).anonymous? + assert_no_difference 'User.count' do + put :destroy, :params => {:id => 6} + end + assert_response 404 + end + def test_destroy_should_redirect_to_back_url_param assert_difference 'User.count', -1 do delete :destroy, :params => {:id => 2, :back_url => '/users?name=foo'} From ebc9820877bc2f754e73b6201a4e9a443c0fbe7c Mon Sep 17 00:00:00 2001 From: Jean-Philippe Lang Date: Mon, 3 Apr 2017 13:32:46 +0000 Subject: [PATCH 0773/1117] Change Russian translation for field_due_date and label_relation_new (#25392). Patch by Ilya Potapov. git-svn-id: http://svn.redmine.org/redmine/trunk@16465 e93f8b46-1217-0410-a6f0-8f06a7374b81 --- config/locales/ru.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/config/locales/ru.yml b/config/locales/ru.yml index 3743091cb..770c54a9d 100644 --- a/config/locales/ru.yml +++ b/config/locales/ru.yml @@ -324,7 +324,7 @@ ru: field_description: Описание field_done_ratio: Готовность field_downloads: Загрузки - field_due_date: Дата завершения + field_due_date: Срок завершения field_editable: Редактируемое field_effective_date: Дата field_estimated_hours: Оценка трудозатрат @@ -632,7 +632,7 @@ ru: label_related_issues: Связанные задачи label_relates_to: связана с label_relation_delete: Удалить связь - label_relation_new: Новое отношение + label_relation_new: Новая связь label_renamed: переименовано label_reply_plural: Ответы label_report: Отчёт From 857696c3c61d329c82cd0d4f0ba8ae6b001aac2f Mon Sep 17 00:00:00 2001 From: Jean-Philippe Lang Date: Mon, 3 Apr 2017 13:34:01 +0000 Subject: [PATCH 0774/1117] Russian translation update (#25397). Patch by Ilya Potapov. git-svn-id: http://svn.redmine.org/redmine/trunk@16466 e93f8b46-1217-0410-a6f0-8f06a7374b81 --- config/locales/ru.yml | 38 ++++++++++++++++++-------------------- 1 file changed, 18 insertions(+), 20 deletions(-) diff --git a/config/locales/ru.yml b/config/locales/ru.yml index 770c54a9d..41f8029ec 100644 --- a/config/locales/ru.yml +++ b/config/locales/ru.yml @@ -1300,28 +1300,26 @@ ru: label_new_project_issue_tab_enabled: Отображать вкладку "Новая задача" setting_new_item_menu_tab: Вкладка меню проекта для создания новых объектов label_new_object_tab_enabled: Отображать выпадающий список "+" - error_no_projects_with_tracker_allowed_for_new_issue: There are no projects with trackers - for which you can create an issue - field_textarea_font: Font used for text areas - label_font_default: Default font - label_font_monospace: Monospaced font - label_font_proportional: Proportional font + error_no_projects_with_tracker_allowed_for_new_issue: Отсутствуют проекты, по трекерам которых вы можете создавать задачи + field_textarea_font: Шрифт для текстовых полей + label_font_default: Шрифт по умолчанию + label_font_monospace: Моноширинный шрифт + label_font_proportional: Пропорциональный шрифт setting_timespan_format: Time span format - label_table_of_contents: Table of contents - setting_commit_logs_formatting: Apply text formatting to commit messages - setting_mail_handler_enable_regex_delimiters: Enable regular expressions - error_move_of_child_not_possible: 'Subtask %{child} could not be moved to the new + label_table_of_contents: Содержание + setting_commit_logs_formatting: Использовать форматирование текста для комментариев хранилища + setting_mail_handler_enable_regex_delimiters: Использовать регулярные выражения + error_move_of_child_not_possible: 'Подзадача %{child} не может быть перемещена в новый project: %{errors}' error_cannot_reassign_time_entries_to_an_issue_about_to_be_deleted: Spent time cannot be reassigned to an issue that is about to be deleted - setting_timelog_required_fields: Required fields for time logs - label_attribute_of_object: '%{object_name}''s %{name}' - label_user_mail_option_only_assigned: Only for things I watch or I am assigned to - label_user_mail_option_only_owner: Only for things I watch or I am the owner of - warning_fields_cleared_on_bulk_edit: Changes will result in the automatic deletion - of values from one or more fields on the selected objects - field_updated_by: Updated by - field_last_updated_by: Last updated by - field_full_width_layout: Full width layout - label_last_notes: Last notes + setting_timelog_required_fields: Обязательные поля для трудозатрат + label_attribute_of_object: '%{name} объекта %{object_name}' + label_user_mail_option_only_assigned: Только для объектов, которые назначены мне + label_user_mail_option_only_owner: Только для объектов, для которых я являюсь владельцем + warning_fields_cleared_on_bulk_edit: Изменения приведут к удалению значений одного или нескольких полей выбранных объектов + field_updated_by: Кем изменено + field_last_updated_by: Последний изменивший + field_full_width_layout: Растягивать по ширине страницы + label_last_notes: Последние примечания field_digest: Checksum From 6c4b73b448fa4cc1614a1bec93beeaaacdb62510 Mon Sep 17 00:00:00 2001 From: Jean-Philippe Lang Date: Mon, 3 Apr 2017 14:04:04 +0000 Subject: [PATCH 0775/1117] Query through multiple projects by issue custom field not possible anymore (#25501). git-svn-id: http://svn.redmine.org/redmine/trunk@16467 e93f8b46-1217-0410-a6f0-8f06a7374b81 --- app/models/issue_query.rb | 8 +------- app/models/project.rb | 17 +++++++++++++++++ app/models/query.rb | 9 +++++++++ app/models/time_entry_query.rb | 8 -------- 4 files changed, 27 insertions(+), 15 deletions(-) diff --git a/app/models/issue_query.rb b/app/models/issue_query.rb index 9f3bf290d..5ca76a5bc 100644 --- a/app/models/issue_query.rb +++ b/app/models/issue_query.rb @@ -164,10 +164,7 @@ class IssueQuery < Query :values => lambda { subproject_values } end - - issue_custom_fields = project ? project.all_issue_custom_fields : IssueCustomField.where(:is_for_all => true) add_custom_fields_filters(issue_custom_fields) - add_associations_custom_fields_filters :project, :author, :assigned_to, :fixed_version IssueRelation::TYPES.each do |relation_type, options| @@ -186,10 +183,7 @@ class IssueQuery < Query def available_columns return @available_columns if @available_columns @available_columns = self.class.available_columns.dup - @available_columns += (project ? - project.all_issue_custom_fields : - IssueCustomField - ).visible.collect {|cf| QueryCustomFieldColumn.new(cf) } + @available_columns += issue_custom_fields.visible.collect {|cf| QueryCustomFieldColumn.new(cf) } if User.current.allowed_to?(:view_time_entries, project, :global => true) index = @available_columns.find_index {|column| column.name == :total_estimated_hours} diff --git a/app/models/project.rb b/app/models/project.rb index 3d8878ca2..a425d8ca7 100644 --- a/app/models/project.rb +++ b/app/models/project.rb @@ -325,6 +325,7 @@ class Project < ActiveRecord::Base @shared_versions = nil @rolled_up_versions = nil @rolled_up_trackers = nil + @rolled_up_custom_fields = nil @all_issue_custom_fields = nil @all_time_entry_custom_fields = nil @to_param = nil @@ -579,6 +580,22 @@ class Project < ActiveRecord::Base end end + # Returns a scope of all custom fields enabled for issues of the project + # and its subprojects + def rolled_up_custom_fields + if leaf? + all_issue_custom_fields + else + @rolled_up_custom_fields ||= IssueCustomField. + sorted. + where("is_for_all = ? OR EXISTS (SELECT 1" + + " FROM #{table_name_prefix}custom_fields_projects#{table_name_suffix} cfp" + + " JOIN #{Project.table_name} p ON p.id = cfp.project_id" + + " WHERE cfp.custom_field_id = #{CustomField.table_name}.id" + + " AND p.lft >= ? AND p.rgt <= ?)", true, lft, rgt) + end + end + def project self end diff --git a/app/models/query.rb b/app/models/query.rb index a0f1969e3..863bdbc4a 100644 --- a/app/models/query.rb +++ b/app/models/query.rb @@ -551,6 +551,15 @@ class Query < ActiveRecord::Base Version.sort_by_status(versions).collect{|s| ["#{s.project.name} - #{s.name}", s.id.to_s, l("version_status_#{s.status}")] } end + # Returns a scope of issue custom fields that are available as columns or filters + def issue_custom_fields + if project + project.rolled_up_custom_fields + else + IssueCustomField.all + end + end + # Adds available filters def initialize_available_filters # implemented by sub-classes diff --git a/app/models/time_entry_query.rb b/app/models/time_entry_query.rb index 656415d66..eab1113e2 100644 --- a/app/models/time_entry_query.rb +++ b/app/models/time_entry_query.rb @@ -218,12 +218,4 @@ class TimeEntryQuery < Query joins.compact! joins.any? ? joins.join(' ') : nil end - - def issue_custom_fields - if project - project.all_issue_custom_fields - else - IssueCustomField.where(:is_for_all => true) - end - end end From 940db66eaf2f4c342492b685fae61612494d127f Mon Sep 17 00:00:00 2001 From: Toshi MARUYAMA Date: Mon, 3 Apr 2017 14:39:19 +0000 Subject: [PATCH 0776/1117] Fix Japanese mistranslation for field_base_dn by Go MAEDA (#25470) git-svn-id: http://svn.redmine.org/redmine/trunk@16469 e93f8b46-1217-0410-a6f0-8f06a7374b81 --- config/locales/ja.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/config/locales/ja.yml b/config/locales/ja.yml index 9cc24cbd8..500d114a0 100644 --- a/config/locales/ja.yml +++ b/config/locales/ja.yml @@ -290,7 +290,7 @@ ja: field_host: ホスト field_port: ポート field_account: アカウント - field_base_dn: 検索範囲 + field_base_dn: ベースDN field_attr_login: ログイン名属性 field_attr_firstname: 名前属性 field_attr_lastname: 苗字属性 From 0a40b19c999091b10d3e47528339c7013700af13 Mon Sep 17 00:00:00 2001 From: Toshi MARUYAMA Date: Mon, 3 Apr 2017 16:30:02 +0000 Subject: [PATCH 0777/1117] Russian translation for 3.2-stable updated by Kirill Bezrukov (#25349, #25505) git-svn-id: http://svn.redmine.org/redmine/trunk@16470 e93f8b46-1217-0410-a6f0-8f06a7374b81 --- config/locales/ru.yml | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/config/locales/ru.yml b/config/locales/ru.yml index 41f8029ec..16daec183 100644 --- a/config/locales/ru.yml +++ b/config/locales/ru.yml @@ -1311,8 +1311,7 @@ ru: setting_mail_handler_enable_regex_delimiters: Использовать регулярные выражения error_move_of_child_not_possible: 'Подзадача %{child} не может быть перемещена в новый project: %{errors}' - error_cannot_reassign_time_entries_to_an_issue_about_to_be_deleted: Spent time cannot - be reassigned to an issue that is about to be deleted + error_cannot_reassign_time_entries_to_an_issue_about_to_be_deleted: Затраченное время не может быть переназначено на задачу, которая будет удалена setting_timelog_required_fields: Обязательные поля для трудозатрат label_attribute_of_object: '%{name} объекта %{object_name}' label_user_mail_option_only_assigned: Только для объектов, которые назначены мне From 5c7aaa4d1eed86e0a3e687ab4a2263b00a68d611 Mon Sep 17 00:00:00 2001 From: Jean-Philippe Lang Date: Tue, 4 Apr 2017 17:07:13 +0000 Subject: [PATCH 0778/1117] Makes Attachments column available on the issue list (#25515). git-svn-id: http://svn.redmine.org/redmine/trunk@16473 e93f8b46-1217-0410-a6f0-8f06a7374b81 --- app/helpers/queries_helper.rb | 31 +++++++++++++-------- app/models/issue_query.rb | 3 +- lib/redmine/export/pdf/issues_pdf_helper.rb | 5 +++- public/stylesheets/application.css | 3 +- test/functional/issues_controller_test.rb | 20 +++++++++++++ 5 files changed, 47 insertions(+), 15 deletions(-) diff --git a/app/helpers/queries_helper.rb b/app/helpers/queries_helper.rb index b4a0a0b75..061da8dec 100644 --- a/app/helpers/queries_helper.rb +++ b/app/helpers/queries_helper.rb @@ -228,6 +228,8 @@ module QueriesHelper link_to_if(value > 0, format_hours(value), project_time_entries_path(item.project, :issue_id => "#{item.id}")) when :total_spent_hours link_to_if(value > 0, format_hours(value), project_time_entries_path(item.project, :issue_id => "~#{item.id}")) + when :attachments + value.to_a.map {|a| format_object(a)}.join(" ").html_safe else format_object(value) end @@ -243,20 +245,25 @@ module QueriesHelper end def csv_value(column, object, value) - format_object(value, false) do |value| - case value.class.name - when 'Float' - sprintf("%.2f", value).gsub('.', l(:general_csv_decimal_separator)) - when 'IssueRelation' - value.to_s(object) - when 'Issue' - if object.is_a?(TimeEntry) - "#{value.tracker} ##{value.id}: #{value.subject}" + case column.name + when :attachments + value.to_a.map {|a| a.filename}.join("\n") + else + format_object(value, false) do |value| + case value.class.name + when 'Float' + sprintf("%.2f", value).gsub('.', l(:general_csv_decimal_separator)) + when 'IssueRelation' + value.to_s(object) + when 'Issue' + if object.is_a?(TimeEntry) + "#{value.tracker} ##{value.id}: #{value.subject}" + else + value.id + end else - value.id + value end - else - value end end end diff --git a/app/models/issue_query.rb b/app/models/issue_query.rb index 5ca76a5bc..94a47e3fe 100644 --- a/app/models/issue_query.rb +++ b/app/models/issue_query.rb @@ -45,6 +45,7 @@ class IssueQuery < Query QueryColumn.new(:closed_on, :sortable => "#{Issue.table_name}.closed_on", :default_order => 'desc'), QueryColumn.new(:last_updated_by, :sortable => lambda {User.fields_for_order_statement("last_journal_user")}), QueryColumn.new(:relations, :caption => :label_related_issues), + QueryColumn.new(:attachments, :caption => :label_attachment_plural), QueryColumn.new(:description, :inline => false), QueryColumn.new(:last_notes, :caption => :label_last_notes, :inline => false) ] @@ -278,7 +279,7 @@ class IssueQuery < Query limit(options[:limit]). offset(options[:offset]) - scope = scope.preload([:tracker, :author, :assigned_to, :fixed_version, :category] & columns.map(&:name)) + scope = scope.preload([:tracker, :author, :assigned_to, :fixed_version, :category, :attachments] & columns.map(&:name)) if has_custom_field_column? scope = scope.preload(:custom_values) end diff --git a/lib/redmine/export/pdf/issues_pdf_helper.rb b/lib/redmine/export/pdf/issues_pdf_helper.rb index c72ff6657..1130670ea 100644 --- a/lib/redmine/export/pdf/issues_pdf_helper.rb +++ b/lib/redmine/export/pdf/issues_pdf_helper.rb @@ -374,8 +374,11 @@ module Redmine show_value(cv, false) else value = issue.send(column.name) - if column.name == :subject + case column.name + when :subject value = " " * level + value + when :attachments + value = value.to_a.map {|a| a.filename}.join("\n") end if value.is_a?(Date) format_date(value) diff --git a/public/stylesheets/application.css b/public/stylesheets/application.css index 03545c6c5..a250ba36b 100644 --- a/public/stylesheets/application.css +++ b/public/stylesheets/application.css @@ -223,7 +223,8 @@ table.list, .table-list { border: 1px solid #e4e4e4; border-collapse: collapse; table.list th, .table-list-header { background-color:#EEEEEE; padding: 4px; white-space:nowrap; font-weight:bold; } table.list td {text-align:center; vertical-align:middle; padding-right:10px;} table.list td.id { width: 2%; text-align: center;} -table.list td.name, table.list td.description, table.list td.subject, table.list td.comments, table.list td.roles {text-align: left;} +table.list td.name, table.list td.description, table.list td.subject, table.list td.comments, table.list td.roles, table.list td.attachments {text-align: left;} +table.list td.attachments a {display:block;} table.list td.tick {width:15%} table.list td.checkbox { width: 15px; padding: 2px 0 0 0; } table.list td.checkbox input {padding:0px;} diff --git a/test/functional/issues_controller_test.rb b/test/functional/issues_controller_test.rb index a6f7cd13a..6c025123d 100644 --- a/test/functional/issues_controller_test.rb +++ b/test/functional/issues_controller_test.rb @@ -1023,6 +1023,26 @@ class IssuesControllerTest < Redmine::ControllerTest assert_equal ["John Smith", "John Smith", ""], css_select('td.last_updated_by').map(&:text) end + def test_index_with_attachments_column + get :index, :c => %w(subject attachments), :set_filter => '1', :sort => 'id' + assert_response :success + + assert_select 'td.attachments' + assert_select 'tr#issue-2' do + assert_select 'td.attachments' do + assert_select 'a', :text => 'source.rb' + assert_select 'a', :text => 'picture.jpg' + end + end + end + + def test_index_with_attachments_column_as_csv + get :index, :c => %w(subject attachments), :set_filter => '1', :sort => 'id', :format => 'csv' + assert_response :success + + assert_include "\"source.rb\npicture.jpg\"", response.body + end + def test_index_with_estimated_hours_total Issue.delete_all Issue.generate!(:estimated_hours => 5.5) From b9ee00a8c8ba2fe2b32eb33d299d4764ebc2968b Mon Sep 17 00:00:00 2001 From: Jean-Philippe Lang Date: Tue, 4 Apr 2017 17:15:07 +0000 Subject: [PATCH 0779/1117] Adds methods to User model to handle tokens. git-svn-id: http://svn.redmine.org/redmine/trunk@16474 e93f8b46-1217-0410-a6f0-8f06a7374b81 --- app/controllers/account_controller.rb | 4 ++-- app/controllers/application_controller.rb | 7 ++++--- app/models/user.rb | 14 ++++++++++++++ 3 files changed, 20 insertions(+), 5 deletions(-) diff --git a/app/controllers/account_controller.rb b/app/controllers/account_controller.rb index 6bd7e02f5..842df6045 100644 --- a/app/controllers/account_controller.rb +++ b/app/controllers/account_controller.rb @@ -280,13 +280,13 @@ class AccountController < ApplicationController end def set_autologin_cookie(user) - token = Token.create(:user => user, :action => 'autologin') + token = user.generate_autologin_token secure = Redmine::Configuration['autologin_cookie_secure'] if secure.nil? secure = request.ssl? end cookie_options = { - :value => token.value, + :value => token, :expires => 1.year.from_now, :path => (Redmine::Configuration['autologin_cookie_path'] || RedmineApp::Application.config.relative_url_root || '/'), :secure => secure, diff --git a/app/controllers/application_controller.rb b/app/controllers/application_controller.rb index d3f549e46..f7bc95a7d 100644 --- a/app/controllers/application_controller.rb +++ b/app/controllers/application_controller.rb @@ -168,9 +168,10 @@ class ApplicationController < ActionController::Base # Logs out current user def logout_user if User.current.logged? - cookies.delete(autologin_cookie_name) - Token.where(["user_id = ? AND action = ?", User.current.id, 'autologin']).delete_all - Token.where(["user_id = ? AND action = ? AND value = ?", User.current.id, 'session', session[:tk]]).delete_all + if autologin = cookies.delete(autologin_cookie_name) + User.current.delete_autologin_token(autologin) + end + User.current.delete_session_token(session[:tk]) self.logged_user = nil end end diff --git a/app/models/user.rb b/app/models/user.rb index 815a6d343..f7a9c33bd 100644 --- a/app/models/user.rb +++ b/app/models/user.rb @@ -417,6 +417,20 @@ class User < Principal token.value end + def delete_session_token(value) + Token.where(:user_id => id, :action => 'session', :value => value).delete_all + end + + # Generates a new autologin token and returns its value + def generate_autologin_token + token = Token.create!(:user_id => id, :action => 'autologin') + token.value + end + + def delete_autologin_token(value) + Token.where(:user_id => id, :action => 'autologin', :value => value).delete_all + end + # Returns true if token is a valid session token for the user whose id is user_id def self.verify_session_token(user_id, token) return false if user_id.blank? || token.blank? From 88a3a351d08b5446317c1813cf2b966aa5f716fb Mon Sep 17 00:00:00 2001 From: Jean-Philippe Lang Date: Tue, 4 Apr 2017 17:17:47 +0000 Subject: [PATCH 0780/1117] Don't hardcode the groups on My page. git-svn-id: http://svn.redmine.org/redmine/trunk@16475 e93f8b46-1217-0410-a6f0-8f06a7374b81 --- app/controllers/my_controller.rb | 11 +++------ app/models/user_preference.rb | 33 +++++++++++++++++++++++---- app/views/my/page.html.erb | 18 +++++---------- lib/redmine/my_page.rb | 6 +++++ public/stylesheets/application.css | 4 ++-- public/stylesheets/responsive.css | 4 ++-- test/functional/my_controller_test.rb | 18 +++++++++++++-- 7 files changed, 63 insertions(+), 31 deletions(-) diff --git a/app/controllers/my_controller.rb b/app/controllers/my_controller.rb index f0b56e44f..15fc9e388 100644 --- a/app/controllers/my_controller.rb +++ b/app/controllers/my_controller.rb @@ -37,6 +37,7 @@ class MyController < ApplicationController # Show user's page def page @user = User.current + @groups = @user.pref.my_page_groups @blocks = @user.pref.my_page_layout end @@ -178,14 +179,8 @@ class MyController < ApplicationController # params[:blocks] : array of block ids of the group def order_blocks @user = User.current - group = params[:group].to_s - if %w(top left right).include? group - group_items = (params[:blocks] || []).collect(&:underscore) - # remove group blocks if they are presents in other groups - group_items.each {|s| @user.pref.remove_block(s)} - @user.pref.my_page_layout[group] = group_items - @user.pref.save - end + @user.pref.order_blocks params[:group], params[:blocks] + @user.pref.save head 200 end end diff --git a/app/models/user_preference.rb b/app/models/user_preference.rb index 836ad3978..861cf9323 100644 --- a/app/models/user_preference.rb +++ b/app/models/user_preference.rb @@ -88,6 +88,14 @@ class UserPreference < ActiveRecord::Base def textarea_font; self[:textarea_font] end def textarea_font=(value); self[:textarea_font]=value; end + # Returns the names of groups that are displayed on user's page + # Example: + # preferences.my_page_groups + # # => ['top', 'left, 'right'] + def my_page_groups + Redmine::MyPage.groups + end + def my_page_layout self[:my_page_layout] ||= Redmine::MyPage.default_layout.deep_dup end @@ -110,10 +118,12 @@ class UserPreference < ActiveRecord::Base end # Removes block from the user page layout + # Example: + # preferences.remove_block('news') def remove_block(block) block = block.to_s.underscore - %w(top left right).each do |f| - (my_page_layout[f] ||= []).delete(block) + my_page_layout.keys.each do |group| + my_page_layout[group].delete(block) end my_page_layout end @@ -126,9 +136,22 @@ class UserPreference < ActiveRecord::Base return unless Redmine::MyPage.valid_block?(block, my_page_layout.values.flatten) remove_block(block) - # add it on top - my_page_layout['top'] ||= [] - my_page_layout['top'].unshift(block) + # add it to the first group + group = my_page_groups.first + my_page_layout[group] ||= [] + my_page_layout[group].unshift(block) + end + + # Sets the block order for the given group. + # Example: + # preferences.order_blocks('left', ['issueswatched', 'news']) + def order_blocks(group, blocks) + group = group.to_s + if Redmine::MyPage.groups.include?(group) && blocks.present? + blocks = blocks.map(&:underscore) & my_page_layout.values.flatten + blocks.each {|block| remove_block(block)} + my_page_layout[group] = blocks + end end def update_block_settings(block, settings) diff --git a/app/views/my/page.html.erb b/app/views/my/page.html.erb index 7f67d0a90..ba150fd79 100644 --- a/app/views/my/page.html.erb +++ b/app/views/my/page.html.erb @@ -8,17 +8,11 @@

          <%=l(:label_my_page)%>

          -
          - <%= render_blocks(@blocks['top'], @user) %> -
          - -
          - <%= render_blocks(@blocks['left'], @user) %> -
          - -
          - <%= render_blocks(@blocks['right'], @user) %> -
          +<% @groups.each do |group| %> +
          + <%= render_blocks(@blocks[group], @user) %> +
          +<% end %>
          <%= context_menu %> @@ -26,7 +20,7 @@ <%= javascript_tag do %> $(document).ready(function(){ $('#block-select').val(''); - $('#list-top, #list-left, #list-right').sortable({ + $('.block-receiver').sortable({ connectWith: '.block-receiver', tolerance: 'pointer', handle: '.sort-handle', diff --git a/lib/redmine/my_page.rb b/lib/redmine/my_page.rb index 02feb54bb..e2f078a14 100644 --- a/lib/redmine/my_page.rb +++ b/lib/redmine/my_page.rb @@ -19,6 +19,8 @@ module Redmine module MyPage include Redmine::I18n + CORE_GROUPS = ['top', 'left', 'right'] + CORE_BLOCKS = { 'issuesassignedtome' => {:label => :label_assigned_to_me_issues}, 'issuesreportedbyme' => {:label => :label_reported_issues}, @@ -30,6 +32,10 @@ module Redmine 'timelog' => {:label => :label_spent_time} } + def self.groups + CORE_GROUPS.dup.freeze + end + # Returns the available blocks def self.blocks CORE_BLOCKS.merge(additional_blocks).freeze diff --git a/public/stylesheets/application.css b/public/stylesheets/application.css index a250ba36b..5c45cf5a6 100644 --- a/public/stylesheets/application.css +++ b/public/stylesheets/application.css @@ -428,8 +428,8 @@ div.square { .message .contextual { margin-top: 0; } .splitcontent {overflow:auto;} -.splitcontentleft{float:left; width:49%;} -.splitcontentright{float:right; width:49%;} +.splitcontentleft, #list-left {float:left; width:49%;} +.splitcontentright, #list-right {float:right; width:49%;} form {display: inline;} input, select {vertical-align: middle; margin-top: 1px; margin-bottom: 1px;} input[type="submit"] { -webkit-appearance: button; } diff --git a/public/stylesheets/responsive.css b/public/stylesheets/responsive.css index 8e7f7465a..e4b8be20e 100644 --- a/public/stylesheets/responsive.css +++ b/public/stylesheets/responsive.css @@ -217,11 +217,11 @@ display: none; } - .splitcontentleft { + .splitcontentleft, #list-left { width: 100%; } - .splitcontentright { + .splitcontentright, #list-right { width: 100%; } diff --git a/test/functional/my_controller_test.rb b/test/functional/my_controller_test.rb index 92f5f8fa2..c35ff9043 100644 --- a/test/functional/my_controller_test.rb +++ b/test/functional/my_controller_test.rb @@ -411,9 +411,23 @@ class MyControllerTest < Redmine::ControllerTest end def test_order_blocks - xhr :post, :order_blocks, :group => 'left', 'blocks' => ['documents', 'calendar', 'latestnews'] + pref = User.find(2).pref + pref.my_page_layout = {'left' => ['news', 'calendar','documents']} + pref.save! + + xhr :post, :order_blocks, :group => 'left', :blocks => ['documents', 'calendar', 'news'] assert_response :success - assert_equal ['documents', 'calendar', 'latestnews'], User.find(2).pref[:my_page_layout]['left'] + assert_equal ['documents', 'calendar', 'news'], User.find(2).pref.my_page_layout['left'] + end + + def test_move_block + pref = User.find(2).pref + pref.my_page_layout = {'left' => ['news','documents'], 'right' => ['calendar']} + pref.save! + + xhr :post, :order_blocks, :group => 'left', :blocks => ['news', 'calendar', 'documents'] + assert_response :success + assert_equal({'left' => ['news', 'calendar', 'documents'], 'right' => []}, User.find(2).pref.my_page_layout) end def test_reset_rss_key_with_existing_key From 41cb7a3a55261c4497ea42510ab6753cac365409 Mon Sep 17 00:00:00 2001 From: Jean-Philippe Lang Date: Tue, 4 Apr 2017 17:19:55 +0000 Subject: [PATCH 0781/1117] Let the issue list be grouped by private flag. git-svn-id: http://svn.redmine.org/redmine/trunk@16476 e93f8b46-1217-0410-a6f0-8f06a7374b81 --- app/models/issue_query.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app/models/issue_query.rb b/app/models/issue_query.rb index 94a47e3fe..72a9728df 100644 --- a/app/models/issue_query.rb +++ b/app/models/issue_query.rb @@ -206,7 +206,7 @@ class IssueQuery < Query if User.current.allowed_to?(:set_issues_private, nil, :global => true) || User.current.allowed_to?(:set_own_issues_private, nil, :global => true) - @available_columns << QueryColumn.new(:is_private, :sortable => "#{Issue.table_name}.is_private") + @available_columns << QueryColumn.new(:is_private, :sortable => "#{Issue.table_name}.is_private", :groupable => true) end disabled_fields = Tracker.disabled_core_fields(trackers).map {|field| field.sub(/_id$/, '')} From 7b125bc2924125200e13bdbe5dc4c04e3078d157 Mon Sep 17 00:00:00 2001 From: Jean-Philippe Lang Date: Tue, 4 Apr 2017 17:22:08 +0000 Subject: [PATCH 0782/1117] Better handling of update failures when bulk editing time entries. git-svn-id: http://svn.redmine.org/redmine/trunk@16477 e93f8b46-1217-0410-a6f0-8f06a7374b81 --- app/controllers/timelog_controller.rb | 39 ++++++++++++---------- app/views/timelog/bulk_edit.html.erb | 26 ++++++++++++--- test/functional/timelog_controller_test.rb | 4 +-- test/ui/timelog_test_ui.rb | 30 ++++++++++++++++- 4 files changed, 73 insertions(+), 26 deletions(-) diff --git a/app/controllers/timelog_controller.rb b/app/controllers/timelog_controller.rb index 9cfe16312..0cfdd18db 100644 --- a/app/controllers/timelog_controller.rb +++ b/app/controllers/timelog_controller.rb @@ -172,19 +172,33 @@ class TimelogController < ApplicationController def bulk_update attributes = parse_params_for_bulk_update(params[:time_entry]) - unsaved_time_entry_ids = [] + unsaved_time_entries = [] + saved_time_entries = [] + @time_entries.each do |time_entry| time_entry.reload time_entry.safe_attributes = attributes call_hook(:controller_time_entries_bulk_edit_before_save, { :params => params, :time_entry => time_entry }) - unless time_entry.save - logger.info "time entry could not be updated: #{time_entry.errors.full_messages}" if logger && logger.info? - # Keep unsaved time_entry ids to display them in flash error - unsaved_time_entry_ids << time_entry.id + if time_entry.save + saved_time_entries << time_entry + else + unsaved_time_entries << time_entry end end - set_flash_from_bulk_time_entry_save(@time_entries, unsaved_time_entry_ids) - redirect_back_or_default project_time_entries_path(@projects.first) + + if unsaved_time_entries.empty? + flash[:notice] = l(:notice_successful_update) unless saved_time_entries.empty? + redirect_back_or_default project_time_entries_path(@projects.first) + else + @saved_time_entries = @time_entries + @unsaved_time_entries = unsaved_time_entries + @time_entries = TimeEntry.where(:id => unsaved_time_entries.map(&:id)). + preload(:project => :time_entry_activities). + preload(:user).to_a + + bulk_edit + render :action => 'bulk_edit' + end end def destroy @@ -243,17 +257,6 @@ private render_404 end - def set_flash_from_bulk_time_entry_save(time_entries, unsaved_time_entry_ids) - if unsaved_time_entry_ids.empty? - flash[:notice] = l(:notice_successful_update) unless time_entries.empty? - else - flash[:error] = l(:notice_failed_to_save_time_entries, - :count => unsaved_time_entry_ids.size, - :total => time_entries.size, - :ids => '#' + unsaved_time_entry_ids.join(', #')) - end - end - def find_optional_issue if params[:issue_id].present? @issue = Issue.find(params[:issue_id]) diff --git a/app/views/timelog/bulk_edit.html.erb b/app/views/timelog/bulk_edit.html.erb index 640f7d893..96c953151 100644 --- a/app/views/timelog/bulk_edit.html.erb +++ b/app/views/timelog/bulk_edit.html.erb @@ -1,5 +1,21 @@

          <%= l(:label_bulk_edit_selected_time_entries) %>

          +<% if @unsaved_time_entries.present? %> +
          + + <%= l(:notice_failed_to_save_time_entries, + :count => @unsaved_time_entries.size, + :total => @saved_time_entries.size, + :ids => @unsaved_time_entries.map {|i| "##{i.id}"}.join(', ')) %> + +
            + <% bulk_edit_error_messages(@unsaved_time_entries).each do |message| %> +
          • <%= message %>
          • + <% end %> +
          +
          +<% end %> +
            <% @time_entries.each do |entry| %> <%= content_tag 'li', @@ -12,29 +28,29 @@

            - + <%= text_field :time_entry, :issue_id, :size => 6 %>

            - + <%= date_field :time_entry, :spent_on, :size => 10 %><%= calendar_for('time_entry_spent_on') %>

            - + <%= text_field :time_entry, :hours, :size => 6 %>

            <% if @available_activities.any? %>

            - + <%= select_tag('time_entry[activity_id]', content_tag('option', l(:label_no_change_option), :value => '') + options_from_collection_for_select(@available_activities, :id, :name)) %>

            <% end %>

            - + <%= text_field(:time_entry, :comments, :size => 100) %>

            diff --git a/test/functional/timelog_controller_test.rb b/test/functional/timelog_controller_test.rb index ead919006..4e6df7e1b 100644 --- a/test/functional/timelog_controller_test.rb +++ b/test/functional/timelog_controller_test.rb @@ -582,8 +582,8 @@ class TimelogControllerTest < Redmine::ControllerTest @request.session[:user_id] = 2 post :bulk_update, :params => {:ids => [1, 2], :time_entry => { :hours => 'A'}} - assert_response 302 - assert_match /Failed to save 2 time entrie/, flash[:error] + assert_response :success + assert_select_error /Failed to save 2 time entrie/ end def test_bulk_update_on_different_projects diff --git a/test/ui/timelog_test_ui.rb b/test/ui/timelog_test_ui.rb index e0da8b067..0495b903e 100644 --- a/test/ui/timelog_test_ui.rb +++ b/test/ui/timelog_test_ui.rb @@ -20,7 +20,8 @@ require File.expand_path('../base', __FILE__) class Redmine::UiTest::TimelogTest < Redmine::UiTest::Base fixtures :projects, :users, :email_addresses, :roles, :members, :member_roles, :trackers, :projects_trackers, :enabled_modules, :issue_statuses, :issues, - :enumerations, :custom_fields, :custom_values, :custom_fields_trackers + :enumerations, :custom_fields, :custom_values, :custom_fields_trackers, + :time_entries def test_changing_project_should_update_activities project = Project.find(1) @@ -41,4 +42,31 @@ class Redmine::UiTest::TimelogTest < Redmine::UiTest::Base assert !has_content?('Design') end end + + def test_bulk_edit + log_user 'jsmith', 'jsmith' + visit '/time_entries/bulk_edit?ids[]=1&ids[]=2&ids[]=3' + fill_in 'Hours', :with => '8.5' + select 'QA', :from => 'Activity' + page.first(:button, 'Submit').click + + entries = TimeEntry.where(:id => [1,2,3]).to_a + assert entries.all? {|entry| entry.hours == 8.5} + assert entries.all? {|entry| entry.activity.name == 'QA'} + end + + def test_bulk_edit_with_failure + log_user 'jsmith', 'jsmith' + visit '/time_entries/bulk_edit?ids[]=1&ids[]=2&ids[]=3' + fill_in 'Hours', :with => 'A' + page.first(:button, 'Submit').click + + assert page.has_css?('#errorExplanation') + fill_in 'Hours', :with => '7' + page.first(:button, 'Submit').click + + assert_equal "/projects/ecookbook/time_entries", current_path + entries = TimeEntry.where(:id => [1,2,3]).to_a + assert entries.all? {|entry| entry.hours == 7.0} + end end From 8fe94c30fe2a5044eda08d9bb73a2e5391273511 Mon Sep 17 00:00:00 2001 From: Jean-Philippe Lang Date: Tue, 4 Apr 2017 17:49:40 +0000 Subject: [PATCH 0783/1117] Adds a link back to the issue list that we are coming from. git-svn-id: http://svn.redmine.org/redmine/trunk@16478 e93f8b46-1217-0410-a6f0-8f06a7374b81 --- app/controllers/issues_controller.rb | 6 ++++++ app/views/issues/show.html.erb | 6 +++++- test/integration/issues_test.rb | 1 + 3 files changed, 12 insertions(+), 1 deletion(-) diff --git a/app/controllers/issues_controller.rb b/app/controllers/issues_controller.rb index 73f2eb404..b6c72a314 100644 --- a/app/controllers/issues_controller.rb +++ b/app/controllers/issues_controller.rb @@ -412,6 +412,7 @@ class IssuesController < ApplicationController else retrieve_query_from_session if @query + @per_page = per_page_option limit = 500 issue_ids = @query.issue_ids(:limit => (limit + 1)) if (idx = issue_ids.index(@issue.id)) && idx < limit @@ -422,6 +423,11 @@ class IssuesController < ApplicationController @prev_issue_id = issue_ids[idx - 1] if idx > 0 @next_issue_id = issue_ids[idx + 1] if idx < (issue_ids.size - 1) end + query_params = @query.as_params + if @issue_position + query_params = query_params.merge(:page => (@issue_position / per_page_option) + 1, :per_page => per_page_option) + end + @query_path = _project_issues_path(@query.project, query_params) end end end diff --git a/app/views/issues/show.html.erb b/app/views/issues/show.html.erb index e51124712..08028d270 100644 --- a/app/views/issues/show.html.erb +++ b/app/views/issues/show.html.erb @@ -11,7 +11,11 @@ :title => "##{@prev_issue_id}", :accesskey => accesskey(:previous) %> | <% if @issue_position && @issue_count %> - <%= l(:label_item_position, :position => @issue_position, :count => @issue_count) %> | + + <%= link_to_if @query_path, + l(:label_item_position, :position => @issue_position, :count => @issue_count), + @query_path %> + | <% end %> <%= link_to_if @next_issue_id, "#{l(:label_next)} \xc2\xbb", diff --git a/test/integration/issues_test.rb b/test/integration/issues_test.rb index c90469be7..eb402e172 100644 --- a/test/integration/issues_test.rb +++ b/test/integration/issues_test.rb @@ -130,6 +130,7 @@ class IssuesTest < Redmine::IntegrationTest get '/issues/5' assert_response :success assert_select '.next-prev-links .position', :text => '3 of 5' + assert_select '.next-prev-links .position a[href^=?]', '/projects/ecookbook/issues?' end end From f604fe946095350dccbb09a84962e94e10374d77 Mon Sep 17 00:00:00 2001 From: Jean-Philippe Lang Date: Tue, 4 Apr 2017 17:52:24 +0000 Subject: [PATCH 0784/1117] SQL Cleanup. git-svn-id: http://svn.redmine.org/redmine/trunk@16479 e93f8b46-1217-0410-a6f0-8f06a7374b81 --- app/models/principal.rb | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/app/models/principal.rb b/app/models/principal.rb index a1f5156bf..b8ab4ea97 100644 --- a/app/models/principal.rb +++ b/app/models/principal.rb @@ -28,8 +28,7 @@ class Principal < ActiveRecord::Base has_many :members, :foreign_key => 'user_id', :dependent => :destroy has_many :memberships, - lambda {joins(:project). - where("#{Project.table_name}.status<>#{Project::STATUS_ARCHIVED}")}, + lambda {joins(:project).where.not(:projects => {:status => Project::STATUS_ARCHIVED})}, :class_name => 'Member', :foreign_key => 'user_id' has_many :projects, :through => :memberships From d8dec34ece7463ab17c78c4c4ea16497780fd91e Mon Sep 17 00:00:00 2001 From: Jean-Philippe Lang Date: Tue, 4 Apr 2017 17:53:48 +0000 Subject: [PATCH 0785/1117] Don't compare LOWER() with #downcase. git-svn-id: http://svn.redmine.org/redmine/trunk@16480 e93f8b46-1217-0410-a6f0-8f06a7374b81 --- app/models/project.rb | 8 +++----- 1 file changed, 3 insertions(+), 5 deletions(-) diff --git a/app/models/project.rb b/app/models/project.rb index a425d8ca7..ce68c725c 100644 --- a/app/models/project.rb +++ b/app/models/project.rb @@ -103,11 +103,9 @@ class Project < ActiveRecord::Base where(Project.allowed_to_condition(user, permission, *args)) } scope :like, lambda {|arg| - if arg.blank? - where(nil) - else - pattern = "%#{arg.to_s.strip.downcase}%" - where("LOWER(identifier) LIKE :p OR LOWER(name) LIKE :p", :p => pattern) + if arg.present? + pattern = "%#{arg.to_s.strip}%" + where("LOWER(identifier) LIKE LOWER(:p) OR LOWER(name) LIKE LOWER(:p)", :p => pattern) end } scope :sorted, lambda {order(:lft)} From 70b0bc5168aff813398334d859db1212e86a2b48 Mon Sep 17 00:00:00 2001 From: Jean-Philippe Lang Date: Tue, 4 Apr 2017 17:54:39 +0000 Subject: [PATCH 0786/1117] Adds a scope to left join the issue. git-svn-id: http://svn.redmine.org/redmine/trunk@16481 e93f8b46-1217-0410-a6f0-8f06a7374b81 --- app/models/time_entry.rb | 3 +++ app/models/time_entry_query.rb | 2 +- 2 files changed, 4 insertions(+), 1 deletion(-) diff --git a/app/models/time_entry.rb b/app/models/time_entry.rb index 241ff2ffc..2376f36b0 100644 --- a/app/models/time_entry.rb +++ b/app/models/time_entry.rb @@ -54,6 +54,9 @@ class TimeEntry < ActiveRecord::Base joins(:project). where(TimeEntry.visible_condition(args.shift || User.current, *args)) } + scope :left_join_issue, lambda { + joins("LEFT OUTER JOIN #{Issue.table_name} ON #{Issue.table_name}.id = #{TimeEntry.table_name}.issue_id") + } scope :on_issue, lambda {|issue| joins(:issue). where("#{Issue.table_name}.root_id = #{issue.root_id} AND #{Issue.table_name}.lft >= #{issue.lft} AND #{Issue.table_name}.rgt <= #{issue.rgt}") diff --git a/app/models/time_entry_query.rb b/app/models/time_entry_query.rb index eab1113e2..063074496 100644 --- a/app/models/time_entry_query.rb +++ b/app/models/time_entry_query.rb @@ -115,7 +115,7 @@ class TimeEntryQuery < Query def base_scope TimeEntry.visible. joins(:project, :user). - joins("LEFT OUTER JOIN issues ON issues.id = time_entries.issue_id"). + left_join_issue. where(statement) end From fbde611f3f4eb681cffaaab76ab8761d0053a85e Mon Sep 17 00:00:00 2001 From: Jean-Philippe Lang Date: Tue, 4 Apr 2017 18:00:20 +0000 Subject: [PATCH 0787/1117] Use #to_sql to generate the subquery. git-svn-id: http://svn.redmine.org/redmine/trunk@16482 e93f8b46-1217-0410-a6f0-8f06a7374b81 --- app/models/issue_status.rb | 13 +++++++------ 1 file changed, 7 insertions(+), 6 deletions(-) diff --git a/app/models/issue_status.rb b/app/models/issue_status.rb index bdf096121..1a1beaf1c 100644 --- a/app/models/issue_status.rb +++ b/app/models/issue_status.rb @@ -92,12 +92,13 @@ class IssueStatus < ActiveRecord::Base if is_closed_changed? && is_closed == true # First we update issues that have a journal for when the current status was set, # a subselect is used to update all issues with a single query - subselect = "SELECT MAX(j.created_on) FROM #{Journal.table_name} j" + - " JOIN #{JournalDetail.table_name} d ON d.journal_id = j.id" + - " WHERE j.journalized_type = 'Issue' AND j.journalized_id = #{Issue.table_name}.id" + - " AND d.property = 'attr' AND d.prop_key = 'status_id' AND d.value = :status_id" - Issue.where(:status_id => id, :closed_on => nil). - update_all(["closed_on = (#{subselect})", {:status_id => id.to_s}]) + subquery = Journal.joins(:details). + where(:journalized_type => 'Issue'). + where("journalized_id = #{Issue.table_name}.id"). + where(:journal_details => {:property => 'attr', :prop_key => 'status_id', :value => id.to_s}). + select("MAX(created_on)"). + to_sql + Issue.where(:status_id => id, :closed_on => nil).update_all("closed_on = (#{subquery})") # Then we update issues that don't have a journal which means the # current status was set on creation From 3a4ce13b42a6bbdc2f8156a8f23bc2c6c2d5a498 Mon Sep 17 00:00:00 2001 From: Jean-Philippe Lang Date: Tue, 4 Apr 2017 18:03:49 +0000 Subject: [PATCH 0788/1117] Use 2 queries that use an index. git-svn-id: http://svn.redmine.org/redmine/trunk@16483 e93f8b46-1217-0410-a6f0-8f06a7374b81 --- app/models/issue_status.rb | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/app/models/issue_status.rb b/app/models/issue_status.rb index 1a1beaf1c..a3f194247 100644 --- a/app/models/issue_status.rb +++ b/app/models/issue_status.rb @@ -116,6 +116,7 @@ class IssueStatus < ActiveRecord::Base # Deletes associated workflows def delete_workflow_rules - WorkflowRule.where(["old_status_id = :id OR new_status_id = :id", {:id => id}]).delete_all + WorkflowRule.where(:old_status_id => id).delete_all + WorkflowRule.where(:new_status_id => id).delete_all end end From b021eb648dbe854969faddd189a3880ce52bbc3e Mon Sep 17 00:00:00 2001 From: Toshi MARUYAMA Date: Wed, 5 Apr 2017 10:53:33 +0000 Subject: [PATCH 0789/1117] remove trailing white space from Gemfile git-svn-id: http://svn.redmine.org/redmine/trunk@16484 e93f8b46-1217-0410-a6f0-8f06a7374b81 --- Gemfile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Gemfile b/Gemfile index 83e44626c..1b51d21cf 100644 --- a/Gemfile +++ b/Gemfile @@ -18,7 +18,7 @@ gem "mimemagic" gem "nokogiri", (RUBY_VERSION >= "2.1" ? ">= 1.7.0" : "~> 1.6.8") gem "i18n", "~> 0.7.0" -# Request at least rails-html-sanitizer 1.0.3 because of security advisories +# Request at least rails-html-sanitizer 1.0.3 because of security advisories gem "rails-html-sanitizer", ">= 1.0.3" # Windows does not include zoneinfo files, so bundle the tzinfo-data gem From 150380ed585e2647f1518c24a6c9bbcfb2250203 Mon Sep 17 00:00:00 2001 From: Toshi MARUYAMA Date: Wed, 5 Apr 2017 10:53:44 +0000 Subject: [PATCH 0790/1117] Gemfile: explicitly use rbpdf 1.19.1 (#22335, #24271) git-svn-id: http://svn.redmine.org/redmine/trunk@16485 e93f8b46-1217-0410-a6f0-8f06a7374b81 --- Gemfile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Gemfile b/Gemfile index 1b51d21cf..4a274549f 100644 --- a/Gemfile +++ b/Gemfile @@ -23,7 +23,7 @@ gem "rails-html-sanitizer", ">= 1.0.3" # Windows does not include zoneinfo files, so bundle the tzinfo-data gem gem 'tzinfo-data', platforms: [:mingw, :x64_mingw, :mswin, :jruby] -gem "rbpdf", "~> 1.19.0" +gem "rbpdf", "~> 1.19.1" # Optional gem for LDAP authentication group :ldap do From 476c4f47d10f1d2fe444dd6525347581f72fcff0 Mon Sep 17 00:00:00 2001 From: Toshi MARUYAMA Date: Wed, 5 Apr 2017 13:34:56 +0000 Subject: [PATCH 0791/1117] Japanese translation updated by Go MAEDA (#25507) git-svn-id: http://svn.redmine.org/redmine/trunk@16488 e93f8b46-1217-0410-a6f0-8f06a7374b81 --- config/locales/ja.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/config/locales/ja.yml b/config/locales/ja.yml index 500d114a0..1fabe0729 100644 --- a/config/locales/ja.yml +++ b/config/locales/ja.yml @@ -1229,4 +1229,4 @@ ja: field_last_updated_by: 最終更新者 field_full_width_layout: ワイド表示 label_last_notes: 最新の注記 - field_digest: Checksum + field_digest: チェックサム From 21887c742a394427f3ae7ba5fcdb33d99c288aab Mon Sep 17 00:00:00 2001 From: Toshi MARUYAMA Date: Wed, 5 Apr 2017 13:35:07 +0000 Subject: [PATCH 0792/1117] Bulgarian translation updated by Ivan Cenov (#25518) git-svn-id: http://svn.redmine.org/redmine/trunk@16489 e93f8b46-1217-0410-a6f0-8f06a7374b81 --- config/locales/bg.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/config/locales/bg.yml b/config/locales/bg.yml index 69923e038..37735c97d 100644 --- a/config/locales/bg.yml +++ b/config/locales/bg.yml @@ -375,6 +375,7 @@ bg: field_updated_by: Обновено от field_last_updated_by: Последно обновено от field_full_width_layout: Пълна широчина + field_digest: Checksum setting_app_title: Заглавие setting_app_subtitle: Описание @@ -1014,6 +1015,7 @@ bg: label_font_default: Шрифт по подразбиране label_font_monospace: Monospaced шрифт label_font_proportional: Пропорционален шрифт + label_last_notes: Last notes button_login: Вход button_submit: Изпращане @@ -1205,5 +1207,3 @@ bg: description_wiki_subpages_reassign: Изберете нова родителска страница description_all_columns: Всички колони text_repository_identifier_info: 'Позволени са малки букви (a-z), цифри, тирета и _.
            Промяна след създаването му не е възможна.' - label_last_notes: Last notes - field_digest: Checksum From 353914768e4d96b424dd0501a661797a8b15eb2c Mon Sep 17 00:00:00 2001 From: Jean-Philippe Lang Date: Wed, 5 Apr 2017 15:59:43 +0000 Subject: [PATCH 0793/1117] Code cleanup. git-svn-id: http://svn.redmine.org/redmine/trunk@16490 e93f8b46-1217-0410-a6f0-8f06a7374b81 --- app/controllers/roles_controller.rb | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/app/controllers/roles_controller.rb b/app/controllers/roles_controller.rb index a09455949..d134e1f67 100644 --- a/app/controllers/roles_controller.rb +++ b/app/controllers/roles_controller.rb @@ -92,10 +92,11 @@ class RolesController < ApplicationController end def destroy - @role.destroy - redirect_to roles_path - rescue - flash[:error] = l(:error_can_not_remove_role) + begin + @role.destroy + rescue + flash[:error] = l(:error_can_not_remove_role) + end redirect_to roles_path end From fc73a90740f323c36e1e73bc97bda090237e8c30 Mon Sep 17 00:00:00 2001 From: Jean-Philippe Lang Date: Wed, 5 Apr 2017 16:09:58 +0000 Subject: [PATCH 0794/1117] Always set spent_hours instance variables to a Float in Issue instances (#25526). Patch by Holger Just. git-svn-id: http://svn.redmine.org/redmine/trunk@16491 e93f8b46-1217-0410-a6f0-8f06a7374b81 --- app/models/issue.rb | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/app/models/issue.rb b/app/models/issue.rb index d7ef5eded..f08e73d24 100644 --- a/app/models/issue.rb +++ b/app/models/issue.rb @@ -1052,7 +1052,7 @@ class Issue < ActiveRecord::Base # Returns the number of hours spent on this issue def spent_hours - @spent_hours ||= time_entries.sum(:hours) || 0 + @spent_hours ||= time_entries.sum(:hours) || 0.0 end # Returns the total number of hours spent on this issue and its descendants @@ -1107,7 +1107,7 @@ class Issue < ActiveRecord::Base if issues.any? hours_by_issue_id = TimeEntry.visible(user).where(:issue_id => issues.map(&:id)).group(:issue_id).sum(:hours) issues.each do |issue| - issue.instance_variable_set "@spent_hours", (hours_by_issue_id[issue.id] || 0) + issue.instance_variable_set "@spent_hours", (hours_by_issue_id[issue.id] || 0.0) end end end @@ -1120,7 +1120,7 @@ class Issue < ActiveRecord::Base " AND parent.lft <= #{Issue.table_name}.lft AND parent.rgt >= #{Issue.table_name}.rgt"). where("parent.id IN (?)", issues.map(&:id)).group("parent.id").sum(:hours) issues.each do |issue| - issue.instance_variable_set "@total_spent_hours", (hours_by_issue_id[issue.id] || 0) + issue.instance_variable_set "@total_spent_hours", (hours_by_issue_id[issue.id] || 0.0) end end end From 73dc7256c60847c75438a149e4387e47c68453ee Mon Sep 17 00:00:00 2001 From: Jean-Philippe Lang Date: Wed, 5 Apr 2017 16:10:16 +0000 Subject: [PATCH 0795/1117] Adds a test for #25526. git-svn-id: http://svn.redmine.org/redmine/trunk@16492 e93f8b46-1217-0410-a6f0-8f06a7374b81 --- test/integration/api_test/issues_test.rb | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/test/integration/api_test/issues_test.rb b/test/integration/api_test/issues_test.rb index f62f83258..81f62ea2d 100644 --- a/test/integration/api_test/issues_test.rb +++ b/test/integration/api_test/issues_test.rb @@ -336,6 +336,15 @@ class Redmine::ApiTest::IssuesTest < Redmine::ApiTest::Base assert_equal 1, json['issue']['children'].select {|child| child.key?('children')}.size end + test "GET /issues/:id.json with no spent time should return floats" do + issue = Issue.generate! + get "/issues/#{issue.id}.json" + + json = ActiveSupport::JSON.decode(response.body) + assert_kind_of Float, json['issue']['spent_hours'] + assert_kind_of Float, json['issue']['total_spent_hours'] + end + def test_show_should_include_issue_attributes get '/issues/1.xml' assert_select 'issue>is_private', :text => 'false' From e0d85267e133eaf9eb4742c9daf435f7c27447f1 Mon Sep 17 00:00:00 2001 From: Toshi MARUYAMA Date: Wed, 5 Apr 2017 16:50:26 +0000 Subject: [PATCH 0796/1117] Russian translation for label_user_mail_option_only_(assigned|owner) changed by Ilya Potapov (#25397, #24177) git-svn-id: http://svn.redmine.org/redmine/trunk@16497 e93f8b46-1217-0410-a6f0-8f06a7374b81 --- config/locales/ru.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/config/locales/ru.yml b/config/locales/ru.yml index 16daec183..949adb209 100644 --- a/config/locales/ru.yml +++ b/config/locales/ru.yml @@ -1314,8 +1314,8 @@ ru: error_cannot_reassign_time_entries_to_an_issue_about_to_be_deleted: Затраченное время не может быть переназначено на задачу, которая будет удалена setting_timelog_required_fields: Обязательные поля для трудозатрат label_attribute_of_object: '%{name} объекта %{object_name}' - label_user_mail_option_only_assigned: Только для объектов, которые назначены мне - label_user_mail_option_only_owner: Только для объектов, для которых я являюсь владельцем + label_user_mail_option_only_assigned: Только для объектов, которые я отслеживаю или которые мне назначены + label_user_mail_option_only_owner: Только для объектов, которые я отслеживаю или для которых я владелец warning_fields_cleared_on_bulk_edit: Изменения приведут к удалению значений одного или нескольких полей выбранных объектов field_updated_by: Кем изменено field_last_updated_by: Последний изменивший From 9ae19223d2468f64789ea6806474713bc6828c93 Mon Sep 17 00:00:00 2001 From: Toshi MARUYAMA Date: Wed, 5 Apr 2017 16:50:37 +0000 Subject: [PATCH 0797/1117] Bulgarian translation updated by Ivan Cenov (#25518) git-svn-id: http://svn.redmine.org/redmine/trunk@16498 e93f8b46-1217-0410-a6f0-8f06a7374b81 --- config/locales/bg.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/config/locales/bg.yml b/config/locales/bg.yml index 37735c97d..25656a9c7 100644 --- a/config/locales/bg.yml +++ b/config/locales/bg.yml @@ -375,7 +375,7 @@ bg: field_updated_by: Обновено от field_last_updated_by: Последно обновено от field_full_width_layout: Пълна широчина - field_digest: Checksum + field_digest: Контролна сума setting_app_title: Заглавие setting_app_subtitle: Описание @@ -1015,7 +1015,7 @@ bg: label_font_default: Шрифт по подразбиране label_font_monospace: Monospaced шрифт label_font_proportional: Пропорционален шрифт - label_last_notes: Last notes + label_last_notes: Последни коментари button_login: Вход button_submit: Изпращане From 36869efbd199e47278ba5942f5dbb7240bf3f5d5 Mon Sep 17 00:00:00 2001 From: Toshi MARUYAMA Date: Wed, 5 Apr 2017 17:07:08 +0000 Subject: [PATCH 0798/1117] Russian "setting_timespan_format" translation updated by Kirill Bezrukov (#25349) git-svn-id: http://svn.redmine.org/redmine/trunk@16499 e93f8b46-1217-0410-a6f0-8f06a7374b81 --- config/locales/ru.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/config/locales/ru.yml b/config/locales/ru.yml index 949adb209..078b09751 100644 --- a/config/locales/ru.yml +++ b/config/locales/ru.yml @@ -1305,7 +1305,7 @@ ru: label_font_default: Шрифт по умолчанию label_font_monospace: Моноширинный шрифт label_font_proportional: Пропорциональный шрифт - setting_timespan_format: Time span format + setting_timespan_format: Формат промежутка времени label_table_of_contents: Содержание setting_commit_logs_formatting: Использовать форматирование текста для комментариев хранилища setting_mail_handler_enable_regex_delimiters: Использовать регулярные выражения From 99fa41011fb260938005139f1328c46fd3ee64c5 Mon Sep 17 00:00:00 2001 From: Jean-Philippe Lang Date: Thu, 6 Apr 2017 16:34:52 +0000 Subject: [PATCH 0799/1117] Add kbd to ALLOWED_TAGS (#25503). Patch by Jan Schulz-Hofen. git-svn-id: http://svn.redmine.org/redmine/trunk@16500 e93f8b46-1217-0410-a6f0-8f06a7374b81 --- lib/redmine/wiki_formatting/textile/redcloth3.rb | 2 +- .../lib/redmine/wiki_formatting/textile_formatter_test.rb | 6 ++++++ 2 files changed, 7 insertions(+), 1 deletion(-) diff --git a/lib/redmine/wiki_formatting/textile/redcloth3.rb b/lib/redmine/wiki_formatting/textile/redcloth3.rb index 31051fa96..bcb796ec6 100644 --- a/lib/redmine/wiki_formatting/textile/redcloth3.rb +++ b/lib/redmine/wiki_formatting/textile/redcloth3.rb @@ -1202,8 +1202,8 @@ class RedCloth3 < String end end - ALLOWED_TAGS = %w(redpre pre code notextile) + ALLOWED_TAGS = %w(redpre pre code kbd notextile) def escape_html_tags(text) text.gsub!(%r{<(\/?([!\w]+)[^<>\n]*)(>?)}) {|m| ALLOWED_TAGS.include?($2) ? "<#{$1}#{$3}" : "<#{$1}#{'>' unless $3.blank?}" } end diff --git a/test/unit/lib/redmine/wiki_formatting/textile_formatter_test.rb b/test/unit/lib/redmine/wiki_formatting/textile_formatter_test.rb index 03d4ef5e6..548a41de3 100644 --- a/test/unit/lib/redmine/wiki_formatting/textile_formatter_test.rb +++ b/test/unit/lib/redmine/wiki_formatting/textile_formatter_test.rb @@ -166,6 +166,12 @@ EXPECTED ) end + def test_kbd + assert_html_output({ + 'test' => 'test' + }, false) + end + def test_use_of_backslashes_followed_by_numbers_in_headers assert_html_output({ 'h1. 2009\02\09' => '

            2009\02\09

            ' From 281b26e2f548b4f79dfd2d59c8263d6b670c3304 Mon Sep 17 00:00:00 2001 From: Jean-Philippe Lang Date: Thu, 6 Apr 2017 16:37:18 +0000 Subject: [PATCH 0800/1117] Helper methods to find out if a given language is supported (#25503). Patch by Jan Schulz-Hofen. git-svn-id: http://svn.redmine.org/redmine/trunk@16501 e93f8b46-1217-0410-a6f0-8f06a7374b81 --- lib/redmine/syntax_highlighting.rb | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) diff --git a/lib/redmine/syntax_highlighting.rb b/lib/redmine/syntax_highlighting.rb index 7480ebd16..7f4334977 100644 --- a/lib/redmine/syntax_highlighting.rb +++ b/lib/redmine/syntax_highlighting.rb @@ -40,6 +40,16 @@ module Redmine rescue ERB::Util.h(text) end + + def language_supported?(language) + if highlighter.respond_to? :language_supported? + highlighter.language_supported? language + else + true + end + rescue + false + end end module CodeRay @@ -58,6 +68,12 @@ module Redmine def highlight_by_language(text, language) ::CodeRay.scan(text, language).html(:wrap => :span) end + + def language_supported?(language) + ::CodeRay::Scanners.list.include?(language.to_s.downcase.to_sym) + rescue + false + end end end end From 4f2c5a9945d0a1d83620f5cfb7eb8d19056edc34 Mon Sep 17 00:00:00 2001 From: Jean-Philippe Lang Date: Thu, 6 Apr 2017 16:41:52 +0000 Subject: [PATCH 0801/1117] Filter arbitrary class names and ids in rendered HTML output (#25503). * Disallow setting arbitrary classes and ids via Textile syntax * Only allow valid/supported languages for syntax highlighted code blocks Patch by Jan Schulz-Hofen. git-svn-id: http://svn.redmine.org/redmine/trunk@16502 e93f8b46-1217-0410-a6f0-8f06a7374b81 --- .../wiki_formatting/markdown/formatter.rb | 2 +- .../wiki_formatting/textile/formatter.rb | 10 +++- .../wiki_formatting/textile/redcloth3.rb | 12 ++++- test/unit/helpers/application_helper_test.rb | 13 ++--- .../markdown_formatter_test.rb | 9 ++++ .../wiki_formatting/textile_formatter_test.rb | 48 +++++++++++++++++-- 6 files changed, 80 insertions(+), 14 deletions(-) diff --git a/lib/redmine/wiki_formatting/markdown/formatter.rb b/lib/redmine/wiki_formatting/markdown/formatter.rb index 4afbc2fdd..bfb04774c 100644 --- a/lib/redmine/wiki_formatting/markdown/formatter.rb +++ b/lib/redmine/wiki_formatting/markdown/formatter.rb @@ -35,7 +35,7 @@ module Redmine end def block_code(code, language) - if language.present? + if language.present? && Redmine::SyntaxHighlighting.language_supported?(language) "
            " +
                           Redmine::SyntaxHighlighting.highlight_by_language(code, language) +
                           "
            " diff --git a/lib/redmine/wiki_formatting/textile/formatter.rb b/lib/redmine/wiki_formatting/textile/formatter.rb index 5862a1c62..8ff623a73 100644 --- a/lib/redmine/wiki_formatting/textile/formatter.rb +++ b/lib/redmine/wiki_formatting/textile/formatter.rb @@ -121,8 +121,14 @@ module Redmine text.gsub!(//) do content = @pre_list[$1.to_i] if content.match(/\s?(.+)/m) - content = "" + - Redmine::SyntaxHighlighting.highlight_by_language($2, $1) + language = $1 + text = $2 + if Redmine::SyntaxHighlighting.language_supported?(language) + content = "" + + Redmine::SyntaxHighlighting.highlight_by_language(text, language) + else + content = "#{ERB::Util.h(text)}" + end end content end diff --git a/lib/redmine/wiki_formatting/textile/redcloth3.rb b/lib/redmine/wiki_formatting/textile/redcloth3.rb index bcb796ec6..d0bd217d3 100644 --- a/lib/redmine/wiki_formatting/textile/redcloth3.rb +++ b/lib/redmine/wiki_formatting/textile/redcloth3.rb @@ -494,7 +494,15 @@ class RedCloth3 < String style << "text-align:#{ h_align( $& ) };" if text =~ A_HLGN cls, id = $1, $2 if cls =~ /^(.*?)#(.*)$/ - + + # add wiki-class- and wiki-id- to classes and ids to prevent setting of + # arbitrary classes and ids + cls = cls.split(/\s+/).map do |c| + c.starts_with?('wiki-class-') ? c : "wiki-class-#{c}" + end.join(' ') if cls + + id = id.starts_with?('wiki-id-') ? id : "wiki-id-#{id}" if id + atts = '' atts << " style=\"#{ style.join }\"" unless style.empty? atts << " class=\"#{ cls }\"" unless cls.to_s.empty? @@ -1097,7 +1105,7 @@ class RedCloth3 < String first.match(/<#{ OFFTAGS }([^>]*)>/) tag = $1 $2.to_s.match(/(class\=("[^"]+"|'[^']+'))/i) - tag << " #{$1}" if $1 + tag << " #{$1}" if $1 && tag == 'code' @pre_list << "<#{ tag }>#{ aftertag }" end elsif $1 and codepre > 0 diff --git a/test/unit/helpers/application_helper_test.rb b/test/unit/helpers/application_helper_test.rb index a0d88eb5d..500fbd86e 100644 --- a/test/unit/helpers/application_helper_test.rb +++ b/test/unit/helpers/application_helper_test.rb @@ -117,7 +117,8 @@ class ApplicationHelperTest < Redmine::HelperTest to_test = { '!http://foo.bar/image.jpg!' => '', 'floating !>http://foo.bar/image.jpg!' => 'floating ', - 'with class !(some-class)http://foo.bar/image.jpg!' => 'with class ', + 'with class !(some-class)http://foo.bar/image.jpg!' => 'with class ', + 'with class !(wiki-class-foo)http://foo.bar/image.jpg!' => 'with class ', 'with style !{width:100px;height:100px}http://foo.bar/image.jpg!' => 'with style ', 'with title !http://foo.bar/image.jpg(This is a title)!' => 'with title This is a title', 'with title !http://foo.bar/image.jpg(This is a double-quoted "title")!' => 'with title This is a double-quoted "title"', @@ -911,11 +912,11 @@ RAW "
            content
            " => "
            <div>content</div>
            ", "HTML comment: " => "

            HTML comment: <!-- no comments -->

            ", "