##// END OF EJS Templates
Adds settings to control start/due dates and priority on parent tasks (#5490)....
Jean-Philippe Lang -
r13887:0ad09e3aef86
parent child
Show More
@@ -0,0 +1,146
1 # Redmine - project management software
2 # Copyright (C) 2006-2015 Jean-Philippe Lang
3 #
4 # This program is free software; you can redistribute it and/or
5 # modify it under the terms of the GNU General Public License
6 # as published by the Free Software Foundation; either version 2
7 # of the License, or (at your option) any later version.
8 #
9 # This program is distributed in the hope that it will be useful,
10 # but WITHOUT ANY WARRANTY; without even the implied warranty of
11 # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
12 # GNU General Public License for more details.
13 #
14 # You should have received a copy of the GNU General Public License
15 # along with this program; if not, write to the Free Software
16 # Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
17
18 require File.expand_path('../../test_helper', __FILE__)
19
20 class IssueSubtaskingTest < ActiveSupport::TestCase
21 fixtures :projects, :users, :roles, :members, :member_roles,
22 :trackers, :projects_trackers,
23 :issue_statuses, :issue_categories, :enumerations,
24 :issues
25
26 def test_leaf_planning_fields_should_be_editable
27 issue = Issue.generate!
28 user = User.find(1)
29 %w(priority_id done_ratio start_date due_date estimated_hours).each do |attribute|
30 assert issue.safe_attribute?(attribute, user)
31 end
32 end
33
34 def test_parent_dates_should_be_read_only_with_parent_issue_dates_set_to_derived
35 with_settings :parent_issue_dates => 'derived' do
36 issue = Issue.generate_with_child!
37 user = User.find(1)
38 %w(start_date due_date).each do |attribute|
39 assert !issue.safe_attribute?(attribute, user)
40 end
41 end
42 end
43
44 def test_parent_dates_should_be_lowest_start_and_highest_due_dates_with_parent_issue_dates_set_to_derived
45 with_settings :parent_issue_dates => 'derived' do
46 parent = Issue.generate!
47 parent.generate_child!(:start_date => '2010-01-25', :due_date => '2010-02-15')
48 parent.generate_child!( :due_date => '2010-02-13')
49 parent.generate_child!(:start_date => '2010-02-01', :due_date => '2010-02-22')
50 parent.reload
51 assert_equal Date.parse('2010-01-25'), parent.start_date
52 assert_equal Date.parse('2010-02-22'), parent.due_date
53 end
54 end
55
56 def test_reschuling_a_parent_should_reschedule_subtasks_with_parent_issue_dates_set_to_derived
57 with_settings :parent_issue_dates => 'derived' do
58 parent = Issue.generate!
59 c1 = parent.generate_child!(:start_date => '2010-05-12', :due_date => '2010-05-18')
60 c2 = parent.generate_child!(:start_date => '2010-06-03', :due_date => '2010-06-10')
61 parent.reload.reschedule_on!(Date.parse('2010-06-02'))
62 c1.reload
63 assert_equal [Date.parse('2010-06-02'), Date.parse('2010-06-08')], [c1.start_date, c1.due_date]
64 c2.reload
65 assert_equal [Date.parse('2010-06-03'), Date.parse('2010-06-10')], [c2.start_date, c2.due_date] # no change
66 parent.reload
67 assert_equal [Date.parse('2010-06-02'), Date.parse('2010-06-10')], [parent.start_date, parent.due_date]
68 end
69 end
70
71 def test_parent_priority_should_be_read_only_with_parent_issue_priority_set_to_derived
72 with_settings :parent_issue_priority => 'derived' do
73 issue = Issue.generate_with_child!
74 user = User.find(1)
75 assert !issue.safe_attribute?('priority_id', user)
76 end
77 end
78
79 def test_parent_priority_should_be_the_highest_child_priority
80 with_settings :parent_issue_priority => 'derived' do
81 parent = Issue.generate!(:priority => IssuePriority.find_by_name('Normal'))
82 # Create children
83 child1 = parent.generate_child!(:priority => IssuePriority.find_by_name('High'))
84 assert_equal 'High', parent.reload.priority.name
85 child2 = child1.generate_child!(:priority => IssuePriority.find_by_name('Immediate'))
86 assert_equal 'Immediate', child1.reload.priority.name
87 assert_equal 'Immediate', parent.reload.priority.name
88 child3 = parent.generate_child!(:priority => IssuePriority.find_by_name('Low'))
89 assert_equal 'Immediate', parent.reload.priority.name
90 # Destroy a child
91 child1.destroy
92 assert_equal 'Low', parent.reload.priority.name
93 # Update a child
94 child3.reload.priority = IssuePriority.find_by_name('Normal')
95 child3.save!
96 assert_equal 'Normal', parent.reload.priority.name
97 end
98 end
99
100 def test_parent_dates_should_be_editable_with_parent_issue_dates_set_to_independent
101 with_settings :parent_issue_dates => 'independent' do
102 issue = Issue.generate_with_child!
103 user = User.find(1)
104 %w(start_date due_date).each do |attribute|
105 assert issue.safe_attribute?(attribute, user)
106 end
107 end
108 end
109
110 def test_parent_dates_should_not_be_updated_with_parent_issue_dates_set_to_independent
111 with_settings :parent_issue_dates => 'independent' do
112 parent = Issue.generate!(:start_date => '2015-07-01', :due_date => '2015-08-01')
113 parent.generate_child!(:start_date => '2015-06-01', :due_date => '2015-09-01')
114 parent.reload
115 assert_equal Date.parse('2015-07-01'), parent.start_date
116 assert_equal Date.parse('2015-08-01'), parent.due_date
117 end
118 end
119
120 def test_reschuling_a_parent_should_not_reschedule_subtasks_with_parent_issue_dates_set_to_independent
121 with_settings :parent_issue_dates => 'independent' do
122 parent = Issue.generate!(:start_date => '2010-05-01', :due_date => '2010-05-20')
123 c1 = parent.generate_child!(:start_date => '2010-05-12', :due_date => '2010-05-18')
124 parent.reload.reschedule_on!(Date.parse('2010-06-01'))
125 assert_equal Date.parse('2010-06-01'), parent.reload.start_date
126 c1.reload
127 assert_equal [Date.parse('2010-05-12'), Date.parse('2010-05-18')], [c1.start_date, c1.due_date]
128 end
129 end
130
131 def test_parent_priority_should_be_editable_with_parent_issue_priority_set_to_independent
132 with_settings :parent_issue_priority => 'independent' do
133 issue = Issue.generate_with_child!
134 user = User.find(1)
135 assert issue.safe_attribute?('priority_id', user)
136 end
137 end
138
139 def test_parent_priority_should_not_be_updated_with_parent_issue_priority_set_to_independent
140 with_settings :parent_issue_priority => 'independent' do
141 parent = Issue.generate!(:priority => IssuePriority.find_by_name('Normal'))
142 child1 = parent.generate_child!(:priority => IssuePriority.find_by_name('High'))
143 assert_equal 'Normal', parent.reload.priority.name
144 end
145 end
146 end
@@ -1,139 +1,162
1 1 # encoding: utf-8
2 2 #
3 3 # Redmine - project management software
4 4 # Copyright (C) 2006-2015 Jean-Philippe Lang
5 5 #
6 6 # This program is free software; you can redistribute it and/or
7 7 # modify it under the terms of the GNU General Public License
8 8 # as published by the Free Software Foundation; either version 2
9 9 # of the License, or (at your option) any later version.
10 10 #
11 11 # This program is distributed in the hope that it will be useful,
12 12 # but WITHOUT ANY WARRANTY; without even the implied warranty of
13 13 # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
14 14 # GNU General Public License for more details.
15 15 #
16 16 # You should have received a copy of the GNU General Public License
17 17 # along with this program; if not, write to the Free Software
18 18 # Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
19 19
20 20 module SettingsHelper
21 21 def administration_settings_tabs
22 22 tabs = [{:name => 'general', :partial => 'settings/general', :label => :label_general},
23 23 {:name => 'display', :partial => 'settings/display', :label => :label_display},
24 24 {:name => 'authentication', :partial => 'settings/authentication', :label => :label_authentication},
25 25 {:name => 'projects', :partial => 'settings/projects', :label => :label_project_plural},
26 26 {:name => 'issues', :partial => 'settings/issues', :label => :label_issue_tracking},
27 27 {:name => 'notifications', :partial => 'settings/notifications', :label => :field_mail_notification},
28 28 {:name => 'mail_handler', :partial => 'settings/mail_handler', :label => :label_incoming_emails},
29 29 {:name => 'repositories', :partial => 'settings/repositories', :label => :label_repository_plural}
30 30 ]
31 31 end
32 32
33 33 def setting_select(setting, choices, options={})
34 34 if blank_text = options.delete(:blank)
35 35 choices = [[blank_text.is_a?(Symbol) ? l(blank_text) : blank_text, '']] + choices
36 36 end
37 37 setting_label(setting, options).html_safe +
38 38 select_tag("settings[#{setting}]",
39 39 options_for_select(choices, Setting.send(setting).to_s),
40 40 options).html_safe
41 41 end
42 42
43 43 def setting_multiselect(setting, choices, options={})
44 44 setting_values = Setting.send(setting)
45 45 setting_values = [] unless setting_values.is_a?(Array)
46 46
47 47 content_tag("label", l(options[:label] || "setting_#{setting}")) +
48 48 hidden_field_tag("settings[#{setting}][]", '').html_safe +
49 49 choices.collect do |choice|
50 50 text, value = (choice.is_a?(Array) ? choice : [choice, choice])
51 51 content_tag(
52 52 'label',
53 53 check_box_tag(
54 54 "settings[#{setting}][]",
55 55 value,
56 56 setting_values.include?(value),
57 57 :id => nil
58 58 ) + text.to_s,
59 59 :class => (options[:inline] ? 'inline' : 'block')
60 60 )
61 61 end.join.html_safe
62 62 end
63 63
64 64 def setting_text_field(setting, options={})
65 65 setting_label(setting, options).html_safe +
66 66 text_field_tag("settings[#{setting}]", Setting.send(setting), options).html_safe
67 67 end
68 68
69 69 def setting_text_area(setting, options={})
70 70 setting_label(setting, options).html_safe +
71 71 text_area_tag("settings[#{setting}]", Setting.send(setting), options).html_safe
72 72 end
73 73
74 74 def setting_check_box(setting, options={})
75 75 setting_label(setting, options).html_safe +
76 76 hidden_field_tag("settings[#{setting}]", 0, :id => nil).html_safe +
77 77 check_box_tag("settings[#{setting}]", 1, Setting.send("#{setting}?"), options).html_safe
78 78 end
79 79
80 80 def setting_label(setting, options={})
81 81 label = options.delete(:label)
82 label != false ? label_tag("settings_#{setting}", l(label || "setting_#{setting}"), options[:label_options]).html_safe : ''
82 if label == false
83 ''
84 else
85 text = label.is_a?(String) ? label : l(label || "setting_#{setting}")
86 label_tag("settings_#{setting}", text, options[:label_options])
87 end
83 88 end
84 89
85 90 # Renders a notification field for a Redmine::Notifiable option
86 91 def notification_field(notifiable)
87 92 tag_data = notifiable.parent.present? ?
88 93 {:parent_notifiable => notifiable.parent} :
89 94 {:disables => "input[data-parent-notifiable=#{notifiable.name}]"}
90 95
91 96 tag = check_box_tag('settings[notified_events][]',
92 97 notifiable.name,
93 98 Setting.notified_events.include?(notifiable.name),
94 99 :id => nil,
95 100 :data => tag_data)
96 101
97 102 text = l_or_humanize(notifiable.name, :prefix => 'label_')
98 103
99 104 options = {}
100 105 if notifiable.parent.present?
101 106 options[:class] = "parent"
102 107 end
103 108
104 109 content_tag(:label, tag + text, options)
105 110 end
106 111
107 112 def link_copied_issue_options
108 113 options = [
109 114 [:general_text_Yes, 'yes'],
110 115 [:general_text_No, 'no'],
111 116 [:label_ask, 'ask']
112 117 ]
113 118
114 119 options.map {|label, value| [l(label), value.to_s]}
115 120 end
116 121
117 122 def cross_project_subtasks_options
118 123 options = [
119 124 [:label_disabled, ''],
120 125 [:label_cross_project_system, 'system'],
121 126 [:label_cross_project_tree, 'tree'],
122 127 [:label_cross_project_hierarchy, 'hierarchy'],
123 128 [:label_cross_project_descendants, 'descendants']
124 129 ]
125 130
126 131 options.map {|label, value| [l(label), value.to_s]}
127 132 end
128 133
134 def parent_issue_dates_options
135 options = [
136 [:label_parent_task_attributes_derived, 'derived'],
137 [:label_parent_task_attributes_independent, 'independent']
138 ]
139
140 options.map {|label, value| [l(label), value.to_s]}
141 end
142
143 def parent_issue_priority_options
144 options = [
145 [:label_parent_task_attributes_derived, 'derived'],
146 [:label_parent_task_attributes_independent, 'independent']
147 ]
148
149 options.map {|label, value| [l(label), value.to_s]}
150 end
151
129 152 # Returns the options for the date_format setting
130 153 def date_format_setting_options(locale)
131 154 Setting::DATE_FORMATS.map do |f|
132 155 today = ::I18n.l(Date.today, :locale => locale, :format => f)
133 156 format = f.gsub('%', '').gsub(/[dmY]/) do
134 157 {'d' => 'dd', 'm' => 'mm', 'Y' => 'yyyy'}[$&]
135 158 end
136 159 ["#{today} (#{format})", f]
137 160 end
138 161 end
139 162 end
@@ -1,1607 +1,1628
1 1 # Redmine - project management software
2 2 # Copyright (C) 2006-2015 Jean-Philippe Lang
3 3 #
4 4 # This program is free software; you can redistribute it and/or
5 5 # modify it under the terms of the GNU General Public License
6 6 # as published by the Free Software Foundation; either version 2
7 7 # of the License, or (at your option) any later version.
8 8 #
9 9 # This program is distributed in the hope that it will be useful,
10 10 # but WITHOUT ANY WARRANTY; without even the implied warranty of
11 11 # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
12 12 # GNU General Public License for more details.
13 13 #
14 14 # You should have received a copy of the GNU General Public License
15 15 # along with this program; if not, write to the Free Software
16 16 # Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
17 17
18 18 class Issue < ActiveRecord::Base
19 19 include Redmine::SafeAttributes
20 20 include Redmine::Utils::DateCalculation
21 21 include Redmine::I18n
22 22 before_save :set_parent_id
23 23 include Redmine::NestedSet::IssueNestedSet
24 24
25 25 belongs_to :project
26 26 belongs_to :tracker
27 27 belongs_to :status, :class_name => 'IssueStatus'
28 28 belongs_to :author, :class_name => 'User'
29 29 belongs_to :assigned_to, :class_name => 'Principal'
30 30 belongs_to :fixed_version, :class_name => 'Version'
31 31 belongs_to :priority, :class_name => 'IssuePriority'
32 32 belongs_to :category, :class_name => 'IssueCategory'
33 33
34 34 has_many :journals, :as => :journalized, :dependent => :destroy, :inverse_of => :journalized
35 35 has_many :visible_journals,
36 36 lambda {where(["(#{Journal.table_name}.private_notes = ? OR (#{Project.allowed_to_condition(User.current, :view_private_notes)}))", false])},
37 37 :class_name => 'Journal',
38 38 :as => :journalized
39 39
40 40 has_many :time_entries, :dependent => :destroy
41 41 has_and_belongs_to_many :changesets, lambda {order("#{Changeset.table_name}.committed_on ASC, #{Changeset.table_name}.id ASC")}
42 42
43 43 has_many :relations_from, :class_name => 'IssueRelation', :foreign_key => 'issue_from_id', :dependent => :delete_all
44 44 has_many :relations_to, :class_name => 'IssueRelation', :foreign_key => 'issue_to_id', :dependent => :delete_all
45 45
46 46 acts_as_attachable :after_add => :attachment_added, :after_remove => :attachment_removed
47 47 acts_as_customizable
48 48 acts_as_watchable
49 49 acts_as_searchable :columns => ['subject', "#{table_name}.description"],
50 50 :preload => [:project, :status, :tracker],
51 51 :scope => lambda {|options| options[:open_issues] ? self.open : self.all}
52 52
53 53 acts_as_event :title => Proc.new {|o| "#{o.tracker.name} ##{o.id} (#{o.status}): #{o.subject}"},
54 54 :url => Proc.new {|o| {:controller => 'issues', :action => 'show', :id => o.id}},
55 55 :type => Proc.new {|o| 'issue' + (o.closed? ? ' closed' : '') }
56 56
57 57 acts_as_activity_provider :scope => preload(:project, :author, :tracker),
58 58 :author_key => :author_id
59 59
60 60 DONE_RATIO_OPTIONS = %w(issue_field issue_status)
61 61
62 62 attr_reader :current_journal
63 63 delegate :notes, :notes=, :private_notes, :private_notes=, :to => :current_journal, :allow_nil => true
64 64
65 65 validates_presence_of :subject, :project, :tracker
66 66 validates_presence_of :priority, :if => Proc.new {|issue| issue.new_record? || issue.priority_id_changed?}
67 67 validates_presence_of :status, :if => Proc.new {|issue| issue.new_record? || issue.status_id_changed?}
68 68 validates_presence_of :author, :if => Proc.new {|issue| issue.new_record? || issue.author_id_changed?}
69 69
70 70 validates_length_of :subject, :maximum => 255
71 71 validates_inclusion_of :done_ratio, :in => 0..100
72 72 validates :estimated_hours, :numericality => {:greater_than_or_equal_to => 0, :allow_nil => true, :message => :invalid}
73 73 validates :start_date, :date => true
74 74 validates :due_date, :date => true
75 75 validate :validate_issue, :validate_required_fields
76 76 attr_protected :id
77 77
78 78 scope :visible, lambda {|*args|
79 79 joins(:project).
80 80 where(Issue.visible_condition(args.shift || User.current, *args))
81 81 }
82 82
83 83 scope :open, lambda {|*args|
84 84 is_closed = args.size > 0 ? !args.first : false
85 85 joins(:status).
86 86 where("#{IssueStatus.table_name}.is_closed = ?", is_closed)
87 87 }
88 88
89 89 scope :recently_updated, lambda { order("#{Issue.table_name}.updated_on DESC") }
90 90 scope :on_active_project, lambda {
91 91 joins(:project).
92 92 where("#{Project.table_name}.status = ?", Project::STATUS_ACTIVE)
93 93 }
94 94 scope :fixed_version, lambda {|versions|
95 95 ids = [versions].flatten.compact.map {|v| v.is_a?(Version) ? v.id : v}
96 96 ids.any? ? where(:fixed_version_id => ids) : where('1=0')
97 97 }
98 98
99 99 before_validation :clear_disabled_fields
100 100 before_create :default_assign
101 101 before_save :close_duplicates, :update_done_ratio_from_issue_status,
102 102 :force_updated_on_change, :update_closed_on, :set_assigned_to_was
103 103 after_save {|issue| issue.send :after_project_change if !issue.id_changed? && issue.project_id_changed?}
104 104 after_save :reschedule_following_issues, :update_nested_set_attributes,
105 105 :update_parent_attributes, :create_journal
106 106 # Should be after_create but would be called before previous after_save callbacks
107 107 after_save :after_create_from_copy
108 108 after_destroy :update_parent_attributes
109 109 after_create :send_notification
110 110 # Keep it at the end of after_save callbacks
111 111 after_save :clear_assigned_to_was
112 112
113 113 # Returns a SQL conditions string used to find all issues visible by the specified user
114 114 def self.visible_condition(user, options={})
115 115 Project.allowed_to_condition(user, :view_issues, options) do |role, user|
116 116 if user.id && user.logged?
117 117 case role.issues_visibility
118 118 when 'all'
119 119 nil
120 120 when 'default'
121 121 user_ids = [user.id] + user.groups.map(&:id).compact
122 122 "(#{table_name}.is_private = #{connection.quoted_false} OR #{table_name}.author_id = #{user.id} OR #{table_name}.assigned_to_id IN (#{user_ids.join(',')}))"
123 123 when 'own'
124 124 user_ids = [user.id] + user.groups.map(&:id).compact
125 125 "(#{table_name}.author_id = #{user.id} OR #{table_name}.assigned_to_id IN (#{user_ids.join(',')}))"
126 126 else
127 127 '1=0'
128 128 end
129 129 else
130 130 "(#{table_name}.is_private = #{connection.quoted_false})"
131 131 end
132 132 end
133 133 end
134 134
135 135 # Returns true if usr or current user is allowed to view the issue
136 136 def visible?(usr=nil)
137 137 (usr || User.current).allowed_to?(:view_issues, self.project) do |role, user|
138 138 if user.logged?
139 139 case role.issues_visibility
140 140 when 'all'
141 141 true
142 142 when 'default'
143 143 !self.is_private? || (self.author == user || user.is_or_belongs_to?(assigned_to))
144 144 when 'own'
145 145 self.author == user || user.is_or_belongs_to?(assigned_to)
146 146 else
147 147 false
148 148 end
149 149 else
150 150 !self.is_private?
151 151 end
152 152 end
153 153 end
154 154
155 155 # Returns true if user or current user is allowed to edit or add a note to the issue
156 156 def editable?(user=User.current)
157 157 attributes_editable?(user) || user.allowed_to?(:add_issue_notes, project)
158 158 end
159 159
160 160 # Returns true if user or current user is allowed to edit the issue
161 161 def attributes_editable?(user=User.current)
162 162 user.allowed_to?(:edit_issues, project)
163 163 end
164 164
165 165 def initialize(attributes=nil, *args)
166 166 super
167 167 if new_record?
168 168 # set default values for new records only
169 169 self.priority ||= IssuePriority.default
170 170 self.watcher_user_ids = []
171 171 end
172 172 end
173 173
174 174 def create_or_update
175 175 super
176 176 ensure
177 177 @status_was = nil
178 178 end
179 179 private :create_or_update
180 180
181 181 # AR#Persistence#destroy would raise and RecordNotFound exception
182 182 # if the issue was already deleted or updated (non matching lock_version).
183 183 # This is a problem when bulk deleting issues or deleting a project
184 184 # (because an issue may already be deleted if its parent was deleted
185 185 # first).
186 186 # The issue is reloaded by the nested_set before being deleted so
187 187 # the lock_version condition should not be an issue but we handle it.
188 188 def destroy
189 189 super
190 190 rescue ActiveRecord::StaleObjectError, ActiveRecord::RecordNotFound
191 191 # Stale or already deleted
192 192 begin
193 193 reload
194 194 rescue ActiveRecord::RecordNotFound
195 195 # The issue was actually already deleted
196 196 @destroyed = true
197 197 return freeze
198 198 end
199 199 # The issue was stale, retry to destroy
200 200 super
201 201 end
202 202
203 203 alias :base_reload :reload
204 204 def reload(*args)
205 205 @workflow_rule_by_attribute = nil
206 206 @assignable_versions = nil
207 207 @relations = nil
208 208 @spent_hours = nil
209 209 base_reload(*args)
210 210 end
211 211
212 212 # Overrides Redmine::Acts::Customizable::InstanceMethods#available_custom_fields
213 213 def available_custom_fields
214 214 (project && tracker) ? (project.all_issue_custom_fields & tracker.custom_fields) : []
215 215 end
216 216
217 217 def visible_custom_field_values(user=nil)
218 218 user_real = user || User.current
219 219 custom_field_values.select do |value|
220 220 value.custom_field.visible_by?(project, user_real)
221 221 end
222 222 end
223 223
224 224 # Copies attributes from another issue, arg can be an id or an Issue
225 225 def copy_from(arg, options={})
226 226 issue = arg.is_a?(Issue) ? arg : Issue.visible.find(arg)
227 227 self.attributes = issue.attributes.dup.except("id", "root_id", "parent_id", "lft", "rgt", "created_on", "updated_on")
228 228 self.custom_field_values = issue.custom_field_values.inject({}) {|h,v| h[v.custom_field_id] = v.value; h}
229 229 self.status = issue.status
230 230 self.author = User.current
231 231 unless options[:attachments] == false
232 232 self.attachments = issue.attachments.map do |attachement|
233 233 attachement.copy(:container => self)
234 234 end
235 235 end
236 236 @copied_from = issue
237 237 @copy_options = options
238 238 self
239 239 end
240 240
241 241 # Returns an unsaved copy of the issue
242 242 def copy(attributes=nil, copy_options={})
243 243 copy = self.class.new.copy_from(self, copy_options)
244 244 copy.attributes = attributes if attributes
245 245 copy
246 246 end
247 247
248 248 # Returns true if the issue is a copy
249 249 def copy?
250 250 @copied_from.present?
251 251 end
252 252
253 253 def status_id=(status_id)
254 254 if status_id.to_s != self.status_id.to_s
255 255 self.status = (status_id.present? ? IssueStatus.find_by_id(status_id) : nil)
256 256 end
257 257 self.status_id
258 258 end
259 259
260 260 # Sets the status.
261 261 def status=(status)
262 262 if status != self.status
263 263 @workflow_rule_by_attribute = nil
264 264 end
265 265 association(:status).writer(status)
266 266 end
267 267
268 268 def priority_id=(pid)
269 269 self.priority = nil
270 270 write_attribute(:priority_id, pid)
271 271 end
272 272
273 273 def category_id=(cid)
274 274 self.category = nil
275 275 write_attribute(:category_id, cid)
276 276 end
277 277
278 278 def fixed_version_id=(vid)
279 279 self.fixed_version = nil
280 280 write_attribute(:fixed_version_id, vid)
281 281 end
282 282
283 283 def tracker_id=(tracker_id)
284 284 if tracker_id.to_s != self.tracker_id.to_s
285 285 self.tracker = (tracker_id.present? ? Tracker.find_by_id(tracker_id) : nil)
286 286 end
287 287 self.tracker_id
288 288 end
289 289
290 290 # Sets the tracker.
291 291 # This will set the status to the default status of the new tracker if:
292 292 # * the status was the default for the previous tracker
293 293 # * or if the status was not part of the new tracker statuses
294 294 # * or the status was nil
295 295 def tracker=(tracker)
296 296 if tracker != self.tracker
297 297 if status == default_status
298 298 self.status = nil
299 299 elsif status && tracker && !tracker.issue_status_ids.include?(status.id)
300 300 self.status = nil
301 301 end
302 302 @custom_field_values = nil
303 303 @workflow_rule_by_attribute = nil
304 304 end
305 305 association(:tracker).writer(tracker)
306 306 self.status ||= default_status
307 307 self.tracker
308 308 end
309 309
310 310 def project_id=(project_id)
311 311 if project_id.to_s != self.project_id.to_s
312 312 self.project = (project_id.present? ? Project.find_by_id(project_id) : nil)
313 313 end
314 314 self.project_id
315 315 end
316 316
317 317 # Sets the project.
318 318 # Unless keep_tracker argument is set to true, this will change the tracker
319 319 # to the first tracker of the new project if the previous tracker is not part
320 320 # of the new project trackers.
321 321 # This will clear the fixed_version is it's no longer valid for the new project.
322 322 # This will clear the parent issue if it's no longer valid for the new project.
323 323 # This will set the category to the category with the same name in the new
324 324 # project if it exists, or clear it if it doesn't.
325 325 def project=(project, keep_tracker=false)
326 326 project_was = self.project
327 327 association(:project).writer(project)
328 328 if project_was && project && project_was != project
329 329 @assignable_versions = nil
330 330
331 331 unless keep_tracker || project.trackers.include?(tracker)
332 332 self.tracker = project.trackers.first
333 333 end
334 334 # Reassign to the category with same name if any
335 335 if category
336 336 self.category = project.issue_categories.find_by_name(category.name)
337 337 end
338 338 # Keep the fixed_version if it's still valid in the new_project
339 339 if fixed_version && fixed_version.project != project && !project.shared_versions.include?(fixed_version)
340 340 self.fixed_version = nil
341 341 end
342 342 # Clear the parent task if it's no longer valid
343 343 unless valid_parent_project?
344 344 self.parent_issue_id = nil
345 345 end
346 346 @custom_field_values = nil
347 347 @workflow_rule_by_attribute = nil
348 348 end
349 349 self.project
350 350 end
351 351
352 352 def description=(arg)
353 353 if arg.is_a?(String)
354 354 arg = arg.gsub(/(\r\n|\n|\r)/, "\r\n")
355 355 end
356 356 write_attribute(:description, arg)
357 357 end
358 358
359 359 # Overrides assign_attributes so that project and tracker get assigned first
360 360 def assign_attributes_with_project_and_tracker_first(new_attributes, *args)
361 361 return if new_attributes.nil?
362 362 attrs = new_attributes.dup
363 363 attrs.stringify_keys!
364 364
365 365 %w(project project_id tracker tracker_id).each do |attr|
366 366 if attrs.has_key?(attr)
367 367 send "#{attr}=", attrs.delete(attr)
368 368 end
369 369 end
370 370 send :assign_attributes_without_project_and_tracker_first, attrs, *args
371 371 end
372 372 # Do not redefine alias chain on reload (see #4838)
373 373 alias_method_chain(:assign_attributes, :project_and_tracker_first) unless method_defined?(:assign_attributes_without_project_and_tracker_first)
374 374
375 375 def attributes=(new_attributes)
376 376 assign_attributes new_attributes
377 377 end
378 378
379 379 def estimated_hours=(h)
380 380 write_attribute :estimated_hours, (h.is_a?(String) ? h.to_hours : h)
381 381 end
382 382
383 383 safe_attributes 'project_id',
384 384 'tracker_id',
385 385 'status_id',
386 386 'category_id',
387 387 'assigned_to_id',
388 388 'priority_id',
389 389 'fixed_version_id',
390 390 'subject',
391 391 'description',
392 392 'start_date',
393 393 'due_date',
394 394 'done_ratio',
395 395 'estimated_hours',
396 396 'custom_field_values',
397 397 'custom_fields',
398 398 'lock_version',
399 399 'notes',
400 400 :if => lambda {|issue, user| issue.new_record? || user.allowed_to?(:edit_issues, issue.project) }
401 401
402 402 safe_attributes 'notes',
403 403 :if => lambda {|issue, user| user.allowed_to?(:add_issue_notes, issue.project)}
404 404
405 405 safe_attributes 'private_notes',
406 406 :if => lambda {|issue, user| !issue.new_record? && user.allowed_to?(:set_notes_private, issue.project)}
407 407
408 408 safe_attributes 'watcher_user_ids',
409 409 :if => lambda {|issue, user| issue.new_record? && user.allowed_to?(:add_issue_watchers, issue.project)}
410 410
411 411 safe_attributes 'is_private',
412 412 :if => lambda {|issue, user|
413 413 user.allowed_to?(:set_issues_private, issue.project) ||
414 414 (issue.author_id == user.id && user.allowed_to?(:set_own_issues_private, issue.project))
415 415 }
416 416
417 417 safe_attributes 'parent_issue_id',
418 418 :if => lambda {|issue, user| (issue.new_record? || user.allowed_to?(:edit_issues, issue.project)) &&
419 419 user.allowed_to?(:manage_subtasks, issue.project)}
420 420
421 421 def safe_attribute_names(user=nil)
422 422 names = super
423 423 names -= disabled_core_fields
424 424 names -= read_only_attribute_names(user)
425 425 if new_record?
426 426 # Make sure that project_id can always be set for new issues
427 427 names |= %w(project_id)
428 428 end
429 if dates_derived?
430 names -= %w(start_date due_date)
431 end
432 if priority_derived?
433 names -= %w(priority_id)
434 end
435 unless leaf?
436 names -= %w(done_ratio estimated_hours)
437 end
429 438 names
430 439 end
431 440
432 441 # Safely sets attributes
433 442 # Should be called from controllers instead of #attributes=
434 443 # attr_accessible is too rough because we still want things like
435 444 # Issue.new(:project => foo) to work
436 445 def safe_attributes=(attrs, user=User.current)
437 446 return unless attrs.is_a?(Hash)
438 447
439 448 attrs = attrs.deep_dup
440 449
441 450 # Project and Tracker must be set before since new_statuses_allowed_to depends on it.
442 451 if (p = attrs.delete('project_id')) && safe_attribute?('project_id')
443 452 if allowed_target_projects(user).where(:id => p.to_i).exists?
444 453 self.project_id = p
445 454 end
446 455 end
447 456
448 457 if (t = attrs.delete('tracker_id')) && safe_attribute?('tracker_id')
449 458 self.tracker_id = t
450 459 end
451 460 if project
452 461 # Set the default tracker to accept custom field values
453 462 # even if tracker is not specified
454 463 self.tracker ||= project.trackers.first
455 464 end
456 465
457 466 if (s = attrs.delete('status_id')) && safe_attribute?('status_id')
458 467 if new_statuses_allowed_to(user).collect(&:id).include?(s.to_i)
459 468 self.status_id = s
460 469 end
461 470 end
462 471
463 472 attrs = delete_unsafe_attributes(attrs, user)
464 473 return if attrs.empty?
465 474
466 unless leaf?
467 attrs.reject! {|k,v| %w(priority_id done_ratio start_date due_date estimated_hours).include?(k)}
468 end
469
470 475 if attrs['parent_issue_id'].present?
471 476 s = attrs['parent_issue_id'].to_s
472 477 unless (m = s.match(%r{\A#?(\d+)\z})) && (m[1] == parent_id.to_s || Issue.visible(user).exists?(m[1]))
473 478 @invalid_parent_issue_id = attrs.delete('parent_issue_id')
474 479 end
475 480 end
476 481
477 482 if attrs['custom_field_values'].present?
478 483 editable_custom_field_ids = editable_custom_field_values(user).map {|v| v.custom_field_id.to_s}
479 484 attrs['custom_field_values'].select! {|k, v| editable_custom_field_ids.include?(k.to_s)}
480 485 end
481 486
482 487 if attrs['custom_fields'].present?
483 488 editable_custom_field_ids = editable_custom_field_values(user).map {|v| v.custom_field_id.to_s}
484 489 attrs['custom_fields'].select! {|c| editable_custom_field_ids.include?(c['id'].to_s)}
485 490 end
486 491
487 492 # mass-assignment security bypass
488 493 assign_attributes attrs, :without_protection => true
489 494 end
490 495
491 496 def disabled_core_fields
492 497 tracker ? tracker.disabled_core_fields : []
493 498 end
494 499
495 500 # Returns the custom_field_values that can be edited by the given user
496 501 def editable_custom_field_values(user=nil)
497 502 visible_custom_field_values(user).reject do |value|
498 503 read_only_attribute_names(user).include?(value.custom_field_id.to_s)
499 504 end
500 505 end
501 506
502 507 # Returns the custom fields that can be edited by the given user
503 508 def editable_custom_fields(user=nil)
504 509 editable_custom_field_values(user).map(&:custom_field).uniq
505 510 end
506 511
507 512 # Returns the names of attributes that are read-only for user or the current user
508 513 # For users with multiple roles, the read-only fields are the intersection of
509 514 # read-only fields of each role
510 515 # The result is an array of strings where sustom fields are represented with their ids
511 516 #
512 517 # Examples:
513 518 # issue.read_only_attribute_names # => ['due_date', '2']
514 519 # issue.read_only_attribute_names(user) # => []
515 520 def read_only_attribute_names(user=nil)
516 521 workflow_rule_by_attribute(user).reject {|attr, rule| rule != 'readonly'}.keys
517 522 end
518 523
519 524 # Returns the names of required attributes for user or the current user
520 525 # For users with multiple roles, the required fields are the intersection of
521 526 # required fields of each role
522 527 # The result is an array of strings where sustom fields are represented with their ids
523 528 #
524 529 # Examples:
525 530 # issue.required_attribute_names # => ['due_date', '2']
526 531 # issue.required_attribute_names(user) # => []
527 532 def required_attribute_names(user=nil)
528 533 workflow_rule_by_attribute(user).reject {|attr, rule| rule != 'required'}.keys
529 534 end
530 535
531 536 # Returns true if the attribute is required for user
532 537 def required_attribute?(name, user=nil)
533 538 required_attribute_names(user).include?(name.to_s)
534 539 end
535 540
536 541 # Returns a hash of the workflow rule by attribute for the given user
537 542 #
538 543 # Examples:
539 544 # issue.workflow_rule_by_attribute # => {'due_date' => 'required', 'start_date' => 'readonly'}
540 545 def workflow_rule_by_attribute(user=nil)
541 546 return @workflow_rule_by_attribute if @workflow_rule_by_attribute && user.nil?
542 547
543 548 user_real = user || User.current
544 549 roles = user_real.admin ? Role.all.to_a : user_real.roles_for_project(project)
545 550 roles = roles.select(&:consider_workflow?)
546 551 return {} if roles.empty?
547 552
548 553 result = {}
549 554 workflow_permissions = WorkflowPermission.where(:tracker_id => tracker_id, :old_status_id => status_id, :role_id => roles.map(&:id)).to_a
550 555 if workflow_permissions.any?
551 556 workflow_rules = workflow_permissions.inject({}) do |h, wp|
552 557 h[wp.field_name] ||= {}
553 558 h[wp.field_name][wp.role_id] = wp.rule
554 559 h
555 560 end
556 561 fields_with_roles = {}
557 562 IssueCustomField.where(:visible => false).joins(:roles).pluck(:id, "role_id").each do |field_id, role_id|
558 563 fields_with_roles[field_id] ||= []
559 564 fields_with_roles[field_id] << role_id
560 565 end
561 566 roles.each do |role|
562 567 fields_with_roles.each do |field_id, role_ids|
563 568 unless role_ids.include?(role.id)
564 569 field_name = field_id.to_s
565 570 workflow_rules[field_name] ||= {}
566 571 workflow_rules[field_name][role.id] = 'readonly'
567 572 end
568 573 end
569 574 end
570 575 workflow_rules.each do |attr, rules|
571 576 next if rules.size < roles.size
572 577 uniq_rules = rules.values.uniq
573 578 if uniq_rules.size == 1
574 579 result[attr] = uniq_rules.first
575 580 else
576 581 result[attr] = 'required'
577 582 end
578 583 end
579 584 end
580 585 @workflow_rule_by_attribute = result if user.nil?
581 586 result
582 587 end
583 588 private :workflow_rule_by_attribute
584 589
585 590 def done_ratio
586 591 if Issue.use_status_for_done_ratio? && status && status.default_done_ratio
587 592 status.default_done_ratio
588 593 else
589 594 read_attribute(:done_ratio)
590 595 end
591 596 end
592 597
593 598 def self.use_status_for_done_ratio?
594 599 Setting.issue_done_ratio == 'issue_status'
595 600 end
596 601
597 602 def self.use_field_for_done_ratio?
598 603 Setting.issue_done_ratio == 'issue_field'
599 604 end
600 605
601 606 def validate_issue
602 607 if due_date && start_date && (start_date_changed? || due_date_changed?) && due_date < start_date
603 608 errors.add :due_date, :greater_than_start_date
604 609 end
605 610
606 611 if start_date && start_date_changed? && soonest_start && start_date < soonest_start
607 612 errors.add :start_date, :earlier_than_minimum_start_date, :date => format_date(soonest_start)
608 613 end
609 614
610 615 if fixed_version
611 616 if !assignable_versions.include?(fixed_version)
612 617 errors.add :fixed_version_id, :inclusion
613 618 elsif reopening? && fixed_version.closed?
614 619 errors.add :base, I18n.t(:error_can_not_reopen_issue_on_closed_version)
615 620 end
616 621 end
617 622
618 623 # Checks that the issue can not be added/moved to a disabled tracker
619 624 if project && (tracker_id_changed? || project_id_changed?)
620 625 unless project.trackers.include?(tracker)
621 626 errors.add :tracker_id, :inclusion
622 627 end
623 628 end
624 629
625 630 # Checks parent issue assignment
626 631 if @invalid_parent_issue_id.present?
627 632 errors.add :parent_issue_id, :invalid
628 633 elsif @parent_issue
629 634 if !valid_parent_project?(@parent_issue)
630 635 errors.add :parent_issue_id, :invalid
631 636 elsif (@parent_issue != parent) && (all_dependent_issues.include?(@parent_issue) || @parent_issue.all_dependent_issues.include?(self))
632 637 errors.add :parent_issue_id, :invalid
633 638 elsif !new_record?
634 639 # moving an existing issue
635 640 if move_possible?(@parent_issue)
636 641 # move accepted
637 642 else
638 643 errors.add :parent_issue_id, :invalid
639 644 end
640 645 end
641 646 end
642 647 end
643 648
644 649 # Validates the issue against additional workflow requirements
645 650 def validate_required_fields
646 651 user = new_record? ? author : current_journal.try(:user)
647 652
648 653 required_attribute_names(user).each do |attribute|
649 654 if attribute =~ /^\d+$/
650 655 attribute = attribute.to_i
651 656 v = custom_field_values.detect {|v| v.custom_field_id == attribute }
652 657 if v && v.value.blank?
653 658 errors.add :base, v.custom_field.name + ' ' + l('activerecord.errors.messages.blank')
654 659 end
655 660 else
656 661 if respond_to?(attribute) && send(attribute).blank? && !disabled_core_fields.include?(attribute)
657 662 errors.add attribute, :blank
658 663 end
659 664 end
660 665 end
661 666 end
662 667
663 668 # Overrides Redmine::Acts::Customizable::InstanceMethods#validate_custom_field_values
664 669 # so that custom values that are not editable are not validated (eg. a custom field that
665 670 # is marked as required should not trigger a validation error if the user is not allowed
666 671 # to edit this field).
667 672 def validate_custom_field_values
668 673 user = new_record? ? author : current_journal.try(:user)
669 674 if new_record? || custom_field_values_changed?
670 675 editable_custom_field_values(user).each(&:validate_value)
671 676 end
672 677 end
673 678
674 679 # Set the done_ratio using the status if that setting is set. This will keep the done_ratios
675 680 # even if the user turns off the setting later
676 681 def update_done_ratio_from_issue_status
677 682 if Issue.use_status_for_done_ratio? && status && status.default_done_ratio
678 683 self.done_ratio = status.default_done_ratio
679 684 end
680 685 end
681 686
682 687 def init_journal(user, notes = "")
683 688 @current_journal ||= Journal.new(:journalized => self, :user => user, :notes => notes)
684 689 end
685 690
686 691 # Returns the current journal or nil if it's not initialized
687 692 def current_journal
688 693 @current_journal
689 694 end
690 695
691 696 # Returns the names of attributes that are journalized when updating the issue
692 697 def journalized_attribute_names
693 698 names = Issue.column_names - %w(id root_id lft rgt lock_version created_on updated_on closed_on)
694 699 if tracker
695 700 names -= tracker.disabled_core_fields
696 701 end
697 702 names
698 703 end
699 704
700 705 # Returns the id of the last journal or nil
701 706 def last_journal_id
702 707 if new_record?
703 708 nil
704 709 else
705 710 journals.maximum(:id)
706 711 end
707 712 end
708 713
709 714 # Returns a scope for journals that have an id greater than journal_id
710 715 def journals_after(journal_id)
711 716 scope = journals.reorder("#{Journal.table_name}.id ASC")
712 717 if journal_id.present?
713 718 scope = scope.where("#{Journal.table_name}.id > ?", journal_id.to_i)
714 719 end
715 720 scope
716 721 end
717 722
718 723 # Returns the initial status of the issue
719 724 # Returns nil for a new issue
720 725 def status_was
721 726 if status_id_changed?
722 727 if status_id_was.to_i > 0
723 728 @status_was ||= IssueStatus.find_by_id(status_id_was)
724 729 end
725 730 else
726 731 @status_was ||= status
727 732 end
728 733 end
729 734
730 735 # Return true if the issue is closed, otherwise false
731 736 def closed?
732 737 status.present? && status.is_closed?
733 738 end
734 739
735 740 # Returns true if the issue was closed when loaded
736 741 def was_closed?
737 742 status_was.present? && status_was.is_closed?
738 743 end
739 744
740 745 # Return true if the issue is being reopened
741 746 def reopening?
742 747 if new_record?
743 748 false
744 749 else
745 750 status_id_changed? && !closed? && was_closed?
746 751 end
747 752 end
748 753 alias :reopened? :reopening?
749 754
750 755 # Return true if the issue is being closed
751 756 def closing?
752 757 if new_record?
753 758 closed?
754 759 else
755 760 status_id_changed? && closed? && !was_closed?
756 761 end
757 762 end
758 763
759 764 # Returns true if the issue is overdue
760 765 def overdue?
761 766 due_date.present? && (due_date < Date.today) && !closed?
762 767 end
763 768
764 769 # Is the amount of work done less than it should for the due date
765 770 def behind_schedule?
766 771 return false if start_date.nil? || due_date.nil?
767 772 done_date = start_date + ((due_date - start_date + 1) * done_ratio / 100).floor
768 773 return done_date <= Date.today
769 774 end
770 775
771 776 # Does this issue have children?
772 777 def children?
773 778 !leaf?
774 779 end
775 780
776 781 # Users the issue can be assigned to
777 782 def assignable_users
778 783 users = project.assignable_users.to_a
779 784 users << author if author
780 785 users << assigned_to if assigned_to
781 786 users.uniq.sort
782 787 end
783 788
784 789 # Versions that the issue can be assigned to
785 790 def assignable_versions
786 791 return @assignable_versions if @assignable_versions
787 792
788 793 versions = project.shared_versions.open.to_a
789 794 if fixed_version
790 795 if fixed_version_id_changed?
791 796 # nothing to do
792 797 elsif project_id_changed?
793 798 if project.shared_versions.include?(fixed_version)
794 799 versions << fixed_version
795 800 end
796 801 else
797 802 versions << fixed_version
798 803 end
799 804 end
800 805 @assignable_versions = versions.uniq.sort
801 806 end
802 807
803 808 # Returns true if this issue is blocked by another issue that is still open
804 809 def blocked?
805 810 !relations_to.detect {|ir| ir.relation_type == 'blocks' && !ir.issue_from.closed?}.nil?
806 811 end
807 812
808 813 # Returns the default status of the issue based on its tracker
809 814 # Returns nil if tracker is nil
810 815 def default_status
811 816 tracker.try(:default_status)
812 817 end
813 818
814 819 # Returns an array of statuses that user is able to apply
815 820 def new_statuses_allowed_to(user=User.current, include_default=false)
816 821 if new_record? && @copied_from
817 822 [default_status, @copied_from.status].compact.uniq.sort
818 823 else
819 824 initial_status = nil
820 825 if new_record?
821 826 initial_status = default_status
822 827 elsif tracker_id_changed?
823 828 if Tracker.where(:id => tracker_id_was, :default_status_id => status_id_was).any?
824 829 initial_status = default_status
825 830 elsif tracker.issue_status_ids.include?(status_id_was)
826 831 initial_status = IssueStatus.find_by_id(status_id_was)
827 832 else
828 833 initial_status = default_status
829 834 end
830 835 else
831 836 initial_status = status_was
832 837 end
833 838
834 839 initial_assigned_to_id = assigned_to_id_changed? ? assigned_to_id_was : assigned_to_id
835 840 assignee_transitions_allowed = initial_assigned_to_id.present? &&
836 841 (user.id == initial_assigned_to_id || user.group_ids.include?(initial_assigned_to_id))
837 842
838 843 statuses = []
839 844 if initial_status
840 845 statuses += initial_status.find_new_statuses_allowed_to(
841 846 user.admin ? Role.all.to_a : user.roles_for_project(project),
842 847 tracker,
843 848 author == user,
844 849 assignee_transitions_allowed
845 850 )
846 851 end
847 852 statuses << initial_status unless statuses.empty?
848 853 statuses << default_status if include_default
849 854 statuses = statuses.compact.uniq.sort
850 855 if blocked?
851 856 statuses.reject!(&:is_closed?)
852 857 end
853 858 statuses
854 859 end
855 860 end
856 861
857 862 # Returns the previous assignee (user or group) if changed
858 863 def assigned_to_was
859 864 # assigned_to_id_was is reset before after_save callbacks
860 865 user_id = @previous_assigned_to_id || assigned_to_id_was
861 866 if user_id && user_id != assigned_to_id
862 867 @assigned_to_was ||= Principal.find_by_id(user_id)
863 868 end
864 869 end
865 870
866 871 # Returns the users that should be notified
867 872 def notified_users
868 873 notified = []
869 874 # Author and assignee are always notified unless they have been
870 875 # locked or don't want to be notified
871 876 notified << author if author
872 877 if assigned_to
873 878 notified += (assigned_to.is_a?(Group) ? assigned_to.users : [assigned_to])
874 879 end
875 880 if assigned_to_was
876 881 notified += (assigned_to_was.is_a?(Group) ? assigned_to_was.users : [assigned_to_was])
877 882 end
878 883 notified = notified.select {|u| u.active? && u.notify_about?(self)}
879 884
880 885 notified += project.notified_users
881 886 notified.uniq!
882 887 # Remove users that can not view the issue
883 888 notified.reject! {|user| !visible?(user)}
884 889 notified
885 890 end
886 891
887 892 # Returns the email addresses that should be notified
888 893 def recipients
889 894 notified_users.collect(&:mail)
890 895 end
891 896
892 897 def each_notification(users, &block)
893 898 if users.any?
894 899 if custom_field_values.detect {|value| !value.custom_field.visible?}
895 900 users_by_custom_field_visibility = users.group_by do |user|
896 901 visible_custom_field_values(user).map(&:custom_field_id).sort
897 902 end
898 903 users_by_custom_field_visibility.values.each do |users|
899 904 yield(users)
900 905 end
901 906 else
902 907 yield(users)
903 908 end
904 909 end
905 910 end
906 911
907 912 # Returns the number of hours spent on this issue
908 913 def spent_hours
909 914 @spent_hours ||= time_entries.sum(:hours) || 0
910 915 end
911 916
912 917 # Returns the total number of hours spent on this issue and its descendants
913 918 #
914 919 # Example:
915 920 # spent_hours => 0.0
916 921 # spent_hours => 50.2
917 922 def total_spent_hours
918 923 @total_spent_hours ||=
919 924 self_and_descendants.
920 925 joins("LEFT JOIN #{TimeEntry.table_name} ON #{TimeEntry.table_name}.issue_id = #{Issue.table_name}.id").
921 926 sum("#{TimeEntry.table_name}.hours").to_f || 0.0
922 927 end
923 928
924 929 def relations
925 930 @relations ||= IssueRelation::Relations.new(self, (relations_from + relations_to).sort)
926 931 end
927 932
928 933 # Preloads relations for a collection of issues
929 934 def self.load_relations(issues)
930 935 if issues.any?
931 936 relations = IssueRelation.where("issue_from_id IN (:ids) OR issue_to_id IN (:ids)", :ids => issues.map(&:id)).all
932 937 issues.each do |issue|
933 938 issue.instance_variable_set "@relations", relations.select {|r| r.issue_from_id == issue.id || r.issue_to_id == issue.id}
934 939 end
935 940 end
936 941 end
937 942
938 943 # Preloads visible spent time for a collection of issues
939 944 def self.load_visible_spent_hours(issues, user=User.current)
940 945 if issues.any?
941 946 hours_by_issue_id = TimeEntry.visible(user).group(:issue_id).sum(:hours)
942 947 issues.each do |issue|
943 948 issue.instance_variable_set "@spent_hours", (hours_by_issue_id[issue.id] || 0)
944 949 end
945 950 end
946 951 end
947 952
948 953 # Preloads visible relations for a collection of issues
949 954 def self.load_visible_relations(issues, user=User.current)
950 955 if issues.any?
951 956 issue_ids = issues.map(&:id)
952 957 # Relations with issue_from in given issues and visible issue_to
953 958 relations_from = IssueRelation.joins(:issue_to => :project).
954 959 where(visible_condition(user)).where(:issue_from_id => issue_ids).to_a
955 960 # Relations with issue_to in given issues and visible issue_from
956 961 relations_to = IssueRelation.joins(:issue_from => :project).
957 962 where(visible_condition(user)).
958 963 where(:issue_to_id => issue_ids).to_a
959 964 issues.each do |issue|
960 965 relations =
961 966 relations_from.select {|relation| relation.issue_from_id == issue.id} +
962 967 relations_to.select {|relation| relation.issue_to_id == issue.id}
963 968
964 969 issue.instance_variable_set "@relations", IssueRelation::Relations.new(issue, relations.sort)
965 970 end
966 971 end
967 972 end
968 973
969 974 # Finds an issue relation given its id.
970 975 def find_relation(relation_id)
971 976 IssueRelation.where("issue_to_id = ? OR issue_from_id = ?", id, id).find(relation_id)
972 977 end
973 978
974 979 # Returns all the other issues that depend on the issue
975 980 # The algorithm is a modified breadth first search (bfs)
976 981 def all_dependent_issues(except=[])
977 982 # The found dependencies
978 983 dependencies = []
979 984
980 985 # The visited flag for every node (issue) used by the breadth first search
981 986 eNOT_DISCOVERED = 0 # The issue is "new" to the algorithm, it has not seen it before.
982 987
983 988 ePROCESS_ALL = 1 # The issue is added to the queue. Process both children and relations of
984 989 # the issue when it is processed.
985 990
986 991 ePROCESS_RELATIONS_ONLY = 2 # The issue was added to the queue and will be output as dependent issue,
987 992 # but its children will not be added to the queue when it is processed.
988 993
989 994 eRELATIONS_PROCESSED = 3 # The related issues, the parent issue and the issue itself have been added to
990 995 # the queue, but its children have not been added.
991 996
992 997 ePROCESS_CHILDREN_ONLY = 4 # The relations and the parent of the issue have been added to the queue, but
993 998 # the children still need to be processed.
994 999
995 1000 eALL_PROCESSED = 5 # The issue and all its children, its parent and its related issues have been
996 1001 # added as dependent issues. It needs no further processing.
997 1002
998 1003 issue_status = Hash.new(eNOT_DISCOVERED)
999 1004
1000 1005 # The queue
1001 1006 queue = []
1002 1007
1003 1008 # Initialize the bfs, add start node (self) to the queue
1004 1009 queue << self
1005 1010 issue_status[self] = ePROCESS_ALL
1006 1011
1007 1012 while (!queue.empty?) do
1008 1013 current_issue = queue.shift
1009 1014 current_issue_status = issue_status[current_issue]
1010 1015 dependencies << current_issue
1011 1016
1012 1017 # Add parent to queue, if not already in it.
1013 1018 parent = current_issue.parent
1014 1019 parent_status = issue_status[parent]
1015 1020
1016 1021 if parent && (parent_status == eNOT_DISCOVERED) && !except.include?(parent)
1017 1022 queue << parent
1018 1023 issue_status[parent] = ePROCESS_RELATIONS_ONLY
1019 1024 end
1020 1025
1021 1026 # Add children to queue, but only if they are not already in it and
1022 1027 # the children of the current node need to be processed.
1023 1028 if (current_issue_status == ePROCESS_CHILDREN_ONLY || current_issue_status == ePROCESS_ALL)
1024 1029 current_issue.children.each do |child|
1025 1030 next if except.include?(child)
1026 1031
1027 1032 if (issue_status[child] == eNOT_DISCOVERED)
1028 1033 queue << child
1029 1034 issue_status[child] = ePROCESS_ALL
1030 1035 elsif (issue_status[child] == eRELATIONS_PROCESSED)
1031 1036 queue << child
1032 1037 issue_status[child] = ePROCESS_CHILDREN_ONLY
1033 1038 elsif (issue_status[child] == ePROCESS_RELATIONS_ONLY)
1034 1039 queue << child
1035 1040 issue_status[child] = ePROCESS_ALL
1036 1041 end
1037 1042 end
1038 1043 end
1039 1044
1040 1045 # Add related issues to the queue, if they are not already in it.
1041 1046 current_issue.relations_from.map(&:issue_to).each do |related_issue|
1042 1047 next if except.include?(related_issue)
1043 1048
1044 1049 if (issue_status[related_issue] == eNOT_DISCOVERED)
1045 1050 queue << related_issue
1046 1051 issue_status[related_issue] = ePROCESS_ALL
1047 1052 elsif (issue_status[related_issue] == eRELATIONS_PROCESSED)
1048 1053 queue << related_issue
1049 1054 issue_status[related_issue] = ePROCESS_CHILDREN_ONLY
1050 1055 elsif (issue_status[related_issue] == ePROCESS_RELATIONS_ONLY)
1051 1056 queue << related_issue
1052 1057 issue_status[related_issue] = ePROCESS_ALL
1053 1058 end
1054 1059 end
1055 1060
1056 1061 # Set new status for current issue
1057 1062 if (current_issue_status == ePROCESS_ALL) || (current_issue_status == ePROCESS_CHILDREN_ONLY)
1058 1063 issue_status[current_issue] = eALL_PROCESSED
1059 1064 elsif (current_issue_status == ePROCESS_RELATIONS_ONLY)
1060 1065 issue_status[current_issue] = eRELATIONS_PROCESSED
1061 1066 end
1062 1067 end # while
1063 1068
1064 1069 # Remove the issues from the "except" parameter from the result array
1065 1070 dependencies -= except
1066 1071 dependencies.delete(self)
1067 1072
1068 1073 dependencies
1069 1074 end
1070 1075
1071 1076 # Returns an array of issues that duplicate this one
1072 1077 def duplicates
1073 1078 relations_to.select {|r| r.relation_type == IssueRelation::TYPE_DUPLICATES}.collect {|r| r.issue_from}
1074 1079 end
1075 1080
1076 1081 # Returns the due date or the target due date if any
1077 1082 # Used on gantt chart
1078 1083 def due_before
1079 1084 due_date || (fixed_version ? fixed_version.effective_date : nil)
1080 1085 end
1081 1086
1082 1087 # Returns the time scheduled for this issue.
1083 1088 #
1084 1089 # Example:
1085 1090 # Start Date: 2/26/09, End Date: 3/04/09
1086 1091 # duration => 6
1087 1092 def duration
1088 1093 (start_date && due_date) ? due_date - start_date : 0
1089 1094 end
1090 1095
1091 1096 # Returns the duration in working days
1092 1097 def working_duration
1093 1098 (start_date && due_date) ? working_days(start_date, due_date) : 0
1094 1099 end
1095 1100
1096 1101 def soonest_start(reload=false)
1097 @soonest_start = nil if reload
1098 @soonest_start ||= (
1099 relations_to(reload).collect{|relation| relation.successor_soonest_start} +
1100 [(@parent_issue || parent).try(:soonest_start)]
1101 ).compact.max
1102 if @soonest_start.nil? || reload
1103 dates = relations_to(reload).collect{|relation| relation.successor_soonest_start}
1104 p = @parent_issue || parent
1105 if p && Setting.parent_issue_dates == 'derived'
1106 dates << p.soonest_start
1107 end
1108 @soonest_start = dates.compact.max
1109 end
1110 @soonest_start
1102 1111 end
1103 1112
1104 1113 # Sets start_date on the given date or the next working day
1105 1114 # and changes due_date to keep the same working duration.
1106 1115 def reschedule_on(date)
1107 1116 wd = working_duration
1108 1117 date = next_working_date(date)
1109 1118 self.start_date = date
1110 1119 self.due_date = add_working_days(date, wd)
1111 1120 end
1112 1121
1113 1122 # Reschedules the issue on the given date or the next working day and saves the record.
1114 1123 # If the issue is a parent task, this is done by rescheduling its subtasks.
1115 1124 def reschedule_on!(date)
1116 1125 return if date.nil?
1117 if leaf?
1126 if leaf? || !dates_derived?
1118 1127 if start_date.nil? || start_date != date
1119 1128 if start_date && start_date > date
1120 1129 # Issue can not be moved earlier than its soonest start date
1121 1130 date = [soonest_start(true), date].compact.max
1122 1131 end
1123 1132 reschedule_on(date)
1124 1133 begin
1125 1134 save
1126 1135 rescue ActiveRecord::StaleObjectError
1127 1136 reload
1128 1137 reschedule_on(date)
1129 1138 save
1130 1139 end
1131 1140 end
1132 1141 else
1133 1142 leaves.each do |leaf|
1134 1143 if leaf.start_date
1135 1144 # Only move subtask if it starts at the same date as the parent
1136 1145 # or if it starts before the given date
1137 1146 if start_date == leaf.start_date || date > leaf.start_date
1138 1147 leaf.reschedule_on!(date)
1139 1148 end
1140 1149 else
1141 1150 leaf.reschedule_on!(date)
1142 1151 end
1143 1152 end
1144 1153 end
1145 1154 end
1146 1155
1156 def dates_derived?
1157 !leaf? && Setting.parent_issue_dates == 'derived'
1158 end
1159
1160 def priority_derived?
1161 !leaf? && Setting.parent_issue_priority == 'derived'
1162 end
1163
1147 1164 def <=>(issue)
1148 1165 if issue.nil?
1149 1166 -1
1150 1167 elsif root_id != issue.root_id
1151 1168 (root_id || 0) <=> (issue.root_id || 0)
1152 1169 else
1153 1170 (lft || 0) <=> (issue.lft || 0)
1154 1171 end
1155 1172 end
1156 1173
1157 1174 def to_s
1158 1175 "#{tracker} ##{id}: #{subject}"
1159 1176 end
1160 1177
1161 1178 # Returns a string of css classes that apply to the issue
1162 1179 def css_classes(user=User.current)
1163 1180 s = "issue tracker-#{tracker_id} status-#{status_id} #{priority.try(:css_classes)}"
1164 1181 s << ' closed' if closed?
1165 1182 s << ' overdue' if overdue?
1166 1183 s << ' child' if child?
1167 1184 s << ' parent' unless leaf?
1168 1185 s << ' private' if is_private?
1169 1186 if user.logged?
1170 1187 s << ' created-by-me' if author_id == user.id
1171 1188 s << ' assigned-to-me' if assigned_to_id == user.id
1172 1189 s << ' assigned-to-my-group' if user.groups.any? {|g| g.id == assigned_to_id}
1173 1190 end
1174 1191 s
1175 1192 end
1176 1193
1177 1194 # Unassigns issues from +version+ if it's no longer shared with issue's project
1178 1195 def self.update_versions_from_sharing_change(version)
1179 1196 # Update issues assigned to the version
1180 1197 update_versions(["#{Issue.table_name}.fixed_version_id = ?", version.id])
1181 1198 end
1182 1199
1183 1200 # Unassigns issues from versions that are no longer shared
1184 1201 # after +project+ was moved
1185 1202 def self.update_versions_from_hierarchy_change(project)
1186 1203 moved_project_ids = project.self_and_descendants.reload.collect(&:id)
1187 1204 # Update issues of the moved projects and issues assigned to a version of a moved project
1188 1205 Issue.update_versions(
1189 1206 ["#{Version.table_name}.project_id IN (?) OR #{Issue.table_name}.project_id IN (?)",
1190 1207 moved_project_ids, moved_project_ids]
1191 1208 )
1192 1209 end
1193 1210
1194 1211 def parent_issue_id=(arg)
1195 1212 s = arg.to_s.strip.presence
1196 1213 if s && (m = s.match(%r{\A#?(\d+)\z})) && (@parent_issue = Issue.find_by_id(m[1]))
1197 1214 @invalid_parent_issue_id = nil
1198 1215 elsif s.blank?
1199 1216 @parent_issue = nil
1200 1217 @invalid_parent_issue_id = nil
1201 1218 else
1202 1219 @parent_issue = nil
1203 1220 @invalid_parent_issue_id = arg
1204 1221 end
1205 1222 end
1206 1223
1207 1224 def parent_issue_id
1208 1225 if @invalid_parent_issue_id
1209 1226 @invalid_parent_issue_id
1210 1227 elsif instance_variable_defined? :@parent_issue
1211 1228 @parent_issue.nil? ? nil : @parent_issue.id
1212 1229 else
1213 1230 parent_id
1214 1231 end
1215 1232 end
1216 1233
1217 1234 def set_parent_id
1218 1235 self.parent_id = parent_issue_id
1219 1236 end
1220 1237
1221 1238 # Returns true if issue's project is a valid
1222 1239 # parent issue project
1223 1240 def valid_parent_project?(issue=parent)
1224 1241 return true if issue.nil? || issue.project_id == project_id
1225 1242
1226 1243 case Setting.cross_project_subtasks
1227 1244 when 'system'
1228 1245 true
1229 1246 when 'tree'
1230 1247 issue.project.root == project.root
1231 1248 when 'hierarchy'
1232 1249 issue.project.is_or_is_ancestor_of?(project) || issue.project.is_descendant_of?(project)
1233 1250 when 'descendants'
1234 1251 issue.project.is_or_is_ancestor_of?(project)
1235 1252 else
1236 1253 false
1237 1254 end
1238 1255 end
1239 1256
1240 1257 # Returns an issue scope based on project and scope
1241 1258 def self.cross_project_scope(project, scope=nil)
1242 1259 if project.nil?
1243 1260 return Issue
1244 1261 end
1245 1262 case scope
1246 1263 when 'all', 'system'
1247 1264 Issue
1248 1265 when 'tree'
1249 1266 Issue.joins(:project).where("(#{Project.table_name}.lft >= :lft AND #{Project.table_name}.rgt <= :rgt)",
1250 1267 :lft => project.root.lft, :rgt => project.root.rgt)
1251 1268 when 'hierarchy'
1252 1269 Issue.joins(:project).where("(#{Project.table_name}.lft >= :lft AND #{Project.table_name}.rgt <= :rgt) OR (#{Project.table_name}.lft < :lft AND #{Project.table_name}.rgt > :rgt)",
1253 1270 :lft => project.lft, :rgt => project.rgt)
1254 1271 when 'descendants'
1255 1272 Issue.joins(:project).where("(#{Project.table_name}.lft >= :lft AND #{Project.table_name}.rgt <= :rgt)",
1256 1273 :lft => project.lft, :rgt => project.rgt)
1257 1274 else
1258 1275 Issue.where(:project_id => project.id)
1259 1276 end
1260 1277 end
1261 1278
1262 1279 def self.by_tracker(project)
1263 1280 count_and_group_by(:project => project, :association => :tracker)
1264 1281 end
1265 1282
1266 1283 def self.by_version(project)
1267 1284 count_and_group_by(:project => project, :association => :fixed_version)
1268 1285 end
1269 1286
1270 1287 def self.by_priority(project)
1271 1288 count_and_group_by(:project => project, :association => :priority)
1272 1289 end
1273 1290
1274 1291 def self.by_category(project)
1275 1292 count_and_group_by(:project => project, :association => :category)
1276 1293 end
1277 1294
1278 1295 def self.by_assigned_to(project)
1279 1296 count_and_group_by(:project => project, :association => :assigned_to)
1280 1297 end
1281 1298
1282 1299 def self.by_author(project)
1283 1300 count_and_group_by(:project => project, :association => :author)
1284 1301 end
1285 1302
1286 1303 def self.by_subproject(project)
1287 1304 r = count_and_group_by(:project => project, :with_subprojects => true, :association => :project)
1288 1305 r.reject {|r| r["project_id"] == project.id.to_s}
1289 1306 end
1290 1307
1291 1308 # Query generator for selecting groups of issue counts for a project
1292 1309 # based on specific criteria
1293 1310 #
1294 1311 # Options
1295 1312 # * project - Project to search in.
1296 1313 # * with_subprojects - Includes subprojects issues if set to true.
1297 1314 # * association - Symbol. Association for grouping.
1298 1315 def self.count_and_group_by(options)
1299 1316 assoc = reflect_on_association(options[:association])
1300 1317 select_field = assoc.foreign_key
1301 1318
1302 1319 Issue.
1303 1320 visible(User.current, :project => options[:project], :with_subprojects => options[:with_subprojects]).
1304 1321 joins(:status, assoc.name).
1305 1322 group(:status_id, :is_closed, select_field).
1306 1323 count.
1307 1324 map do |columns, total|
1308 1325 status_id, is_closed, field_value = columns
1309 1326 is_closed = ['t', 'true', '1'].include?(is_closed.to_s)
1310 1327 {
1311 1328 "status_id" => status_id.to_s,
1312 1329 "closed" => is_closed,
1313 1330 select_field => field_value.to_s,
1314 1331 "total" => total.to_s
1315 1332 }
1316 1333 end
1317 1334 end
1318 1335
1319 1336 # Returns a scope of projects that user can assign the issue to
1320 1337 def allowed_target_projects(user=User.current)
1321 1338 current_project = new_record? ? nil : project
1322 1339 self.class.allowed_target_projects(user, current_project)
1323 1340 end
1324 1341
1325 1342 # Returns a scope of projects that user can assign issues to
1326 1343 # If current_project is given, it will be included in the scope
1327 1344 def self.allowed_target_projects(user=User.current, current_project=nil)
1328 1345 condition = Project.allowed_to_condition(user, :add_issues)
1329 1346 if current_project
1330 1347 condition = ["(#{condition}) OR #{Project.table_name}.id = ?", current_project.id]
1331 1348 end
1332 1349 Project.where(condition)
1333 1350 end
1334 1351
1335 1352 private
1336 1353
1337 1354 def after_project_change
1338 1355 # Update project_id on related time entries
1339 1356 TimeEntry.where({:issue_id => id}).update_all(["project_id = ?", project_id])
1340 1357
1341 1358 # Delete issue relations
1342 1359 unless Setting.cross_project_issue_relations?
1343 1360 relations_from.clear
1344 1361 relations_to.clear
1345 1362 end
1346 1363
1347 1364 # Move subtasks that were in the same project
1348 1365 children.each do |child|
1349 1366 next unless child.project_id == project_id_was
1350 1367 # Change project and keep project
1351 1368 child.send :project=, project, true
1352 1369 unless child.save
1353 1370 raise ActiveRecord::Rollback
1354 1371 end
1355 1372 end
1356 1373 end
1357 1374
1358 1375 # Callback for after the creation of an issue by copy
1359 1376 # * adds a "copied to" relation with the copied issue
1360 1377 # * copies subtasks from the copied issue
1361 1378 def after_create_from_copy
1362 1379 return unless copy? && !@after_create_from_copy_handled
1363 1380
1364 1381 if (@copied_from.project_id == project_id || Setting.cross_project_issue_relations?) && @copy_options[:link] != false
1365 1382 if @current_journal
1366 1383 @copied_from.init_journal(@current_journal.user)
1367 1384 end
1368 1385 relation = IssueRelation.new(:issue_from => @copied_from, :issue_to => self, :relation_type => IssueRelation::TYPE_COPIED_TO)
1369 1386 unless relation.save
1370 1387 logger.error "Could not create relation while copying ##{@copied_from.id} to ##{id} due to validation errors: #{relation.errors.full_messages.join(', ')}" if logger
1371 1388 end
1372 1389 end
1373 1390
1374 1391 unless @copied_from.leaf? || @copy_options[:subtasks] == false
1375 1392 copy_options = (@copy_options || {}).merge(:subtasks => false)
1376 1393 copied_issue_ids = {@copied_from.id => self.id}
1377 1394 @copied_from.reload.descendants.reorder("#{Issue.table_name}.lft").each do |child|
1378 1395 # Do not copy self when copying an issue as a descendant of the copied issue
1379 1396 next if child == self
1380 1397 # Do not copy subtasks of issues that were not copied
1381 1398 next unless copied_issue_ids[child.parent_id]
1382 1399 # Do not copy subtasks that are not visible to avoid potential disclosure of private data
1383 1400 unless child.visible?
1384 1401 logger.error "Subtask ##{child.id} was not copied during ##{@copied_from.id} copy because it is not visible to the current user" if logger
1385 1402 next
1386 1403 end
1387 1404 copy = Issue.new.copy_from(child, copy_options)
1388 1405 if @current_journal
1389 1406 copy.init_journal(@current_journal.user)
1390 1407 end
1391 1408 copy.author = author
1392 1409 copy.project = project
1393 1410 copy.parent_issue_id = copied_issue_ids[child.parent_id]
1394 1411 unless copy.save
1395 1412 logger.error "Could not copy subtask ##{child.id} while copying ##{@copied_from.id} to ##{id} due to validation errors: #{copy.errors.full_messages.join(', ')}" if logger
1396 1413 next
1397 1414 end
1398 1415 copied_issue_ids[child.id] = copy.id
1399 1416 end
1400 1417 end
1401 1418 @after_create_from_copy_handled = true
1402 1419 end
1403 1420
1404 1421 def update_nested_set_attributes
1405 1422 if parent_id_changed?
1406 1423 update_nested_set_attributes_on_parent_change
1407 1424 end
1408 1425 remove_instance_variable(:@parent_issue) if instance_variable_defined?(:@parent_issue)
1409 1426 end
1410 1427
1411 1428 # Updates the nested set for when an existing issue is moved
1412 1429 def update_nested_set_attributes_on_parent_change
1413 1430 former_parent_id = parent_id_was
1414 1431 # delete invalid relations of all descendants
1415 1432 self_and_descendants.each do |issue|
1416 1433 issue.relations.each do |relation|
1417 1434 relation.destroy unless relation.valid?
1418 1435 end
1419 1436 end
1420 1437 # update former parent
1421 1438 recalculate_attributes_for(former_parent_id) if former_parent_id
1422 1439 end
1423 1440
1424 1441 def update_parent_attributes
1425 1442 if parent_id
1426 1443 recalculate_attributes_for(parent_id)
1427 1444 association(:parent).reset
1428 1445 end
1429 1446 end
1430 1447
1431 1448 def recalculate_attributes_for(issue_id)
1432 1449 if issue_id && p = Issue.find_by_id(issue_id)
1450 if p.priority_derived?
1433 1451 # priority = highest priority of children
1434 1452 if priority_position = p.children.joins(:priority).maximum("#{IssuePriority.table_name}.position")
1435 1453 p.priority = IssuePriority.find_by_position(priority_position)
1436 1454 end
1455 end
1437 1456
1457 if p.dates_derived?
1438 1458 # start/due dates = lowest/highest dates of children
1439 1459 p.start_date = p.children.minimum(:start_date)
1440 1460 p.due_date = p.children.maximum(:due_date)
1441 1461 if p.start_date && p.due_date && p.due_date < p.start_date
1442 1462 p.start_date, p.due_date = p.due_date, p.start_date
1443 1463 end
1464 end
1444 1465
1445 1466 # done ratio = weighted average ratio of leaves
1446 1467 unless Issue.use_status_for_done_ratio? && p.status && p.status.default_done_ratio
1447 1468 leaves_count = p.leaves.count
1448 1469 if leaves_count > 0
1449 1470 average = p.leaves.where("estimated_hours > 0").average(:estimated_hours).to_f
1450 1471 if average == 0
1451 1472 average = 1
1452 1473 end
1453 1474 done = p.leaves.joins(:status).
1454 1475 sum("COALESCE(CASE WHEN estimated_hours > 0 THEN estimated_hours ELSE NULL END, #{average}) " +
1455 1476 "* (CASE WHEN is_closed = #{self.class.connection.quoted_true} THEN 100 ELSE COALESCE(done_ratio, 0) END)").to_f
1456 1477 progress = done / (average * leaves_count)
1457 1478 p.done_ratio = progress.round
1458 1479 end
1459 1480 end
1460 1481
1461 1482 # estimate = sum of leaves estimates
1462 1483 p.estimated_hours = p.leaves.sum(:estimated_hours).to_f
1463 1484 p.estimated_hours = nil if p.estimated_hours == 0.0
1464 1485
1465 1486 # ancestors will be recursively updated
1466 1487 p.save(:validate => false)
1467 1488 end
1468 1489 end
1469 1490
1470 1491 # Update issues so their versions are not pointing to a
1471 1492 # fixed_version that is not shared with the issue's project
1472 1493 def self.update_versions(conditions=nil)
1473 1494 # Only need to update issues with a fixed_version from
1474 1495 # a different project and that is not systemwide shared
1475 1496 Issue.joins(:project, :fixed_version).
1476 1497 where("#{Issue.table_name}.fixed_version_id IS NOT NULL" +
1477 1498 " AND #{Issue.table_name}.project_id <> #{Version.table_name}.project_id" +
1478 1499 " AND #{Version.table_name}.sharing <> 'system'").
1479 1500 where(conditions).each do |issue|
1480 1501 next if issue.project.nil? || issue.fixed_version.nil?
1481 1502 unless issue.project.shared_versions.include?(issue.fixed_version)
1482 1503 issue.init_journal(User.current)
1483 1504 issue.fixed_version = nil
1484 1505 issue.save
1485 1506 end
1486 1507 end
1487 1508 end
1488 1509
1489 1510 # Callback on file attachment
1490 1511 def attachment_added(attachment)
1491 1512 if current_journal && !attachment.new_record?
1492 1513 current_journal.journalize_attachment(attachment, :added)
1493 1514 end
1494 1515 end
1495 1516
1496 1517 # Callback on attachment deletion
1497 1518 def attachment_removed(attachment)
1498 1519 if current_journal && !attachment.new_record?
1499 1520 current_journal.journalize_attachment(attachment, :removed)
1500 1521 current_journal.save
1501 1522 end
1502 1523 end
1503 1524
1504 1525 # Called after a relation is added
1505 1526 def relation_added(relation)
1506 1527 if current_journal
1507 1528 current_journal.journalize_relation(relation, :added)
1508 1529 current_journal.save
1509 1530 end
1510 1531 end
1511 1532
1512 1533 # Called after a relation is removed
1513 1534 def relation_removed(relation)
1514 1535 if current_journal
1515 1536 current_journal.journalize_relation(relation, :removed)
1516 1537 current_journal.save
1517 1538 end
1518 1539 end
1519 1540
1520 1541 # Default assignment based on category
1521 1542 def default_assign
1522 1543 if assigned_to.nil? && category && category.assigned_to
1523 1544 self.assigned_to = category.assigned_to
1524 1545 end
1525 1546 end
1526 1547
1527 1548 # Updates start/due dates of following issues
1528 1549 def reschedule_following_issues
1529 1550 if start_date_changed? || due_date_changed?
1530 1551 relations_from.each do |relation|
1531 1552 relation.set_issue_to_dates
1532 1553 end
1533 1554 end
1534 1555 end
1535 1556
1536 1557 # Closes duplicates if the issue is being closed
1537 1558 def close_duplicates
1538 1559 if closing?
1539 1560 duplicates.each do |duplicate|
1540 1561 # Reload is needed in case the duplicate was updated by a previous duplicate
1541 1562 duplicate.reload
1542 1563 # Don't re-close it if it's already closed
1543 1564 next if duplicate.closed?
1544 1565 # Same user and notes
1545 1566 if @current_journal
1546 1567 duplicate.init_journal(@current_journal.user, @current_journal.notes)
1547 1568 end
1548 1569 duplicate.update_attribute :status, self.status
1549 1570 end
1550 1571 end
1551 1572 end
1552 1573
1553 1574 # Make sure updated_on is updated when adding a note and set updated_on now
1554 1575 # so we can set closed_on with the same value on closing
1555 1576 def force_updated_on_change
1556 1577 if @current_journal || changed?
1557 1578 self.updated_on = current_time_from_proper_timezone
1558 1579 if new_record?
1559 1580 self.created_on = updated_on
1560 1581 end
1561 1582 end
1562 1583 end
1563 1584
1564 1585 # Callback for setting closed_on when the issue is closed.
1565 1586 # The closed_on attribute stores the time of the last closing
1566 1587 # and is preserved when the issue is reopened.
1567 1588 def update_closed_on
1568 1589 if closing?
1569 1590 self.closed_on = updated_on
1570 1591 end
1571 1592 end
1572 1593
1573 1594 # Saves the changes in a Journal
1574 1595 # Called after_save
1575 1596 def create_journal
1576 1597 if current_journal
1577 1598 current_journal.save
1578 1599 end
1579 1600 end
1580 1601
1581 1602 def send_notification
1582 1603 if Setting.notified_events.include?('issue_added')
1583 1604 Mailer.deliver_issue_add(self)
1584 1605 end
1585 1606 end
1586 1607
1587 1608 # Stores the previous assignee so we can still have access
1588 1609 # to it during after_save callbacks (assigned_to_id_was is reset)
1589 1610 def set_assigned_to_was
1590 1611 @previous_assigned_to_id = assigned_to_id_was
1591 1612 end
1592 1613
1593 1614 # Clears the previous assignee at the end of after_save callbacks
1594 1615 def clear_assigned_to_was
1595 1616 @assigned_to_was = nil
1596 1617 @previous_assigned_to_id = nil
1597 1618 end
1598 1619
1599 1620 def clear_disabled_fields
1600 1621 if tracker
1601 1622 tracker.disabled_core_fields.each do |attribute|
1602 1623 send "#{attribute}=", nil
1603 1624 end
1604 1625 self.done_ratio ||= 0
1605 1626 end
1606 1627 end
1607 1628 end
@@ -1,81 +1,79
1 1 <%= labelled_fields_for :issue, @issue do |f| %>
2 2
3 3 <div class="splitcontent">
4 4 <div class="splitcontentleft">
5 5 <% if @issue.safe_attribute?('status_id') && @allowed_statuses.present? %>
6 6 <p><%= f.select :status_id, (@allowed_statuses.collect {|p| [p.name, p.id]}), {:required => true},
7 7 :onchange => "updateIssueFrom('#{escape_javascript update_issue_form_path(@project, @issue)}')" %></p>
8 8 <%= hidden_field_tag 'was_default_status', @issue.status_id, :id => nil if @issue.status == @issue.default_status %>
9 9 <% else %>
10 10 <p><label><%= l(:field_status) %></label> <%= @issue.status %></p>
11 11 <% end %>
12 12
13 13 <% if @issue.safe_attribute? 'priority_id' %>
14 14 <p><%= f.select :priority_id, (@priorities.collect {|p| [p.name, p.id]}), {:required => true}, :disabled => !@issue.leaf? %></p>
15 15 <% end %>
16 16
17 17 <% if @issue.safe_attribute? 'assigned_to_id' %>
18 18 <p><%= f.select :assigned_to_id, principals_options_for_select(@issue.assignable_users, @issue.assigned_to), :include_blank => true, :required => @issue.required_attribute?('assigned_to_id') %></p>
19 19 <% end %>
20 20
21 21 <% if @issue.safe_attribute?('category_id') && @issue.project.issue_categories.any? %>
22 22 <p><%= f.select :category_id, (@issue.project.issue_categories.collect {|c| [c.name, c.id]}), :include_blank => true, :required => @issue.required_attribute?('category_id') %>
23 23 <%= link_to(image_tag('add.png', :style => 'vertical-align: middle;'),
24 24 new_project_issue_category_path(@issue.project),
25 25 :remote => true,
26 26 :method => 'get',
27 27 :title => l(:label_issue_category_new),
28 28 :tabindex => 200) if User.current.allowed_to?(:manage_categories, @issue.project) %></p>
29 29 <% end %>
30 30
31 31 <% if @issue.safe_attribute?('fixed_version_id') && @issue.assignable_versions.any? %>
32 32 <p><%= f.select :fixed_version_id, version_options_for_select(@issue.assignable_versions, @issue.fixed_version), :include_blank => true, :required => @issue.required_attribute?('fixed_version_id') %>
33 33 <%= link_to(image_tag('add.png', :style => 'vertical-align: middle;'),
34 34 new_project_version_path(@issue.project),
35 35 :remote => true,
36 36 :method => 'get',
37 37 :title => l(:label_version_new),
38 38 :tabindex => 200) if User.current.allowed_to?(:manage_versions, @issue.project) %>
39 39 </p>
40 40 <% end %>
41 41 </div>
42 42
43 43 <div class="splitcontentright">
44 44 <% if @issue.safe_attribute? 'parent_issue_id' %>
45 45 <p id="parent_issue"><%= f.text_field :parent_issue_id, :size => 10, :required => @issue.required_attribute?('parent_issue_id') %></p>
46 46 <%= javascript_tag "observeAutocompleteField('issue_parent_issue_id', '#{escape_javascript auto_complete_issues_path(:project_id => @issue.project, :scope => Setting.cross_project_subtasks)}')" %>
47 47 <% end %>
48 48
49 49 <% if @issue.safe_attribute? 'start_date' %>
50 50 <p id="start_date_area">
51 <%= f.text_field(:start_date, :size => 10, :disabled => !@issue.leaf?,
52 :required => @issue.required_attribute?('start_date')) %>
51 <%= f.text_field(:start_date, :size => 10, :required => @issue.required_attribute?('start_date')) %>
53 52 <%= calendar_for('issue_start_date') if @issue.leaf? %>
54 53 </p>
55 54 <% end %>
56 55
57 56 <% if @issue.safe_attribute? 'due_date' %>
58 57 <p id="due_date_area">
59 <%= f.text_field(:due_date, :size => 10, :disabled => !@issue.leaf?,
60 :required => @issue.required_attribute?('due_date')) %>
58 <%= f.text_field(:due_date, :size => 10, :required => @issue.required_attribute?('due_date')) %>
61 59 <%= calendar_for('issue_due_date') if @issue.leaf? %>
62 60 </p>
63 61 <% end %>
64 62
65 63 <% if @issue.safe_attribute? 'estimated_hours' %>
66 <p><%= f.text_field :estimated_hours, :size => 3, :disabled => !@issue.leaf?, :required => @issue.required_attribute?('estimated_hours') %> <%= l(:field_hours) %></p>
64 <p><%= f.text_field :estimated_hours, :size => 3, :required => @issue.required_attribute?('estimated_hours') %> <%= l(:field_hours) %></p>
67 65 <% end %>
68 66
69 <% if @issue.safe_attribute?('done_ratio') && @issue.leaf? && Issue.use_field_for_done_ratio? %>
67 <% if @issue.safe_attribute?('done_ratio') && Issue.use_field_for_done_ratio? %>
70 68 <p><%= f.select :done_ratio, ((0..10).to_a.collect {|r| ["#{r*10} %", r*10] }), :required => @issue.required_attribute?('done_ratio') %></p>
71 69 <% end %>
72 70 </div>
73 71 </div>
74 72
75 73 <% if @issue.safe_attribute? 'custom_field_values' %>
76 74 <%= render :partial => 'issues/form_custom_fields' %>
77 75 <% end %>
78 76
79 77 <% end %>
80 78
81 79 <% include_calendar_headers_tags %>
@@ -1,33 +1,42
1 1 <%= form_tag({:action => 'edit', :tab => 'issues'}) do %>
2 2
3 3 <div class="box tabular settings">
4 4 <p><%= setting_check_box :cross_project_issue_relations %></p>
5 5
6 6 <p><%= setting_select :link_copied_issue, link_copied_issue_options %></p>
7 7
8 8 <p><%= setting_select :cross_project_subtasks, cross_project_subtasks_options %></p>
9 9
10 10 <p><%= setting_check_box :issue_group_assignment %></p>
11 11
12 12 <p><%= setting_check_box :default_issue_start_date_to_creation_date %></p>
13 13
14 14 <p><%= setting_check_box :display_subprojects_issues %></p>
15 15
16 16 <p><%= setting_select :issue_done_ratio, Issue::DONE_RATIO_OPTIONS.collect {|i| [l("setting_issue_done_ratio_#{i}"), i]} %></p>
17 17
18 18 <p><%= setting_multiselect :non_working_week_days, (1..7).map {|d| [day_name(d), d.to_s]}, :inline => true %></p>
19 19
20 20 <p><%= setting_text_field :issues_export_limit, :size => 6 %></p>
21 21
22 22 <p><%= setting_text_field :gantt_items_limit, :size => 6 %></p>
23 23 </div>
24 24
25 25 <fieldset class="box">
26 <legend><%= l(:label_parent_task_attributes) %></legend>
27 <div class="tabular settings">
28 <p><%= setting_select :parent_issue_dates, parent_issue_dates_options, :label => "#{l(:field_start_date)} / #{l(:field_due_date)}" %></p>
29
30 <p><%= setting_select :parent_issue_priority, parent_issue_priority_options, :label => :field_priority %></p>
31 </div>
32 </fieldset>
33
34 <fieldset class="box">
26 35 <legend><%= l(:setting_issue_list_default_columns) %></legend>
27 36 <%= render_query_columns_selection(
28 37 IssueQuery.new(:column_names => Setting.issue_list_default_columns),
29 38 :name => 'settings[issue_list_default_columns]') %>
30 39 </fieldset>
31 40
32 41 <%= submit_tag l(:button_save) %>
33 42 <% end %>
@@ -1,1135 +1,1138
1 1 en:
2 2 # Text direction: Left-to-Right (ltr) or Right-to-Left (rtl)
3 3 direction: ltr
4 4 date:
5 5 formats:
6 6 # Use the strftime parameters for formats.
7 7 # When no format has been given, it uses default.
8 8 # You can provide other formats here if you like!
9 9 default: "%m/%d/%Y"
10 10 short: "%b %d"
11 11 long: "%B %d, %Y"
12 12
13 13 day_names: [Sunday, Monday, Tuesday, Wednesday, Thursday, Friday, Saturday]
14 14 abbr_day_names: [Sun, Mon, Tue, Wed, Thu, Fri, Sat]
15 15
16 16 # Don't forget the nil at the beginning; there's no such thing as a 0th month
17 17 month_names: [~, January, February, March, April, May, June, July, August, September, October, November, December]
18 18 abbr_month_names: [~, Jan, Feb, Mar, Apr, May, Jun, Jul, Aug, Sep, Oct, Nov, Dec]
19 19 # Used in date_select and datime_select.
20 20 order:
21 21 - :year
22 22 - :month
23 23 - :day
24 24
25 25 time:
26 26 formats:
27 27 default: "%m/%d/%Y %I:%M %p"
28 28 time: "%I:%M %p"
29 29 short: "%d %b %H:%M"
30 30 long: "%B %d, %Y %H:%M"
31 31 am: "am"
32 32 pm: "pm"
33 33
34 34 datetime:
35 35 distance_in_words:
36 36 half_a_minute: "half a minute"
37 37 less_than_x_seconds:
38 38 one: "less than 1 second"
39 39 other: "less than %{count} seconds"
40 40 x_seconds:
41 41 one: "1 second"
42 42 other: "%{count} seconds"
43 43 less_than_x_minutes:
44 44 one: "less than a minute"
45 45 other: "less than %{count} minutes"
46 46 x_minutes:
47 47 one: "1 minute"
48 48 other: "%{count} minutes"
49 49 about_x_hours:
50 50 one: "about 1 hour"
51 51 other: "about %{count} hours"
52 52 x_hours:
53 53 one: "1 hour"
54 54 other: "%{count} hours"
55 55 x_days:
56 56 one: "1 day"
57 57 other: "%{count} days"
58 58 about_x_months:
59 59 one: "about 1 month"
60 60 other: "about %{count} months"
61 61 x_months:
62 62 one: "1 month"
63 63 other: "%{count} months"
64 64 about_x_years:
65 65 one: "about 1 year"
66 66 other: "about %{count} years"
67 67 over_x_years:
68 68 one: "over 1 year"
69 69 other: "over %{count} years"
70 70 almost_x_years:
71 71 one: "almost 1 year"
72 72 other: "almost %{count} years"
73 73
74 74 number:
75 75 format:
76 76 separator: "."
77 77 delimiter: ""
78 78 precision: 3
79 79
80 80 human:
81 81 format:
82 82 delimiter: ""
83 83 precision: 3
84 84 storage_units:
85 85 format: "%n %u"
86 86 units:
87 87 byte:
88 88 one: "Byte"
89 89 other: "Bytes"
90 90 kb: "KB"
91 91 mb: "MB"
92 92 gb: "GB"
93 93 tb: "TB"
94 94
95 95 # Used in array.to_sentence.
96 96 support:
97 97 array:
98 98 sentence_connector: "and"
99 99 skip_last_comma: false
100 100
101 101 activerecord:
102 102 errors:
103 103 template:
104 104 header:
105 105 one: "1 error prohibited this %{model} from being saved"
106 106 other: "%{count} errors prohibited this %{model} from being saved"
107 107 messages:
108 108 inclusion: "is not included in the list"
109 109 exclusion: "is reserved"
110 110 invalid: "is invalid"
111 111 confirmation: "doesn't match confirmation"
112 112 accepted: "must be accepted"
113 113 empty: "cannot be empty"
114 114 blank: "cannot be blank"
115 115 too_long: "is too long (maximum is %{count} characters)"
116 116 too_short: "is too short (minimum is %{count} characters)"
117 117 wrong_length: "is the wrong length (should be %{count} characters)"
118 118 taken: "has already been taken"
119 119 not_a_number: "is not a number"
120 120 not_a_date: "is not a valid date"
121 121 greater_than: "must be greater than %{count}"
122 122 greater_than_or_equal_to: "must be greater than or equal to %{count}"
123 123 equal_to: "must be equal to %{count}"
124 124 less_than: "must be less than %{count}"
125 125 less_than_or_equal_to: "must be less than or equal to %{count}"
126 126 odd: "must be odd"
127 127 even: "must be even"
128 128 greater_than_start_date: "must be greater than start date"
129 129 not_same_project: "doesn't belong to the same project"
130 130 circular_dependency: "This relation would create a circular dependency"
131 131 cant_link_an_issue_with_a_descendant: "An issue cannot be linked to one of its subtasks"
132 132 earlier_than_minimum_start_date: "cannot be earlier than %{date} because of preceding issues"
133 133
134 134 actionview_instancetag_blank_option: Please select
135 135
136 136 general_text_No: 'No'
137 137 general_text_Yes: 'Yes'
138 138 general_text_no: 'no'
139 139 general_text_yes: 'yes'
140 140 general_lang_name: 'English'
141 141 general_csv_separator: ','
142 142 general_csv_decimal_separator: '.'
143 143 general_csv_encoding: ISO-8859-1
144 144 general_pdf_fontname: freesans
145 145 general_first_day_of_week: '7'
146 146
147 147 notice_account_updated: Account was successfully updated.
148 148 notice_account_invalid_creditentials: Invalid user or password
149 149 notice_account_password_updated: Password was successfully updated.
150 150 notice_account_wrong_password: Wrong password
151 151 notice_account_register_done: Account was successfully created. An email containing the instructions to activate your account was sent to %{email}.
152 152 notice_account_unknown_email: Unknown user.
153 153 notice_account_not_activated_yet: You haven't activated your account yet. If you want to receive a new activation email, please <a href="%{url}">click this link</a>.
154 154 notice_account_locked: Your account is locked.
155 155 notice_can_t_change_password: This account uses an external authentication source. Impossible to change the password.
156 156 notice_account_lost_email_sent: An email with instructions to choose a new password has been sent to you.
157 157 notice_account_activated: Your account has been activated. You can now log in.
158 158 notice_successful_create: Successful creation.
159 159 notice_successful_update: Successful update.
160 160 notice_successful_delete: Successful deletion.
161 161 notice_successful_connection: Successful connection.
162 162 notice_file_not_found: The page you were trying to access doesn't exist or has been removed.
163 163 notice_locking_conflict: Data has been updated by another user.
164 164 notice_not_authorized: You are not authorized to access this page.
165 165 notice_not_authorized_archived_project: The project you're trying to access has been archived.
166 166 notice_email_sent: "An email was sent to %{value}"
167 167 notice_email_error: "An error occurred while sending mail (%{value})"
168 168 notice_feeds_access_key_reseted: Your Atom access key was reset.
169 169 notice_api_access_key_reseted: Your API access key was reset.
170 170 notice_failed_to_save_issues: "Failed to save %{count} issue(s) on %{total} selected: %{ids}."
171 171 notice_failed_to_save_time_entries: "Failed to save %{count} time entrie(s) on %{total} selected: %{ids}."
172 172 notice_failed_to_save_members: "Failed to save member(s): %{errors}."
173 173 notice_no_issue_selected: "No issue is selected! Please, check the issues you want to edit."
174 174 notice_account_pending: "Your account was created and is now pending administrator approval."
175 175 notice_default_data_loaded: Default configuration successfully loaded.
176 176 notice_unable_delete_version: Unable to delete version.
177 177 notice_unable_delete_time_entry: Unable to delete time log entry.
178 178 notice_issue_done_ratios_updated: Issue done ratios updated.
179 179 notice_gantt_chart_truncated: "The chart was truncated because it exceeds the maximum number of items that can be displayed (%{max})"
180 180 notice_issue_successful_create: "Issue %{id} created."
181 181 notice_issue_update_conflict: "The issue has been updated by an other user while you were editing it."
182 182 notice_account_deleted: "Your account has been permanently deleted."
183 183 notice_user_successful_create: "User %{id} created."
184 184 notice_new_password_must_be_different: The new password must be different from the current password
185 185
186 186 error_can_t_load_default_data: "Default configuration could not be loaded: %{value}"
187 187 error_scm_not_found: "The entry or revision was not found in the repository."
188 188 error_scm_command_failed: "An error occurred when trying to access the repository: %{value}"
189 189 error_scm_annotate: "The entry does not exist or cannot be annotated."
190 190 error_scm_annotate_big_text_file: "The entry cannot be annotated, as it exceeds the maximum text file size."
191 191 error_issue_not_found_in_project: 'The issue was not found or does not belong to this project'
192 192 error_no_tracker_in_project: 'No tracker is associated to this project. Please check the Project settings.'
193 193 error_no_default_issue_status: 'No default issue status is defined. Please check your configuration (Go to "Administration -> Issue statuses").'
194 194 error_can_not_delete_custom_field: Unable to delete custom field
195 195 error_can_not_delete_tracker: "This tracker contains issues and cannot be deleted."
196 196 error_can_not_remove_role: "This role is in use and cannot be deleted."
197 197 error_can_not_reopen_issue_on_closed_version: 'An issue assigned to a closed version cannot be reopened'
198 198 error_can_not_archive_project: This project cannot be archived
199 199 error_issue_done_ratios_not_updated: "Issue done ratios not updated."
200 200 error_workflow_copy_source: 'Please select a source tracker or role'
201 201 error_workflow_copy_target: 'Please select target tracker(s) and role(s)'
202 202 error_unable_delete_issue_status: 'Unable to delete issue status'
203 203 error_unable_to_connect: "Unable to connect (%{value})"
204 204 error_attachment_too_big: "This file cannot be uploaded because it exceeds the maximum allowed file size (%{max_size})"
205 205 error_session_expired: "Your session has expired. Please login again."
206 206 warning_attachments_not_saved: "%{count} file(s) could not be saved."
207 207 error_password_expired: "Your password has expired or the administrator requires you to change it."
208 208
209 209 mail_subject_lost_password: "Your %{value} password"
210 210 mail_body_lost_password: 'To change your password, click on the following link:'
211 211 mail_subject_register: "Your %{value} account activation"
212 212 mail_body_register: 'To activate your account, click on the following link:'
213 213 mail_body_account_information_external: "You can use your %{value} account to log in."
214 214 mail_body_account_information: Your account information
215 215 mail_subject_account_activation_request: "%{value} account activation request"
216 216 mail_body_account_activation_request: "A new user (%{value}) has registered. The account is pending your approval:"
217 217 mail_subject_reminder: "%{count} issue(s) due in the next %{days} days"
218 218 mail_body_reminder: "%{count} issue(s) that are assigned to you are due in the next %{days} days:"
219 219 mail_subject_wiki_content_added: "'%{id}' wiki page has been added"
220 220 mail_body_wiki_content_added: "The '%{id}' wiki page has been added by %{author}."
221 221 mail_subject_wiki_content_updated: "'%{id}' wiki page has been updated"
222 222 mail_body_wiki_content_updated: "The '%{id}' wiki page has been updated by %{author}."
223 223
224 224 field_name: Name
225 225 field_description: Description
226 226 field_summary: Summary
227 227 field_is_required: Required
228 228 field_firstname: First name
229 229 field_lastname: Last name
230 230 field_mail: Email
231 231 field_address: Email
232 232 field_filename: File
233 233 field_filesize: Size
234 234 field_downloads: Downloads
235 235 field_author: Author
236 236 field_created_on: Created
237 237 field_updated_on: Updated
238 238 field_closed_on: Closed
239 239 field_field_format: Format
240 240 field_is_for_all: For all projects
241 241 field_possible_values: Possible values
242 242 field_regexp: Regular expression
243 243 field_min_length: Minimum length
244 244 field_max_length: Maximum length
245 245 field_value: Value
246 246 field_category: Category
247 247 field_title: Title
248 248 field_project: Project
249 249 field_issue: Issue
250 250 field_status: Status
251 251 field_notes: Notes
252 252 field_is_closed: Issue closed
253 253 field_is_default: Default value
254 254 field_tracker: Tracker
255 255 field_subject: Subject
256 256 field_due_date: Due date
257 257 field_assigned_to: Assignee
258 258 field_priority: Priority
259 259 field_fixed_version: Target version
260 260 field_user: User
261 261 field_principal: Principal
262 262 field_role: Role
263 263 field_homepage: Homepage
264 264 field_is_public: Public
265 265 field_parent: Subproject of
266 266 field_is_in_roadmap: Issues displayed in roadmap
267 267 field_login: Login
268 268 field_mail_notification: Email notifications
269 269 field_admin: Administrator
270 270 field_last_login_on: Last connection
271 271 field_language: Language
272 272 field_effective_date: Date
273 273 field_password: Password
274 274 field_new_password: New password
275 275 field_password_confirmation: Confirmation
276 276 field_version: Version
277 277 field_type: Type
278 278 field_host: Host
279 279 field_port: Port
280 280 field_account: Account
281 281 field_base_dn: Base DN
282 282 field_attr_login: Login attribute
283 283 field_attr_firstname: Firstname attribute
284 284 field_attr_lastname: Lastname attribute
285 285 field_attr_mail: Email attribute
286 286 field_onthefly: On-the-fly user creation
287 287 field_start_date: Start date
288 288 field_done_ratio: "% Done"
289 289 field_auth_source: Authentication mode
290 290 field_hide_mail: Hide my email address
291 291 field_comments: Comment
292 292 field_url: URL
293 293 field_start_page: Start page
294 294 field_subproject: Subproject
295 295 field_hours: Hours
296 296 field_activity: Activity
297 297 field_spent_on: Date
298 298 field_identifier: Identifier
299 299 field_is_filter: Used as a filter
300 300 field_issue_to: Related issue
301 301 field_delay: Delay
302 302 field_assignable: Issues can be assigned to this role
303 303 field_redirect_existing_links: Redirect existing links
304 304 field_estimated_hours: Estimated time
305 305 field_column_names: Columns
306 306 field_time_entries: Log time
307 307 field_time_zone: Time zone
308 308 field_searchable: Searchable
309 309 field_default_value: Default value
310 310 field_comments_sorting: Display comments
311 311 field_parent_title: Parent page
312 312 field_editable: Editable
313 313 field_watcher: Watcher
314 314 field_identity_url: OpenID URL
315 315 field_content: Content
316 316 field_group_by: Group results by
317 317 field_sharing: Sharing
318 318 field_parent_issue: Parent task
319 319 field_member_of_group: "Assignee's group"
320 320 field_assigned_to_role: "Assignee's role"
321 321 field_text: Text field
322 322 field_visible: Visible
323 323 field_warn_on_leaving_unsaved: "Warn me when leaving a page with unsaved text"
324 324 field_issues_visibility: Issues visibility
325 325 field_is_private: Private
326 326 field_commit_logs_encoding: Commit messages encoding
327 327 field_scm_path_encoding: Path encoding
328 328 field_path_to_repository: Path to repository
329 329 field_root_directory: Root directory
330 330 field_cvsroot: CVSROOT
331 331 field_cvs_module: Module
332 332 field_repository_is_default: Main repository
333 333 field_multiple: Multiple values
334 334 field_auth_source_ldap_filter: LDAP filter
335 335 field_core_fields: Standard fields
336 336 field_timeout: "Timeout (in seconds)"
337 337 field_board_parent: Parent forum
338 338 field_private_notes: Private notes
339 339 field_inherit_members: Inherit members
340 340 field_generate_password: Generate password
341 341 field_must_change_passwd: Must change password at next logon
342 342 field_default_status: Default status
343 343 field_users_visibility: Users visibility
344 344
345 345 setting_app_title: Application title
346 346 setting_app_subtitle: Application subtitle
347 347 setting_welcome_text: Welcome text
348 348 setting_default_language: Default language
349 349 setting_login_required: Authentication required
350 350 setting_self_registration: Self-registration
351 351 setting_attachment_max_size: Maximum attachment size
352 352 setting_issues_export_limit: Issues export limit
353 353 setting_mail_from: Emission email address
354 354 setting_bcc_recipients: Blind carbon copy recipients (bcc)
355 355 setting_plain_text_mail: Plain text mail (no HTML)
356 356 setting_host_name: Host name and path
357 357 setting_text_formatting: Text formatting
358 358 setting_wiki_compression: Wiki history compression
359 359 setting_feeds_limit: Maximum number of items in Atom feeds
360 360 setting_default_projects_public: New projects are public by default
361 361 setting_autofetch_changesets: Fetch commits automatically
362 362 setting_sys_api_enabled: Enable WS for repository management
363 363 setting_commit_ref_keywords: Referencing keywords
364 364 setting_commit_fix_keywords: Fixing keywords
365 365 setting_autologin: Autologin
366 366 setting_date_format: Date format
367 367 setting_time_format: Time format
368 368 setting_cross_project_issue_relations: Allow cross-project issue relations
369 369 setting_cross_project_subtasks: Allow cross-project subtasks
370 370 setting_issue_list_default_columns: Default columns displayed on the issue list
371 371 setting_repositories_encodings: Attachments and repositories encodings
372 372 setting_emails_header: Email header
373 373 setting_emails_footer: Email footer
374 374 setting_protocol: Protocol
375 375 setting_per_page_options: Objects per page options
376 376 setting_user_format: Users display format
377 377 setting_activity_days_default: Days displayed on project activity
378 378 setting_display_subprojects_issues: Display subprojects issues on main projects by default
379 379 setting_enabled_scm: Enabled SCM
380 380 setting_mail_handler_body_delimiters: "Truncate emails after one of these lines"
381 381 setting_mail_handler_api_enabled: Enable WS for incoming emails
382 382 setting_mail_handler_api_key: API key
383 383 setting_sequential_project_identifiers: Generate sequential project identifiers
384 384 setting_gravatar_enabled: Use Gravatar user icons
385 385 setting_gravatar_default: Default Gravatar image
386 386 setting_diff_max_lines_displayed: Maximum number of diff lines displayed
387 387 setting_file_max_size_displayed: Maximum size of text files displayed inline
388 388 setting_repository_log_display_limit: Maximum number of revisions displayed on file log
389 389 setting_openid: Allow OpenID login and registration
390 390 setting_password_max_age: Require password change after
391 391 setting_password_min_length: Minimum password length
392 392 setting_new_project_user_role_id: Role given to a non-admin user who creates a project
393 393 setting_default_projects_modules: Default enabled modules for new projects
394 394 setting_issue_done_ratio: Calculate the issue done ratio with
395 395 setting_issue_done_ratio_issue_field: Use the issue field
396 396 setting_issue_done_ratio_issue_status: Use the issue status
397 397 setting_start_of_week: Start calendars on
398 398 setting_rest_api_enabled: Enable REST web service
399 399 setting_cache_formatted_text: Cache formatted text
400 400 setting_default_notification_option: Default notification option
401 401 setting_commit_logtime_enabled: Enable time logging
402 402 setting_commit_logtime_activity_id: Activity for logged time
403 403 setting_gantt_items_limit: Maximum number of items displayed on the gantt chart
404 404 setting_issue_group_assignment: Allow issue assignment to groups
405 405 setting_default_issue_start_date_to_creation_date: Use current date as start date for new issues
406 406 setting_commit_cross_project_ref: Allow issues of all the other projects to be referenced and fixed
407 407 setting_unsubscribe: Allow users to delete their own account
408 408 setting_session_lifetime: Session maximum lifetime
409 409 setting_session_timeout: Session inactivity timeout
410 410 setting_thumbnails_enabled: Display attachment thumbnails
411 411 setting_thumbnails_size: Thumbnails size (in pixels)
412 412 setting_non_working_week_days: Non-working days
413 413 setting_jsonp_enabled: Enable JSONP support
414 414 setting_default_projects_tracker_ids: Default trackers for new projects
415 415 setting_mail_handler_excluded_filenames: Exclude attachments by name
416 416 setting_force_default_language_for_anonymous: Force default language for anonymous users
417 417 setting_force_default_language_for_loggedin: Force default language for logged-in users
418 418 setting_link_copied_issue: Link issues on copy
419 419 setting_max_additional_emails: Maximum number of additional email addresses
420 420 setting_search_results_per_page: Search results per page
421 421
422 422 permission_add_project: Create project
423 423 permission_add_subprojects: Create subprojects
424 424 permission_edit_project: Edit project
425 425 permission_close_project: Close / reopen the project
426 426 permission_select_project_modules: Select project modules
427 427 permission_manage_members: Manage members
428 428 permission_manage_project_activities: Manage project activities
429 429 permission_manage_versions: Manage versions
430 430 permission_manage_categories: Manage issue categories
431 431 permission_view_issues: View Issues
432 432 permission_add_issues: Add issues
433 433 permission_edit_issues: Edit issues
434 434 permission_copy_issues: Copy issues
435 435 permission_manage_issue_relations: Manage issue relations
436 436 permission_set_issues_private: Set issues public or private
437 437 permission_set_own_issues_private: Set own issues public or private
438 438 permission_add_issue_notes: Add notes
439 439 permission_edit_issue_notes: Edit notes
440 440 permission_edit_own_issue_notes: Edit own notes
441 441 permission_view_private_notes: View private notes
442 442 permission_set_notes_private: Set notes as private
443 443 permission_move_issues: Move issues
444 444 permission_delete_issues: Delete issues
445 445 permission_manage_public_queries: Manage public queries
446 446 permission_save_queries: Save queries
447 447 permission_view_gantt: View gantt chart
448 448 permission_view_calendar: View calendar
449 449 permission_view_issue_watchers: View watchers list
450 450 permission_add_issue_watchers: Add watchers
451 451 permission_delete_issue_watchers: Delete watchers
452 452 permission_log_time: Log spent time
453 453 permission_view_time_entries: View spent time
454 454 permission_edit_time_entries: Edit time logs
455 455 permission_edit_own_time_entries: Edit own time logs
456 456 permission_manage_news: Manage news
457 457 permission_comment_news: Comment news
458 458 permission_view_documents: View documents
459 459 permission_add_documents: Add documents
460 460 permission_edit_documents: Edit documents
461 461 permission_delete_documents: Delete documents
462 462 permission_manage_files: Manage files
463 463 permission_view_files: View files
464 464 permission_manage_wiki: Manage wiki
465 465 permission_rename_wiki_pages: Rename wiki pages
466 466 permission_delete_wiki_pages: Delete wiki pages
467 467 permission_view_wiki_pages: View wiki
468 468 permission_view_wiki_edits: View wiki history
469 469 permission_edit_wiki_pages: Edit wiki pages
470 470 permission_delete_wiki_pages_attachments: Delete attachments
471 471 permission_protect_wiki_pages: Protect wiki pages
472 472 permission_manage_repository: Manage repository
473 473 permission_browse_repository: Browse repository
474 474 permission_view_changesets: View changesets
475 475 permission_commit_access: Commit access
476 476 permission_manage_boards: Manage forums
477 477 permission_view_messages: View messages
478 478 permission_add_messages: Post messages
479 479 permission_edit_messages: Edit messages
480 480 permission_edit_own_messages: Edit own messages
481 481 permission_delete_messages: Delete messages
482 482 permission_delete_own_messages: Delete own messages
483 483 permission_export_wiki_pages: Export wiki pages
484 484 permission_manage_subtasks: Manage subtasks
485 485 permission_manage_related_issues: Manage related issues
486 486
487 487 project_module_issue_tracking: Issue tracking
488 488 project_module_time_tracking: Time tracking
489 489 project_module_news: News
490 490 project_module_documents: Documents
491 491 project_module_files: Files
492 492 project_module_wiki: Wiki
493 493 project_module_repository: Repository
494 494 project_module_boards: Forums
495 495 project_module_calendar: Calendar
496 496 project_module_gantt: Gantt
497 497
498 498 label_user: User
499 499 label_user_plural: Users
500 500 label_user_new: New user
501 501 label_user_anonymous: Anonymous
502 502 label_project: Project
503 503 label_project_new: New project
504 504 label_project_plural: Projects
505 505 label_x_projects:
506 506 zero: no projects
507 507 one: 1 project
508 508 other: "%{count} projects"
509 509 label_project_all: All Projects
510 510 label_project_latest: Latest projects
511 511 label_issue: Issue
512 512 label_issue_new: New issue
513 513 label_issue_plural: Issues
514 514 label_issue_view_all: View all issues
515 515 label_issues_by: "Issues by %{value}"
516 516 label_issue_added: Issue added
517 517 label_issue_updated: Issue updated
518 518 label_issue_note_added: Note added
519 519 label_issue_status_updated: Status updated
520 520 label_issue_assigned_to_updated: Assignee updated
521 521 label_issue_priority_updated: Priority updated
522 522 label_document: Document
523 523 label_document_new: New document
524 524 label_document_plural: Documents
525 525 label_document_added: Document added
526 526 label_role: Role
527 527 label_role_plural: Roles
528 528 label_role_new: New role
529 529 label_role_and_permissions: Roles and permissions
530 530 label_role_anonymous: Anonymous
531 531 label_role_non_member: Non member
532 532 label_member: Member
533 533 label_member_new: New member
534 534 label_member_plural: Members
535 535 label_tracker: Tracker
536 536 label_tracker_plural: Trackers
537 537 label_tracker_new: New tracker
538 538 label_workflow: Workflow
539 539 label_issue_status: Issue status
540 540 label_issue_status_plural: Issue statuses
541 541 label_issue_status_new: New status
542 542 label_issue_category: Issue category
543 543 label_issue_category_plural: Issue categories
544 544 label_issue_category_new: New category
545 545 label_custom_field: Custom field
546 546 label_custom_field_plural: Custom fields
547 547 label_custom_field_new: New custom field
548 548 label_enumerations: Enumerations
549 549 label_enumeration_new: New value
550 550 label_information: Information
551 551 label_information_plural: Information
552 552 label_please_login: Please log in
553 553 label_register: Register
554 554 label_login_with_open_id_option: or login with OpenID
555 555 label_password_lost: Lost password
556 556 label_home: Home
557 557 label_my_page: My page
558 558 label_my_account: My account
559 559 label_my_projects: My projects
560 560 label_my_page_block: My page block
561 561 label_administration: Administration
562 562 label_login: Sign in
563 563 label_logout: Sign out
564 564 label_help: Help
565 565 label_reported_issues: Reported issues
566 566 label_assigned_to_me_issues: Issues assigned to me
567 567 label_last_login: Last connection
568 568 label_registered_on: Registered on
569 569 label_activity: Activity
570 570 label_overall_activity: Overall activity
571 571 label_user_activity: "%{value}'s activity"
572 572 label_new: New
573 573 label_logged_as: Logged in as
574 574 label_environment: Environment
575 575 label_authentication: Authentication
576 576 label_auth_source: Authentication mode
577 577 label_auth_source_new: New authentication mode
578 578 label_auth_source_plural: Authentication modes
579 579 label_subproject_plural: Subprojects
580 580 label_subproject_new: New subproject
581 581 label_and_its_subprojects: "%{value} and its subprojects"
582 582 label_min_max_length: Min - Max length
583 583 label_list: List
584 584 label_date: Date
585 585 label_integer: Integer
586 586 label_float: Float
587 587 label_boolean: Boolean
588 588 label_string: Text
589 589 label_text: Long text
590 590 label_attribute: Attribute
591 591 label_attribute_plural: Attributes
592 592 label_no_data: No data to display
593 593 label_change_status: Change status
594 594 label_history: History
595 595 label_attachment: File
596 596 label_attachment_new: New file
597 597 label_attachment_delete: Delete file
598 598 label_attachment_plural: Files
599 599 label_file_added: File added
600 600 label_report: Report
601 601 label_report_plural: Reports
602 602 label_news: News
603 603 label_news_new: Add news
604 604 label_news_plural: News
605 605 label_news_latest: Latest news
606 606 label_news_view_all: View all news
607 607 label_news_added: News added
608 608 label_news_comment_added: Comment added to a news
609 609 label_settings: Settings
610 610 label_overview: Overview
611 611 label_version: Version
612 612 label_version_new: New version
613 613 label_version_plural: Versions
614 614 label_close_versions: Close completed versions
615 615 label_confirmation: Confirmation
616 616 label_export_to: 'Also available in:'
617 617 label_read: Read...
618 618 label_public_projects: Public projects
619 619 label_open_issues: open
620 620 label_open_issues_plural: open
621 621 label_closed_issues: closed
622 622 label_closed_issues_plural: closed
623 623 label_x_open_issues_abbr_on_total:
624 624 zero: 0 open / %{total}
625 625 one: 1 open / %{total}
626 626 other: "%{count} open / %{total}"
627 627 label_x_open_issues_abbr:
628 628 zero: 0 open
629 629 one: 1 open
630 630 other: "%{count} open"
631 631 label_x_closed_issues_abbr:
632 632 zero: 0 closed
633 633 one: 1 closed
634 634 other: "%{count} closed"
635 635 label_x_issues:
636 636 zero: 0 issues
637 637 one: 1 issue
638 638 other: "%{count} issues"
639 639 label_total: Total
640 640 label_total_time: Total time
641 641 label_permissions: Permissions
642 642 label_current_status: Current status
643 643 label_new_statuses_allowed: New statuses allowed
644 644 label_all: all
645 645 label_any: any
646 646 label_none: none
647 647 label_nobody: nobody
648 648 label_next: Next
649 649 label_previous: Previous
650 650 label_used_by: Used by
651 651 label_details: Details
652 652 label_add_note: Add a note
653 653 label_calendar: Calendar
654 654 label_months_from: months from
655 655 label_gantt: Gantt
656 656 label_internal: Internal
657 657 label_last_changes: "last %{count} changes"
658 658 label_change_view_all: View all changes
659 659 label_personalize_page: Personalize this page
660 660 label_comment: Comment
661 661 label_comment_plural: Comments
662 662 label_x_comments:
663 663 zero: no comments
664 664 one: 1 comment
665 665 other: "%{count} comments"
666 666 label_comment_add: Add a comment
667 667 label_comment_added: Comment added
668 668 label_comment_delete: Delete comments
669 669 label_query: Custom query
670 670 label_query_plural: Custom queries
671 671 label_query_new: New query
672 672 label_my_queries: My custom queries
673 673 label_filter_add: Add filter
674 674 label_filter_plural: Filters
675 675 label_equals: is
676 676 label_not_equals: is not
677 677 label_in_less_than: in less than
678 678 label_in_more_than: in more than
679 679 label_in_the_next_days: in the next
680 680 label_in_the_past_days: in the past
681 681 label_greater_or_equal: '>='
682 682 label_less_or_equal: '<='
683 683 label_between: between
684 684 label_in: in
685 685 label_today: today
686 686 label_all_time: all time
687 687 label_yesterday: yesterday
688 688 label_this_week: this week
689 689 label_last_week: last week
690 690 label_last_n_weeks: "last %{count} weeks"
691 691 label_last_n_days: "last %{count} days"
692 692 label_this_month: this month
693 693 label_last_month: last month
694 694 label_this_year: this year
695 695 label_date_range: Date range
696 696 label_less_than_ago: less than days ago
697 697 label_more_than_ago: more than days ago
698 698 label_ago: days ago
699 699 label_contains: contains
700 700 label_not_contains: doesn't contain
701 701 label_any_issues_in_project: any issues in project
702 702 label_any_issues_not_in_project: any issues not in project
703 703 label_no_issues_in_project: no issues in project
704 704 label_day_plural: days
705 705 label_repository: Repository
706 706 label_repository_new: New repository
707 707 label_repository_plural: Repositories
708 708 label_browse: Browse
709 709 label_branch: Branch
710 710 label_tag: Tag
711 711 label_revision: Revision
712 712 label_revision_plural: Revisions
713 713 label_revision_id: "Revision %{value}"
714 714 label_associated_revisions: Associated revisions
715 715 label_added: added
716 716 label_modified: modified
717 717 label_copied: copied
718 718 label_renamed: renamed
719 719 label_deleted: deleted
720 720 label_latest_revision: Latest revision
721 721 label_latest_revision_plural: Latest revisions
722 722 label_view_revisions: View revisions
723 723 label_view_all_revisions: View all revisions
724 724 label_max_size: Maximum size
725 725 label_sort_highest: Move to top
726 726 label_sort_higher: Move up
727 727 label_sort_lower: Move down
728 728 label_sort_lowest: Move to bottom
729 729 label_roadmap: Roadmap
730 730 label_roadmap_due_in: "Due in %{value}"
731 731 label_roadmap_overdue: "%{value} late"
732 732 label_roadmap_no_issues: No issues for this version
733 733 label_search: Search
734 734 label_result_plural: Results
735 735 label_all_words: All words
736 736 label_wiki: Wiki
737 737 label_wiki_edit: Wiki edit
738 738 label_wiki_edit_plural: Wiki edits
739 739 label_wiki_page: Wiki page
740 740 label_wiki_page_plural: Wiki pages
741 741 label_index_by_title: Index by title
742 742 label_index_by_date: Index by date
743 743 label_current_version: Current version
744 744 label_preview: Preview
745 745 label_feed_plural: Feeds
746 746 label_changes_details: Details of all changes
747 747 label_issue_tracking: Issue tracking
748 748 label_spent_time: Spent time
749 749 label_overall_spent_time: Overall spent time
750 750 label_f_hour: "%{value} hour"
751 751 label_f_hour_plural: "%{value} hours"
752 752 label_time_tracking: Time tracking
753 753 label_change_plural: Changes
754 754 label_statistics: Statistics
755 755 label_commits_per_month: Commits per month
756 756 label_commits_per_author: Commits per author
757 757 label_diff: diff
758 758 label_view_diff: View differences
759 759 label_diff_inline: inline
760 760 label_diff_side_by_side: side by side
761 761 label_options: Options
762 762 label_copy_workflow_from: Copy workflow from
763 763 label_permissions_report: Permissions report
764 764 label_watched_issues: Watched issues
765 765 label_related_issues: Related issues
766 766 label_applied_status: Applied status
767 767 label_loading: Loading...
768 768 label_relation_new: New relation
769 769 label_relation_delete: Delete relation
770 770 label_relates_to: Related to
771 771 label_duplicates: Duplicates
772 772 label_duplicated_by: Duplicated by
773 773 label_blocks: Blocks
774 774 label_blocked_by: Blocked by
775 775 label_precedes: Precedes
776 776 label_follows: Follows
777 777 label_copied_to: Copied to
778 778 label_copied_from: Copied from
779 779 label_end_to_start: end to start
780 780 label_end_to_end: end to end
781 781 label_start_to_start: start to start
782 782 label_start_to_end: start to end
783 783 label_stay_logged_in: Stay logged in
784 784 label_disabled: disabled
785 785 label_show_completed_versions: Show completed versions
786 786 label_me: me
787 787 label_board: Forum
788 788 label_board_new: New forum
789 789 label_board_plural: Forums
790 790 label_board_locked: Locked
791 791 label_board_sticky: Sticky
792 792 label_topic_plural: Topics
793 793 label_message_plural: Messages
794 794 label_message_last: Last message
795 795 label_message_new: New message
796 796 label_message_posted: Message added
797 797 label_reply_plural: Replies
798 798 label_send_information: Send account information to the user
799 799 label_year: Year
800 800 label_month: Month
801 801 label_week: Week
802 802 label_date_from: From
803 803 label_date_to: To
804 804 label_language_based: Based on user's language
805 805 label_sort_by: "Sort by %{value}"
806 806 label_send_test_email: Send a test email
807 807 label_feeds_access_key: Atom access key
808 808 label_missing_feeds_access_key: Missing a Atom access key
809 809 label_feeds_access_key_created_on: "Atom access key created %{value} ago"
810 810 label_module_plural: Modules
811 811 label_added_time_by: "Added by %{author} %{age} ago"
812 812 label_updated_time_by: "Updated by %{author} %{age} ago"
813 813 label_updated_time: "Updated %{value} ago"
814 814 label_jump_to_a_project: Jump to a project...
815 815 label_file_plural: Files
816 816 label_changeset_plural: Changesets
817 817 label_default_columns: Default columns
818 818 label_no_change_option: (No change)
819 819 label_bulk_edit_selected_issues: Bulk edit selected issues
820 820 label_bulk_edit_selected_time_entries: Bulk edit selected time entries
821 821 label_theme: Theme
822 822 label_default: Default
823 823 label_search_titles_only: Search titles only
824 824 label_user_mail_option_all: "For any event on all my projects"
825 825 label_user_mail_option_selected: "For any event on the selected projects only..."
826 826 label_user_mail_option_none: "No events"
827 827 label_user_mail_option_only_my_events: "Only for things I watch or I'm involved in"
828 828 label_user_mail_option_only_assigned: "Only for things I am assigned to"
829 829 label_user_mail_option_only_owner: "Only for things I am the owner of"
830 830 label_user_mail_no_self_notified: "I don't want to be notified of changes that I make myself"
831 831 label_registration_activation_by_email: account activation by email
832 832 label_registration_manual_activation: manual account activation
833 833 label_registration_automatic_activation: automatic account activation
834 834 label_display_per_page: "Per page: %{value}"
835 835 label_age: Age
836 836 label_change_properties: Change properties
837 837 label_general: General
838 838 label_more: More
839 839 label_scm: SCM
840 840 label_plugins: Plugins
841 841 label_ldap_authentication: LDAP authentication
842 842 label_downloads_abbr: D/L
843 843 label_optional_description: Optional description
844 844 label_add_another_file: Add another file
845 845 label_preferences: Preferences
846 846 label_chronological_order: In chronological order
847 847 label_reverse_chronological_order: In reverse chronological order
848 848 label_planning: Planning
849 849 label_incoming_emails: Incoming emails
850 850 label_generate_key: Generate a key
851 851 label_issue_watchers: Watchers
852 852 label_example: Example
853 853 label_display: Display
854 854 label_sort: Sort
855 855 label_ascending: Ascending
856 856 label_descending: Descending
857 857 label_date_from_to: From %{start} to %{end}
858 858 label_wiki_content_added: Wiki page added
859 859 label_wiki_content_updated: Wiki page updated
860 860 label_group: Group
861 861 label_group_plural: Groups
862 862 label_group_new: New group
863 863 label_group_anonymous: Anonymous users
864 864 label_group_non_member: Non member users
865 865 label_time_entry_plural: Spent time
866 866 label_version_sharing_none: Not shared
867 867 label_version_sharing_descendants: With subprojects
868 868 label_version_sharing_hierarchy: With project hierarchy
869 869 label_version_sharing_tree: With project tree
870 870 label_version_sharing_system: With all projects
871 871 label_update_issue_done_ratios: Update issue done ratios
872 872 label_copy_source: Source
873 873 label_copy_target: Target
874 874 label_copy_same_as_target: Same as target
875 875 label_display_used_statuses_only: Only display statuses that are used by this tracker
876 876 label_api_access_key: API access key
877 877 label_missing_api_access_key: Missing an API access key
878 878 label_api_access_key_created_on: "API access key created %{value} ago"
879 879 label_profile: Profile
880 880 label_subtask_plural: Subtasks
881 881 label_project_copy_notifications: Send email notifications during the project copy
882 882 label_principal_search: "Search for user or group:"
883 883 label_user_search: "Search for user:"
884 884 label_additional_workflow_transitions_for_author: Additional transitions allowed when the user is the author
885 885 label_additional_workflow_transitions_for_assignee: Additional transitions allowed when the user is the assignee
886 886 label_issues_visibility_all: All issues
887 887 label_issues_visibility_public: All non private issues
888 888 label_issues_visibility_own: Issues created by or assigned to the user
889 889 label_git_report_last_commit: Report last commit for files and directories
890 890 label_parent_revision: Parent
891 891 label_child_revision: Child
892 892 label_export_options: "%{export_format} export options"
893 893 label_copy_attachments: Copy attachments
894 894 label_copy_subtasks: Copy subtasks
895 895 label_item_position: "%{position} of %{count}"
896 896 label_completed_versions: Completed versions
897 897 label_search_for_watchers: Search for watchers to add
898 898 label_session_expiration: Session expiration
899 899 label_show_closed_projects: View closed projects
900 900 label_status_transitions: Status transitions
901 901 label_fields_permissions: Fields permissions
902 902 label_readonly: Read-only
903 903 label_required: Required
904 904 label_hidden: Hidden
905 905 label_attribute_of_project: "Project's %{name}"
906 906 label_attribute_of_issue: "Issue's %{name}"
907 907 label_attribute_of_author: "Author's %{name}"
908 908 label_attribute_of_assigned_to: "Assignee's %{name}"
909 909 label_attribute_of_user: "User's %{name}"
910 910 label_attribute_of_fixed_version: "Target version's %{name}"
911 911 label_cross_project_descendants: With subprojects
912 912 label_cross_project_tree: With project tree
913 913 label_cross_project_hierarchy: With project hierarchy
914 914 label_cross_project_system: With all projects
915 915 label_gantt_progress_line: Progress line
916 916 label_visibility_private: to me only
917 917 label_visibility_roles: to these roles only
918 918 label_visibility_public: to any users
919 919 label_link: Link
920 920 label_only: only
921 921 label_drop_down_list: drop-down list
922 922 label_checkboxes: checkboxes
923 923 label_radio_buttons: radio buttons
924 924 label_link_values_to: Link values to URL
925 925 label_custom_field_select_type: Select the type of object to which the custom field is to be attached
926 926 label_check_for_updates: Check for updates
927 927 label_latest_compatible_version: Latest compatible version
928 928 label_unknown_plugin: Unknown plugin
929 929 label_add_projects: Add projects
930 930 label_users_visibility_all: All active users
931 931 label_users_visibility_members_of_visible_projects: Members of visible projects
932 932 label_edit_attachments: Edit attached files
933 933 label_link_copied_issue: Link copied issue
934 934 label_ask: Ask
935 935 label_search_attachments_yes: Search attachment filenames and descriptions
936 936 label_search_attachments_no: Do not search attachments
937 937 label_search_attachments_only: Search attachments only
938 938 label_search_open_issues_only: Open issues only
939 939 label_email_address_plural: Emails
940 940 label_email_address_add: Add email address
941 941 label_enable_notifications: Enable notifications
942 942 label_disable_notifications: Disable notifications
943 943 label_blank_value: blank
944 label_parent_task_attributes: Parent tasks attributes
945 label_parent_task_attributes_derived: Calculated from subtasks
946 label_parent_task_attributes_independent: Independent of subtasks
944 947
945 948 button_login: Login
946 949 button_submit: Submit
947 950 button_save: Save
948 951 button_check_all: Check all
949 952 button_uncheck_all: Uncheck all
950 953 button_collapse_all: Collapse all
951 954 button_expand_all: Expand all
952 955 button_delete: Delete
953 956 button_create: Create
954 957 button_create_and_continue: Create and continue
955 958 button_test: Test
956 959 button_edit: Edit
957 960 button_edit_associated_wikipage: "Edit associated Wiki page: %{page_title}"
958 961 button_add: Add
959 962 button_change: Change
960 963 button_apply: Apply
961 964 button_clear: Clear
962 965 button_lock: Lock
963 966 button_unlock: Unlock
964 967 button_download: Download
965 968 button_list: List
966 969 button_view: View
967 970 button_move: Move
968 971 button_move_and_follow: Move and follow
969 972 button_back: Back
970 973 button_cancel: Cancel
971 974 button_activate: Activate
972 975 button_sort: Sort
973 976 button_log_time: Log time
974 977 button_rollback: Rollback to this version
975 978 button_watch: Watch
976 979 button_unwatch: Unwatch
977 980 button_reply: Reply
978 981 button_archive: Archive
979 982 button_unarchive: Unarchive
980 983 button_reset: Reset
981 984 button_rename: Rename
982 985 button_change_password: Change password
983 986 button_copy: Copy
984 987 button_copy_and_follow: Copy and follow
985 988 button_annotate: Annotate
986 989 button_update: Update
987 990 button_configure: Configure
988 991 button_quote: Quote
989 992 button_duplicate: Duplicate
990 993 button_show: Show
991 994 button_hide: Hide
992 995 button_edit_section: Edit this section
993 996 button_export: Export
994 997 button_delete_my_account: Delete my account
995 998 button_close: Close
996 999 button_reopen: Reopen
997 1000
998 1001 status_active: active
999 1002 status_registered: registered
1000 1003 status_locked: locked
1001 1004
1002 1005 project_status_active: active
1003 1006 project_status_closed: closed
1004 1007 project_status_archived: archived
1005 1008
1006 1009 version_status_open: open
1007 1010 version_status_locked: locked
1008 1011 version_status_closed: closed
1009 1012
1010 1013 field_active: Active
1011 1014
1012 1015 text_select_mail_notifications: Select actions for which email notifications should be sent.
1013 1016 text_regexp_info: eg. ^[A-Z0-9]+$
1014 1017 text_min_max_length_info: 0 means no restriction
1015 1018 text_project_destroy_confirmation: Are you sure you want to delete this project and related data?
1016 1019 text_subprojects_destroy_warning: "Its subproject(s): %{value} will be also deleted."
1017 1020 text_workflow_edit: Select a role and a tracker to edit the workflow
1018 1021 text_are_you_sure: Are you sure?
1019 1022 text_journal_changed: "%{label} changed from %{old} to %{new}"
1020 1023 text_journal_changed_no_detail: "%{label} updated"
1021 1024 text_journal_set_to: "%{label} set to %{value}"
1022 1025 text_journal_deleted: "%{label} deleted (%{old})"
1023 1026 text_journal_added: "%{label} %{value} added"
1024 1027 text_tip_issue_begin_day: issue beginning this day
1025 1028 text_tip_issue_end_day: issue ending this day
1026 1029 text_tip_issue_begin_end_day: issue beginning and ending this day
1027 1030 text_project_identifier_info: 'Only lower case letters (a-z), numbers, dashes and underscores are allowed, must start with a lower case letter.<br />Once saved, the identifier cannot be changed.'
1028 1031 text_caracters_maximum: "%{count} characters maximum."
1029 1032 text_caracters_minimum: "Must be at least %{count} characters long."
1030 1033 text_length_between: "Length between %{min} and %{max} characters."
1031 1034 text_tracker_no_workflow: No workflow defined for this tracker
1032 1035 text_unallowed_characters: Unallowed characters
1033 1036 text_comma_separated: Multiple values allowed (comma separated).
1034 1037 text_line_separated: Multiple values allowed (one line for each value).
1035 1038 text_issues_ref_in_commit_messages: Referencing and fixing issues in commit messages
1036 1039 text_issue_added: "Issue %{id} has been reported by %{author}."
1037 1040 text_issue_updated: "Issue %{id} has been updated by %{author}."
1038 1041 text_wiki_destroy_confirmation: Are you sure you want to delete this wiki and all its content?
1039 1042 text_issue_category_destroy_question: "Some issues (%{count}) are assigned to this category. What do you want to do?"
1040 1043 text_issue_category_destroy_assignments: Remove category assignments
1041 1044 text_issue_category_reassign_to: Reassign issues to this category
1042 1045 text_user_mail_option: "For unselected projects, you will only receive notifications about things you watch or you're involved in (eg. issues you're the author or assignee)."
1043 1046 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."
1044 1047 text_load_default_configuration: Load the default configuration
1045 1048 text_status_changed_by_changeset: "Applied in changeset %{value}."
1046 1049 text_time_logged_by_changeset: "Applied in changeset %{value}."
1047 1050 text_issues_destroy_confirmation: 'Are you sure you want to delete the selected issue(s)?'
1048 1051 text_issues_destroy_descendants_confirmation: "This will also delete %{count} subtask(s)."
1049 1052 text_time_entries_destroy_confirmation: 'Are you sure you want to delete the selected time entr(y/ies)?'
1050 1053 text_select_project_modules: 'Select modules to enable for this project:'
1051 1054 text_default_administrator_account_changed: Default administrator account changed
1052 1055 text_file_repository_writable: Attachments directory writable
1053 1056 text_plugin_assets_writable: Plugin assets directory writable
1054 1057 text_rmagick_available: RMagick available (optional)
1055 1058 text_convert_available: ImageMagick convert available (optional)
1056 1059 text_destroy_time_entries_question: "%{hours} hours were reported on the issues you are about to delete. What do you want to do?"
1057 1060 text_destroy_time_entries: Delete reported hours
1058 1061 text_assign_time_entries_to_project: Assign reported hours to the project
1059 1062 text_reassign_time_entries: 'Reassign reported hours to this issue:'
1060 1063 text_user_wrote: "%{value} wrote:"
1061 1064 text_enumeration_destroy_question: "%{count} objects are assigned to this value."
1062 1065 text_enumeration_category_reassign_to: 'Reassign them to this value:'
1063 1066 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."
1064 1067 text_repository_usernames_mapping: "Select or 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."
1065 1068 text_diff_truncated: '... This diff was truncated because it exceeds the maximum size that can be displayed.'
1066 1069 text_custom_field_possible_values_info: 'One line for each value'
1067 1070 text_wiki_page_destroy_question: "This page has %{descendants} child page(s) and descendant(s). What do you want to do?"
1068 1071 text_wiki_page_nullify_children: "Keep child pages as root pages"
1069 1072 text_wiki_page_destroy_children: "Delete child pages and all their descendants"
1070 1073 text_wiki_page_reassign_children: "Reassign child pages to this parent page"
1071 1074 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.\nAre you sure you want to continue?"
1072 1075 text_zoom_in: Zoom in
1073 1076 text_zoom_out: Zoom out
1074 1077 text_warn_on_leaving_unsaved: "The current page contains unsaved text that will be lost if you leave this page."
1075 1078 text_scm_path_encoding_note: "Default: UTF-8"
1076 1079 text_subversion_repository_note: "Examples: file:///, http://, https://, svn://, svn+[tunnelscheme]://"
1077 1080 text_git_repository_note: Repository is bare and local (e.g. /gitrepo, c:\gitrepo)
1078 1081 text_mercurial_repository_note: Local repository (e.g. /hgrepo, c:\hgrepo)
1079 1082 text_scm_command: Command
1080 1083 text_scm_command_version: Version
1081 1084 text_scm_config: You can configure your SCM commands in config/configuration.yml. Please restart the application after editing it.
1082 1085 text_scm_command_not_available: SCM command is not available. Please check settings on the administration panel.
1083 1086 text_issue_conflict_resolution_overwrite: "Apply my changes anyway (previous notes will be kept but some changes may be overwritten)"
1084 1087 text_issue_conflict_resolution_add_notes: "Add my notes and discard my other changes"
1085 1088 text_issue_conflict_resolution_cancel: "Discard all my changes and redisplay %{link}"
1086 1089 text_account_destroy_confirmation: "Are you sure you want to proceed?\nYour account will be permanently deleted, with no way to reactivate it."
1087 1090 text_session_expiration_settings: "Warning: changing these settings may expire the current sessions including yours."
1088 1091 text_project_closed: This project is closed and read-only.
1089 1092 text_turning_multiple_off: "If you disable multiple values, multiple values will be removed in order to preserve only one value per item."
1090 1093
1091 1094 default_role_manager: Manager
1092 1095 default_role_developer: Developer
1093 1096 default_role_reporter: Reporter
1094 1097 default_tracker_bug: Bug
1095 1098 default_tracker_feature: Feature
1096 1099 default_tracker_support: Support
1097 1100 default_issue_status_new: New
1098 1101 default_issue_status_in_progress: In Progress
1099 1102 default_issue_status_resolved: Resolved
1100 1103 default_issue_status_feedback: Feedback
1101 1104 default_issue_status_closed: Closed
1102 1105 default_issue_status_rejected: Rejected
1103 1106 default_doc_category_user: User documentation
1104 1107 default_doc_category_tech: Technical documentation
1105 1108 default_priority_low: Low
1106 1109 default_priority_normal: Normal
1107 1110 default_priority_high: High
1108 1111 default_priority_urgent: Urgent
1109 1112 default_priority_immediate: Immediate
1110 1113 default_activity_design: Design
1111 1114 default_activity_development: Development
1112 1115
1113 1116 enumeration_issue_priorities: Issue priorities
1114 1117 enumeration_doc_categories: Document categories
1115 1118 enumeration_activities: Activities (time tracking)
1116 1119 enumeration_system_activity: System Activity
1117 1120 description_filter: Filter
1118 1121 description_search: Searchfield
1119 1122 description_choose_project: Projects
1120 1123 description_project_scope: Search scope
1121 1124 description_notes: Notes
1122 1125 description_message_content: Message content
1123 1126 description_query_sort_criteria_attribute: Sort attribute
1124 1127 description_query_sort_criteria_direction: Sort direction
1125 1128 description_user_mail_notification: Mail notification settings
1126 1129 description_available_columns: Available Columns
1127 1130 description_selected_columns: Selected Columns
1128 1131 description_all_columns: All Columns
1129 1132 description_issue_category_reassign: Choose issue category
1130 1133 description_wiki_subpages_reassign: Choose new parent page
1131 1134 description_date_range_list: Choose range from list
1132 1135 description_date_range_interval: Choose range by selecting start and end date
1133 1136 description_date_from: Enter start date
1134 1137 description_date_to: Enter end date
1135 1138 text_repository_identifier_info: 'Only lower case letters (a-z), numbers, dashes and underscores are allowed.<br />Once saved, the identifier cannot be changed.'
@@ -1,1155 +1,1156
1 1 # French translations for Ruby on Rails
2 2 # by Christian Lescuyer (christian@flyingcoders.com)
3 3 # contributor: Sebastien Grosjean - ZenCocoon.com
4 4 # contributor: Thibaut Cuvelier - Developpez.com
5 5
6 6 fr:
7 7 direction: ltr
8 8 date:
9 9 formats:
10 10 default: "%d/%m/%Y"
11 11 short: "%e %b"
12 12 long: "%e %B %Y"
13 13 long_ordinal: "%e %B %Y"
14 14 only_day: "%e"
15 15
16 16 day_names: [dimanche, lundi, mardi, mercredi, jeudi, vendredi, samedi]
17 17 abbr_day_names: [dim, lun, mar, mer, jeu, ven, sam]
18 18
19 19 # Don't forget the nil at the beginning; there's no such thing as a 0th month
20 20 month_names: [~, janvier, fΓ©vrier, mars, avril, mai, juin, juillet, aoΓ»t, septembre, octobre, novembre, dΓ©cembre]
21 21 abbr_month_names: [~, jan., fΓ©v., mar., avr., mai, juin, juil., aoΓ»t, sept., oct., nov., dΓ©c.]
22 22 # Used in date_select and datime_select.
23 23 order:
24 24 - :day
25 25 - :month
26 26 - :year
27 27
28 28 time:
29 29 formats:
30 30 default: "%d/%m/%Y %H:%M"
31 31 time: "%H:%M"
32 32 short: "%d %b %H:%M"
33 33 long: "%A %d %B %Y %H:%M:%S %Z"
34 34 long_ordinal: "%A %d %B %Y %H:%M:%S %Z"
35 35 only_second: "%S"
36 36 am: 'am'
37 37 pm: 'pm'
38 38
39 39 datetime:
40 40 distance_in_words:
41 41 half_a_minute: "30 secondes"
42 42 less_than_x_seconds:
43 43 zero: "moins d'une seconde"
44 44 one: "moins d'uneΒ seconde"
45 45 other: "moins de %{count}Β secondes"
46 46 x_seconds:
47 47 one: "1Β seconde"
48 48 other: "%{count}Β secondes"
49 49 less_than_x_minutes:
50 50 zero: "moins d'une minute"
51 51 one: "moins d'uneΒ minute"
52 52 other: "moins de %{count}Β minutes"
53 53 x_minutes:
54 54 one: "1Β minute"
55 55 other: "%{count}Β minutes"
56 56 about_x_hours:
57 57 one: "environ une heure"
58 58 other: "environ %{count}Β heures"
59 59 x_hours:
60 60 one: "une heure"
61 61 other: "%{count}Β heures"
62 62 x_days:
63 63 one: "unΒ jour"
64 64 other: "%{count}Β jours"
65 65 about_x_months:
66 66 one: "environ un mois"
67 67 other: "environ %{count}Β mois"
68 68 x_months:
69 69 one: "unΒ mois"
70 70 other: "%{count}Β mois"
71 71 about_x_years:
72 72 one: "environ un an"
73 73 other: "environ %{count}Β ans"
74 74 over_x_years:
75 75 one: "plus d'un an"
76 76 other: "plus de %{count}Β ans"
77 77 almost_x_years:
78 78 one: "presqu'un an"
79 79 other: "presque %{count} ans"
80 80 prompts:
81 81 year: "AnnΓ©e"
82 82 month: "Mois"
83 83 day: "Jour"
84 84 hour: "Heure"
85 85 minute: "Minute"
86 86 second: "Seconde"
87 87
88 88 number:
89 89 format:
90 90 precision: 3
91 91 separator: ','
92 92 delimiter: 'Β '
93 93 currency:
94 94 format:
95 95 unit: '€'
96 96 precision: 2
97 97 format: '%nΒ %u'
98 98 human:
99 99 format:
100 100 precision: 3
101 101 storage_units:
102 102 format: "%n %u"
103 103 units:
104 104 byte:
105 105 one: "octet"
106 106 other: "octets"
107 107 kb: "ko"
108 108 mb: "Mo"
109 109 gb: "Go"
110 110 tb: "To"
111 111
112 112 support:
113 113 array:
114 114 sentence_connector: 'et'
115 115 skip_last_comma: true
116 116 word_connector: ", "
117 117 two_words_connector: " et "
118 118 last_word_connector: " et "
119 119
120 120 activerecord:
121 121 errors:
122 122 template:
123 123 header:
124 124 one: "Impossible d'enregistrer %{model} : une erreur"
125 125 other: "Impossible d'enregistrer %{model} : %{count} erreurs."
126 126 body: "Veuillez vΓ©rifier les champs suivantsΒ :"
127 127 messages:
128 128 inclusion: "n'est pas inclus(e) dans la liste"
129 129 exclusion: "n'est pas disponible"
130 130 invalid: "n'est pas valide"
131 131 confirmation: "ne concorde pas avec la confirmation"
132 132 accepted: "doit Γͺtre acceptΓ©(e)"
133 133 empty: "doit Γͺtre renseignΓ©(e)"
134 134 blank: "doit Γͺtre renseignΓ©(e)"
135 135 too_long: "est trop long (pas plus de %{count} caractères)"
136 136 too_short: "est trop court (au moins %{count} caractères)"
137 137 wrong_length: "ne fait pas la bonne longueur (doit comporter %{count} caractères)"
138 138 taken: "est dΓ©jΓ  utilisΓ©"
139 139 not_a_number: "n'est pas un nombre"
140 140 not_a_date: "n'est pas une date valide"
141 141 greater_than: "doit Γͺtre supΓ©rieur Γ  %{count}"
142 142 greater_than_or_equal_to: "doit Γͺtre supΓ©rieur ou Γ©gal Γ  %{count}"
143 143 equal_to: "doit Γͺtre Γ©gal Γ  %{count}"
144 144 less_than: "doit Γͺtre infΓ©rieur Γ  %{count}"
145 145 less_than_or_equal_to: "doit Γͺtre infΓ©rieur ou Γ©gal Γ  %{count}"
146 146 odd: "doit Γͺtre impair"
147 147 even: "doit Γͺtre pair"
148 148 greater_than_start_date: "doit Γͺtre postΓ©rieure Γ  la date de dΓ©but"
149 149 not_same_project: "n'appartient pas au mΓͺme projet"
150 150 circular_dependency: "Cette relation crΓ©erait une dΓ©pendance circulaire"
151 151 cant_link_an_issue_with_a_descendant: "Une demande ne peut pas Γͺtre liΓ©e Γ  l'une de ses sous-tΓ’ches"
152 152 earlier_than_minimum_start_date: "ne peut pas Γͺtre antΓ©rieure au %{date} Γ  cause des demandes qui prΓ©cΓ¨dent"
153 153
154 154 actionview_instancetag_blank_option: Choisir
155 155
156 156 general_text_No: 'Non'
157 157 general_text_Yes: 'Oui'
158 158 general_text_no: 'non'
159 159 general_text_yes: 'oui'
160 160 general_lang_name: 'French (FranΓ§ais)'
161 161 general_csv_separator: ';'
162 162 general_csv_decimal_separator: ','
163 163 general_csv_encoding: ISO-8859-1
164 164 general_pdf_fontname: freesans
165 165 general_first_day_of_week: '1'
166 166
167 167 notice_account_updated: Le compte a été mis à jour avec succès.
168 168 notice_account_invalid_creditentials: Identifiant ou mot de passe invalide.
169 169 notice_account_password_updated: Mot de passe mis à jour avec succès.
170 170 notice_account_wrong_password: Mot de passe incorrect
171 171 notice_account_register_done: Un message contenant les instructions pour activer votre compte vous a Γ©tΓ© envoyΓ© Γ  l'adresse %{email}.
172 172 notice_account_unknown_email: Aucun compte ne correspond Γ  cette adresse.
173 173 notice_account_not_activated_yet: Vous n'avez pas encore activΓ© votre compte. Si vous voulez recevoir un nouveau message d'activation, veuillez <a href="%{url}">cliquer sur ce lien</a>.
174 174 notice_account_locked: Votre compte est verrouillΓ©.
175 175 notice_can_t_change_password: Ce compte utilise une authentification externe. Impossible de changer le mot de passe.
176 176 notice_account_lost_email_sent: Un message contenant les instructions pour choisir un nouveau mot de passe vous a Γ©tΓ© envoyΓ©.
177 177 notice_account_activated: Votre compte a Γ©tΓ© activΓ©. Vous pouvez Γ  prΓ©sent vous connecter.
178 178 notice_successful_create: Création effectuée avec succès.
179 179 notice_successful_update: Mise à jour effectuée avec succès.
180 180 notice_successful_delete: Suppression effectuée avec succès.
181 181 notice_successful_connection: Connexion rΓ©ussie.
182 182 notice_file_not_found: "La page Γ  laquelle vous souhaitez accΓ©der n'existe pas ou a Γ©tΓ© supprimΓ©e."
183 183 notice_locking_conflict: Les donnΓ©es ont Γ©tΓ© mises Γ  jour par un autre utilisateur. Mise Γ  jour impossible.
184 184 notice_not_authorized: "Vous n'Γͺtes pas autorisΓ© Γ  accΓ©der Γ  cette page."
185 185 notice_not_authorized_archived_project: Le projet auquel vous tentez d'accΓ©der a Γ©tΓ© archivΓ©.
186 186 notice_email_sent: "Un email a Γ©tΓ© envoyΓ© Γ  %{value}"
187 187 notice_email_error: "Erreur lors de l'envoi de l'email (%{value})"
188 188 notice_feeds_access_key_reseted: "Votre clé d'accès aux flux Atom a été réinitialisée."
189 189 notice_api_access_key_reseted: Votre clé d'accès API a été réinitialisée.
190 190 notice_failed_to_save_issues: "%{count} demande(s) sur les %{total} sΓ©lectionnΓ©es n'ont pas pu Γͺtre mise(s) Γ  jour : %{ids}."
191 191 notice_failed_to_save_time_entries: "%{count} temps passΓ©(s) sur les %{total} sΓ©lectionnΓ©s n'ont pas pu Γͺtre mis Γ  jour: %{ids}."
192 192 notice_failed_to_save_members: "Erreur lors de la sauvegarde des membres: %{errors}."
193 193 notice_no_issue_selected: "Aucune demande sΓ©lectionnΓ©e ! Cochez les demandes que vous voulez mettre Γ  jour."
194 194 notice_account_pending: "Votre compte a été créé et attend l'approbation de l'administrateur."
195 195 notice_default_data_loaded: Paramétrage par défaut chargé avec succès.
196 196 notice_unable_delete_version: Impossible de supprimer cette version.
197 197 notice_unable_delete_time_entry: Impossible de supprimer le temps passΓ©.
198 198 notice_issue_done_ratios_updated: L'avancement des demandes a Γ©tΓ© mis Γ  jour.
199 199 notice_gantt_chart_truncated: "Le diagramme a Γ©tΓ© tronquΓ© car il excΓ¨de le nombre maximal d'Γ©lΓ©ments pouvant Γͺtre affichΓ©s (%{max})"
200 200 notice_issue_successful_create: "Demande %{id} créée."
201 201 notice_issue_update_conflict: "La demande a Γ©tΓ© mise Γ  jour par un autre utilisateur pendant que vous la modifiez."
202 202 notice_account_deleted: "Votre compte a Γ©tΓ© dΓ©finitivement supprimΓ©."
203 203 notice_user_successful_create: "Utilisateur %{id} créé."
204 204 notice_new_password_must_be_different: Votre nouveau mot de passe doit Γͺtre diffΓ©rent de votre mot de passe actuel
205 205
206 206 error_can_t_load_default_data: "Une erreur s'est produite lors du chargement du paramΓ©trage : %{value}"
207 207 error_scm_not_found: "L'entrΓ©e et/ou la rΓ©vision demandΓ©e n'existe pas dans le dΓ©pΓ΄t."
208 208 error_scm_command_failed: "Une erreur s'est produite lors de l'accès au dépôt : %{value}"
209 209 error_scm_annotate: "L'entrΓ©e n'existe pas ou ne peut pas Γͺtre annotΓ©e."
210 210 error_scm_annotate_big_text_file: Cette entrΓ©e ne peut pas Γͺtre annotΓ©e car elle excΓ¨de la taille maximale.
211 211 error_issue_not_found_in_project: "La demande n'existe pas ou n'appartient pas Γ  ce projet"
212 212 error_no_tracker_in_project: "Aucun tracker n'est associΓ© Γ  ce projet. VΓ©rifier la configuration du projet."
213 213 error_no_default_issue_status: "Aucun statut de demande n'est dΓ©fini par dΓ©faut. VΓ©rifier votre configuration (Administration -> Statuts de demandes)."
214 214 error_can_not_delete_custom_field: Impossible de supprimer le champ personnalisΓ©
215 215 error_can_not_delete_tracker: Ce tracker contient des demandes et ne peut pas Γͺtre supprimΓ©.
216 216 error_can_not_remove_role: Ce rΓ΄le est utilisΓ© et ne peut pas Γͺtre supprimΓ©.
217 217 error_can_not_reopen_issue_on_closed_version: 'Une demande assignΓ©e Γ  une version fermΓ©e ne peut pas Γͺtre rΓ©ouverte'
218 218 error_can_not_archive_project: "Ce projet ne peut pas Γͺtre archivΓ©"
219 219 error_issue_done_ratios_not_updated: L'avancement des demandes n'a pas pu Γͺtre mis Γ  jour.
220 220 error_workflow_copy_source: 'Veuillez sΓ©lectionner un tracker et/ou un rΓ΄le source'
221 221 error_workflow_copy_target: 'Veuillez sΓ©lectionner les trackers et rΓ΄les cibles'
222 222 error_unable_delete_issue_status: Impossible de supprimer le statut de demande
223 223 error_unable_to_connect: Connexion impossible (%{value})
224 224 error_attachment_too_big: Ce fichier ne peut pas Γͺtre attachΓ© car il excΓ¨de la taille maximale autorisΓ©e (%{max_size})
225 225 error_session_expired: "Votre session a expirΓ©. Veuillez vous reconnecter."
226 226 warning_attachments_not_saved: "%{count} fichier(s) n'ont pas pu Γͺtre sauvegardΓ©s."
227 227 error_password_expired: "Votre mot de passe a expirΓ© ou nΓ©cessite d'Γͺtre changΓ©."
228 228
229 229 mail_subject_lost_password: "Votre mot de passe %{value}"
230 230 mail_body_lost_password: 'Pour changer votre mot de passe, cliquez sur le lien suivant :'
231 231 mail_subject_register: "Activation de votre compte %{value}"
232 232 mail_body_register: 'Pour activer votre compte, cliquez sur le lien suivant :'
233 233 mail_body_account_information_external: "Vous pouvez utiliser votre compte %{value} pour vous connecter."
234 234 mail_body_account_information: Paramètres de connexion de votre compte
235 235 mail_subject_account_activation_request: "Demande d'activation d'un compte %{value}"
236 236 mail_body_account_activation_request: "Un nouvel utilisateur (%{value}) s'est inscrit. Son compte nΓ©cessite votre approbation :"
237 237 mail_subject_reminder: "%{count} demande(s) arrivent Γ  Γ©chΓ©ance (%{days})"
238 238 mail_body_reminder: "%{count} demande(s) qui vous sont assignΓ©es arrivent Γ  Γ©chΓ©ance dans les %{days} prochains jours :"
239 239 mail_subject_wiki_content_added: "Page wiki '%{id}' ajoutΓ©e"
240 240 mail_body_wiki_content_added: "La page wiki '%{id}' a Γ©tΓ© ajoutΓ©e par %{author}."
241 241 mail_subject_wiki_content_updated: "Page wiki '%{id}' mise Γ  jour"
242 242 mail_body_wiki_content_updated: "La page wiki '%{id}' a Γ©tΓ© mise Γ  jour par %{author}."
243 243
244 244 field_name: Nom
245 245 field_description: Description
246 246 field_summary: RΓ©sumΓ©
247 247 field_is_required: Obligatoire
248 248 field_firstname: PrΓ©nom
249 249 field_lastname: Nom
250 250 field_mail: Email
251 251 field_address: Email
252 252 field_filename: Fichier
253 253 field_filesize: Taille
254 254 field_downloads: TΓ©lΓ©chargements
255 255 field_author: Auteur
256 256 field_created_on: Créé
257 257 field_updated_on: Mis-Γ -jour
258 258 field_closed_on: FermΓ©
259 259 field_field_format: Format
260 260 field_is_for_all: Pour tous les projets
261 261 field_possible_values: Valeurs possibles
262 262 field_regexp: Expression régulière
263 263 field_min_length: Longueur minimum
264 264 field_max_length: Longueur maximum
265 265 field_value: Valeur
266 266 field_category: CatΓ©gorie
267 267 field_title: Titre
268 268 field_project: Projet
269 269 field_issue: Demande
270 270 field_status: Statut
271 271 field_notes: Notes
272 272 field_is_closed: Demande fermΓ©e
273 273 field_is_default: Valeur par dΓ©faut
274 274 field_tracker: Tracker
275 275 field_subject: Sujet
276 276 field_due_date: EchΓ©ance
277 277 field_assigned_to: AssignΓ© Γ 
278 278 field_priority: PrioritΓ©
279 279 field_fixed_version: Version cible
280 280 field_user: Utilisateur
281 281 field_principal: Principal
282 282 field_role: RΓ΄le
283 283 field_homepage: Site web
284 284 field_is_public: Public
285 285 field_parent: Sous-projet de
286 286 field_is_in_roadmap: Demandes affichΓ©es dans la roadmap
287 287 field_login: Identifiant
288 288 field_mail_notification: Notifications par mail
289 289 field_admin: Administrateur
290 290 field_last_login_on: Dernière connexion
291 291 field_language: Langue
292 292 field_effective_date: Date
293 293 field_password: Mot de passe
294 294 field_new_password: Nouveau mot de passe
295 295 field_password_confirmation: Confirmation
296 296 field_version: Version
297 297 field_type: Type
298 298 field_host: HΓ΄te
299 299 field_port: Port
300 300 field_account: Compte
301 301 field_base_dn: Base DN
302 302 field_attr_login: Attribut Identifiant
303 303 field_attr_firstname: Attribut PrΓ©nom
304 304 field_attr_lastname: Attribut Nom
305 305 field_attr_mail: Attribut Email
306 306 field_onthefly: CrΓ©ation des utilisateurs Γ  la volΓ©e
307 307 field_start_date: DΓ©but
308 308 field_done_ratio: "% rΓ©alisΓ©"
309 309 field_auth_source: Mode d'authentification
310 310 field_hide_mail: Cacher mon adresse mail
311 311 field_comments: Commentaire
312 312 field_url: URL
313 313 field_start_page: Page de dΓ©marrage
314 314 field_subproject: Sous-projet
315 315 field_hours: Heures
316 316 field_activity: ActivitΓ©
317 317 field_spent_on: Date
318 318 field_identifier: Identifiant
319 319 field_is_filter: UtilisΓ© comme filtre
320 320 field_issue_to: Demande liΓ©e
321 321 field_delay: Retard
322 322 field_assignable: Demandes assignables Γ  ce rΓ΄le
323 323 field_redirect_existing_links: Rediriger les liens existants
324 324 field_estimated_hours: Temps estimΓ©
325 325 field_column_names: Colonnes
326 326 field_time_entries: Temps passΓ©
327 327 field_time_zone: Fuseau horaire
328 328 field_searchable: UtilisΓ© pour les recherches
329 329 field_default_value: Valeur par dΓ©faut
330 330 field_comments_sorting: Afficher les commentaires
331 331 field_parent_title: Page parent
332 332 field_editable: Modifiable
333 333 field_watcher: Observateur
334 334 field_identity_url: URL OpenID
335 335 field_content: Contenu
336 336 field_group_by: Grouper par
337 337 field_sharing: Partage
338 338 field_parent_issue: TΓ’che parente
339 339 field_member_of_group: Groupe de l'assignΓ©
340 340 field_assigned_to_role: RΓ΄le de l'assignΓ©
341 341 field_text: Champ texte
342 342 field_visible: Visible
343 343 field_warn_on_leaving_unsaved: "M'avertir lorsque je quitte une page contenant du texte non sauvegardΓ©"
344 344 field_issues_visibility: VisibilitΓ© des demandes
345 345 field_is_private: PrivΓ©e
346 346 field_commit_logs_encoding: Encodage des messages de commit
347 347 field_scm_path_encoding: Encodage des chemins
348 348 field_path_to_repository: Chemin du dΓ©pΓ΄t
349 349 field_root_directory: RΓ©pertoire racine
350 350 field_cvsroot: CVSROOT
351 351 field_cvs_module: Module
352 352 field_repository_is_default: DΓ©pΓ΄t principal
353 353 field_multiple: Valeurs multiples
354 354 field_auth_source_ldap_filter: Filtre LDAP
355 355 field_core_fields: Champs standards
356 356 field_timeout: "Timeout (en secondes)"
357 357 field_board_parent: Forum parent
358 358 field_private_notes: Notes privΓ©es
359 359 field_inherit_members: HΓ©riter les membres
360 360 field_generate_password: GΓ©nΓ©rer un mot de passe
361 361 field_must_change_passwd: Doit changer de mot de passe Γ  la prochaine connexion
362 362 field_default_status: Statut par dΓ©faut
363 363 field_users_visibility: VisibilitΓ© des utilisateurs
364 364
365 365 setting_app_title: Titre de l'application
366 366 setting_app_subtitle: Sous-titre de l'application
367 367 setting_welcome_text: Texte d'accueil
368 368 setting_default_language: Langue par dΓ©faut
369 369 setting_login_required: Authentification obligatoire
370 370 setting_self_registration: Inscription des nouveaux utilisateurs
371 371 setting_attachment_max_size: Taille maximale des fichiers
372 372 setting_issues_export_limit: Limite d'exportation des demandes
373 373 setting_mail_from: Adresse d'Γ©mission
374 374 setting_bcc_recipients: Destinataires en copie cachΓ©e (cci)
375 375 setting_plain_text_mail: Mail en texte brut (non HTML)
376 376 setting_host_name: Nom d'hΓ΄te et chemin
377 377 setting_text_formatting: Formatage du texte
378 378 setting_wiki_compression: Compression de l'historique des pages wiki
379 379 setting_feeds_limit: Nombre maximal d'Γ©lΓ©ments dans les flux Atom
380 380 setting_default_projects_public: DΓ©finir les nouveaux projets comme publics par dΓ©faut
381 381 setting_autofetch_changesets: RΓ©cupΓ©ration automatique des commits
382 382 setting_sys_api_enabled: Activer les WS pour la gestion des dΓ©pΓ΄ts
383 383 setting_commit_ref_keywords: Mots-clΓ©s de rΓ©fΓ©rencement
384 384 setting_commit_fix_keywords: Mots-clΓ©s de rΓ©solution
385 385 setting_autologin: DurΓ©e maximale de connexion automatique
386 386 setting_date_format: Format de date
387 387 setting_time_format: Format d'heure
388 388 setting_cross_project_issue_relations: Autoriser les relations entre demandes de diffΓ©rents projets
389 389 setting_cross_project_subtasks: Autoriser les sous-tΓ’ches dans des projets diffΓ©rents
390 390 setting_issue_list_default_columns: Colonnes affichΓ©es par dΓ©faut sur la liste des demandes
391 391 setting_repositories_encodings: Encodages des fichiers et des dΓ©pΓ΄ts
392 392 setting_emails_header: En-tΓͺte des emails
393 393 setting_emails_footer: Pied-de-page des emails
394 394 setting_protocol: Protocole
395 395 setting_per_page_options: Options d'objets affichΓ©s par page
396 396 setting_user_format: Format d'affichage des utilisateurs
397 397 setting_activity_days_default: Nombre de jours affichΓ©s sur l'activitΓ© des projets
398 398 setting_display_subprojects_issues: Afficher par dΓ©faut les demandes des sous-projets sur les projets principaux
399 399 setting_enabled_scm: SCM activΓ©s
400 400 setting_mail_handler_body_delimiters: "Tronquer les emails après l'une de ces lignes"
401 401 setting_mail_handler_api_enabled: "Activer le WS pour la rΓ©ception d'emails"
402 402 setting_mail_handler_api_key: ClΓ© de protection de l'API
403 403 setting_sequential_project_identifiers: GΓ©nΓ©rer des identifiants de projet sΓ©quentiels
404 404 setting_gravatar_enabled: Afficher les Gravatar des utilisateurs
405 405 setting_gravatar_default: Image Gravatar par dΓ©faut
406 406 setting_diff_max_lines_displayed: Nombre maximum de lignes de diff affichΓ©es
407 407 setting_file_max_size_displayed: Taille maximum des fichiers texte affichΓ©s en ligne
408 408 setting_repository_log_display_limit: "Nombre maximum de rΓ©visions affichΓ©es sur l'historique d'un fichier"
409 409 setting_openid: "Autoriser l'authentification et l'enregistrement OpenID"
410 410 setting_password_max_age: Expiration des mots de passe après
411 411 setting_password_min_length: Longueur minimum des mots de passe
412 412 setting_new_project_user_role_id: RΓ΄le donnΓ© Γ  un utilisateur non-administrateur qui crΓ©e un projet
413 413 setting_default_projects_modules: Modules activΓ©s par dΓ©faut pour les nouveaux projets
414 414 setting_issue_done_ratio: Calcul de l'avancement des demandes
415 415 setting_issue_done_ratio_issue_field: 'Utiliser le champ % effectuΓ©'
416 416 setting_issue_done_ratio_issue_status: Utiliser le statut
417 417 setting_start_of_week: Jour de dΓ©but des calendriers
418 418 setting_rest_api_enabled: Activer l'API REST
419 419 setting_cache_formatted_text: Mettre en cache le texte formatΓ©
420 420 setting_default_notification_option: Option de notification par dΓ©faut
421 421 setting_commit_logtime_enabled: Permettre la saisie de temps
422 422 setting_commit_logtime_activity_id: ActivitΓ© pour le temps saisi
423 423 setting_gantt_items_limit: Nombre maximum d'Γ©lΓ©ments affichΓ©s sur le gantt
424 424 setting_issue_group_assignment: Permettre l'assignement des demandes aux groupes
425 425 setting_default_issue_start_date_to_creation_date: Donner Γ  la date de dΓ©but d'une nouvelle demande la valeur de la date du jour
426 426 setting_commit_cross_project_ref: Permettre le rΓ©fΓ©rencement et la rΓ©solution des demandes de tous les autres projets
427 427 setting_unsubscribe: Permettre aux utilisateurs de supprimer leur propre compte
428 428 setting_session_lifetime: DurΓ©e de vie maximale des sessions
429 429 setting_session_timeout: DurΓ©e maximale d'inactivitΓ©
430 430 setting_thumbnails_enabled: Afficher les vignettes des images
431 431 setting_thumbnails_size: Taille des vignettes (en pixels)
432 432 setting_non_working_week_days: Jours non travaillΓ©s
433 433 setting_jsonp_enabled: Activer le support JSONP
434 434 setting_default_projects_tracker_ids: Trackers par dΓ©faut pour les nouveaux projets
435 435 setting_mail_handler_excluded_filenames: Exclure les fichiers attachΓ©s par leur nom
436 436 setting_force_default_language_for_anonymous: Forcer la langue par dΓ©fault pour les utilisateurs anonymes
437 437 setting_force_default_language_for_loggedin: Forcer la langue par dΓ©fault pour les utilisateurs identifiΓ©s
438 438 setting_link_copied_issue: Lier les demandes lors de la copie
439 439 setting_max_additional_emails: Nombre maximal d'adresses email additionnelles
440 440 setting_search_results_per_page: RΓ©sultats de recherche affichΓ©s par page
441 441
442 442 permission_add_project: CrΓ©er un projet
443 443 permission_add_subprojects: CrΓ©er des sous-projets
444 444 permission_edit_project: Modifier le projet
445 445 permission_close_project: Fermer / rΓ©ouvrir le projet
446 446 permission_select_project_modules: Choisir les modules
447 447 permission_manage_members: GΓ©rer les membres
448 448 permission_manage_project_activities: GΓ©rer les activitΓ©s
449 449 permission_manage_versions: GΓ©rer les versions
450 450 permission_manage_categories: GΓ©rer les catΓ©gories de demandes
451 451 permission_view_issues: Voir les demandes
452 452 permission_add_issues: CrΓ©er des demandes
453 453 permission_edit_issues: Modifier les demandes
454 454 permission_copy_issues: Copier les demandes
455 455 permission_manage_issue_relations: GΓ©rer les relations
456 456 permission_set_issues_private: Rendre les demandes publiques ou privΓ©es
457 457 permission_set_own_issues_private: Rendre ses propres demandes publiques ou privΓ©es
458 458 permission_add_issue_notes: Ajouter des notes
459 459 permission_edit_issue_notes: Modifier les notes
460 460 permission_edit_own_issue_notes: Modifier ses propres notes
461 461 permission_view_private_notes: Voir les notes privΓ©es
462 462 permission_set_notes_private: Rendre les notes privΓ©es
463 463 permission_move_issues: DΓ©placer les demandes
464 464 permission_delete_issues: Supprimer les demandes
465 465 permission_manage_public_queries: GΓ©rer les requΓͺtes publiques
466 466 permission_save_queries: Sauvegarder les requΓͺtes
467 467 permission_view_gantt: Voir le gantt
468 468 permission_view_calendar: Voir le calendrier
469 469 permission_view_issue_watchers: Voir la liste des observateurs
470 470 permission_add_issue_watchers: Ajouter des observateurs
471 471 permission_delete_issue_watchers: Supprimer des observateurs
472 472 permission_log_time: Saisir le temps passΓ©
473 473 permission_view_time_entries: Voir le temps passΓ©
474 474 permission_edit_time_entries: Modifier les temps passΓ©s
475 475 permission_edit_own_time_entries: Modifier son propre temps passΓ©
476 476 permission_manage_news: GΓ©rer les annonces
477 477 permission_comment_news: Commenter les annonces
478 478 permission_view_documents: Voir les documents
479 479 permission_add_documents: Ajouter des documents
480 480 permission_edit_documents: Modifier les documents
481 481 permission_delete_documents: Supprimer les documents
482 482 permission_manage_files: GΓ©rer les fichiers
483 483 permission_view_files: Voir les fichiers
484 484 permission_manage_wiki: GΓ©rer le wiki
485 485 permission_rename_wiki_pages: Renommer les pages
486 486 permission_delete_wiki_pages: Supprimer les pages
487 487 permission_view_wiki_pages: Voir le wiki
488 488 permission_view_wiki_edits: "Voir l'historique des modifications"
489 489 permission_edit_wiki_pages: Modifier les pages
490 490 permission_delete_wiki_pages_attachments: Supprimer les fichiers joints
491 491 permission_protect_wiki_pages: ProtΓ©ger les pages
492 492 permission_manage_repository: GΓ©rer le dΓ©pΓ΄t de sources
493 493 permission_browse_repository: Parcourir les sources
494 494 permission_view_changesets: Voir les rΓ©visions
495 495 permission_commit_access: Droit de commit
496 496 permission_manage_boards: GΓ©rer les forums
497 497 permission_view_messages: Voir les messages
498 498 permission_add_messages: Poster un message
499 499 permission_edit_messages: Modifier les messages
500 500 permission_edit_own_messages: Modifier ses propres messages
501 501 permission_delete_messages: Supprimer les messages
502 502 permission_delete_own_messages: Supprimer ses propres messages
503 503 permission_export_wiki_pages: Exporter les pages
504 504 permission_manage_subtasks: GΓ©rer les sous-tΓ’ches
505 505 permission_manage_related_issues: GΓ©rer les demandes associΓ©es
506 506
507 507 project_module_issue_tracking: Suivi des demandes
508 508 project_module_time_tracking: Suivi du temps passΓ©
509 509 project_module_news: Publication d'annonces
510 510 project_module_documents: Publication de documents
511 511 project_module_files: Publication de fichiers
512 512 project_module_wiki: Wiki
513 513 project_module_repository: DΓ©pΓ΄t de sources
514 514 project_module_boards: Forums de discussion
515 515 project_module_calendar: Calendrier
516 516 project_module_gantt: Gantt
517 517
518 518 label_user: Utilisateur
519 519 label_user_plural: Utilisateurs
520 520 label_user_new: Nouvel utilisateur
521 521 label_user_anonymous: Anonyme
522 522 label_project: Projet
523 523 label_project_new: Nouveau projet
524 524 label_project_plural: Projets
525 525 label_x_projects:
526 526 zero: aucun projet
527 527 one: un projet
528 528 other: "%{count} projets"
529 529 label_project_all: Tous les projets
530 530 label_project_latest: Derniers projets
531 531 label_issue: Demande
532 532 label_issue_new: Nouvelle demande
533 533 label_issue_plural: Demandes
534 534 label_issue_view_all: Voir toutes les demandes
535 535 label_issues_by: "Demandes par %{value}"
536 536 label_issue_added: Demande ajoutΓ©e
537 537 label_issue_updated: Demande mise Γ  jour
538 538 label_issue_note_added: Note ajoutΓ©e
539 539 label_issue_status_updated: Statut changΓ©
540 540 label_issue_assigned_to_updated: AssignΓ© changΓ©
541 541 label_issue_priority_updated: PrioritΓ© changΓ©e
542 542 label_document: Document
543 543 label_document_new: Nouveau document
544 544 label_document_plural: Documents
545 545 label_document_added: Document ajoutΓ©
546 546 label_role: RΓ΄le
547 547 label_role_plural: RΓ΄les
548 548 label_role_new: Nouveau rΓ΄le
549 549 label_role_and_permissions: RΓ΄les et permissions
550 550 label_role_anonymous: Anonyme
551 551 label_role_non_member: Non membre
552 552 label_member: Membre
553 553 label_member_new: Nouveau membre
554 554 label_member_plural: Membres
555 555 label_tracker: Tracker
556 556 label_tracker_plural: Trackers
557 557 label_tracker_new: Nouveau tracker
558 558 label_workflow: Workflow
559 559 label_issue_status: Statut de demandes
560 560 label_issue_status_plural: Statuts de demandes
561 561 label_issue_status_new: Nouveau statut
562 562 label_issue_category: CatΓ©gorie de demandes
563 563 label_issue_category_plural: CatΓ©gories de demandes
564 564 label_issue_category_new: Nouvelle catΓ©gorie
565 565 label_custom_field: Champ personnalisΓ©
566 566 label_custom_field_plural: Champs personnalisΓ©s
567 567 label_custom_field_new: Nouveau champ personnalisΓ©
568 568 label_enumerations: Listes de valeurs
569 569 label_enumeration_new: Nouvelle valeur
570 570 label_information: Information
571 571 label_information_plural: Informations
572 572 label_please_login: Identification
573 573 label_register: S'enregistrer
574 574 label_login_with_open_id_option: S'authentifier avec OpenID
575 575 label_password_lost: Mot de passe perdu
576 576 label_home: Accueil
577 577 label_my_page: Ma page
578 578 label_my_account: Mon compte
579 579 label_my_projects: Mes projets
580 580 label_my_page_block: Blocs disponibles
581 581 label_administration: Administration
582 582 label_login: Connexion
583 583 label_logout: DΓ©connexion
584 584 label_help: Aide
585 585 label_reported_issues: Demandes soumises
586 586 label_assigned_to_me_issues: Demandes qui me sont assignΓ©es
587 587 label_last_login: Dernière connexion
588 588 label_registered_on: Inscrit le
589 589 label_activity: ActivitΓ©
590 590 label_overall_activity: ActivitΓ© globale
591 591 label_user_activity: "ActivitΓ© de %{value}"
592 592 label_new: Nouveau
593 593 label_logged_as: ConnectΓ© en tant que
594 594 label_environment: Environnement
595 595 label_authentication: Authentification
596 596 label_auth_source: Mode d'authentification
597 597 label_auth_source_new: Nouveau mode d'authentification
598 598 label_auth_source_plural: Modes d'authentification
599 599 label_subproject_plural: Sous-projets
600 600 label_subproject_new: Nouveau sous-projet
601 601 label_and_its_subprojects: "%{value} et ses sous-projets"
602 602 label_min_max_length: Longueurs mini - maxi
603 603 label_list: Liste
604 604 label_date: Date
605 605 label_integer: Entier
606 606 label_float: Nombre dΓ©cimal
607 607 label_boolean: BoolΓ©en
608 608 label_string: Texte
609 609 label_text: Texte long
610 610 label_attribute: Attribut
611 611 label_attribute_plural: Attributs
612 612 label_no_data: Aucune donnΓ©e Γ  afficher
613 613 label_change_status: Changer le statut
614 614 label_history: Historique
615 615 label_attachment: Fichier
616 616 label_attachment_new: Nouveau fichier
617 617 label_attachment_delete: Supprimer le fichier
618 618 label_attachment_plural: Fichiers
619 619 label_file_added: Fichier ajoutΓ©
620 620 label_report: Rapport
621 621 label_report_plural: Rapports
622 622 label_news: Annonce
623 623 label_news_new: Nouvelle annonce
624 624 label_news_plural: Annonces
625 625 label_news_latest: Dernières annonces
626 626 label_news_view_all: Voir toutes les annonces
627 627 label_news_added: Annonce ajoutΓ©e
628 628 label_news_comment_added: Commentaire ajoutΓ© Γ  une annonce
629 629 label_settings: Configuration
630 630 label_overview: AperΓ§u
631 631 label_version: Version
632 632 label_version_new: Nouvelle version
633 633 label_version_plural: Versions
634 634 label_close_versions: Fermer les versions terminΓ©es
635 635 label_confirmation: Confirmation
636 636 label_export_to: 'Formats disponibles :'
637 637 label_read: Lire...
638 638 label_public_projects: Projets publics
639 639 label_open_issues: ouvert
640 640 label_open_issues_plural: ouverts
641 641 label_closed_issues: fermΓ©
642 642 label_closed_issues_plural: fermΓ©s
643 643 label_x_open_issues_abbr_on_total:
644 644 zero: 0 ouverte sur %{total}
645 645 one: 1 ouverte sur %{total}
646 646 other: "%{count} ouvertes sur %{total}"
647 647 label_x_open_issues_abbr:
648 648 zero: 0 ouverte
649 649 one: 1 ouverte
650 650 other: "%{count} ouvertes"
651 651 label_x_closed_issues_abbr:
652 652 zero: 0 fermΓ©e
653 653 one: 1 fermΓ©e
654 654 other: "%{count} fermΓ©es"
655 655 label_x_issues:
656 656 zero: 0 demande
657 657 one: 1 demande
658 658 other: "%{count} demandes"
659 659 label_total: Total
660 660 label_total_time: Temps total
661 661 label_permissions: Permissions
662 662 label_current_status: Statut actuel
663 663 label_new_statuses_allowed: Nouveaux statuts autorisΓ©s
664 664 label_all: tous
665 665 label_any: tous
666 666 label_none: aucun
667 667 label_nobody: personne
668 668 label_next: Suivant
669 669 label_previous: PrΓ©cΓ©dent
670 670 label_used_by: UtilisΓ© par
671 671 label_details: DΓ©tails
672 672 label_add_note: Ajouter une note
673 673 label_calendar: Calendrier
674 674 label_months_from: mois depuis
675 675 label_gantt: Gantt
676 676 label_internal: Interne
677 677 label_last_changes: "%{count} derniers changements"
678 678 label_change_view_all: Voir tous les changements
679 679 label_personalize_page: Personnaliser cette page
680 680 label_comment: Commentaire
681 681 label_comment_plural: Commentaires
682 682 label_x_comments:
683 683 zero: aucun commentaire
684 684 one: un commentaire
685 685 other: "%{count} commentaires"
686 686 label_comment_add: Ajouter un commentaire
687 687 label_comment_added: Commentaire ajoutΓ©
688 688 label_comment_delete: Supprimer les commentaires
689 689 label_query: Rapport personnalisΓ©
690 690 label_query_plural: Rapports personnalisΓ©s
691 691 label_query_new: Nouveau rapport
692 692 label_my_queries: Mes rapports personnalisΓ©s
693 693 label_filter_add: Ajouter le filtre
694 694 label_filter_plural: Filtres
695 695 label_equals: Γ©gal
696 696 label_not_equals: diffΓ©rent
697 697 label_in_less_than: dans moins de
698 698 label_in_more_than: dans plus de
699 699 label_in_the_next_days: dans les prochains jours
700 700 label_in_the_past_days: dans les derniers jours
701 701 label_greater_or_equal: '>='
702 702 label_less_or_equal: '<='
703 703 label_between: entre
704 704 label_in: dans
705 705 label_today: aujourd'hui
706 706 label_all_time: toute la pΓ©riode
707 707 label_yesterday: hier
708 708 label_this_week: cette semaine
709 709 label_last_week: la semaine dernière
710 710 label_last_n_weeks: "les %{count} dernières semaines"
711 711 label_last_n_days: "les %{count} derniers jours"
712 712 label_this_month: ce mois-ci
713 713 label_last_month: le mois dernier
714 714 label_this_year: cette annΓ©e
715 715 label_date_range: PΓ©riode
716 716 label_less_than_ago: il y a moins de
717 717 label_more_than_ago: il y a plus de
718 718 label_ago: il y a
719 719 label_contains: contient
720 720 label_not_contains: ne contient pas
721 721 label_any_issues_in_project: une demande du projet
722 722 label_any_issues_not_in_project: une demande hors du projet
723 723 label_no_issues_in_project: aucune demande du projet
724 724 label_day_plural: jours
725 725 label_repository: DΓ©pΓ΄t
726 726 label_repository_new: Nouveau dΓ©pΓ΄t
727 727 label_repository_plural: DΓ©pΓ΄ts
728 728 label_browse: Parcourir
729 729 label_branch: Branche
730 730 label_tag: Tag
731 731 label_revision: RΓ©vision
732 732 label_revision_plural: RΓ©visions
733 733 label_revision_id: "RΓ©vision %{value}"
734 734 label_associated_revisions: RΓ©visions associΓ©es
735 735 label_added: ajoutΓ©
736 736 label_modified: modifiΓ©
737 737 label_copied: copiΓ©
738 738 label_renamed: renommΓ©
739 739 label_deleted: supprimΓ©
740 740 label_latest_revision: Dernière révision
741 741 label_latest_revision_plural: Dernières révisions
742 742 label_view_revisions: Voir les rΓ©visions
743 743 label_view_all_revisions: Voir toutes les rΓ©visions
744 744 label_max_size: Taille maximale
745 745 label_sort_highest: Remonter en premier
746 746 label_sort_higher: Remonter
747 747 label_sort_lower: Descendre
748 748 label_sort_lowest: Descendre en dernier
749 749 label_roadmap: Roadmap
750 750 label_roadmap_due_in: "Γ‰chΓ©ance dans %{value}"
751 751 label_roadmap_overdue: "En retard de %{value}"
752 752 label_roadmap_no_issues: Aucune demande pour cette version
753 753 label_search: Recherche
754 754 label_result_plural: RΓ©sultats
755 755 label_all_words: Tous les mots
756 756 label_wiki: Wiki
757 757 label_wiki_edit: RΓ©vision wiki
758 758 label_wiki_edit_plural: RΓ©visions wiki
759 759 label_wiki_page: Page wiki
760 760 label_wiki_page_plural: Pages wiki
761 761 label_index_by_title: Index par titre
762 762 label_index_by_date: Index par date
763 763 label_current_version: Version actuelle
764 764 label_preview: PrΓ©visualisation
765 765 label_feed_plural: Flux Atom
766 766 label_changes_details: DΓ©tails de tous les changements
767 767 label_issue_tracking: Suivi des demandes
768 768 label_spent_time: Temps passΓ©
769 769 label_overall_spent_time: Temps passΓ© global
770 770 label_f_hour: "%{value} heure"
771 771 label_f_hour_plural: "%{value} heures"
772 772 label_time_tracking: Suivi du temps
773 773 label_change_plural: Changements
774 774 label_statistics: Statistiques
775 775 label_commits_per_month: Commits par mois
776 776 label_commits_per_author: Commits par auteur
777 777 label_diff: diff
778 778 label_view_diff: Voir les diffΓ©rences
779 779 label_diff_inline: en ligne
780 780 label_diff_side_by_side: cΓ΄te Γ  cΓ΄te
781 781 label_options: Options
782 782 label_copy_workflow_from: Copier le workflow de
783 783 label_permissions_report: Synthèse des permissions
784 784 label_watched_issues: Demandes surveillΓ©es
785 785 label_related_issues: Demandes liΓ©es
786 786 label_applied_status: Statut appliquΓ©
787 787 label_loading: Chargement...
788 788 label_relation_new: Nouvelle relation
789 789 label_relation_delete: Supprimer la relation
790 790 label_relates_to: LiΓ© Γ 
791 791 label_duplicates: Duplique
792 792 label_duplicated_by: DupliquΓ© par
793 793 label_blocks: Bloque
794 794 label_blocked_by: BloquΓ© par
795 795 label_precedes: Précède
796 796 label_follows: Suit
797 797 label_copied_to: CopiΓ© vers
798 798 label_copied_from: CopiΓ© depuis
799 799 label_end_to_start: fin Γ  dΓ©but
800 800 label_end_to_end: fin Γ  fin
801 801 label_start_to_start: dΓ©but Γ  dΓ©but
802 802 label_start_to_end: dΓ©but Γ  fin
803 803 label_stay_logged_in: Rester connectΓ©
804 804 label_disabled: dΓ©sactivΓ©
805 805 label_show_completed_versions: Voir les versions passΓ©es
806 806 label_me: moi
807 807 label_board: Forum
808 808 label_board_new: Nouveau forum
809 809 label_board_plural: Forums
810 810 label_board_locked: VerrouillΓ©
811 811 label_board_sticky: Sticky
812 812 label_topic_plural: Discussions
813 813 label_message_plural: Messages
814 814 label_message_last: Dernier message
815 815 label_message_new: Nouveau message
816 816 label_message_posted: Message ajoutΓ©
817 817 label_reply_plural: RΓ©ponses
818 818 label_send_information: Envoyer les informations Γ  l'utilisateur
819 819 label_year: AnnΓ©e
820 820 label_month: Mois
821 821 label_week: Semaine
822 822 label_date_from: Du
823 823 label_date_to: Au
824 824 label_language_based: BasΓ© sur la langue de l'utilisateur
825 825 label_sort_by: "Trier par %{value}"
826 826 label_send_test_email: Envoyer un email de test
827 827 label_feeds_access_key: Clé d'accès Atom
828 828 label_missing_feeds_access_key: Clé d'accès Atom manquante
829 829 label_feeds_access_key_created_on: "Clé d'accès Atom créée il y a %{value}"
830 830 label_module_plural: Modules
831 831 label_added_time_by: "AjoutΓ© par %{author} il y a %{age}"
832 832 label_updated_time_by: "Mis Γ  jour par %{author} il y a %{age}"
833 833 label_updated_time: "Mis Γ  jour il y a %{value}"
834 834 label_jump_to_a_project: Aller Γ  un projet...
835 835 label_file_plural: Fichiers
836 836 label_changeset_plural: RΓ©visions
837 837 label_default_columns: Colonnes par dΓ©faut
838 838 label_no_change_option: (Pas de changement)
839 839 label_bulk_edit_selected_issues: Modifier les demandes sΓ©lectionnΓ©es
840 840 label_bulk_edit_selected_time_entries: Modifier les temps passΓ©s sΓ©lectionnΓ©s
841 841 label_theme: Thème
842 842 label_default: DΓ©faut
843 843 label_search_titles_only: Uniquement dans les titres
844 844 label_user_mail_option_all: "Pour tous les Γ©vΓ©nements de tous mes projets"
845 845 label_user_mail_option_selected: "Pour tous les Γ©vΓ©nements des projets sΓ©lectionnΓ©s..."
846 846 label_user_mail_option_none: Aucune notification
847 847 label_user_mail_option_only_my_events: Seulement pour ce que je surveille
848 848 label_user_mail_option_only_assigned: Seulement pour ce qui m'est assignΓ©
849 849 label_user_mail_option_only_owner: Seulement pour ce que j'ai créé
850 850 label_user_mail_no_self_notified: "Je ne veux pas Γͺtre notifiΓ© des changements que j'effectue"
851 851 label_registration_activation_by_email: activation du compte par email
852 852 label_registration_manual_activation: activation manuelle du compte
853 853 label_registration_automatic_activation: activation automatique du compte
854 854 label_display_per_page: "Par page : %{value}"
855 855 label_age: Γ‚ge
856 856 label_change_properties: Changer les propriΓ©tΓ©s
857 857 label_general: GΓ©nΓ©ral
858 858 label_more: Plus
859 859 label_scm: SCM
860 860 label_plugins: Plugins
861 861 label_ldap_authentication: Authentification LDAP
862 862 label_downloads_abbr: D/L
863 863 label_optional_description: Description facultative
864 864 label_add_another_file: Ajouter un autre fichier
865 865 label_preferences: PrΓ©fΓ©rences
866 866 label_chronological_order: Dans l'ordre chronologique
867 867 label_reverse_chronological_order: Dans l'ordre chronologique inverse
868 868 label_planning: Planning
869 869 label_incoming_emails: Emails entrants
870 870 label_generate_key: GΓ©nΓ©rer une clΓ©
871 871 label_issue_watchers: Observateurs
872 872 label_example: Exemple
873 873 label_display: Affichage
874 874 label_sort: Tri
875 875 label_ascending: Croissant
876 876 label_descending: DΓ©croissant
877 877 label_date_from_to: Du %{start} au %{end}
878 878 label_wiki_content_added: Page wiki ajoutΓ©e
879 879 label_wiki_content_updated: Page wiki mise Γ  jour
880 880 label_group: Groupe
881 881 label_group_plural: Groupes
882 882 label_group_new: Nouveau groupe
883 883 label_group_anonymous: Utilisateurs anonymes
884 884 label_group_non_member: Utilisateurs non membres
885 885 label_time_entry_plural: Temps passΓ©
886 886 label_version_sharing_none: Non partagΓ©
887 887 label_version_sharing_descendants: Avec les sous-projets
888 888 label_version_sharing_hierarchy: Avec toute la hiΓ©rarchie
889 889 label_version_sharing_tree: Avec tout l'arbre
890 890 label_version_sharing_system: Avec tous les projets
891 891 label_update_issue_done_ratios: Mettre Γ  jour l'avancement des demandes
892 892 label_copy_source: Source
893 893 label_copy_target: Cible
894 894 label_copy_same_as_target: Comme la cible
895 895 label_display_used_statuses_only: N'afficher que les statuts utilisΓ©s dans ce tracker
896 896 label_api_access_key: Clé d'accès API
897 897 label_missing_api_access_key: Clé d'accès API manquante
898 898 label_api_access_key_created_on: Clé d'accès API créée il y a %{value}
899 899 label_profile: Profil
900 900 label_subtask_plural: Sous-tΓ’ches
901 901 label_project_copy_notifications: Envoyer les notifications durant la copie du projet
902 902 label_principal_search: "Rechercher un utilisateur ou un groupe :"
903 903 label_user_search: "Rechercher un utilisateur :"
904 904 label_additional_workflow_transitions_for_author: Autorisations supplémentaires lorsque l'utilisateur a créé la demande
905 905 label_additional_workflow_transitions_for_assignee: Autorisations supplΓ©mentaires lorsque la demande est assignΓ©e Γ  l'utilisateur
906 906 label_issues_visibility_all: Toutes les demandes
907 907 label_issues_visibility_public: Toutes les demandes non privΓ©es
908 908 label_issues_visibility_own: Demandes créées par ou assignées à l'utilisateur
909 909 label_git_report_last_commit: Afficher le dernier commit des fichiers et rΓ©pertoires
910 910 label_parent_revision: Parent
911 911 label_child_revision: Enfant
912 912 label_export_options: Options d'exportation %{export_format}
913 913 label_copy_attachments: Copier les fichiers
914 914 label_copy_subtasks: Copier les sous-tΓ’ches
915 915 label_item_position: "%{position} sur %{count}"
916 916 label_completed_versions: Versions passΓ©es
917 917 label_search_for_watchers: Rechercher des observateurs
918 918 label_session_expiration: Expiration des sessions
919 919 label_show_closed_projects: Voir les projets fermΓ©s
920 920 label_status_transitions: Changements de statut
921 921 label_fields_permissions: Permissions sur les champs
922 922 label_readonly: Lecture
923 923 label_required: Obligatoire
924 924 label_hidden: CachΓ©
925 925 label_attribute_of_project: "%{name} du projet"
926 926 label_attribute_of_issue: "%{name} de la demande"
927 927 label_attribute_of_author: "%{name} de l'auteur"
928 928 label_attribute_of_assigned_to: "%{name} de l'assignΓ©"
929 929 label_attribute_of_user: "%{name} de l'utilisateur"
930 930 label_attribute_of_fixed_version: "%{name} de la version cible"
931 931 label_cross_project_descendants: Avec les sous-projets
932 932 label_cross_project_tree: Avec tout l'arbre
933 933 label_cross_project_hierarchy: Avec toute la hiΓ©rarchie
934 934 label_cross_project_system: Avec tous les projets
935 935 label_gantt_progress_line: Ligne de progression
936 936 label_visibility_private: par moi uniquement
937 937 label_visibility_roles: par ces rΓ΄les uniquement
938 938 label_visibility_public: par tout le monde
939 939 label_link: Lien
940 940 label_only: seulement
941 941 label_drop_down_list: liste dΓ©roulante
942 942 label_checkboxes: cases Γ  cocher
943 943 label_radio_buttons: boutons radio
944 944 label_link_values_to: Lier les valeurs vers l'URL
945 945 label_custom_field_select_type: Selectionner le type d'objet auquel attacher le champ personnalisΓ©
946 946 label_check_for_updates: VΓ©rifier les mises Γ  jour
947 947 label_latest_compatible_version: Dernière version compatible
948 948 label_unknown_plugin: Plugin inconnu
949 949 label_add_projects: Ajouter des projets
950 950 label_users_visibility_all: Tous les utilisateurs actifs
951 951 label_users_visibility_members_of_visible_projects: Membres des projets visibles
952 952 label_edit_attachments: Modifier les fichiers attachΓ©s
953 953 label_link_copied_issue: Lier la demande copiΓ©e
954 954 label_ask: Demander
955 955 label_search_attachments_yes: Rechercher les noms et descriptions de fichiers
956 956 label_search_attachments_no: Ne pas rechercher les fichiers
957 957 label_search_attachments_only: Rechercher les fichiers uniquement
958 958 label_search_open_issues_only: Demandes ouvertes uniquement
959 959 label_email_address_plural: Emails
960 960 label_email_address_add: Ajouter une adresse email
961 961 label_enable_notifications: Activer les notifications
962 962 label_disable_notifications: DΓ©sactiver les notifications
963 963 label_blank_value: non renseignΓ©
964 label_parent_task_attributes: Attributs des tΓ’ches parentes
964 965
965 966 button_login: Connexion
966 967 button_submit: Soumettre
967 968 button_save: Sauvegarder
968 969 button_check_all: Tout cocher
969 970 button_uncheck_all: Tout dΓ©cocher
970 971 button_collapse_all: Plier tout
971 972 button_expand_all: DΓ©plier tout
972 973 button_delete: Supprimer
973 974 button_create: CrΓ©er
974 975 button_create_and_continue: CrΓ©er et continuer
975 976 button_test: Tester
976 977 button_edit: Modifier
977 978 button_edit_associated_wikipage: "Modifier la page wiki associΓ©e: %{page_title}"
978 979 button_add: Ajouter
979 980 button_change: Changer
980 981 button_apply: Appliquer
981 982 button_clear: Effacer
982 983 button_lock: Verrouiller
983 984 button_unlock: DΓ©verrouiller
984 985 button_download: TΓ©lΓ©charger
985 986 button_list: Lister
986 987 button_view: Voir
987 988 button_move: DΓ©placer
988 989 button_move_and_follow: DΓ©placer et suivre
989 990 button_back: Retour
990 991 button_cancel: Annuler
991 992 button_activate: Activer
992 993 button_sort: Trier
993 994 button_log_time: Saisir temps
994 995 button_rollback: Revenir Γ  cette version
995 996 button_watch: Surveiller
996 997 button_unwatch: Ne plus surveiller
997 998 button_reply: RΓ©pondre
998 999 button_archive: Archiver
999 1000 button_unarchive: DΓ©sarchiver
1000 1001 button_reset: RΓ©initialiser
1001 1002 button_rename: Renommer
1002 1003 button_change_password: Changer de mot de passe
1003 1004 button_copy: Copier
1004 1005 button_copy_and_follow: Copier et suivre
1005 1006 button_annotate: Annoter
1006 1007 button_update: Mettre Γ  jour
1007 1008 button_configure: Configurer
1008 1009 button_quote: Citer
1009 1010 button_duplicate: Dupliquer
1010 1011 button_show: Afficher
1011 1012 button_hide: Cacher
1012 1013 button_edit_section: Modifier cette section
1013 1014 button_export: Exporter
1014 1015 button_delete_my_account: Supprimer mon compte
1015 1016 button_close: Fermer
1016 1017 button_reopen: RΓ©ouvrir
1017 1018
1018 1019 status_active: actif
1019 1020 status_registered: enregistrΓ©
1020 1021 status_locked: verrouillΓ©
1021 1022
1022 1023 project_status_active: actif
1023 1024 project_status_closed: fermΓ©
1024 1025 project_status_archived: archivΓ©
1025 1026
1026 1027 version_status_open: ouvert
1027 1028 version_status_locked: verrouillΓ©
1028 1029 version_status_closed: fermΓ©
1029 1030
1030 1031 field_active: Actif
1031 1032
1032 1033 text_select_mail_notifications: Actions pour lesquelles une notification par e-mail est envoyΓ©e
1033 1034 text_regexp_info: ex. ^[A-Z0-9]+$
1034 1035 text_min_max_length_info: 0 pour aucune restriction
1035 1036 text_project_destroy_confirmation: Êtes-vous sûr de vouloir supprimer ce projet et toutes ses données ?
1036 1037 text_subprojects_destroy_warning: "Ses sous-projets : %{value} seront Γ©galement supprimΓ©s."
1037 1038 text_workflow_edit: SΓ©lectionner un tracker et un rΓ΄le pour Γ©diter le workflow
1038 1039 text_are_you_sure: Êtes-vous sûr ?
1039 1040 text_journal_changed: "%{label} changΓ© de %{old} Γ  %{new}"
1040 1041 text_journal_changed_no_detail: "%{label} mis Γ  jour"
1041 1042 text_journal_set_to: "%{label} mis Γ  %{value}"
1042 1043 text_journal_deleted: "%{label} %{old} supprimΓ©"
1043 1044 text_journal_added: "%{label} %{value} ajoutΓ©"
1044 1045 text_tip_issue_begin_day: tΓ’che commenΓ§ant ce jour
1045 1046 text_tip_issue_end_day: tΓ’che finissant ce jour
1046 1047 text_tip_issue_begin_end_day: tΓ’che commenΓ§ant et finissant ce jour
1047 1048 text_project_identifier_info: 'Seuls les lettres minuscules (a-z), chiffres, tirets et tirets bas sont autorisΓ©s, doit commencer par une minuscule.<br />Un fois sauvegardΓ©, l''identifiant ne pourra plus Γͺtre modifiΓ©.'
1048 1049 text_caracters_maximum: "%{count} caractères maximum."
1049 1050 text_caracters_minimum: "%{count} caractères minimum."
1050 1051 text_length_between: "Longueur comprise entre %{min} et %{max} caractères."
1051 1052 text_tracker_no_workflow: Aucun worflow n'est dΓ©fini pour ce tracker
1052 1053 text_unallowed_characters: Caractères non autorisés
1053 1054 text_comma_separated: Plusieurs valeurs possibles (sΓ©parΓ©es par des virgules).
1054 1055 text_line_separated: Plusieurs valeurs possibles (une valeur par ligne).
1055 1056 text_issues_ref_in_commit_messages: RΓ©fΓ©rencement et rΓ©solution des demandes dans les commentaires de commits
1056 1057 text_issue_added: "La demande %{id} a Γ©tΓ© soumise par %{author}."
1057 1058 text_issue_updated: "La demande %{id} a Γ©tΓ© mise Γ  jour par %{author}."
1058 1059 text_wiki_destroy_confirmation: Etes-vous sΓ»r de vouloir supprimer ce wiki et tout son contenu ?
1059 1060 text_issue_category_destroy_question: "%{count} demandes sont affectΓ©es Γ  cette catΓ©gorie. Que voulez-vous faire ?"
1060 1061 text_issue_category_destroy_assignments: N'affecter les demandes Γ  aucune autre catΓ©gorie
1061 1062 text_issue_category_reassign_to: RΓ©affecter les demandes Γ  cette catΓ©gorie
1062 1063 text_user_mail_option: "Pour les projets non sΓ©lectionnΓ©s, vous recevrez seulement des notifications pour ce que vous surveillez ou Γ  quoi vous participez (exemple: demandes dont vous Γͺtes l'auteur ou la personne assignΓ©e)."
1063 1064 text_no_configuration_data: "Les rΓ΄les, trackers, statuts et le workflow ne sont pas encore paramΓ©trΓ©s.\nIl est vivement recommandΓ© de charger le paramΓ©trage par defaut. Vous pourrez le modifier une fois chargΓ©."
1064 1065 text_load_default_configuration: Charger le paramΓ©trage par dΓ©faut
1065 1066 text_status_changed_by_changeset: "AppliquΓ© par commit %{value}."
1066 1067 text_time_logged_by_changeset: "AppliquΓ© par commit %{value}"
1067 1068 text_issues_destroy_confirmation: 'Êtes-vous sûr de vouloir supprimer la ou les demandes(s) selectionnée(s) ?'
1068 1069 text_issues_destroy_descendants_confirmation: "Cela entrainera Γ©galement la suppression de %{count} sous-tΓ’che(s)."
1069 1070 text_time_entries_destroy_confirmation: "Etes-vous sΓ»r de vouloir supprimer les temps passΓ©s sΓ©lectionnΓ©s ?"
1070 1071 text_select_project_modules: 'SΓ©lectionner les modules Γ  activer pour ce projet :'
1071 1072 text_default_administrator_account_changed: Compte administrateur par dΓ©faut changΓ©
1072 1073 text_file_repository_writable: RΓ©pertoire de stockage des fichiers accessible en Γ©criture
1073 1074 text_plugin_assets_writable: RΓ©pertoire public des plugins accessible en Γ©criture
1074 1075 text_rmagick_available: Bibliothèque RMagick présente (optionnelle)
1075 1076 text_convert_available: Binaire convert de ImageMagick prΓ©sent (optionel)
1076 1077 text_destroy_time_entries_question: "%{hours} heures ont Γ©tΓ© enregistrΓ©es sur les demandes Γ  supprimer. Que voulez-vous faire ?"
1077 1078 text_destroy_time_entries: Supprimer les heures
1078 1079 text_assign_time_entries_to_project: Reporter les heures sur le projet
1079 1080 text_reassign_time_entries: 'Reporter les heures sur cette demande:'
1080 1081 text_user_wrote: "%{value} a Γ©crit :"
1081 1082 text_enumeration_destroy_question: "Cette valeur est affectΓ©e Γ  %{count} objets."
1082 1083 text_enumeration_category_reassign_to: 'RΓ©affecter les objets Γ  cette valeur:'
1083 1084 text_email_delivery_not_configured: "L'envoi de mail n'est pas configurΓ©, les notifications sont dΓ©sactivΓ©es.\nConfigurez votre serveur SMTP dans config/configuration.yml et redΓ©marrez l'application pour les activer."
1084 1085 text_repository_usernames_mapping: "Vous pouvez sΓ©lectionner ou modifier l'utilisateur Redmine associΓ© Γ  chaque nom d'utilisateur figurant dans l'historique du dΓ©pΓ΄t.\nLes utilisateurs avec le mΓͺme identifiant ou la mΓͺme adresse mail seront automatiquement associΓ©s."
1085 1086 text_diff_truncated: '... Ce diffΓ©rentiel a Γ©tΓ© tronquΓ© car il excΓ¨de la taille maximale pouvant Γͺtre affichΓ©e.'
1086 1087 text_custom_field_possible_values_info: 'Une ligne par valeur'
1087 1088 text_wiki_page_destroy_question: "Cette page possède %{descendants} sous-page(s) et descendante(s). Que voulez-vous faire ?"
1088 1089 text_wiki_page_nullify_children: "Conserver les sous-pages en tant que pages racines"
1089 1090 text_wiki_page_destroy_children: "Supprimer les sous-pages et toutes leurs descedantes"
1090 1091 text_wiki_page_reassign_children: "RΓ©affecter les sous-pages Γ  cette page"
1091 1092 text_own_membership_delete_confirmation: "Vous allez supprimer tout ou partie de vos permissions sur ce projet et ne serez peut-Γͺtre plus autorisΓ© Γ  modifier ce projet.\nEtes-vous sΓ»r de vouloir continuer ?"
1092 1093 text_zoom_in: Zoom avant
1093 1094 text_zoom_out: Zoom arrière
1094 1095 text_warn_on_leaving_unsaved: "Cette page contient du texte non sauvegardΓ© qui sera perdu si vous quittez la page."
1095 1096 text_scm_path_encoding_note: "DΓ©faut : UTF-8"
1096 1097 text_subversion_repository_note: "Exemples (en fonction des protocoles supportΓ©s) : file:///, http://, https://, svn://, svn+[tunnelscheme]://"
1097 1098 text_git_repository_note: "Chemin vers un dΓ©pΓ΄t vide et local (exemples : /gitrepo, c:\\gitrepo)"
1098 1099 text_mercurial_repository_note: "Chemin vers un dΓ©pΓ΄t local (exemples : /hgrepo, c:\\hgrepo)"
1099 1100 text_scm_command: Commande
1100 1101 text_scm_command_version: Version
1101 1102 text_scm_config: Vous pouvez configurer les commandes des SCM dans config/configuration.yml. Redémarrer l'application après modification.
1102 1103 text_scm_command_not_available: Ce SCM n'est pas disponible. Vérifier les paramètres dans la section administration.
1103 1104 text_issue_conflict_resolution_overwrite: "Appliquer quand mΓͺme ma mise Γ  jour (les notes prΓ©cΓ©dentes seront conservΓ©es mais des changements pourront Γͺtre Γ©crasΓ©s)"
1104 1105 text_issue_conflict_resolution_add_notes: "Ajouter mes notes et ignorer mes autres changements"
1105 1106 text_issue_conflict_resolution_cancel: "Annuler ma mise Γ  jour et rΓ©afficher %{link}"
1106 1107 text_account_destroy_confirmation: "Êtes-vous sûr de vouloir continuer ?\nVotre compte sera définitivement supprimé, sans aucune possibilité de le réactiver."
1107 1108 text_session_expiration_settings: "Attention : le changement de ces paramètres peut entrainer l'expiration des sessions utilisateurs en cours, y compris la vôtre."
1108 1109 text_project_closed: Ce projet est fermΓ© et accessible en lecture seule.
1109 1110 text_turning_multiple_off: "Si vous dΓ©sactivez les valeurs multiples, les valeurs multiples seront supprimΓ©es pour n'en conserver qu'une par objet."
1110 1111
1111 1112 default_role_manager: Manager
1112 1113 default_role_developer: DΓ©veloppeur
1113 1114 default_role_reporter: Rapporteur
1114 1115 default_tracker_bug: Anomalie
1115 1116 default_tracker_feature: Evolution
1116 1117 default_tracker_support: Assistance
1117 1118 default_issue_status_new: Nouveau
1118 1119 default_issue_status_in_progress: En cours
1119 1120 default_issue_status_resolved: RΓ©solu
1120 1121 default_issue_status_feedback: Commentaire
1121 1122 default_issue_status_closed: FermΓ©
1122 1123 default_issue_status_rejected: RejetΓ©
1123 1124 default_doc_category_user: Documentation utilisateur
1124 1125 default_doc_category_tech: Documentation technique
1125 1126 default_priority_low: Bas
1126 1127 default_priority_normal: Normal
1127 1128 default_priority_high: Haut
1128 1129 default_priority_urgent: Urgent
1129 1130 default_priority_immediate: ImmΓ©diat
1130 1131 default_activity_design: Conception
1131 1132 default_activity_development: DΓ©veloppement
1132 1133
1133 1134 enumeration_issue_priorities: PrioritΓ©s des demandes
1134 1135 enumeration_doc_categories: CatΓ©gories des documents
1135 1136 enumeration_activities: ActivitΓ©s (suivi du temps)
1136 1137 enumeration_system_activity: Activité système
1137 1138 description_filter: Filtre
1138 1139 description_search: Champ de recherche
1139 1140 description_choose_project: Projets
1140 1141 description_project_scope: Périmètre de recherche
1141 1142 description_notes: Notes
1142 1143 description_message_content: Contenu du message
1143 1144 description_query_sort_criteria_attribute: Critère de tri
1144 1145 description_query_sort_criteria_direction: Ordre de tri
1145 1146 description_user_mail_notification: Option de notification
1146 1147 description_available_columns: Colonnes disponibles
1147 1148 description_selected_columns: Colonnes sΓ©lectionnΓ©es
1148 1149 description_all_columns: Toutes les colonnes
1149 1150 description_issue_category_reassign: Choisir une catΓ©gorie
1150 1151 description_wiki_subpages_reassign: Choisir une nouvelle page parent
1151 1152 description_date_range_list: Choisir une pΓ©riode prΓ©dΓ©finie
1152 1153 description_date_range_interval: Choisir une pΓ©riode
1153 1154 description_date_from: Date de dΓ©but
1154 1155 description_date_to: Date de fin
1155 1156 text_repository_identifier_info: 'Seuls les lettres minuscules (a-z), chiffres, tirets et tirets bas sont autorisΓ©s.<br />Un fois sauvegardΓ©, l''identifiant ne pourra plus Γͺtre modifiΓ©.'
@@ -1,246 +1,250
1 1 # Redmine - project management software
2 2 # Copyright (C) 2006-2015 Jean-Philippe Lang
3 3 #
4 4 # This program is free software; you can redistribute it and/or
5 5 # modify it under the terms of the GNU General Public License
6 6 # as published by the Free Software Foundation; either version 2
7 7 # of the License, or (at your option) any later version.
8 8 #
9 9 # This program is distributed in the hope that it will be useful,
10 10 # but WITHOUT ANY WARRANTY; without even the implied warranty of
11 11 # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
12 12 # GNU General Public License for more details.
13 13 #
14 14 # You should have received a copy of the GNU General Public License
15 15 # along with this program; if not, write to the Free Software
16 16 # Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
17 17
18 18
19 19 # DO NOT MODIFY THIS FILE !!!
20 20 # Settings can be defined through the application in Admin -> Settings
21 21
22 22 app_title:
23 23 default: Redmine
24 24 app_subtitle:
25 25 default: Project management
26 26 welcome_text:
27 27 default:
28 28 login_required:
29 29 default: 0
30 30 self_registration:
31 31 default: '2'
32 32 lost_password:
33 33 default: 1
34 34 unsubscribe:
35 35 default: 1
36 36 password_min_length:
37 37 format: int
38 38 default: 8
39 39 # Maximum password age in days
40 40 password_max_age:
41 41 format: int
42 42 default: 0
43 43 # Maximum number of additional email addresses per user
44 44 max_additional_emails:
45 45 format: int
46 46 default: 5
47 47 # Maximum lifetime of user sessions in minutes
48 48 session_lifetime:
49 49 format: int
50 50 default: 0
51 51 # User session timeout in minutes
52 52 session_timeout:
53 53 format: int
54 54 default: 0
55 55 attachment_max_size:
56 56 format: int
57 57 default: 5120
58 58 issues_export_limit:
59 59 format: int
60 60 default: 500
61 61 activity_days_default:
62 62 format: int
63 63 default: 30
64 64 per_page_options:
65 65 default: '25,50,100'
66 66 search_results_per_page:
67 67 default: 10
68 68 mail_from:
69 69 default: redmine@example.net
70 70 bcc_recipients:
71 71 default: 1
72 72 plain_text_mail:
73 73 default: 0
74 74 text_formatting:
75 75 default: textile
76 76 cache_formatted_text:
77 77 default: 0
78 78 wiki_compression:
79 79 default: ""
80 80 default_language:
81 81 default: en
82 82 force_default_language_for_anonymous:
83 83 default: 0
84 84 force_default_language_for_loggedin:
85 85 default: 0
86 86 host_name:
87 87 default: localhost:3000
88 88 protocol:
89 89 default: http
90 90 feeds_limit:
91 91 format: int
92 92 default: 15
93 93 gantt_items_limit:
94 94 format: int
95 95 default: 500
96 96 # Maximum size of files that can be displayed
97 97 # inline through the file viewer (in KB)
98 98 file_max_size_displayed:
99 99 format: int
100 100 default: 512
101 101 diff_max_lines_displayed:
102 102 format: int
103 103 default: 1500
104 104 enabled_scm:
105 105 serialized: true
106 106 default:
107 107 - Subversion
108 108 - Darcs
109 109 - Mercurial
110 110 - Cvs
111 111 - Bazaar
112 112 - Git
113 113 autofetch_changesets:
114 114 default: 1
115 115 sys_api_enabled:
116 116 default: 0
117 117 sys_api_key:
118 118 default: ''
119 119 commit_cross_project_ref:
120 120 default: 0
121 121 commit_ref_keywords:
122 122 default: 'refs,references,IssueID'
123 123 commit_update_keywords:
124 124 serialized: true
125 125 default: []
126 126 commit_logtime_enabled:
127 127 default: 0
128 128 commit_logtime_activity_id:
129 129 format: int
130 130 default: 0
131 131 # autologin duration in days
132 132 # 0 means autologin is disabled
133 133 autologin:
134 134 format: int
135 135 default: 0
136 136 # date format
137 137 date_format:
138 138 default: ''
139 139 time_format:
140 140 default: ''
141 141 user_format:
142 142 default: :firstname_lastname
143 143 format: symbol
144 144 cross_project_issue_relations:
145 145 default: 0
146 146 # Enables subtasks to be in other projects
147 147 cross_project_subtasks:
148 148 default: 'tree'
149 parent_issue_dates:
150 default: 'derived'
151 parent_issue_priority:
152 default: 'derived'
149 153 link_copied_issue:
150 154 default: 'ask'
151 155 issue_group_assignment:
152 156 default: 0
153 157 default_issue_start_date_to_creation_date:
154 158 default: 1
155 159 notified_events:
156 160 serialized: true
157 161 default:
158 162 - issue_added
159 163 - issue_updated
160 164 mail_handler_body_delimiters:
161 165 default: ''
162 166 mail_handler_excluded_filenames:
163 167 default: ''
164 168 mail_handler_api_enabled:
165 169 default: 0
166 170 mail_handler_api_key:
167 171 default:
168 172 issue_list_default_columns:
169 173 serialized: true
170 174 default:
171 175 - tracker
172 176 - status
173 177 - priority
174 178 - subject
175 179 - assigned_to
176 180 - updated_on
177 181 display_subprojects_issues:
178 182 default: 1
179 183 issue_done_ratio:
180 184 default: 'issue_field'
181 185 default_projects_public:
182 186 default: 1
183 187 default_projects_modules:
184 188 serialized: true
185 189 default:
186 190 - issue_tracking
187 191 - time_tracking
188 192 - news
189 193 - documents
190 194 - files
191 195 - wiki
192 196 - repository
193 197 - boards
194 198 - calendar
195 199 - gantt
196 200 default_projects_tracker_ids:
197 201 serialized: true
198 202 default:
199 203 # Role given to a non-admin user who creates a project
200 204 new_project_user_role_id:
201 205 format: int
202 206 default: ''
203 207 sequential_project_identifiers:
204 208 default: 0
205 209 # encodings used to convert repository files content to UTF-8
206 210 # multiple values accepted, comma separated
207 211 repositories_encodings:
208 212 default: ''
209 213 # encoding used to convert commit logs to UTF-8
210 214 commit_logs_encoding:
211 215 default: 'UTF-8'
212 216 repository_log_display_limit:
213 217 format: int
214 218 default: 100
215 219 ui_theme:
216 220 default: ''
217 221 emails_footer:
218 222 default: |-
219 223 You have received this notification because you have either subscribed to it, or are involved in it.
220 224 To change your notification preferences, please click here: http://hostname/my/account
221 225 gravatar_enabled:
222 226 default: 0
223 227 openid:
224 228 default: 0
225 229 gravatar_default:
226 230 default: ''
227 231 start_of_week:
228 232 default: ''
229 233 rest_api_enabled:
230 234 default: 0
231 235 jsonp_enabled:
232 236 default: 0
233 237 default_notification_option:
234 238 default: 'only_my_events'
235 239 emails_header:
236 240 default: ''
237 241 thumbnails_enabled:
238 242 default: 0
239 243 thumbnails_size:
240 244 format: int
241 245 default: 100
242 246 non_working_week_days:
243 247 serialized: true
244 248 default:
245 249 - '6'
246 250 - '7'
@@ -1,235 +1,241
1 1 module ObjectHelpers
2 2 def User.generate!(attributes={})
3 3 @generated_user_login ||= 'user0'
4 4 @generated_user_login.succ!
5 5 user = User.new(attributes)
6 6 user.login = @generated_user_login.dup if user.login.blank?
7 7 user.mail = "#{@generated_user_login}@example.com" if user.mail.blank?
8 8 user.firstname = "Bob" if user.firstname.blank?
9 9 user.lastname = "Doe" if user.lastname.blank?
10 10 yield user if block_given?
11 11 user.save!
12 12 user
13 13 end
14 14
15 15 def User.add_to_project(user, project, roles=nil)
16 16 roles = Role.find(1) if roles.nil?
17 17 roles = [roles] if roles.is_a?(Role)
18 18 Member.create!(:principal => user, :project => project, :roles => roles)
19 19 end
20 20
21 21 def Group.generate!(attributes={})
22 22 @generated_group_name ||= 'Group 0'
23 23 @generated_group_name.succ!
24 24 group = Group.new(attributes)
25 25 group.name = @generated_group_name.dup if group.name.blank?
26 26 yield group if block_given?
27 27 group.save!
28 28 group
29 29 end
30 30
31 31 def Project.generate!(attributes={})
32 32 @generated_project_identifier ||= 'project-0000'
33 33 @generated_project_identifier.succ!
34 34 project = Project.new(attributes)
35 35 project.name = @generated_project_identifier.dup if project.name.blank?
36 36 project.identifier = @generated_project_identifier.dup if project.identifier.blank?
37 37 yield project if block_given?
38 38 project.save!
39 39 project
40 40 end
41 41
42 42 def Project.generate_with_parent!(parent, attributes={})
43 43 project = Project.generate!(attributes) do |p|
44 44 p.parent = parent
45 45 end
46 46 parent.reload if parent
47 47 project
48 48 end
49 49
50 50 def IssueStatus.generate!(attributes={})
51 51 @generated_status_name ||= 'Status 0'
52 52 @generated_status_name.succ!
53 53 status = IssueStatus.new(attributes)
54 54 status.name = @generated_status_name.dup if status.name.blank?
55 55 yield status if block_given?
56 56 status.save!
57 57 status
58 58 end
59 59
60 60 def Tracker.generate!(attributes={})
61 61 @generated_tracker_name ||= 'Tracker 0'
62 62 @generated_tracker_name.succ!
63 63 tracker = Tracker.new(attributes)
64 64 tracker.name = @generated_tracker_name.dup if tracker.name.blank?
65 65 tracker.default_status ||= IssueStatus.order('position').first || IssueStatus.generate!
66 66 yield tracker if block_given?
67 67 tracker.save!
68 68 tracker
69 69 end
70 70
71 71 def Role.generate!(attributes={})
72 72 @generated_role_name ||= 'Role 0'
73 73 @generated_role_name.succ!
74 74 role = Role.new(attributes)
75 75 role.name = @generated_role_name.dup if role.name.blank?
76 76 yield role if block_given?
77 77 role.save!
78 78 role
79 79 end
80 80
81 81 # Generates an unsaved Issue
82 82 def Issue.generate(attributes={})
83 83 issue = Issue.new(attributes)
84 84 issue.project ||= Project.find(1)
85 85 issue.tracker ||= issue.project.trackers.first
86 86 issue.subject = 'Generated' if issue.subject.blank?
87 87 issue.author ||= User.find(2)
88 88 yield issue if block_given?
89 89 issue
90 90 end
91 91
92 92 # Generates a saved Issue
93 93 def Issue.generate!(attributes={}, &block)
94 94 issue = Issue.generate(attributes, &block)
95 95 issue.save!
96 96 issue
97 97 end
98 98
99 99 # Generates an issue with 2 children and a grandchild
100 100 def Issue.generate_with_descendants!(attributes={})
101 101 issue = Issue.generate!(attributes)
102 102 child = Issue.generate!(:project => issue.project, :subject => 'Child1', :parent_issue_id => issue.id)
103 103 Issue.generate!(:project => issue.project, :subject => 'Child2', :parent_issue_id => issue.id)
104 104 Issue.generate!(:project => issue.project, :subject => 'Child11', :parent_issue_id => child.id)
105 105 issue.reload
106 106 end
107 107
108 def Issue.generate_with_child!(attributes={})
109 issue = Issue.generate!(attributes)
110 Issue.generate!(:parent_issue_id => issue.id)
111 issue.reload
112 end
113
108 114 def Journal.generate!(attributes={})
109 115 journal = Journal.new(attributes)
110 116 journal.user ||= User.first
111 117 journal.journalized ||= Issue.first
112 118 yield journal if block_given?
113 119 journal.save!
114 120 journal
115 121 end
116 122
117 123 def Version.generate!(attributes={})
118 124 @generated_version_name ||= 'Version 0'
119 125 @generated_version_name.succ!
120 126 version = Version.new(attributes)
121 127 version.name = @generated_version_name.dup if version.name.blank?
122 128 yield version if block_given?
123 129 version.save!
124 130 version
125 131 end
126 132
127 133 def TimeEntry.generate!(attributes={})
128 134 entry = TimeEntry.new(attributes)
129 135 entry.user ||= User.find(2)
130 136 entry.issue ||= Issue.find(1) unless entry.project
131 137 entry.project ||= entry.issue.project
132 138 entry.activity ||= TimeEntryActivity.first
133 139 entry.spent_on ||= Date.today
134 140 entry.hours ||= 1.0
135 141 entry.save!
136 142 entry
137 143 end
138 144
139 145 def AuthSource.generate!(attributes={})
140 146 @generated_auth_source_name ||= 'Auth 0'
141 147 @generated_auth_source_name.succ!
142 148 source = AuthSource.new(attributes)
143 149 source.name = @generated_auth_source_name.dup if source.name.blank?
144 150 yield source if block_given?
145 151 source.save!
146 152 source
147 153 end
148 154
149 155 def Board.generate!(attributes={})
150 156 @generated_board_name ||= 'Forum 0'
151 157 @generated_board_name.succ!
152 158 board = Board.new(attributes)
153 159 board.name = @generated_board_name.dup if board.name.blank?
154 160 board.description = @generated_board_name.dup if board.description.blank?
155 161 yield board if block_given?
156 162 board.save!
157 163 board
158 164 end
159 165
160 166 def Attachment.generate!(attributes={})
161 167 @generated_filename ||= 'testfile0'
162 168 @generated_filename.succ!
163 169 attributes = attributes.dup
164 170 attachment = Attachment.new(attributes)
165 171 attachment.container ||= Issue.find(1)
166 172 attachment.author ||= User.find(2)
167 173 attachment.filename = @generated_filename.dup if attachment.filename.blank?
168 174 attachment.save!
169 175 attachment
170 176 end
171 177
172 178 def CustomField.generate!(attributes={})
173 179 @generated_custom_field_name ||= 'Custom field 0'
174 180 @generated_custom_field_name.succ!
175 181 field = new(attributes)
176 182 field.name = @generated_custom_field_name.dup if field.name.blank?
177 183 field.field_format = 'string' if field.field_format.blank?
178 184 yield field if block_given?
179 185 field.save!
180 186 field
181 187 end
182 188
183 189 def Changeset.generate!(attributes={})
184 190 @generated_changeset_rev ||= '123456'
185 191 @generated_changeset_rev.succ!
186 192 changeset = new(attributes)
187 193 changeset.repository ||= Project.find(1).repository
188 194 changeset.revision ||= @generated_changeset_rev
189 195 changeset.committed_on ||= Time.now
190 196 yield changeset if block_given?
191 197 changeset.save!
192 198 changeset
193 199 end
194 200
195 201 def Query.generate!(attributes={})
196 202 query = new(attributes)
197 203 query.name = "Generated query" if query.name.blank?
198 204 query.user ||= User.find(1)
199 205 query.save!
200 206 query
201 207 end
202 208 end
203 209
204 210 module TrackerObjectHelpers
205 211 def generate_transitions!(*args)
206 212 options = args.last.is_a?(Hash) ? args.pop : {}
207 213 if args.size == 1
208 214 args << args.first
209 215 end
210 216 if options[:clear]
211 217 WorkflowTransition.where(:tracker_id => id).delete_all
212 218 end
213 219 args.each_cons(2) do |old_status_id, new_status_id|
214 220 WorkflowTransition.create!(
215 221 :tracker => self,
216 222 :role_id => (options[:role_id] || 1),
217 223 :old_status_id => old_status_id,
218 224 :new_status_id => new_status_id
219 225 )
220 226 end
221 227 end
222 228 end
223 229 Tracker.send :include, TrackerObjectHelpers
224 230
225 231 module IssueObjectHelpers
226 232 def close!
227 233 self.status = IssueStatus.where(:is_closed => true).first
228 234 save!
229 235 end
230 236
231 237 def generate_child!(attributes={})
232 238 Issue.generate!(attributes.merge(:parent_issue_id => self.id))
233 239 end
234 240 end
235 241 Issue.send :include, IssueObjectHelpers
@@ -1,426 +1,383
1 1 # Redmine - project management software
2 2 # Copyright (C) 2006-2015 Jean-Philippe Lang
3 3 #
4 4 # This program is free software; you can redistribute it and/or
5 5 # modify it under the terms of the GNU General Public License
6 6 # as published by the Free Software Foundation; either version 2
7 7 # of the License, or (at your option) any later version.
8 8 #
9 9 # This program is distributed in the hope that it will be useful,
10 10 # but WITHOUT ANY WARRANTY; without even the implied warranty of
11 11 # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
12 12 # GNU General Public License for more details.
13 13 #
14 14 # You should have received a copy of the GNU General Public License
15 15 # along with this program; if not, write to the Free Software
16 16 # Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
17 17
18 18 require File.expand_path('../../test_helper', __FILE__)
19 19
20 20 class IssueNestedSetTest < ActiveSupport::TestCase
21 21 fixtures :projects, :users, :roles,
22 22 :trackers, :projects_trackers,
23 23 :issue_statuses, :issue_categories, :issue_relations,
24 24 :enumerations,
25 25 :issues
26 26
27 27 def test_new_record_is_leaf
28 28 i = Issue.new
29 29 assert i.leaf?
30 30 end
31 31
32 32 def test_create_root_issue
33 33 lft1 = new_issue_lft
34 34 issue1 = Issue.generate!
35 35 lft2 = new_issue_lft
36 36 issue2 = Issue.generate!
37 37 issue1.reload
38 38 issue2.reload
39 39 assert_equal [issue1.id, nil, lft1, lft1 + 1], [issue1.root_id, issue1.parent_id, issue1.lft, issue1.rgt]
40 40 assert_equal [issue2.id, nil, lft2, lft2 + 1], [issue2.root_id, issue2.parent_id, issue2.lft, issue2.rgt]
41 41 end
42 42
43 43 def test_create_child_issue
44 44 lft = new_issue_lft
45 45 parent = Issue.generate!
46 46 child = parent.generate_child!
47 47 parent.reload
48 48 child.reload
49 49 assert_equal [parent.id, nil, lft, lft + 3], [parent.root_id, parent.parent_id, parent.lft, parent.rgt]
50 50 assert_equal [parent.id, parent.id, lft + 1, lft + 2], [child.root_id, child.parent_id, child.lft, child.rgt]
51 51 end
52 52
53 53 def test_creating_a_child_in_a_subproject_should_validate
54 54 issue = Issue.generate!
55 55 child = Issue.new(:project_id => 3, :tracker_id => 2, :author_id => 1,
56 56 :subject => 'child', :parent_issue_id => issue.id)
57 57 assert_save child
58 58 assert_equal issue, child.reload.parent
59 59 end
60 60
61 61 def test_creating_a_child_in_an_invalid_project_should_not_validate
62 62 issue = Issue.generate!
63 63 child = Issue.new(:project_id => 2, :tracker_id => 1, :author_id => 1,
64 64 :subject => 'child', :parent_issue_id => issue.id)
65 65 assert !child.save
66 66 assert_not_equal [], child.errors[:parent_issue_id]
67 67 end
68 68
69 69 def test_move_a_root_to_child
70 70 lft = new_issue_lft
71 71 parent1 = Issue.generate!
72 72 parent2 = Issue.generate!
73 73 child = parent1.generate_child!
74 74 parent2.parent_issue_id = parent1.id
75 75 parent2.save!
76 76 child.reload
77 77 parent1.reload
78 78 parent2.reload
79 79 assert_equal [parent1.id, lft, lft + 5], [parent1.root_id, parent1.lft, parent1.rgt]
80 80 assert_equal [parent1.id, lft + 1, lft + 2], [parent2.root_id, parent2.lft, parent2.rgt]
81 81 assert_equal [parent1.id, lft + 3, lft + 4], [child.root_id, child.lft, child.rgt]
82 82 end
83 83
84 84 def test_move_a_child_to_root
85 85 lft1 = new_issue_lft
86 86 parent1 = Issue.generate!
87 87 lft2 = new_issue_lft
88 88 parent2 = Issue.generate!
89 89 lft3 = new_issue_lft
90 90 child = parent1.generate_child!
91 91 child.parent_issue_id = nil
92 92 child.save!
93 93 child.reload
94 94 parent1.reload
95 95 parent2.reload
96 96 assert_equal [parent1.id, lft1, lft1 + 1], [parent1.root_id, parent1.lft, parent1.rgt]
97 97 assert_equal [parent2.id, lft2, lft2 + 1], [parent2.root_id, parent2.lft, parent2.rgt]
98 98 assert_equal [child.id, lft3, lft3 + 1], [child.root_id, child.lft, child.rgt]
99 99 end
100 100
101 101 def test_move_a_child_to_another_issue
102 102 lft1 = new_issue_lft
103 103 parent1 = Issue.generate!
104 104 lft2 = new_issue_lft
105 105 parent2 = Issue.generate!
106 106 child = parent1.generate_child!
107 107 child.parent_issue_id = parent2.id
108 108 child.save!
109 109 child.reload
110 110 parent1.reload
111 111 parent2.reload
112 112 assert_equal [parent1.id, lft1, lft1 + 1], [parent1.root_id, parent1.lft, parent1.rgt]
113 113 assert_equal [parent2.id, lft2, lft2 + 3], [parent2.root_id, parent2.lft, parent2.rgt]
114 114 assert_equal [parent2.id, lft2 + 1, lft2 + 2], [child.root_id, child.lft, child.rgt]
115 115 end
116 116
117 117 def test_move_a_child_with_descendants_to_another_issue
118 118 lft1 = new_issue_lft
119 119 parent1 = Issue.generate!
120 120 lft2 = new_issue_lft
121 121 parent2 = Issue.generate!
122 122 child = parent1.generate_child!
123 123 grandchild = child.generate_child!
124 124 parent1.reload
125 125 parent2.reload
126 126 child.reload
127 127 grandchild.reload
128 128 assert_equal [parent1.id, lft1, lft1 + 5], [parent1.root_id, parent1.lft, parent1.rgt]
129 129 assert_equal [parent2.id, lft2, lft2 + 1], [parent2.root_id, parent2.lft, parent2.rgt]
130 130 assert_equal [parent1.id, lft1 + 1, lft1 + 4], [child.root_id, child.lft, child.rgt]
131 131 assert_equal [parent1.id, lft1 + 2, lft1 + 3], [grandchild.root_id, grandchild.lft, grandchild.rgt]
132 132 child.reload.parent_issue_id = parent2.id
133 133 child.save!
134 134 child.reload
135 135 grandchild.reload
136 136 parent1.reload
137 137 parent2.reload
138 138 assert_equal [parent1.id, lft1, lft1 + 1], [parent1.root_id, parent1.lft, parent1.rgt]
139 139 assert_equal [parent2.id, lft2, lft2 + 5], [parent2.root_id, parent2.lft, parent2.rgt]
140 140 assert_equal [parent2.id, lft2 + 1, lft2 + 4], [child.root_id, child.lft, child.rgt]
141 141 assert_equal [parent2.id, lft2 + 2, lft2 + 3], [grandchild.root_id, grandchild.lft, grandchild.rgt]
142 142 end
143 143
144 144 def test_move_a_child_with_descendants_to_another_project
145 145 lft1 = new_issue_lft
146 146 parent1 = Issue.generate!
147 147 child = parent1.generate_child!
148 148 grandchild = child.generate_child!
149 149 lft4 = new_issue_lft
150 150 child.reload
151 151 child.project = Project.find(2)
152 152 assert child.save
153 153 child.reload
154 154 grandchild.reload
155 155 parent1.reload
156 156 assert_equal [1, parent1.id, lft1, lft1 + 1], [parent1.project_id, parent1.root_id, parent1.lft, parent1.rgt]
157 157 assert_equal [2, child.id, lft4, lft4 + 3],
158 158 [child.project_id, child.root_id, child.lft, child.rgt]
159 159 assert_equal [2, child.id, lft4 + 1, lft4 + 2],
160 160 [grandchild.project_id, grandchild.root_id, grandchild.lft, grandchild.rgt]
161 161 end
162 162
163 163 def test_moving_an_issue_to_a_descendant_should_not_validate
164 164 parent1 = Issue.generate!
165 165 parent2 = Issue.generate!
166 166 child = parent1.generate_child!
167 167 grandchild = child.generate_child!
168 168
169 169 child.reload
170 170 child.parent_issue_id = grandchild.id
171 171 assert !child.save
172 172 assert_not_equal [], child.errors[:parent_issue_id]
173 173 end
174 174
175 175 def test_updating_a_root_issue_should_not_trigger_update_nested_set_attributes_on_parent_change
176 176 issue = Issue.find(Issue.generate!.id)
177 177 issue.parent_issue_id = ""
178 178 issue.expects(:update_nested_set_attributes_on_parent_change).never
179 179 issue.save!
180 180 end
181 181
182 182 def test_updating_a_child_issue_should_not_trigger_update_nested_set_attributes_on_parent_change
183 183 issue = Issue.find(Issue.generate!(:parent_issue_id => 1).id)
184 184 issue.parent_issue_id = "1"
185 185 issue.expects(:update_nested_set_attributes_on_parent_change).never
186 186 issue.save!
187 187 end
188 188
189 189 def test_moving_a_root_issue_should_trigger_update_nested_set_attributes_on_parent_change
190 190 issue = Issue.find(Issue.generate!.id)
191 191 issue.parent_issue_id = "1"
192 192 issue.expects(:update_nested_set_attributes_on_parent_change).once
193 193 issue.save!
194 194 end
195 195
196 196 def test_moving_a_child_issue_to_another_parent_should_trigger_update_nested_set_attributes_on_parent_change
197 197 issue = Issue.find(Issue.generate!(:parent_issue_id => 1).id)
198 198 issue.parent_issue_id = "2"
199 199 issue.expects(:update_nested_set_attributes_on_parent_change).once
200 200 issue.save!
201 201 end
202 202
203 203 def test_moving_a_child_issue_to_root_should_trigger_update_nested_set_attributes_on_parent_change
204 204 issue = Issue.find(Issue.generate!(:parent_issue_id => 1).id)
205 205 issue.parent_issue_id = ""
206 206 issue.expects(:update_nested_set_attributes_on_parent_change).once
207 207 issue.save!
208 208 end
209 209
210 210 def test_destroy_should_destroy_children
211 211 lft1 = new_issue_lft
212 212 issue1 = Issue.generate!
213 213 issue2 = Issue.generate!
214 214 issue3 = issue2.generate_child!
215 215 issue4 = issue1.generate_child!
216 216 issue3.init_journal(User.find(2))
217 217 issue3.subject = 'child with journal'
218 218 issue3.save!
219 219 assert_difference 'Issue.count', -2 do
220 220 assert_difference 'Journal.count', -1 do
221 221 assert_difference 'JournalDetail.count', -1 do
222 222 Issue.find(issue2.id).destroy
223 223 end
224 224 end
225 225 end
226 226 issue1.reload
227 227 issue4.reload
228 228 assert !Issue.exists?(issue2.id)
229 229 assert !Issue.exists?(issue3.id)
230 230 assert_equal [issue1.id, lft1, lft1 + 3], [issue1.root_id, issue1.lft, issue1.rgt]
231 231 assert_equal [issue1.id, lft1 + 1, lft1 + 2], [issue4.root_id, issue4.lft, issue4.rgt]
232 232 end
233 233
234 234 def test_destroy_child_should_update_parent
235 235 lft1 = new_issue_lft
236 236 issue = Issue.generate!
237 237 child1 = issue.generate_child!
238 238 child2 = issue.generate_child!
239 239 issue.reload
240 240 assert_equal [issue.id, lft1, lft1 + 5], [issue.root_id, issue.lft, issue.rgt]
241 241 child2.reload.destroy
242 242 issue.reload
243 243 assert_equal [issue.id, lft1, lft1 + 3], [issue.root_id, issue.lft, issue.rgt]
244 244 end
245 245
246 246 def test_destroy_parent_issue_updated_during_children_destroy
247 247 parent = Issue.generate!
248 248 parent.generate_child!(:start_date => Date.today)
249 249 parent.generate_child!(:start_date => 2.days.from_now)
250 250
251 251 assert_difference 'Issue.count', -3 do
252 252 Issue.find(parent.id).destroy
253 253 end
254 254 end
255 255
256 256 def test_destroy_child_issue_with_children
257 257 root = Issue.generate!
258 258 child = root.generate_child!
259 259 leaf = child.generate_child!
260 260 leaf.init_journal(User.find(2))
261 261 leaf.subject = 'leaf with journal'
262 262 leaf.save!
263 263
264 264 assert_difference 'Issue.count', -2 do
265 265 assert_difference 'Journal.count', -1 do
266 266 assert_difference 'JournalDetail.count', -1 do
267 267 Issue.find(child.id).destroy
268 268 end
269 269 end
270 270 end
271 271
272 272 root = Issue.find(root.id)
273 273 assert root.leaf?, "Root issue is not a leaf (lft: #{root.lft}, rgt: #{root.rgt})"
274 274 end
275 275
276 276 def test_destroy_issue_with_grand_child
277 277 lft1 = new_issue_lft
278 278 parent = Issue.generate!
279 279 issue = parent.generate_child!
280 280 child = issue.generate_child!
281 281 grandchild1 = child.generate_child!
282 282 grandchild2 = child.generate_child!
283 283 assert_difference 'Issue.count', -4 do
284 284 Issue.find(issue.id).destroy
285 285 parent.reload
286 286 assert_equal [lft1, lft1 + 1], [parent.lft, parent.rgt]
287 287 end
288 288 end
289 289
290 def test_parent_priority_should_be_the_highest_child_priority
291 parent = Issue.generate!(:priority => IssuePriority.find_by_name('Normal'))
292 # Create children
293 child1 = parent.generate_child!(:priority => IssuePriority.find_by_name('High'))
294 assert_equal 'High', parent.reload.priority.name
295 child2 = child1.generate_child!(:priority => IssuePriority.find_by_name('Immediate'))
296 assert_equal 'Immediate', child1.reload.priority.name
297 assert_equal 'Immediate', parent.reload.priority.name
298 child3 = parent.generate_child!(:priority => IssuePriority.find_by_name('Low'))
299 assert_equal 'Immediate', parent.reload.priority.name
300 # Destroy a child
301 child1.destroy
302 assert_equal 'Low', parent.reload.priority.name
303 # Update a child
304 child3.reload.priority = IssuePriority.find_by_name('Normal')
305 child3.save!
306 assert_equal 'Normal', parent.reload.priority.name
307 end
308
309 def test_parent_dates_should_be_lowest_start_and_highest_due_dates
310 parent = Issue.generate!
311 parent.generate_child!(:start_date => '2010-01-25', :due_date => '2010-02-15')
312 parent.generate_child!( :due_date => '2010-02-13')
313 parent.generate_child!(:start_date => '2010-02-01', :due_date => '2010-02-22')
314 parent.reload
315 assert_equal Date.parse('2010-01-25'), parent.start_date
316 assert_equal Date.parse('2010-02-22'), parent.due_date
317 end
318
319 290 def test_parent_done_ratio_should_be_average_done_ratio_of_leaves
320 291 parent = Issue.generate!
321 292 parent.generate_child!(:done_ratio => 20)
322 293 assert_equal 20, parent.reload.done_ratio
323 294 parent.generate_child!(:done_ratio => 70)
324 295 assert_equal 45, parent.reload.done_ratio
325 296
326 297 child = parent.generate_child!(:done_ratio => 0)
327 298 assert_equal 30, parent.reload.done_ratio
328 299
329 300 child.generate_child!(:done_ratio => 30)
330 301 assert_equal 30, child.reload.done_ratio
331 302 assert_equal 40, parent.reload.done_ratio
332 303 end
333 304
334 305 def test_parent_done_ratio_should_be_weighted_by_estimated_times_if_any
335 306 parent = Issue.generate!
336 307 parent.generate_child!(:estimated_hours => 10, :done_ratio => 20)
337 308 assert_equal 20, parent.reload.done_ratio
338 309 parent.generate_child!(:estimated_hours => 20, :done_ratio => 50)
339 310 assert_equal (50 * 20 + 20 * 10) / 30, parent.reload.done_ratio
340 311 end
341 312
342 313 def test_parent_done_ratio_with_child_estimate_to_0_should_reach_100
343 314 parent = Issue.generate!
344 315 issue1 = parent.generate_child!
345 316 issue2 = parent.generate_child!(:estimated_hours => 0)
346 317 assert_equal 0, parent.reload.done_ratio
347 318 issue1.reload.close!
348 319 assert_equal 50, parent.reload.done_ratio
349 320 issue2.reload.close!
350 321 assert_equal 100, parent.reload.done_ratio
351 322 end
352 323
353 324 def test_parent_estimate_should_be_sum_of_leaves
354 325 parent = Issue.generate!
355 326 parent.generate_child!(:estimated_hours => nil)
356 327 assert_equal nil, parent.reload.estimated_hours
357 328 parent.generate_child!(:estimated_hours => 5)
358 329 assert_equal 5, parent.reload.estimated_hours
359 330 parent.generate_child!(:estimated_hours => 7)
360 331 assert_equal 12, parent.reload.estimated_hours
361 332 end
362 333
363 334 def test_done_ratio_of_parent_with_a_child_without_estimated_time_should_not_exceed_100
364 335 parent = Issue.generate!
365 336 parent.generate_child!(:estimated_hours => 40)
366 337 parent.generate_child!(:estimated_hours => 40)
367 338 parent.generate_child!(:estimated_hours => 20)
368 339 parent.generate_child!
369 340 parent.reload.children.each(&:close!)
370 341 assert_equal 100, parent.reload.done_ratio
371 342 end
372 343
373 344 def test_done_ratio_of_parent_with_a_child_with_estimated_time_at_0_should_not_exceed_100
374 345 parent = Issue.generate!
375 346 parent.generate_child!(:estimated_hours => 40)
376 347 parent.generate_child!(:estimated_hours => 40)
377 348 parent.generate_child!(:estimated_hours => 20)
378 349 parent.generate_child!(:estimated_hours => 0)
379 350 parent.reload.children.each(&:close!)
380 351 assert_equal 100, parent.reload.done_ratio
381 352 end
382 353
383 354 def test_move_parent_updates_old_parent_attributes
384 355 first_parent = Issue.generate!
385 356 second_parent = Issue.generate!
386 357 child = first_parent.generate_child!(:estimated_hours => 5)
387 358 assert_equal 5, first_parent.reload.estimated_hours
388 359 child.update_attributes(:estimated_hours => 7, :parent_issue_id => second_parent.id)
389 360 assert_equal 7, second_parent.reload.estimated_hours
390 361 assert_nil first_parent.reload.estimated_hours
391 362 end
392 363
393 def test_reschuling_a_parent_should_reschedule_subtasks
394 parent = Issue.generate!
395 c1 = parent.generate_child!(:start_date => '2010-05-12', :due_date => '2010-05-18')
396 c2 = parent.generate_child!(:start_date => '2010-06-03', :due_date => '2010-06-10')
397 parent.reload
398 parent.reschedule_on!(Date.parse('2010-06-02'))
399 c1.reload
400 assert_equal [Date.parse('2010-06-02'), Date.parse('2010-06-08')], [c1.start_date, c1.due_date]
401 c2.reload
402 assert_equal [Date.parse('2010-06-03'), Date.parse('2010-06-10')], [c2.start_date, c2.due_date] # no change
403 parent.reload
404 assert_equal [Date.parse('2010-06-02'), Date.parse('2010-06-10')], [parent.start_date, parent.due_date]
405 end
406
407 364 def test_project_copy_should_copy_issue_tree
408 365 p = Project.create!(:name => 'Tree copy', :identifier => 'tree-copy', :tracker_ids => [1, 2])
409 366 i1 = Issue.generate!(:project => p, :subject => 'i1')
410 367 i2 = i1.generate_child!(:project => p, :subject => 'i2')
411 368 i3 = i1.generate_child!(:project => p, :subject => 'i3')
412 369 i4 = i2.generate_child!(:project => p, :subject => 'i4')
413 370 i5 = Issue.generate!(:project => p, :subject => 'i5')
414 371 c = Project.new(:name => 'Copy', :identifier => 'copy', :tracker_ids => [1, 2])
415 372 c.copy(p, :only => 'issues')
416 373 c.reload
417 374
418 375 assert_equal 5, c.issues.count
419 376 ic1, ic2, ic3, ic4, ic5 = c.issues.order('subject').to_a
420 377 assert ic1.root?
421 378 assert_equal ic1, ic2.parent
422 379 assert_equal ic1, ic3.parent
423 380 assert_equal ic2, ic4.parent
424 381 assert ic5.root?
425 382 end
426 383 end
General Comments 0
You need to be logged in to leave comments. Login now