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