##// END OF EJS Templates
Limit trackers for new issue to certain roles (#7839)....
Jean-Philippe Lang -
r15082:79df68e17fc0
parent child
Show More

The requested changes are too big and content was truncated. Show full diff

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