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