The requested changes are too big and content was truncated. Show full diff
@@ -1,1283 +1,1292 | |||||
1 | # Redmine - project management software |
|
1 | # Redmine - project management software | |
2 | # Copyright (C) 2006-2012 Jean-Philippe Lang |
|
2 | # Copyright (C) 2006-2012 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 |
|
20 | |||
21 | belongs_to :project |
|
21 | belongs_to :project | |
22 | belongs_to :tracker |
|
22 | belongs_to :tracker | |
23 | belongs_to :status, :class_name => 'IssueStatus', :foreign_key => 'status_id' |
|
23 | belongs_to :status, :class_name => 'IssueStatus', :foreign_key => 'status_id' | |
24 | belongs_to :author, :class_name => 'User', :foreign_key => 'author_id' |
|
24 | belongs_to :author, :class_name => 'User', :foreign_key => 'author_id' | |
25 | belongs_to :assigned_to, :class_name => 'Principal', :foreign_key => 'assigned_to_id' |
|
25 | belongs_to :assigned_to, :class_name => 'Principal', :foreign_key => 'assigned_to_id' | |
26 | belongs_to :fixed_version, :class_name => 'Version', :foreign_key => 'fixed_version_id' |
|
26 | belongs_to :fixed_version, :class_name => 'Version', :foreign_key => 'fixed_version_id' | |
27 | belongs_to :priority, :class_name => 'IssuePriority', :foreign_key => 'priority_id' |
|
27 | belongs_to :priority, :class_name => 'IssuePriority', :foreign_key => 'priority_id' | |
28 | belongs_to :category, :class_name => 'IssueCategory', :foreign_key => 'category_id' |
|
28 | belongs_to :category, :class_name => 'IssueCategory', :foreign_key => 'category_id' | |
29 |
|
29 | |||
30 | has_many :journals, :as => :journalized, :dependent => :destroy |
|
30 | has_many :journals, :as => :journalized, :dependent => :destroy | |
31 | has_many :time_entries, :dependent => :delete_all |
|
31 | has_many :time_entries, :dependent => :delete_all | |
32 | has_and_belongs_to_many :changesets, :order => "#{Changeset.table_name}.committed_on ASC, #{Changeset.table_name}.id ASC" |
|
32 | has_and_belongs_to_many :changesets, :order => "#{Changeset.table_name}.committed_on ASC, #{Changeset.table_name}.id ASC" | |
33 |
|
33 | |||
34 | has_many :relations_from, :class_name => 'IssueRelation', :foreign_key => 'issue_from_id', :dependent => :delete_all |
|
34 | has_many :relations_from, :class_name => 'IssueRelation', :foreign_key => 'issue_from_id', :dependent => :delete_all | |
35 | has_many :relations_to, :class_name => 'IssueRelation', :foreign_key => 'issue_to_id', :dependent => :delete_all |
|
35 | has_many :relations_to, :class_name => 'IssueRelation', :foreign_key => 'issue_to_id', :dependent => :delete_all | |
36 |
|
36 | |||
37 | acts_as_nested_set :scope => 'root_id', :dependent => :destroy |
|
37 | acts_as_nested_set :scope => 'root_id', :dependent => :destroy | |
38 | acts_as_attachable :after_add => :attachment_added, :after_remove => :attachment_removed |
|
38 | acts_as_attachable :after_add => :attachment_added, :after_remove => :attachment_removed | |
39 | acts_as_customizable |
|
39 | acts_as_customizable | |
40 | acts_as_watchable |
|
40 | acts_as_watchable | |
41 | acts_as_searchable :columns => ['subject', "#{table_name}.description", "#{Journal.table_name}.notes"], |
|
41 | acts_as_searchable :columns => ['subject', "#{table_name}.description", "#{Journal.table_name}.notes"], | |
42 | :include => [:project, :journals], |
|
42 | :include => [:project, :journals], | |
43 | # sort by id so that limited eager loading doesn't break with postgresql |
|
43 | # sort by id so that limited eager loading doesn't break with postgresql | |
44 | :order_column => "#{table_name}.id" |
|
44 | :order_column => "#{table_name}.id" | |
45 | acts_as_event :title => Proc.new {|o| "#{o.tracker.name} ##{o.id} (#{o.status}): #{o.subject}"}, |
|
45 | acts_as_event :title => Proc.new {|o| "#{o.tracker.name} ##{o.id} (#{o.status}): #{o.subject}"}, | |
46 | :url => Proc.new {|o| {:controller => 'issues', :action => 'show', :id => o.id}}, |
|
46 | :url => Proc.new {|o| {:controller => 'issues', :action => 'show', :id => o.id}}, | |
47 | :type => Proc.new {|o| 'issue' + (o.closed? ? ' closed' : '') } |
|
47 | :type => Proc.new {|o| 'issue' + (o.closed? ? ' closed' : '') } | |
48 |
|
48 | |||
49 | acts_as_activity_provider :find_options => {:include => [:project, :author, :tracker]}, |
|
49 | acts_as_activity_provider :find_options => {:include => [:project, :author, :tracker]}, | |
50 | :author_key => :author_id |
|
50 | :author_key => :author_id | |
51 |
|
51 | |||
52 | DONE_RATIO_OPTIONS = %w(issue_field issue_status) |
|
52 | DONE_RATIO_OPTIONS = %w(issue_field issue_status) | |
53 |
|
53 | |||
54 | attr_reader :current_journal |
|
54 | attr_reader :current_journal | |
55 |
|
55 | |||
56 | validates_presence_of :subject, :priority, :project, :tracker, :author, :status |
|
56 | validates_presence_of :subject, :priority, :project, :tracker, :author, :status | |
57 |
|
57 | |||
58 | validates_length_of :subject, :maximum => 255 |
|
58 | validates_length_of :subject, :maximum => 255 | |
59 | validates_inclusion_of :done_ratio, :in => 0..100 |
|
59 | validates_inclusion_of :done_ratio, :in => 0..100 | |
60 | validates_numericality_of :estimated_hours, :allow_nil => true |
|
60 | validates_numericality_of :estimated_hours, :allow_nil => true | |
61 | validate :validate_issue, :validate_required_fields |
|
61 | validate :validate_issue, :validate_required_fields | |
62 |
|
62 | |||
63 | scope :visible, |
|
63 | scope :visible, | |
64 | lambda {|*args| { :include => :project, |
|
64 | lambda {|*args| { :include => :project, | |
65 | :conditions => Issue.visible_condition(args.shift || User.current, *args) } } |
|
65 | :conditions => Issue.visible_condition(args.shift || User.current, *args) } } | |
66 |
|
66 | |||
67 | scope :open, lambda {|*args| |
|
67 | scope :open, lambda {|*args| | |
68 | is_closed = args.size > 0 ? !args.first : false |
|
68 | is_closed = args.size > 0 ? !args.first : false | |
69 | {:conditions => ["#{IssueStatus.table_name}.is_closed = ?", is_closed], :include => :status} |
|
69 | {:conditions => ["#{IssueStatus.table_name}.is_closed = ?", is_closed], :include => :status} | |
70 | } |
|
70 | } | |
71 |
|
71 | |||
72 | scope :recently_updated, :order => "#{Issue.table_name}.updated_on DESC" |
|
72 | scope :recently_updated, :order => "#{Issue.table_name}.updated_on DESC" | |
73 | scope :on_active_project, :include => [:status, :project, :tracker], |
|
73 | scope :on_active_project, :include => [:status, :project, :tracker], | |
74 | :conditions => ["#{Project.table_name}.status=#{Project::STATUS_ACTIVE}"] |
|
74 | :conditions => ["#{Project.table_name}.status=#{Project::STATUS_ACTIVE}"] | |
75 |
|
75 | |||
76 | before_create :default_assign |
|
76 | before_create :default_assign | |
77 | before_save :close_duplicates, :update_done_ratio_from_issue_status, :force_updated_on_change |
|
77 | before_save :close_duplicates, :update_done_ratio_from_issue_status, :force_updated_on_change | |
78 | after_save {|issue| issue.send :after_project_change if !issue.id_changed? && issue.project_id_changed?} |
|
78 | after_save {|issue| issue.send :after_project_change if !issue.id_changed? && issue.project_id_changed?} | |
79 | after_save :reschedule_following_issues, :update_nested_set_attributes, :update_parent_attributes, :create_journal |
|
79 | after_save :reschedule_following_issues, :update_nested_set_attributes, :update_parent_attributes, :create_journal | |
80 | # Should be after_create but would be called before previous after_save callbacks |
|
80 | # Should be after_create but would be called before previous after_save callbacks | |
81 | after_save :after_create_from_copy |
|
81 | after_save :after_create_from_copy | |
82 | after_destroy :update_parent_attributes |
|
82 | after_destroy :update_parent_attributes | |
83 |
|
83 | |||
84 | # Returns a SQL conditions string used to find all issues visible by the specified user |
|
84 | # Returns a SQL conditions string used to find all issues visible by the specified user | |
85 | def self.visible_condition(user, options={}) |
|
85 | def self.visible_condition(user, options={}) | |
86 | Project.allowed_to_condition(user, :view_issues, options) do |role, user| |
|
86 | Project.allowed_to_condition(user, :view_issues, options) do |role, user| | |
87 | if user.logged? |
|
87 | if user.logged? | |
88 | case role.issues_visibility |
|
88 | case role.issues_visibility | |
89 | when 'all' |
|
89 | when 'all' | |
90 | nil |
|
90 | nil | |
91 | when 'default' |
|
91 | when 'default' | |
92 | user_ids = [user.id] + user.groups.map(&:id) |
|
92 | user_ids = [user.id] + user.groups.map(&:id) | |
93 | "(#{table_name}.is_private = #{connection.quoted_false} OR #{table_name}.author_id = #{user.id} OR #{table_name}.assigned_to_id IN (#{user_ids.join(',')}))" |
|
93 | "(#{table_name}.is_private = #{connection.quoted_false} OR #{table_name}.author_id = #{user.id} OR #{table_name}.assigned_to_id IN (#{user_ids.join(',')}))" | |
94 | when 'own' |
|
94 | when 'own' | |
95 | user_ids = [user.id] + user.groups.map(&:id) |
|
95 | user_ids = [user.id] + user.groups.map(&:id) | |
96 | "(#{table_name}.author_id = #{user.id} OR #{table_name}.assigned_to_id IN (#{user_ids.join(',')}))" |
|
96 | "(#{table_name}.author_id = #{user.id} OR #{table_name}.assigned_to_id IN (#{user_ids.join(',')}))" | |
97 | else |
|
97 | else | |
98 | '1=0' |
|
98 | '1=0' | |
99 | end |
|
99 | end | |
100 | else |
|
100 | else | |
101 | "(#{table_name}.is_private = #{connection.quoted_false})" |
|
101 | "(#{table_name}.is_private = #{connection.quoted_false})" | |
102 | end |
|
102 | end | |
103 | end |
|
103 | end | |
104 | end |
|
104 | end | |
105 |
|
105 | |||
106 | # Returns true if usr or current user is allowed to view the issue |
|
106 | # Returns true if usr or current user is allowed to view the issue | |
107 | def visible?(usr=nil) |
|
107 | def visible?(usr=nil) | |
108 | (usr || User.current).allowed_to?(:view_issues, self.project) do |role, user| |
|
108 | (usr || User.current).allowed_to?(:view_issues, self.project) do |role, user| | |
109 | if user.logged? |
|
109 | if user.logged? | |
110 | case role.issues_visibility |
|
110 | case role.issues_visibility | |
111 | when 'all' |
|
111 | when 'all' | |
112 | true |
|
112 | true | |
113 | when 'default' |
|
113 | when 'default' | |
114 | !self.is_private? || (self.author == user || user.is_or_belongs_to?(assigned_to)) |
|
114 | !self.is_private? || (self.author == user || user.is_or_belongs_to?(assigned_to)) | |
115 | when 'own' |
|
115 | when 'own' | |
116 | self.author == user || user.is_or_belongs_to?(assigned_to) |
|
116 | self.author == user || user.is_or_belongs_to?(assigned_to) | |
117 | else |
|
117 | else | |
118 | false |
|
118 | false | |
119 | end |
|
119 | end | |
120 | else |
|
120 | else | |
121 | !self.is_private? |
|
121 | !self.is_private? | |
122 | end |
|
122 | end | |
123 | end |
|
123 | end | |
124 | end |
|
124 | end | |
125 |
|
125 | |||
126 | def initialize(attributes=nil, *args) |
|
126 | def initialize(attributes=nil, *args) | |
127 | super |
|
127 | super | |
128 | if new_record? |
|
128 | if new_record? | |
129 | # set default values for new records only |
|
129 | # set default values for new records only | |
130 | self.status ||= IssueStatus.default |
|
130 | self.status ||= IssueStatus.default | |
131 | self.priority ||= IssuePriority.default |
|
131 | self.priority ||= IssuePriority.default | |
132 | self.watcher_user_ids = [] |
|
132 | self.watcher_user_ids = [] | |
133 | end |
|
133 | end | |
134 | end |
|
134 | end | |
135 |
|
135 | |||
136 | # AR#Persistence#destroy would raise and RecordNotFound exception |
|
136 | # AR#Persistence#destroy would raise and RecordNotFound exception | |
137 | # if the issue was already deleted or updated (non matching lock_version). |
|
137 | # if the issue was already deleted or updated (non matching lock_version). | |
138 | # This is a problem when bulk deleting issues or deleting a project |
|
138 | # This is a problem when bulk deleting issues or deleting a project | |
139 | # (because an issue may already be deleted if its parent was deleted |
|
139 | # (because an issue may already be deleted if its parent was deleted | |
140 | # first). |
|
140 | # first). | |
141 | # The issue is reloaded by the nested_set before being deleted so |
|
141 | # The issue is reloaded by the nested_set before being deleted so | |
142 | # the lock_version condition should not be an issue but we handle it. |
|
142 | # the lock_version condition should not be an issue but we handle it. | |
143 | def destroy |
|
143 | def destroy | |
144 | super |
|
144 | super | |
145 | rescue ActiveRecord::RecordNotFound |
|
145 | rescue ActiveRecord::RecordNotFound | |
146 | # Stale or already deleted |
|
146 | # Stale or already deleted | |
147 | begin |
|
147 | begin | |
148 | reload |
|
148 | reload | |
149 | rescue ActiveRecord::RecordNotFound |
|
149 | rescue ActiveRecord::RecordNotFound | |
150 | # The issue was actually already deleted |
|
150 | # The issue was actually already deleted | |
151 | @destroyed = true |
|
151 | @destroyed = true | |
152 | return freeze |
|
152 | return freeze | |
153 | end |
|
153 | end | |
154 | # The issue was stale, retry to destroy |
|
154 | # The issue was stale, retry to destroy | |
155 | super |
|
155 | super | |
156 | end |
|
156 | end | |
157 |
|
157 | |||
158 | def reload(*args) |
|
158 | def reload(*args) | |
159 | @workflow_rule_by_attribute = nil |
|
159 | @workflow_rule_by_attribute = nil | |
160 | @assignable_versions = nil |
|
160 | @assignable_versions = nil | |
161 | super |
|
161 | super | |
162 | end |
|
162 | end | |
163 |
|
163 | |||
164 | # Overrides Redmine::Acts::Customizable::InstanceMethods#available_custom_fields |
|
164 | # Overrides Redmine::Acts::Customizable::InstanceMethods#available_custom_fields | |
165 | def available_custom_fields |
|
165 | def available_custom_fields | |
166 | (project && tracker) ? (project.all_issue_custom_fields & tracker.custom_fields.all) : [] |
|
166 | (project && tracker) ? (project.all_issue_custom_fields & tracker.custom_fields.all) : [] | |
167 | end |
|
167 | end | |
168 |
|
168 | |||
169 | # Copies attributes from another issue, arg can be an id or an Issue |
|
169 | # Copies attributes from another issue, arg can be an id or an Issue | |
170 | def copy_from(arg, options={}) |
|
170 | def copy_from(arg, options={}) | |
171 | issue = arg.is_a?(Issue) ? arg : Issue.visible.find(arg) |
|
171 | issue = arg.is_a?(Issue) ? arg : Issue.visible.find(arg) | |
172 | self.attributes = issue.attributes.dup.except("id", "root_id", "parent_id", "lft", "rgt", "created_on", "updated_on") |
|
172 | self.attributes = issue.attributes.dup.except("id", "root_id", "parent_id", "lft", "rgt", "created_on", "updated_on") | |
173 | self.custom_field_values = issue.custom_field_values.inject({}) {|h,v| h[v.custom_field_id] = v.value; h} |
|
173 | self.custom_field_values = issue.custom_field_values.inject({}) {|h,v| h[v.custom_field_id] = v.value; h} | |
174 | self.status = issue.status |
|
174 | self.status = issue.status | |
175 | self.author = User.current |
|
175 | self.author = User.current | |
176 | unless options[:attachments] == false |
|
176 | unless options[:attachments] == false | |
177 | self.attachments = issue.attachments.map do |attachement| |
|
177 | self.attachments = issue.attachments.map do |attachement| | |
178 | attachement.copy(:container => self) |
|
178 | attachement.copy(:container => self) | |
179 | end |
|
179 | end | |
180 | end |
|
180 | end | |
181 | @copied_from = issue |
|
181 | @copied_from = issue | |
182 | @copy_options = options |
|
182 | @copy_options = options | |
183 | self |
|
183 | self | |
184 | end |
|
184 | end | |
185 |
|
185 | |||
186 | # Returns an unsaved copy of the issue |
|
186 | # Returns an unsaved copy of the issue | |
187 | def copy(attributes=nil, copy_options={}) |
|
187 | def copy(attributes=nil, copy_options={}) | |
188 | copy = self.class.new.copy_from(self, copy_options) |
|
188 | copy = self.class.new.copy_from(self, copy_options) | |
189 | copy.attributes = attributes if attributes |
|
189 | copy.attributes = attributes if attributes | |
190 | copy |
|
190 | copy | |
191 | end |
|
191 | end | |
192 |
|
192 | |||
193 | # Returns true if the issue is a copy |
|
193 | # Returns true if the issue is a copy | |
194 | def copy? |
|
194 | def copy? | |
195 | @copied_from.present? |
|
195 | @copied_from.present? | |
196 | end |
|
196 | end | |
197 |
|
197 | |||
198 | # Moves/copies an issue to a new project and tracker |
|
198 | # Moves/copies an issue to a new project and tracker | |
199 | # Returns the moved/copied issue on success, false on failure |
|
199 | # Returns the moved/copied issue on success, false on failure | |
200 | def move_to_project(new_project, new_tracker=nil, options={}) |
|
200 | def move_to_project(new_project, new_tracker=nil, options={}) | |
201 | ActiveSupport::Deprecation.warn "Issue#move_to_project is deprecated, use #project= instead." |
|
201 | ActiveSupport::Deprecation.warn "Issue#move_to_project is deprecated, use #project= instead." | |
202 |
|
202 | |||
203 | if options[:copy] |
|
203 | if options[:copy] | |
204 | issue = self.copy |
|
204 | issue = self.copy | |
205 | else |
|
205 | else | |
206 | issue = self |
|
206 | issue = self | |
207 | end |
|
207 | end | |
208 |
|
208 | |||
209 | issue.init_journal(User.current, options[:notes]) |
|
209 | issue.init_journal(User.current, options[:notes]) | |
210 |
|
210 | |||
211 | # Preserve previous behaviour |
|
211 | # Preserve previous behaviour | |
212 | # #move_to_project doesn't change tracker automatically |
|
212 | # #move_to_project doesn't change tracker automatically | |
213 | issue.send :project=, new_project, true |
|
213 | issue.send :project=, new_project, true | |
214 | if new_tracker |
|
214 | if new_tracker | |
215 | issue.tracker = new_tracker |
|
215 | issue.tracker = new_tracker | |
216 | end |
|
216 | end | |
217 | # Allow bulk setting of attributes on the issue |
|
217 | # Allow bulk setting of attributes on the issue | |
218 | if options[:attributes] |
|
218 | if options[:attributes] | |
219 | issue.attributes = options[:attributes] |
|
219 | issue.attributes = options[:attributes] | |
220 | end |
|
220 | end | |
221 |
|
221 | |||
222 | issue.save ? issue : false |
|
222 | issue.save ? issue : false | |
223 | end |
|
223 | end | |
224 |
|
224 | |||
225 | def status_id=(sid) |
|
225 | def status_id=(sid) | |
226 | self.status = nil |
|
226 | self.status = nil | |
227 | result = write_attribute(:status_id, sid) |
|
227 | result = write_attribute(:status_id, sid) | |
228 | @workflow_rule_by_attribute = nil |
|
228 | @workflow_rule_by_attribute = nil | |
229 | result |
|
229 | result | |
230 | end |
|
230 | end | |
231 |
|
231 | |||
232 | def priority_id=(pid) |
|
232 | def priority_id=(pid) | |
233 | self.priority = nil |
|
233 | self.priority = nil | |
234 | write_attribute(:priority_id, pid) |
|
234 | write_attribute(:priority_id, pid) | |
235 | end |
|
235 | end | |
236 |
|
236 | |||
237 | def category_id=(cid) |
|
237 | def category_id=(cid) | |
238 | self.category = nil |
|
238 | self.category = nil | |
239 | write_attribute(:category_id, cid) |
|
239 | write_attribute(:category_id, cid) | |
240 | end |
|
240 | end | |
241 |
|
241 | |||
242 | def fixed_version_id=(vid) |
|
242 | def fixed_version_id=(vid) | |
243 | self.fixed_version = nil |
|
243 | self.fixed_version = nil | |
244 | write_attribute(:fixed_version_id, vid) |
|
244 | write_attribute(:fixed_version_id, vid) | |
245 | end |
|
245 | end | |
246 |
|
246 | |||
247 | def tracker_id=(tid) |
|
247 | def tracker_id=(tid) | |
248 | self.tracker = nil |
|
248 | self.tracker = nil | |
249 | result = write_attribute(:tracker_id, tid) |
|
249 | result = write_attribute(:tracker_id, tid) | |
250 | @custom_field_values = nil |
|
250 | @custom_field_values = nil | |
251 | @workflow_rule_by_attribute = nil |
|
251 | @workflow_rule_by_attribute = nil | |
252 | result |
|
252 | result | |
253 | end |
|
253 | end | |
254 |
|
254 | |||
255 | def project_id=(project_id) |
|
255 | def project_id=(project_id) | |
256 | if project_id.to_s != self.project_id.to_s |
|
256 | if project_id.to_s != self.project_id.to_s | |
257 | self.project = (project_id.present? ? Project.find_by_id(project_id) : nil) |
|
257 | self.project = (project_id.present? ? Project.find_by_id(project_id) : nil) | |
258 | end |
|
258 | end | |
259 | end |
|
259 | end | |
260 |
|
260 | |||
261 | def project=(project, keep_tracker=false) |
|
261 | def project=(project, keep_tracker=false) | |
262 | project_was = self.project |
|
262 | project_was = self.project | |
263 | write_attribute(:project_id, project ? project.id : nil) |
|
263 | write_attribute(:project_id, project ? project.id : nil) | |
264 | association_instance_set('project', project) |
|
264 | association_instance_set('project', project) | |
265 | if project_was && project && project_was != project |
|
265 | if project_was && project && project_was != project | |
266 | @assignable_versions = nil |
|
266 | @assignable_versions = nil | |
267 |
|
267 | |||
268 | unless keep_tracker || project.trackers.include?(tracker) |
|
268 | unless keep_tracker || project.trackers.include?(tracker) | |
269 | self.tracker = project.trackers.first |
|
269 | self.tracker = project.trackers.first | |
270 | end |
|
270 | end | |
271 | # Reassign to the category with same name if any |
|
271 | # Reassign to the category with same name if any | |
272 | if category |
|
272 | if category | |
273 | self.category = project.issue_categories.find_by_name(category.name) |
|
273 | self.category = project.issue_categories.find_by_name(category.name) | |
274 | end |
|
274 | end | |
275 | # Keep the fixed_version if it's still valid in the new_project |
|
275 | # Keep the fixed_version if it's still valid in the new_project | |
276 | if fixed_version && fixed_version.project != project && !project.shared_versions.include?(fixed_version) |
|
276 | if fixed_version && fixed_version.project != project && !project.shared_versions.include?(fixed_version) | |
277 | self.fixed_version = nil |
|
277 | self.fixed_version = nil | |
278 | end |
|
278 | end | |
279 | if parent && parent.project_id != project_id |
|
279 | if parent && parent.project_id != project_id | |
280 | self.parent_issue_id = nil |
|
280 | self.parent_issue_id = nil | |
281 | end |
|
281 | end | |
282 | @custom_field_values = nil |
|
282 | @custom_field_values = nil | |
283 | end |
|
283 | end | |
284 | end |
|
284 | end | |
285 |
|
285 | |||
286 | def description=(arg) |
|
286 | def description=(arg) | |
287 | if arg.is_a?(String) |
|
287 | if arg.is_a?(String) | |
288 | arg = arg.gsub(/(\r\n|\n|\r)/, "\r\n") |
|
288 | arg = arg.gsub(/(\r\n|\n|\r)/, "\r\n") | |
289 | end |
|
289 | end | |
290 | write_attribute(:description, arg) |
|
290 | write_attribute(:description, arg) | |
291 | end |
|
291 | end | |
292 |
|
292 | |||
293 | # Overrides assign_attributes so that project and tracker get assigned first |
|
293 | # Overrides assign_attributes so that project and tracker get assigned first | |
294 | def assign_attributes_with_project_and_tracker_first(new_attributes, *args) |
|
294 | def assign_attributes_with_project_and_tracker_first(new_attributes, *args) | |
295 | return if new_attributes.nil? |
|
295 | return if new_attributes.nil? | |
296 | attrs = new_attributes.dup |
|
296 | attrs = new_attributes.dup | |
297 | attrs.stringify_keys! |
|
297 | attrs.stringify_keys! | |
298 |
|
298 | |||
299 | %w(project project_id tracker tracker_id).each do |attr| |
|
299 | %w(project project_id tracker tracker_id).each do |attr| | |
300 | if attrs.has_key?(attr) |
|
300 | if attrs.has_key?(attr) | |
301 | send "#{attr}=", attrs.delete(attr) |
|
301 | send "#{attr}=", attrs.delete(attr) | |
302 | end |
|
302 | end | |
303 | end |
|
303 | end | |
304 | send :assign_attributes_without_project_and_tracker_first, attrs, *args |
|
304 | send :assign_attributes_without_project_and_tracker_first, attrs, *args | |
305 | end |
|
305 | end | |
306 | # Do not redefine alias chain on reload (see #4838) |
|
306 | # Do not redefine alias chain on reload (see #4838) | |
307 | alias_method_chain(:assign_attributes, :project_and_tracker_first) unless method_defined?(:assign_attributes_without_project_and_tracker_first) |
|
307 | alias_method_chain(:assign_attributes, :project_and_tracker_first) unless method_defined?(:assign_attributes_without_project_and_tracker_first) | |
308 |
|
308 | |||
309 | def estimated_hours=(h) |
|
309 | def estimated_hours=(h) | |
310 | write_attribute :estimated_hours, (h.is_a?(String) ? h.to_hours : h) |
|
310 | write_attribute :estimated_hours, (h.is_a?(String) ? h.to_hours : h) | |
311 | end |
|
311 | end | |
312 |
|
312 | |||
313 | safe_attributes 'project_id', |
|
313 | safe_attributes 'project_id', | |
314 | :if => lambda {|issue, user| |
|
314 | :if => lambda {|issue, user| | |
315 | if issue.new_record? |
|
315 | if issue.new_record? | |
316 | issue.copy? |
|
316 | issue.copy? | |
317 | elsif user.allowed_to?(:move_issues, issue.project) |
|
317 | elsif user.allowed_to?(:move_issues, issue.project) | |
318 | projects = Issue.allowed_target_projects_on_move(user) |
|
318 | projects = Issue.allowed_target_projects_on_move(user) | |
319 | projects.include?(issue.project) && projects.size > 1 |
|
319 | projects.include?(issue.project) && projects.size > 1 | |
320 | end |
|
320 | end | |
321 | } |
|
321 | } | |
322 |
|
322 | |||
323 | safe_attributes 'tracker_id', |
|
323 | safe_attributes 'tracker_id', | |
324 | 'status_id', |
|
324 | 'status_id', | |
325 | 'category_id', |
|
325 | 'category_id', | |
326 | 'assigned_to_id', |
|
326 | 'assigned_to_id', | |
327 | 'priority_id', |
|
327 | 'priority_id', | |
328 | 'fixed_version_id', |
|
328 | 'fixed_version_id', | |
329 | 'subject', |
|
329 | 'subject', | |
330 | 'description', |
|
330 | 'description', | |
331 | 'start_date', |
|
331 | 'start_date', | |
332 | 'due_date', |
|
332 | 'due_date', | |
333 | 'done_ratio', |
|
333 | 'done_ratio', | |
334 | 'estimated_hours', |
|
334 | 'estimated_hours', | |
335 | 'custom_field_values', |
|
335 | 'custom_field_values', | |
336 | 'custom_fields', |
|
336 | 'custom_fields', | |
337 | 'lock_version', |
|
337 | 'lock_version', | |
338 | :if => lambda {|issue, user| issue.new_record? || user.allowed_to?(:edit_issues, issue.project) } |
|
338 | :if => lambda {|issue, user| issue.new_record? || user.allowed_to?(:edit_issues, issue.project) } | |
339 |
|
339 | |||
340 | safe_attributes 'status_id', |
|
340 | safe_attributes 'status_id', | |
341 | 'assigned_to_id', |
|
341 | 'assigned_to_id', | |
342 | 'fixed_version_id', |
|
342 | 'fixed_version_id', | |
343 | 'done_ratio', |
|
343 | 'done_ratio', | |
344 | 'lock_version', |
|
344 | 'lock_version', | |
345 | :if => lambda {|issue, user| issue.new_statuses_allowed_to(user).any? } |
|
345 | :if => lambda {|issue, user| issue.new_statuses_allowed_to(user).any? } | |
346 |
|
346 | |||
347 | safe_attributes 'watcher_user_ids', |
|
347 | safe_attributes 'watcher_user_ids', | |
348 | :if => lambda {|issue, user| issue.new_record? && user.allowed_to?(:add_issue_watchers, issue.project)} |
|
348 | :if => lambda {|issue, user| issue.new_record? && user.allowed_to?(:add_issue_watchers, issue.project)} | |
349 |
|
349 | |||
350 | safe_attributes 'is_private', |
|
350 | safe_attributes 'is_private', | |
351 | :if => lambda {|issue, user| |
|
351 | :if => lambda {|issue, user| | |
352 | user.allowed_to?(:set_issues_private, issue.project) || |
|
352 | user.allowed_to?(:set_issues_private, issue.project) || | |
353 | (issue.author == user && user.allowed_to?(:set_own_issues_private, issue.project)) |
|
353 | (issue.author == user && user.allowed_to?(:set_own_issues_private, issue.project)) | |
354 | } |
|
354 | } | |
355 |
|
355 | |||
356 | safe_attributes 'parent_issue_id', |
|
356 | safe_attributes 'parent_issue_id', | |
357 | :if => lambda {|issue, user| (issue.new_record? || user.allowed_to?(:edit_issues, issue.project)) && |
|
357 | :if => lambda {|issue, user| (issue.new_record? || user.allowed_to?(:edit_issues, issue.project)) && | |
358 | user.allowed_to?(:manage_subtasks, issue.project)} |
|
358 | user.allowed_to?(:manage_subtasks, issue.project)} | |
359 |
|
359 | |||
360 | def safe_attribute_names(user=nil) |
|
360 | def safe_attribute_names(user=nil) | |
361 | names = super |
|
361 | names = super | |
362 | names -= disabled_core_fields |
|
362 | names -= disabled_core_fields | |
363 | names -= read_only_attribute_names(user) |
|
363 | names -= read_only_attribute_names(user) | |
364 | names |
|
364 | names | |
365 | end |
|
365 | end | |
366 |
|
366 | |||
367 | # Safely sets attributes |
|
367 | # Safely sets attributes | |
368 | # Should be called from controllers instead of #attributes= |
|
368 | # Should be called from controllers instead of #attributes= | |
369 | # attr_accessible is too rough because we still want things like |
|
369 | # attr_accessible is too rough because we still want things like | |
370 | # Issue.new(:project => foo) to work |
|
370 | # Issue.new(:project => foo) to work | |
371 | def safe_attributes=(attrs, user=User.current) |
|
371 | def safe_attributes=(attrs, user=User.current) | |
372 | return unless attrs.is_a?(Hash) |
|
372 | return unless attrs.is_a?(Hash) | |
373 |
|
373 | |||
374 | attrs = attrs.dup |
|
374 | attrs = attrs.dup | |
375 |
|
375 | |||
376 | # Project and Tracker must be set before since new_statuses_allowed_to depends on it. |
|
376 | # Project and Tracker must be set before since new_statuses_allowed_to depends on it. | |
377 | if (p = attrs.delete('project_id')) && safe_attribute?('project_id') |
|
377 | if (p = attrs.delete('project_id')) && safe_attribute?('project_id') | |
378 | if allowed_target_projects(user).collect(&:id).include?(p.to_i) |
|
378 | if allowed_target_projects(user).collect(&:id).include?(p.to_i) | |
379 | self.project_id = p |
|
379 | self.project_id = p | |
380 | end |
|
380 | end | |
381 | end |
|
381 | end | |
382 |
|
382 | |||
383 | if (t = attrs.delete('tracker_id')) && safe_attribute?('tracker_id') |
|
383 | if (t = attrs.delete('tracker_id')) && safe_attribute?('tracker_id') | |
384 | self.tracker_id = t |
|
384 | self.tracker_id = t | |
385 | end |
|
385 | end | |
386 |
|
386 | |||
387 | if (s = attrs.delete('status_id')) && safe_attribute?('status_id') |
|
387 | if (s = attrs.delete('status_id')) && safe_attribute?('status_id') | |
388 | if new_statuses_allowed_to(user).collect(&:id).include?(s.to_i) |
|
388 | if new_statuses_allowed_to(user).collect(&:id).include?(s.to_i) | |
389 | self.status_id = s |
|
389 | self.status_id = s | |
390 | end |
|
390 | end | |
391 | end |
|
391 | end | |
392 |
|
392 | |||
393 | attrs = delete_unsafe_attributes(attrs, user) |
|
393 | attrs = delete_unsafe_attributes(attrs, user) | |
394 | return if attrs.empty? |
|
394 | return if attrs.empty? | |
395 |
|
395 | |||
396 | unless leaf? |
|
396 | unless leaf? | |
397 | attrs.reject! {|k,v| %w(priority_id done_ratio start_date due_date estimated_hours).include?(k)} |
|
397 | attrs.reject! {|k,v| %w(priority_id done_ratio start_date due_date estimated_hours).include?(k)} | |
398 | end |
|
398 | end | |
399 |
|
399 | |||
400 | if attrs['parent_issue_id'].present? |
|
400 | if attrs['parent_issue_id'].present? | |
401 | attrs.delete('parent_issue_id') unless Issue.visible(user).exists?(attrs['parent_issue_id'].to_i) |
|
401 | attrs.delete('parent_issue_id') unless Issue.visible(user).exists?(attrs['parent_issue_id'].to_i) | |
402 | end |
|
402 | end | |
403 |
|
403 | |||
404 | if attrs['custom_field_values'].present? |
|
404 | if attrs['custom_field_values'].present? | |
405 | attrs['custom_field_values'] = attrs['custom_field_values'].reject {|k, v| read_only_attribute_names(user).include? k.to_s} |
|
405 | attrs['custom_field_values'] = attrs['custom_field_values'].reject {|k, v| read_only_attribute_names(user).include? k.to_s} | |
406 | end |
|
406 | end | |
407 |
|
407 | |||
408 | if attrs['custom_fields'].present? |
|
408 | if attrs['custom_fields'].present? | |
409 | attrs['custom_fields'] = attrs['custom_fields'].reject {|c| read_only_attribute_names(user).include? c['id'].to_s} |
|
409 | attrs['custom_fields'] = attrs['custom_fields'].reject {|c| read_only_attribute_names(user).include? c['id'].to_s} | |
410 | end |
|
410 | end | |
411 |
|
411 | |||
412 | # mass-assignment security bypass |
|
412 | # mass-assignment security bypass | |
413 | assign_attributes attrs, :without_protection => true |
|
413 | assign_attributes attrs, :without_protection => true | |
414 | end |
|
414 | end | |
415 |
|
415 | |||
416 | def disabled_core_fields |
|
416 | def disabled_core_fields | |
417 | tracker ? tracker.disabled_core_fields : [] |
|
417 | tracker ? tracker.disabled_core_fields : [] | |
418 | end |
|
418 | end | |
419 |
|
419 | |||
420 | # Returns the custom_field_values that can be edited by the given user |
|
420 | # Returns the custom_field_values that can be edited by the given user | |
421 | def editable_custom_field_values(user=nil) |
|
421 | def editable_custom_field_values(user=nil) | |
422 | custom_field_values.reject do |value| |
|
422 | custom_field_values.reject do |value| | |
423 | read_only_attribute_names(user).include?(value.custom_field_id.to_s) |
|
423 | read_only_attribute_names(user).include?(value.custom_field_id.to_s) | |
424 | end |
|
424 | end | |
425 | end |
|
425 | end | |
426 |
|
426 | |||
427 | # Returns the names of attributes that are read-only for user or the current user |
|
427 | # Returns the names of attributes that are read-only for user or the current user | |
428 | # For users with multiple roles, the read-only fields are the intersection of |
|
428 | # For users with multiple roles, the read-only fields are the intersection of | |
429 | # read-only fields of each role |
|
429 | # read-only fields of each role | |
430 | # The result is an array of strings where sustom fields are represented with their ids |
|
430 | # The result is an array of strings where sustom fields are represented with their ids | |
431 | # |
|
431 | # | |
432 | # Examples: |
|
432 | # Examples: | |
433 | # issue.read_only_attribute_names # => ['due_date', '2'] |
|
433 | # issue.read_only_attribute_names # => ['due_date', '2'] | |
434 | # issue.read_only_attribute_names(user) # => [] |
|
434 | # issue.read_only_attribute_names(user) # => [] | |
435 | def read_only_attribute_names(user=nil) |
|
435 | def read_only_attribute_names(user=nil) | |
436 | workflow_rule_by_attribute(user).reject {|attr, rule| rule != 'readonly'}.keys |
|
436 | workflow_rule_by_attribute(user).reject {|attr, rule| rule != 'readonly'}.keys | |
437 | end |
|
437 | end | |
438 |
|
438 | |||
439 | # Returns the names of required attributes for user or the current user |
|
439 | # Returns the names of required attributes for user or the current user | |
440 | # For users with multiple roles, the required fields are the intersection of |
|
440 | # For users with multiple roles, the required fields are the intersection of | |
441 | # required fields of each role |
|
441 | # required fields of each role | |
442 | # The result is an array of strings where sustom fields are represented with their ids |
|
442 | # The result is an array of strings where sustom fields are represented with their ids | |
443 | # |
|
443 | # | |
444 | # Examples: |
|
444 | # Examples: | |
445 | # issue.required_attribute_names # => ['due_date', '2'] |
|
445 | # issue.required_attribute_names # => ['due_date', '2'] | |
446 | # issue.required_attribute_names(user) # => [] |
|
446 | # issue.required_attribute_names(user) # => [] | |
447 | def required_attribute_names(user=nil) |
|
447 | def required_attribute_names(user=nil) | |
448 | workflow_rule_by_attribute(user).reject {|attr, rule| rule != 'required'}.keys |
|
448 | workflow_rule_by_attribute(user).reject {|attr, rule| rule != 'required'}.keys | |
449 | end |
|
449 | end | |
450 |
|
450 | |||
451 | # Returns true if the attribute is required for user |
|
451 | # Returns true if the attribute is required for user | |
452 | def required_attribute?(name, user=nil) |
|
452 | def required_attribute?(name, user=nil) | |
453 | required_attribute_names(user).include?(name.to_s) |
|
453 | required_attribute_names(user).include?(name.to_s) | |
454 | end |
|
454 | end | |
455 |
|
455 | |||
456 | # Returns a hash of the workflow rule by attribute for the given user |
|
456 | # Returns a hash of the workflow rule by attribute for the given user | |
457 | # |
|
457 | # | |
458 | # Examples: |
|
458 | # Examples: | |
459 | # issue.workflow_rule_by_attribute # => {'due_date' => 'required', 'start_date' => 'readonly'} |
|
459 | # issue.workflow_rule_by_attribute # => {'due_date' => 'required', 'start_date' => 'readonly'} | |
460 | def workflow_rule_by_attribute(user=nil) |
|
460 | def workflow_rule_by_attribute(user=nil) | |
461 | return @workflow_rule_by_attribute if @workflow_rule_by_attribute && user.nil? |
|
461 | return @workflow_rule_by_attribute if @workflow_rule_by_attribute && user.nil? | |
462 |
|
462 | |||
463 | user_real = user || User.current |
|
463 | user_real = user || User.current | |
464 | roles = user_real.admin ? Role.all : user_real.roles_for_project(project) |
|
464 | roles = user_real.admin ? Role.all : user_real.roles_for_project(project) | |
465 | return {} if roles.empty? |
|
465 | return {} if roles.empty? | |
466 |
|
466 | |||
467 | result = {} |
|
467 | result = {} | |
468 | workflow_permissions = WorkflowPermission.where(:tracker_id => tracker_id, :old_status_id => status_id, :role_id => roles.map(&:id)).all |
|
468 | workflow_permissions = WorkflowPermission.where(:tracker_id => tracker_id, :old_status_id => status_id, :role_id => roles.map(&:id)).all | |
469 | if workflow_permissions.any? |
|
469 | if workflow_permissions.any? | |
470 | workflow_rules = workflow_permissions.inject({}) do |h, wp| |
|
470 | workflow_rules = workflow_permissions.inject({}) do |h, wp| | |
471 | h[wp.field_name] ||= [] |
|
471 | h[wp.field_name] ||= [] | |
472 | h[wp.field_name] << wp.rule |
|
472 | h[wp.field_name] << wp.rule | |
473 | h |
|
473 | h | |
474 | end |
|
474 | end | |
475 | workflow_rules.each do |attr, rules| |
|
475 | workflow_rules.each do |attr, rules| | |
476 | next if rules.size < roles.size |
|
476 | next if rules.size < roles.size | |
477 | uniq_rules = rules.uniq |
|
477 | uniq_rules = rules.uniq | |
478 | if uniq_rules.size == 1 |
|
478 | if uniq_rules.size == 1 | |
479 | result[attr] = uniq_rules.first |
|
479 | result[attr] = uniq_rules.first | |
480 | else |
|
480 | else | |
481 | result[attr] = 'required' |
|
481 | result[attr] = 'required' | |
482 | end |
|
482 | end | |
483 | end |
|
483 | end | |
484 | end |
|
484 | end | |
485 | @workflow_rule_by_attribute = result if user.nil? |
|
485 | @workflow_rule_by_attribute = result if user.nil? | |
486 | result |
|
486 | result | |
487 | end |
|
487 | end | |
488 | private :workflow_rule_by_attribute |
|
488 | private :workflow_rule_by_attribute | |
489 |
|
489 | |||
490 | def done_ratio |
|
490 | def done_ratio | |
491 | if Issue.use_status_for_done_ratio? && status && status.default_done_ratio |
|
491 | if Issue.use_status_for_done_ratio? && status && status.default_done_ratio | |
492 | status.default_done_ratio |
|
492 | status.default_done_ratio | |
493 | else |
|
493 | else | |
494 | read_attribute(:done_ratio) |
|
494 | read_attribute(:done_ratio) | |
495 | end |
|
495 | end | |
496 | end |
|
496 | end | |
497 |
|
497 | |||
498 | def self.use_status_for_done_ratio? |
|
498 | def self.use_status_for_done_ratio? | |
499 | Setting.issue_done_ratio == 'issue_status' |
|
499 | Setting.issue_done_ratio == 'issue_status' | |
500 | end |
|
500 | end | |
501 |
|
501 | |||
502 | def self.use_field_for_done_ratio? |
|
502 | def self.use_field_for_done_ratio? | |
503 | Setting.issue_done_ratio == 'issue_field' |
|
503 | Setting.issue_done_ratio == 'issue_field' | |
504 | end |
|
504 | end | |
505 |
|
505 | |||
506 | def validate_issue |
|
506 | def validate_issue | |
507 | if self.due_date.nil? && @attributes['due_date'] && !@attributes['due_date'].empty? |
|
507 | if self.due_date.nil? && @attributes['due_date'] && !@attributes['due_date'].empty? | |
508 | errors.add :due_date, :not_a_date |
|
508 | errors.add :due_date, :not_a_date | |
509 | end |
|
509 | end | |
510 |
|
510 | |||
511 | if self.due_date and self.start_date and self.due_date < self.start_date |
|
511 | if self.due_date and self.start_date and self.due_date < self.start_date | |
512 | errors.add :due_date, :greater_than_start_date |
|
512 | errors.add :due_date, :greater_than_start_date | |
513 | end |
|
513 | end | |
514 |
|
514 | |||
515 | if start_date && soonest_start && start_date < soonest_start |
|
515 | if start_date && soonest_start && start_date < soonest_start | |
516 | errors.add :start_date, :invalid |
|
516 | errors.add :start_date, :invalid | |
517 | end |
|
517 | end | |
518 |
|
518 | |||
519 | if fixed_version |
|
519 | if fixed_version | |
520 | if !assignable_versions.include?(fixed_version) |
|
520 | if !assignable_versions.include?(fixed_version) | |
521 | errors.add :fixed_version_id, :inclusion |
|
521 | errors.add :fixed_version_id, :inclusion | |
522 | elsif reopened? && fixed_version.closed? |
|
522 | elsif reopened? && fixed_version.closed? | |
523 | errors.add :base, I18n.t(:error_can_not_reopen_issue_on_closed_version) |
|
523 | errors.add :base, I18n.t(:error_can_not_reopen_issue_on_closed_version) | |
524 | end |
|
524 | end | |
525 | end |
|
525 | end | |
526 |
|
526 | |||
527 | # Checks that the issue can not be added/moved to a disabled tracker |
|
527 | # Checks that the issue can not be added/moved to a disabled tracker | |
528 | if project && (tracker_id_changed? || project_id_changed?) |
|
528 | if project && (tracker_id_changed? || project_id_changed?) | |
529 | unless project.trackers.include?(tracker) |
|
529 | unless project.trackers.include?(tracker) | |
530 | errors.add :tracker_id, :inclusion |
|
530 | errors.add :tracker_id, :inclusion | |
531 | end |
|
531 | end | |
532 | end |
|
532 | end | |
533 |
|
533 | |||
534 | # Checks parent issue assignment |
|
534 | # Checks parent issue assignment | |
535 | if @parent_issue |
|
535 | if @parent_issue | |
536 | if @parent_issue.project_id != project_id |
|
536 | if @parent_issue.project_id != project_id | |
537 | errors.add :parent_issue_id, :not_same_project |
|
537 | errors.add :parent_issue_id, :not_same_project | |
538 | elsif !new_record? |
|
538 | elsif !new_record? | |
539 | # moving an existing issue |
|
539 | # moving an existing issue | |
540 | if @parent_issue.root_id != root_id |
|
540 | if @parent_issue.root_id != root_id | |
541 | # we can always move to another tree |
|
541 | # we can always move to another tree | |
542 | elsif move_possible?(@parent_issue) |
|
542 | elsif move_possible?(@parent_issue) | |
543 | # move accepted inside tree |
|
543 | # move accepted inside tree | |
544 | else |
|
544 | else | |
545 | errors.add :parent_issue_id, :not_a_valid_parent |
|
545 | errors.add :parent_issue_id, :not_a_valid_parent | |
546 | end |
|
546 | end | |
547 | end |
|
547 | end | |
548 | end |
|
548 | end | |
549 | end |
|
549 | end | |
550 |
|
550 | |||
551 | # Validates the issue against additional workflow requirements |
|
551 | # Validates the issue against additional workflow requirements | |
552 | def validate_required_fields |
|
552 | def validate_required_fields | |
553 | user = new_record? ? author : current_journal.try(:user) |
|
553 | user = new_record? ? author : current_journal.try(:user) | |
554 |
|
554 | |||
555 | required_attribute_names(user).each do |attribute| |
|
555 | required_attribute_names(user).each do |attribute| | |
556 | if attribute =~ /^\d+$/ |
|
556 | if attribute =~ /^\d+$/ | |
557 | attribute = attribute.to_i |
|
557 | attribute = attribute.to_i | |
558 | v = custom_field_values.detect {|v| v.custom_field_id == attribute } |
|
558 | v = custom_field_values.detect {|v| v.custom_field_id == attribute } | |
559 | if v && v.value.blank? |
|
559 | if v && v.value.blank? | |
560 | errors.add :base, v.custom_field.name + ' ' + l('activerecord.errors.messages.blank') |
|
560 | errors.add :base, v.custom_field.name + ' ' + l('activerecord.errors.messages.blank') | |
561 | end |
|
561 | end | |
562 | else |
|
562 | else | |
563 | if respond_to?(attribute) && send(attribute).blank? |
|
563 | if respond_to?(attribute) && send(attribute).blank? | |
564 | errors.add attribute, :blank |
|
564 | errors.add attribute, :blank | |
565 | end |
|
565 | end | |
566 | end |
|
566 | end | |
567 | end |
|
567 | end | |
568 | end |
|
568 | end | |
569 |
|
569 | |||
570 | # Set the done_ratio using the status if that setting is set. This will keep the done_ratios |
|
570 | # Set the done_ratio using the status if that setting is set. This will keep the done_ratios | |
571 | # even if the user turns off the setting later |
|
571 | # even if the user turns off the setting later | |
572 | def update_done_ratio_from_issue_status |
|
572 | def update_done_ratio_from_issue_status | |
573 | if Issue.use_status_for_done_ratio? && status && status.default_done_ratio |
|
573 | if Issue.use_status_for_done_ratio? && status && status.default_done_ratio | |
574 | self.done_ratio = status.default_done_ratio |
|
574 | self.done_ratio = status.default_done_ratio | |
575 | end |
|
575 | end | |
576 | end |
|
576 | end | |
577 |
|
577 | |||
578 | def init_journal(user, notes = "") |
|
578 | def init_journal(user, notes = "") | |
579 | @current_journal ||= Journal.new(:journalized => self, :user => user, :notes => notes) |
|
579 | @current_journal ||= Journal.new(:journalized => self, :user => user, :notes => notes) | |
580 | if new_record? |
|
580 | if new_record? | |
581 | @current_journal.notify = false |
|
581 | @current_journal.notify = false | |
582 | else |
|
582 | else | |
583 | @attributes_before_change = attributes.dup |
|
583 | @attributes_before_change = attributes.dup | |
584 | @custom_values_before_change = {} |
|
584 | @custom_values_before_change = {} | |
585 | self.custom_field_values.each {|c| @custom_values_before_change.store c.custom_field_id, c.value } |
|
585 | self.custom_field_values.each {|c| @custom_values_before_change.store c.custom_field_id, c.value } | |
586 | end |
|
586 | end | |
587 | @current_journal |
|
587 | @current_journal | |
588 | end |
|
588 | end | |
589 |
|
589 | |||
590 | # Returns the id of the last journal or nil |
|
590 | # Returns the id of the last journal or nil | |
591 | def last_journal_id |
|
591 | def last_journal_id | |
592 | if new_record? |
|
592 | if new_record? | |
593 | nil |
|
593 | nil | |
594 | else |
|
594 | else | |
595 | journals.maximum(:id) |
|
595 | journals.maximum(:id) | |
596 | end |
|
596 | end | |
597 | end |
|
597 | end | |
598 |
|
598 | |||
599 | # Returns a scope for journals that have an id greater than journal_id |
|
599 | # Returns a scope for journals that have an id greater than journal_id | |
600 | def journals_after(journal_id) |
|
600 | def journals_after(journal_id) | |
601 | scope = journals.reorder("#{Journal.table_name}.id ASC") |
|
601 | scope = journals.reorder("#{Journal.table_name}.id ASC") | |
602 | if journal_id.present? |
|
602 | if journal_id.present? | |
603 | scope = scope.where("#{Journal.table_name}.id > ?", journal_id.to_i) |
|
603 | scope = scope.where("#{Journal.table_name}.id > ?", journal_id.to_i) | |
604 | end |
|
604 | end | |
605 | scope |
|
605 | scope | |
606 | end |
|
606 | end | |
607 |
|
607 | |||
608 | # Return true if the issue is closed, otherwise false |
|
608 | # Return true if the issue is closed, otherwise false | |
609 | def closed? |
|
609 | def closed? | |
610 | self.status.is_closed? |
|
610 | self.status.is_closed? | |
611 | end |
|
611 | end | |
612 |
|
612 | |||
613 | # Return true if the issue is being reopened |
|
613 | # Return true if the issue is being reopened | |
614 | def reopened? |
|
614 | def reopened? | |
615 | if !new_record? && status_id_changed? |
|
615 | if !new_record? && status_id_changed? | |
616 | status_was = IssueStatus.find_by_id(status_id_was) |
|
616 | status_was = IssueStatus.find_by_id(status_id_was) | |
617 | status_new = IssueStatus.find_by_id(status_id) |
|
617 | status_new = IssueStatus.find_by_id(status_id) | |
618 | if status_was && status_new && status_was.is_closed? && !status_new.is_closed? |
|
618 | if status_was && status_new && status_was.is_closed? && !status_new.is_closed? | |
619 | return true |
|
619 | return true | |
620 | end |
|
620 | end | |
621 | end |
|
621 | end | |
622 | false |
|
622 | false | |
623 | end |
|
623 | end | |
624 |
|
624 | |||
625 | # Return true if the issue is being closed |
|
625 | # Return true if the issue is being closed | |
626 | def closing? |
|
626 | def closing? | |
627 | if !new_record? && status_id_changed? |
|
627 | if !new_record? && status_id_changed? | |
628 | status_was = IssueStatus.find_by_id(status_id_was) |
|
628 | status_was = IssueStatus.find_by_id(status_id_was) | |
629 | status_new = IssueStatus.find_by_id(status_id) |
|
629 | status_new = IssueStatus.find_by_id(status_id) | |
630 | if status_was && status_new && !status_was.is_closed? && status_new.is_closed? |
|
630 | if status_was && status_new && !status_was.is_closed? && status_new.is_closed? | |
631 | return true |
|
631 | return true | |
632 | end |
|
632 | end | |
633 | end |
|
633 | end | |
634 | false |
|
634 | false | |
635 | end |
|
635 | end | |
636 |
|
636 | |||
637 | # Returns true if the issue is overdue |
|
637 | # Returns true if the issue is overdue | |
638 | def overdue? |
|
638 | def overdue? | |
639 | !due_date.nil? && (due_date < Date.today) && !status.is_closed? |
|
639 | !due_date.nil? && (due_date < Date.today) && !status.is_closed? | |
640 | end |
|
640 | end | |
641 |
|
641 | |||
642 | # Is the amount of work done less than it should for the due date |
|
642 | # Is the amount of work done less than it should for the due date | |
643 | def behind_schedule? |
|
643 | def behind_schedule? | |
644 | return false if start_date.nil? || due_date.nil? |
|
644 | return false if start_date.nil? || due_date.nil? | |
645 | done_date = start_date + ((due_date - start_date+1)* done_ratio/100).floor |
|
645 | done_date = start_date + ((due_date - start_date+1)* done_ratio/100).floor | |
646 | return done_date <= Date.today |
|
646 | return done_date <= Date.today | |
647 | end |
|
647 | end | |
648 |
|
648 | |||
649 | # Does this issue have children? |
|
649 | # Does this issue have children? | |
650 | def children? |
|
650 | def children? | |
651 | !leaf? |
|
651 | !leaf? | |
652 | end |
|
652 | end | |
653 |
|
653 | |||
654 | # Users the issue can be assigned to |
|
654 | # Users the issue can be assigned to | |
655 | def assignable_users |
|
655 | def assignable_users | |
656 | users = project.assignable_users |
|
656 | users = project.assignable_users | |
657 | users << author if author |
|
657 | users << author if author | |
658 | users << assigned_to if assigned_to |
|
658 | users << assigned_to if assigned_to | |
659 | users.uniq.sort |
|
659 | users.uniq.sort | |
660 | end |
|
660 | end | |
661 |
|
661 | |||
662 | # Versions that the issue can be assigned to |
|
662 | # Versions that the issue can be assigned to | |
663 | def assignable_versions |
|
663 | def assignable_versions | |
664 | return @assignable_versions if @assignable_versions |
|
664 | return @assignable_versions if @assignable_versions | |
665 |
|
665 | |||
666 | versions = project.shared_versions.open.all |
|
666 | versions = project.shared_versions.open.all | |
667 | if fixed_version |
|
667 | if fixed_version | |
668 | if fixed_version_id_changed? |
|
668 | if fixed_version_id_changed? | |
669 | # nothing to do |
|
669 | # nothing to do | |
670 | elsif project_id_changed? |
|
670 | elsif project_id_changed? | |
671 | if project.shared_versions.include?(fixed_version) |
|
671 | if project.shared_versions.include?(fixed_version) | |
672 | versions << fixed_version |
|
672 | versions << fixed_version | |
673 | end |
|
673 | end | |
674 | else |
|
674 | else | |
675 | versions << fixed_version |
|
675 | versions << fixed_version | |
676 | end |
|
676 | end | |
677 | end |
|
677 | end | |
678 | @assignable_versions = versions.uniq.sort |
|
678 | @assignable_versions = versions.uniq.sort | |
679 | end |
|
679 | end | |
680 |
|
680 | |||
681 | # Returns true if this issue is blocked by another issue that is still open |
|
681 | # Returns true if this issue is blocked by another issue that is still open | |
682 | def blocked? |
|
682 | def blocked? | |
683 | !relations_to.detect {|ir| ir.relation_type == 'blocks' && !ir.issue_from.closed?}.nil? |
|
683 | !relations_to.detect {|ir| ir.relation_type == 'blocks' && !ir.issue_from.closed?}.nil? | |
684 | end |
|
684 | end | |
685 |
|
685 | |||
686 | # Returns an array of statuses that user is able to apply |
|
686 | # Returns an array of statuses that user is able to apply | |
687 | def new_statuses_allowed_to(user=User.current, include_default=false) |
|
687 | def new_statuses_allowed_to(user=User.current, include_default=false) | |
688 | if new_record? && @copied_from |
|
688 | if new_record? && @copied_from | |
689 | [IssueStatus.default, @copied_from.status].compact.uniq.sort |
|
689 | [IssueStatus.default, @copied_from.status].compact.uniq.sort | |
690 | else |
|
690 | else | |
691 | initial_status = nil |
|
691 | initial_status = nil | |
692 | if new_record? |
|
692 | if new_record? | |
693 | initial_status = IssueStatus.default |
|
693 | initial_status = IssueStatus.default | |
694 | elsif status_id_was |
|
694 | elsif status_id_was | |
695 | initial_status = IssueStatus.find_by_id(status_id_was) |
|
695 | initial_status = IssueStatus.find_by_id(status_id_was) | |
696 | end |
|
696 | end | |
697 | initial_status ||= status |
|
697 | initial_status ||= status | |
698 |
|
698 | |||
699 | statuses = initial_status.find_new_statuses_allowed_to( |
|
699 | statuses = initial_status.find_new_statuses_allowed_to( | |
700 | user.admin ? Role.all : user.roles_for_project(project), |
|
700 | user.admin ? Role.all : user.roles_for_project(project), | |
701 | tracker, |
|
701 | tracker, | |
702 | author == user, |
|
702 | author == user, | |
703 | assigned_to_id_changed? ? assigned_to_id_was == user.id : assigned_to_id == user.id |
|
703 | assigned_to_id_changed? ? assigned_to_id_was == user.id : assigned_to_id == user.id | |
704 | ) |
|
704 | ) | |
705 | statuses << initial_status unless statuses.empty? |
|
705 | statuses << initial_status unless statuses.empty? | |
706 | statuses << IssueStatus.default if include_default |
|
706 | statuses << IssueStatus.default if include_default | |
707 | statuses = statuses.compact.uniq.sort |
|
707 | statuses = statuses.compact.uniq.sort | |
708 | blocked? ? statuses.reject {|s| s.is_closed?} : statuses |
|
708 | blocked? ? statuses.reject {|s| s.is_closed?} : statuses | |
709 | end |
|
709 | end | |
710 | end |
|
710 | end | |
711 |
|
711 | |||
712 | def assigned_to_was |
|
712 | def assigned_to_was | |
713 | if assigned_to_id_changed? && assigned_to_id_was.present? |
|
713 | if assigned_to_id_changed? && assigned_to_id_was.present? | |
714 | @assigned_to_was ||= User.find_by_id(assigned_to_id_was) |
|
714 | @assigned_to_was ||= User.find_by_id(assigned_to_id_was) | |
715 | end |
|
715 | end | |
716 | end |
|
716 | end | |
717 |
|
717 | |||
718 | # Returns the mail adresses of users that should be notified |
|
718 | # Returns the mail adresses of users that should be notified | |
719 | def recipients |
|
719 | def recipients | |
720 | notified = [] |
|
720 | notified = [] | |
721 | # Author and assignee are always notified unless they have been |
|
721 | # Author and assignee are always notified unless they have been | |
722 | # locked or don't want to be notified |
|
722 | # locked or don't want to be notified | |
723 | notified << author if author |
|
723 | notified << author if author | |
724 | if assigned_to |
|
724 | if assigned_to | |
725 | notified += (assigned_to.is_a?(Group) ? assigned_to.users : [assigned_to]) |
|
725 | notified += (assigned_to.is_a?(Group) ? assigned_to.users : [assigned_to]) | |
726 | end |
|
726 | end | |
727 | if assigned_to_was |
|
727 | if assigned_to_was | |
728 | notified += (assigned_to_was.is_a?(Group) ? assigned_to_was.users : [assigned_to_was]) |
|
728 | notified += (assigned_to_was.is_a?(Group) ? assigned_to_was.users : [assigned_to_was]) | |
729 | end |
|
729 | end | |
730 | notified = notified.select {|u| u.active? && u.notify_about?(self)} |
|
730 | notified = notified.select {|u| u.active? && u.notify_about?(self)} | |
731 |
|
731 | |||
732 | notified += project.notified_users |
|
732 | notified += project.notified_users | |
733 | notified.uniq! |
|
733 | notified.uniq! | |
734 | # Remove users that can not view the issue |
|
734 | # Remove users that can not view the issue | |
735 | notified.reject! {|user| !visible?(user)} |
|
735 | notified.reject! {|user| !visible?(user)} | |
736 | notified.collect(&:mail) |
|
736 | notified.collect(&:mail) | |
737 | end |
|
737 | end | |
738 |
|
738 | |||
739 | # Returns the number of hours spent on this issue |
|
739 | # Returns the number of hours spent on this issue | |
740 | def spent_hours |
|
740 | def spent_hours | |
741 | @spent_hours ||= time_entries.sum(:hours) || 0 |
|
741 | @spent_hours ||= time_entries.sum(:hours) || 0 | |
742 | end |
|
742 | end | |
743 |
|
743 | |||
744 | # Returns the total number of hours spent on this issue and its descendants |
|
744 | # Returns the total number of hours spent on this issue and its descendants | |
745 | # |
|
745 | # | |
746 | # Example: |
|
746 | # Example: | |
747 | # spent_hours => 0.0 |
|
747 | # spent_hours => 0.0 | |
748 | # spent_hours => 50.2 |
|
748 | # spent_hours => 50.2 | |
749 | def total_spent_hours |
|
749 | def total_spent_hours | |
750 | @total_spent_hours ||= self_and_descendants.sum("#{TimeEntry.table_name}.hours", |
|
750 | @total_spent_hours ||= self_and_descendants.sum("#{TimeEntry.table_name}.hours", | |
751 | :joins => "LEFT JOIN #{TimeEntry.table_name} ON #{TimeEntry.table_name}.issue_id = #{Issue.table_name}.id").to_f || 0.0 |
|
751 | :joins => "LEFT JOIN #{TimeEntry.table_name} ON #{TimeEntry.table_name}.issue_id = #{Issue.table_name}.id").to_f || 0.0 | |
752 | end |
|
752 | end | |
753 |
|
753 | |||
754 | def relations |
|
754 | def relations | |
755 | @relations ||= (relations_from + relations_to).sort |
|
755 | @relations ||= (relations_from + relations_to).sort | |
756 | end |
|
756 | end | |
757 |
|
757 | |||
758 | # Preloads relations for a collection of issues |
|
758 | # Preloads relations for a collection of issues | |
759 | def self.load_relations(issues) |
|
759 | def self.load_relations(issues) | |
760 | if issues.any? |
|
760 | if issues.any? | |
761 | relations = IssueRelation.all(:conditions => ["issue_from_id IN (:ids) OR issue_to_id IN (:ids)", {:ids => issues.map(&:id)}]) |
|
761 | relations = IssueRelation.all(:conditions => ["issue_from_id IN (:ids) OR issue_to_id IN (:ids)", {:ids => issues.map(&:id)}]) | |
762 | issues.each do |issue| |
|
762 | issues.each do |issue| | |
763 | issue.instance_variable_set "@relations", relations.select {|r| r.issue_from_id == issue.id || r.issue_to_id == issue.id} |
|
763 | issue.instance_variable_set "@relations", relations.select {|r| r.issue_from_id == issue.id || r.issue_to_id == issue.id} | |
764 | end |
|
764 | end | |
765 | end |
|
765 | end | |
766 | end |
|
766 | end | |
767 |
|
767 | |||
768 | # Preloads visible spent time for a collection of issues |
|
768 | # Preloads visible spent time for a collection of issues | |
769 | def self.load_visible_spent_hours(issues, user=User.current) |
|
769 | def self.load_visible_spent_hours(issues, user=User.current) | |
770 | if issues.any? |
|
770 | if issues.any? | |
771 | hours_by_issue_id = TimeEntry.visible(user).sum(:hours, :group => :issue_id) |
|
771 | hours_by_issue_id = TimeEntry.visible(user).sum(:hours, :group => :issue_id) | |
772 | issues.each do |issue| |
|
772 | issues.each do |issue| | |
773 | issue.instance_variable_set "@spent_hours", (hours_by_issue_id[issue.id] || 0) |
|
773 | issue.instance_variable_set "@spent_hours", (hours_by_issue_id[issue.id] || 0) | |
774 | end |
|
774 | end | |
775 | end |
|
775 | end | |
776 | end |
|
776 | end | |
777 |
|
777 | |||
778 | # Finds an issue relation given its id. |
|
778 | # Finds an issue relation given its id. | |
779 | def find_relation(relation_id) |
|
779 | def find_relation(relation_id) | |
780 | IssueRelation.find(relation_id, :conditions => ["issue_to_id = ? OR issue_from_id = ?", id, id]) |
|
780 | IssueRelation.find(relation_id, :conditions => ["issue_to_id = ? OR issue_from_id = ?", id, id]) | |
781 | end |
|
781 | end | |
782 |
|
782 | |||
783 | def all_dependent_issues(except=[]) |
|
783 | def all_dependent_issues(except=[]) | |
784 | except << self |
|
784 | except << self | |
785 | dependencies = [] |
|
785 | dependencies = [] | |
786 | relations_from.each do |relation| |
|
786 | relations_from.each do |relation| | |
787 | if relation.issue_to && !except.include?(relation.issue_to) |
|
787 | if relation.issue_to && !except.include?(relation.issue_to) | |
788 | dependencies << relation.issue_to |
|
788 | dependencies << relation.issue_to | |
789 | dependencies += relation.issue_to.all_dependent_issues(except) |
|
789 | dependencies += relation.issue_to.all_dependent_issues(except) | |
790 | end |
|
790 | end | |
791 | end |
|
791 | end | |
792 | dependencies |
|
792 | dependencies | |
793 | end |
|
793 | end | |
794 |
|
794 | |||
795 | # Returns an array of issues that duplicate this one |
|
795 | # Returns an array of issues that duplicate this one | |
796 | def duplicates |
|
796 | def duplicates | |
797 | relations_to.select {|r| r.relation_type == IssueRelation::TYPE_DUPLICATES}.collect {|r| r.issue_from} |
|
797 | relations_to.select {|r| r.relation_type == IssueRelation::TYPE_DUPLICATES}.collect {|r| r.issue_from} | |
798 | end |
|
798 | end | |
799 |
|
799 | |||
800 | # Returns the due date or the target due date if any |
|
800 | # Returns the due date or the target due date if any | |
801 | # Used on gantt chart |
|
801 | # Used on gantt chart | |
802 | def due_before |
|
802 | def due_before | |
803 | due_date || (fixed_version ? fixed_version.effective_date : nil) |
|
803 | due_date || (fixed_version ? fixed_version.effective_date : nil) | |
804 | end |
|
804 | end | |
805 |
|
805 | |||
806 | # Returns the time scheduled for this issue. |
|
806 | # Returns the time scheduled for this issue. | |
807 | # |
|
807 | # | |
808 | # Example: |
|
808 | # Example: | |
809 | # Start Date: 2/26/09, End Date: 3/04/09 |
|
809 | # Start Date: 2/26/09, End Date: 3/04/09 | |
810 | # duration => 6 |
|
810 | # duration => 6 | |
811 | def duration |
|
811 | def duration | |
812 | (start_date && due_date) ? due_date - start_date : 0 |
|
812 | (start_date && due_date) ? due_date - start_date : 0 | |
813 | end |
|
813 | end | |
814 |
|
814 | |||
815 | def soonest_start |
|
815 | def soonest_start | |
816 | @soonest_start ||= ( |
|
816 | @soonest_start ||= ( | |
817 | relations_to.collect{|relation| relation.successor_soonest_start} + |
|
817 | relations_to.collect{|relation| relation.successor_soonest_start} + | |
818 | ancestors.collect(&:soonest_start) |
|
818 | ancestors.collect(&:soonest_start) | |
819 | ).compact.max |
|
819 | ).compact.max | |
820 | end |
|
820 | end | |
821 |
|
821 | |||
822 | def reschedule_after(date) |
|
822 | def reschedule_after(date) | |
823 | return if date.nil? |
|
823 | return if date.nil? | |
824 | if leaf? |
|
824 | if leaf? | |
825 | if start_date.nil? || start_date < date |
|
825 | if start_date.nil? || start_date < date | |
826 | self.start_date, self.due_date = date, date + duration |
|
826 | self.start_date, self.due_date = date, date + duration | |
827 | begin |
|
827 | begin | |
828 | save |
|
828 | save | |
829 | rescue ActiveRecord::StaleObjectError |
|
829 | rescue ActiveRecord::StaleObjectError | |
830 | reload |
|
830 | reload | |
831 | self.start_date, self.due_date = date, date + duration |
|
831 | self.start_date, self.due_date = date, date + duration | |
832 | save |
|
832 | save | |
833 | end |
|
833 | end | |
834 | end |
|
834 | end | |
835 | else |
|
835 | else | |
836 | leaves.each do |leaf| |
|
836 | leaves.each do |leaf| | |
837 | leaf.reschedule_after(date) |
|
837 | leaf.reschedule_after(date) | |
838 | end |
|
838 | end | |
839 | end |
|
839 | end | |
840 | end |
|
840 | end | |
841 |
|
841 | |||
842 | def <=>(issue) |
|
842 | def <=>(issue) | |
843 | if issue.nil? |
|
843 | if issue.nil? | |
844 | -1 |
|
844 | -1 | |
845 | elsif root_id != issue.root_id |
|
845 | elsif root_id != issue.root_id | |
846 | (root_id || 0) <=> (issue.root_id || 0) |
|
846 | (root_id || 0) <=> (issue.root_id || 0) | |
847 | else |
|
847 | else | |
848 | (lft || 0) <=> (issue.lft || 0) |
|
848 | (lft || 0) <=> (issue.lft || 0) | |
849 | end |
|
849 | end | |
850 | end |
|
850 | end | |
851 |
|
851 | |||
852 | def to_s |
|
852 | def to_s | |
853 | "#{tracker} ##{id}: #{subject}" |
|
853 | "#{tracker} ##{id}: #{subject}" | |
854 | end |
|
854 | end | |
855 |
|
855 | |||
856 | # Returns a string of css classes that apply to the issue |
|
856 | # Returns a string of css classes that apply to the issue | |
857 | def css_classes |
|
857 | def css_classes | |
858 | s = "issue status-#{status_id} priority-#{priority_id}" |
|
858 | s = "issue status-#{status_id} priority-#{priority_id}" | |
859 | s << ' closed' if closed? |
|
859 | s << ' closed' if closed? | |
860 | s << ' overdue' if overdue? |
|
860 | s << ' overdue' if overdue? | |
861 | s << ' child' if child? |
|
861 | s << ' child' if child? | |
862 | s << ' parent' unless leaf? |
|
862 | s << ' parent' unless leaf? | |
863 | s << ' private' if is_private? |
|
863 | s << ' private' if is_private? | |
864 | s << ' created-by-me' if User.current.logged? && author_id == User.current.id |
|
864 | s << ' created-by-me' if User.current.logged? && author_id == User.current.id | |
865 | s << ' assigned-to-me' if User.current.logged? && assigned_to_id == User.current.id |
|
865 | s << ' assigned-to-me' if User.current.logged? && assigned_to_id == User.current.id | |
866 | s |
|
866 | s | |
867 | end |
|
867 | end | |
868 |
|
868 | |||
869 | # Saves an issue and a time_entry from the parameters |
|
869 | # Saves an issue and a time_entry from the parameters | |
870 | def save_issue_with_child_records(params, existing_time_entry=nil) |
|
870 | def save_issue_with_child_records(params, existing_time_entry=nil) | |
871 | Issue.transaction do |
|
871 | Issue.transaction do | |
872 | if params[:time_entry] && (params[:time_entry][:hours].present? || params[:time_entry][:comments].present?) && User.current.allowed_to?(:log_time, project) |
|
872 | if params[:time_entry] && (params[:time_entry][:hours].present? || params[:time_entry][:comments].present?) && User.current.allowed_to?(:log_time, project) | |
873 | @time_entry = existing_time_entry || TimeEntry.new |
|
873 | @time_entry = existing_time_entry || TimeEntry.new | |
874 | @time_entry.project = project |
|
874 | @time_entry.project = project | |
875 | @time_entry.issue = self |
|
875 | @time_entry.issue = self | |
876 | @time_entry.user = User.current |
|
876 | @time_entry.user = User.current | |
877 | @time_entry.spent_on = User.current.today |
|
877 | @time_entry.spent_on = User.current.today | |
878 | @time_entry.attributes = params[:time_entry] |
|
878 | @time_entry.attributes = params[:time_entry] | |
879 | self.time_entries << @time_entry |
|
879 | self.time_entries << @time_entry | |
880 | end |
|
880 | end | |
881 |
|
881 | |||
882 | # TODO: Rename hook |
|
882 | # TODO: Rename hook | |
883 | Redmine::Hook.call_hook(:controller_issues_edit_before_save, { :params => params, :issue => self, :time_entry => @time_entry, :journal => @current_journal}) |
|
883 | Redmine::Hook.call_hook(:controller_issues_edit_before_save, { :params => params, :issue => self, :time_entry => @time_entry, :journal => @current_journal}) | |
884 | if save |
|
884 | if save | |
885 | # TODO: Rename hook |
|
885 | # TODO: Rename hook | |
886 | Redmine::Hook.call_hook(:controller_issues_edit_after_save, { :params => params, :issue => self, :time_entry => @time_entry, :journal => @current_journal}) |
|
886 | Redmine::Hook.call_hook(:controller_issues_edit_after_save, { :params => params, :issue => self, :time_entry => @time_entry, :journal => @current_journal}) | |
887 | else |
|
887 | else | |
888 | raise ActiveRecord::Rollback |
|
888 | raise ActiveRecord::Rollback | |
889 | end |
|
889 | end | |
890 | end |
|
890 | end | |
891 | end |
|
891 | end | |
892 |
|
892 | |||
893 | # Unassigns issues from +version+ if it's no longer shared with issue's project |
|
893 | # Unassigns issues from +version+ if it's no longer shared with issue's project | |
894 | def self.update_versions_from_sharing_change(version) |
|
894 | def self.update_versions_from_sharing_change(version) | |
895 | # Update issues assigned to the version |
|
895 | # Update issues assigned to the version | |
896 | update_versions(["#{Issue.table_name}.fixed_version_id = ?", version.id]) |
|
896 | update_versions(["#{Issue.table_name}.fixed_version_id = ?", version.id]) | |
897 | end |
|
897 | end | |
898 |
|
898 | |||
899 | # Unassigns issues from versions that are no longer shared |
|
899 | # Unassigns issues from versions that are no longer shared | |
900 | # after +project+ was moved |
|
900 | # after +project+ was moved | |
901 | def self.update_versions_from_hierarchy_change(project) |
|
901 | def self.update_versions_from_hierarchy_change(project) | |
902 | moved_project_ids = project.self_and_descendants.reload.collect(&:id) |
|
902 | moved_project_ids = project.self_and_descendants.reload.collect(&:id) | |
903 | # Update issues of the moved projects and issues assigned to a version of a moved project |
|
903 | # Update issues of the moved projects and issues assigned to a version of a moved project | |
904 | Issue.update_versions(["#{Version.table_name}.project_id IN (?) OR #{Issue.table_name}.project_id IN (?)", moved_project_ids, moved_project_ids]) |
|
904 | Issue.update_versions(["#{Version.table_name}.project_id IN (?) OR #{Issue.table_name}.project_id IN (?)", moved_project_ids, moved_project_ids]) | |
905 | end |
|
905 | end | |
906 |
|
906 | |||
907 | def parent_issue_id=(arg) |
|
907 | def parent_issue_id=(arg) | |
908 | parent_issue_id = arg.blank? ? nil : arg.to_i |
|
908 | parent_issue_id = arg.blank? ? nil : arg.to_i | |
909 | if parent_issue_id && @parent_issue = Issue.find_by_id(parent_issue_id) |
|
909 | if parent_issue_id && @parent_issue = Issue.find_by_id(parent_issue_id) | |
910 | @parent_issue.id |
|
910 | @parent_issue.id | |
911 | else |
|
911 | else | |
912 | @parent_issue = nil |
|
912 | @parent_issue = nil | |
913 | nil |
|
913 | nil | |
914 | end |
|
914 | end | |
915 | end |
|
915 | end | |
916 |
|
916 | |||
917 | def parent_issue_id |
|
917 | def parent_issue_id | |
918 | if instance_variable_defined? :@parent_issue |
|
918 | if instance_variable_defined? :@parent_issue | |
919 | @parent_issue.nil? ? nil : @parent_issue.id |
|
919 | @parent_issue.nil? ? nil : @parent_issue.id | |
920 | else |
|
920 | else | |
921 | parent_id |
|
921 | parent_id | |
922 | end |
|
922 | end | |
923 | end |
|
923 | end | |
924 |
|
924 | |||
925 | # Extracted from the ReportsController. |
|
925 | # Extracted from the ReportsController. | |
926 | def self.by_tracker(project) |
|
926 | def self.by_tracker(project) | |
927 | count_and_group_by(:project => project, |
|
927 | count_and_group_by(:project => project, | |
928 | :field => 'tracker_id', |
|
928 | :field => 'tracker_id', | |
929 | :joins => Tracker.table_name) |
|
929 | :joins => Tracker.table_name) | |
930 | end |
|
930 | end | |
931 |
|
931 | |||
932 | def self.by_version(project) |
|
932 | def self.by_version(project) | |
933 | count_and_group_by(:project => project, |
|
933 | count_and_group_by(:project => project, | |
934 | :field => 'fixed_version_id', |
|
934 | :field => 'fixed_version_id', | |
935 | :joins => Version.table_name) |
|
935 | :joins => Version.table_name) | |
936 | end |
|
936 | end | |
937 |
|
937 | |||
938 | def self.by_priority(project) |
|
938 | def self.by_priority(project) | |
939 | count_and_group_by(:project => project, |
|
939 | count_and_group_by(:project => project, | |
940 | :field => 'priority_id', |
|
940 | :field => 'priority_id', | |
941 | :joins => IssuePriority.table_name) |
|
941 | :joins => IssuePriority.table_name) | |
942 | end |
|
942 | end | |
943 |
|
943 | |||
944 | def self.by_category(project) |
|
944 | def self.by_category(project) | |
945 | count_and_group_by(:project => project, |
|
945 | count_and_group_by(:project => project, | |
946 | :field => 'category_id', |
|
946 | :field => 'category_id', | |
947 | :joins => IssueCategory.table_name) |
|
947 | :joins => IssueCategory.table_name) | |
948 | end |
|
948 | end | |
949 |
|
949 | |||
950 | def self.by_assigned_to(project) |
|
950 | def self.by_assigned_to(project) | |
951 | count_and_group_by(:project => project, |
|
951 | count_and_group_by(:project => project, | |
952 | :field => 'assigned_to_id', |
|
952 | :field => 'assigned_to_id', | |
953 | :joins => User.table_name) |
|
953 | :joins => User.table_name) | |
954 | end |
|
954 | end | |
955 |
|
955 | |||
956 | def self.by_author(project) |
|
956 | def self.by_author(project) | |
957 | count_and_group_by(:project => project, |
|
957 | count_and_group_by(:project => project, | |
958 | :field => 'author_id', |
|
958 | :field => 'author_id', | |
959 | :joins => User.table_name) |
|
959 | :joins => User.table_name) | |
960 | end |
|
960 | end | |
961 |
|
961 | |||
962 | def self.by_subproject(project) |
|
962 | def self.by_subproject(project) | |
963 | ActiveRecord::Base.connection.select_all("select s.id as status_id, |
|
963 | ActiveRecord::Base.connection.select_all("select s.id as status_id, | |
964 | s.is_closed as closed, |
|
964 | s.is_closed as closed, | |
965 | #{Issue.table_name}.project_id as project_id, |
|
965 | #{Issue.table_name}.project_id as project_id, | |
966 | count(#{Issue.table_name}.id) as total |
|
966 | count(#{Issue.table_name}.id) as total | |
967 | from |
|
967 | from | |
968 | #{Issue.table_name}, #{Project.table_name}, #{IssueStatus.table_name} s |
|
968 | #{Issue.table_name}, #{Project.table_name}, #{IssueStatus.table_name} s | |
969 | where |
|
969 | where | |
970 | #{Issue.table_name}.status_id=s.id |
|
970 | #{Issue.table_name}.status_id=s.id | |
971 | and #{Issue.table_name}.project_id = #{Project.table_name}.id |
|
971 | and #{Issue.table_name}.project_id = #{Project.table_name}.id | |
972 | and #{visible_condition(User.current, :project => project, :with_subprojects => true)} |
|
972 | and #{visible_condition(User.current, :project => project, :with_subprojects => true)} | |
973 | and #{Issue.table_name}.project_id <> #{project.id} |
|
973 | and #{Issue.table_name}.project_id <> #{project.id} | |
974 | group by s.id, s.is_closed, #{Issue.table_name}.project_id") if project.descendants.active.any? |
|
974 | group by s.id, s.is_closed, #{Issue.table_name}.project_id") if project.descendants.active.any? | |
975 | end |
|
975 | end | |
976 | # End ReportsController extraction |
|
976 | # End ReportsController extraction | |
977 |
|
977 | |||
978 | # Returns an array of projects that user can assign the issue to |
|
978 | # Returns an array of projects that user can assign the issue to | |
979 | def allowed_target_projects(user=User.current) |
|
979 | def allowed_target_projects(user=User.current) | |
980 | if new_record? |
|
980 | if new_record? | |
981 | Project.all(:conditions => Project.allowed_to_condition(user, :add_issues)) |
|
981 | Project.all(:conditions => Project.allowed_to_condition(user, :add_issues)) | |
982 | else |
|
982 | else | |
983 | self.class.allowed_target_projects_on_move(user) |
|
983 | self.class.allowed_target_projects_on_move(user) | |
984 | end |
|
984 | end | |
985 | end |
|
985 | end | |
986 |
|
986 | |||
987 | # Returns an array of projects that user can move issues to |
|
987 | # Returns an array of projects that user can move issues to | |
988 | def self.allowed_target_projects_on_move(user=User.current) |
|
988 | def self.allowed_target_projects_on_move(user=User.current) | |
989 | Project.all(:conditions => Project.allowed_to_condition(user, :move_issues)) |
|
989 | Project.all(:conditions => Project.allowed_to_condition(user, :move_issues)) | |
990 | end |
|
990 | end | |
991 |
|
991 | |||
992 | private |
|
992 | private | |
993 |
|
993 | |||
994 | def after_project_change |
|
994 | def after_project_change | |
995 | # Update project_id on related time entries |
|
995 | # Update project_id on related time entries | |
996 | TimeEntry.update_all(["project_id = ?", project_id], {:issue_id => id}) |
|
996 | TimeEntry.update_all(["project_id = ?", project_id], {:issue_id => id}) | |
997 |
|
997 | |||
998 | # Delete issue relations |
|
998 | # Delete issue relations | |
999 | unless Setting.cross_project_issue_relations? |
|
999 | unless Setting.cross_project_issue_relations? | |
1000 | relations_from.clear |
|
1000 | relations_from.clear | |
1001 | relations_to.clear |
|
1001 | relations_to.clear | |
1002 | end |
|
1002 | end | |
1003 |
|
1003 | |||
1004 | # Move subtasks |
|
1004 | # Move subtasks | |
1005 | children.each do |child| |
|
1005 | children.each do |child| | |
1006 | # Change project and keep project |
|
1006 | # Change project and keep project | |
1007 | child.send :project=, project, true |
|
1007 | child.send :project=, project, true | |
1008 | unless child.save |
|
1008 | unless child.save | |
1009 | raise ActiveRecord::Rollback |
|
1009 | raise ActiveRecord::Rollback | |
1010 | end |
|
1010 | end | |
1011 | end |
|
1011 | end | |
1012 | end |
|
1012 | end | |
1013 |
|
1013 | |||
1014 | # Copies subtasks from the copied issue |
|
1014 | # Callback for after the creation of an issue by copy | |
|
1015 | # * adds a "copied to" relation with the copied issue | |||
|
1016 | # * copies subtasks from the copied issue | |||
1015 | def after_create_from_copy |
|
1017 | def after_create_from_copy | |
1016 | return unless copy? |
|
1018 | return unless copy? && !@after_create_from_copy_handled | |
1017 |
|
1019 | |||
1018 | unless @copied_from.leaf? || @copy_options[:subtasks] == false || @subtasks_copied |
|
1020 | if @copied_from.project_id == project_id || Setting.cross_project_issue_relations? | |
|
1021 | relation = IssueRelation.new(:issue_from => @copied_from, :issue_to => self, :relation_type => IssueRelation::TYPE_COPIED_TO) | |||
|
1022 | unless relation.save | |||
|
1023 | logger.error "Could not create relation while copying ##{@copied_from.id} to ##{id} due to validation errors: #{relation.errors.full_messages.join(', ')}" if logger | |||
|
1024 | end | |||
|
1025 | end | |||
|
1026 | ||||
|
1027 | unless @copied_from.leaf? || @copy_options[:subtasks] == false | |||
1019 | @copied_from.children.each do |child| |
|
1028 | @copied_from.children.each do |child| | |
1020 | unless child.visible? |
|
1029 | unless child.visible? | |
1021 | # Do not copy subtasks that are not visible to avoid potential disclosure of private data |
|
1030 | # Do not copy subtasks that are not visible to avoid potential disclosure of private data | |
1022 | logger.error "Subtask ##{child.id} was not copied during ##{@copied_from.id} copy because it is not visible to the current user" if logger |
|
1031 | logger.error "Subtask ##{child.id} was not copied during ##{@copied_from.id} copy because it is not visible to the current user" if logger | |
1023 | next |
|
1032 | next | |
1024 | end |
|
1033 | end | |
1025 | copy = Issue.new.copy_from(child, @copy_options) |
|
1034 | copy = Issue.new.copy_from(child, @copy_options) | |
1026 | copy.author = author |
|
1035 | copy.author = author | |
1027 | copy.project = project |
|
1036 | copy.project = project | |
1028 | copy.parent_issue_id = id |
|
1037 | copy.parent_issue_id = id | |
1029 | # Children subtasks are copied recursively |
|
1038 | # Children subtasks are copied recursively | |
1030 | unless copy.save |
|
1039 | unless copy.save | |
1031 | 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 |
|
1040 | 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 | |
1032 | end |
|
1041 | end | |
1033 | end |
|
1042 | end | |
1034 | @subtasks_copied = true |
|
|||
1035 | end |
|
1043 | end | |
|
1044 | @after_create_from_copy_handled = true | |||
1036 | end |
|
1045 | end | |
1037 |
|
1046 | |||
1038 | def update_nested_set_attributes |
|
1047 | def update_nested_set_attributes | |
1039 | if root_id.nil? |
|
1048 | if root_id.nil? | |
1040 | # issue was just created |
|
1049 | # issue was just created | |
1041 | self.root_id = (@parent_issue.nil? ? id : @parent_issue.root_id) |
|
1050 | self.root_id = (@parent_issue.nil? ? id : @parent_issue.root_id) | |
1042 | set_default_left_and_right |
|
1051 | set_default_left_and_right | |
1043 | Issue.update_all("root_id = #{root_id}, lft = #{lft}, rgt = #{rgt}", ["id = ?", id]) |
|
1052 | Issue.update_all("root_id = #{root_id}, lft = #{lft}, rgt = #{rgt}", ["id = ?", id]) | |
1044 | if @parent_issue |
|
1053 | if @parent_issue | |
1045 | move_to_child_of(@parent_issue) |
|
1054 | move_to_child_of(@parent_issue) | |
1046 | end |
|
1055 | end | |
1047 | reload |
|
1056 | reload | |
1048 | elsif parent_issue_id != parent_id |
|
1057 | elsif parent_issue_id != parent_id | |
1049 | former_parent_id = parent_id |
|
1058 | former_parent_id = parent_id | |
1050 | # moving an existing issue |
|
1059 | # moving an existing issue | |
1051 | if @parent_issue && @parent_issue.root_id == root_id |
|
1060 | if @parent_issue && @parent_issue.root_id == root_id | |
1052 | # inside the same tree |
|
1061 | # inside the same tree | |
1053 | move_to_child_of(@parent_issue) |
|
1062 | move_to_child_of(@parent_issue) | |
1054 | else |
|
1063 | else | |
1055 | # to another tree |
|
1064 | # to another tree | |
1056 | unless root? |
|
1065 | unless root? | |
1057 | move_to_right_of(root) |
|
1066 | move_to_right_of(root) | |
1058 | reload |
|
1067 | reload | |
1059 | end |
|
1068 | end | |
1060 | old_root_id = root_id |
|
1069 | old_root_id = root_id | |
1061 | self.root_id = (@parent_issue.nil? ? id : @parent_issue.root_id ) |
|
1070 | self.root_id = (@parent_issue.nil? ? id : @parent_issue.root_id ) | |
1062 | target_maxright = nested_set_scope.maximum(right_column_name) || 0 |
|
1071 | target_maxright = nested_set_scope.maximum(right_column_name) || 0 | |
1063 | offset = target_maxright + 1 - lft |
|
1072 | offset = target_maxright + 1 - lft | |
1064 | Issue.update_all("root_id = #{root_id}, lft = lft + #{offset}, rgt = rgt + #{offset}", |
|
1073 | Issue.update_all("root_id = #{root_id}, lft = lft + #{offset}, rgt = rgt + #{offset}", | |
1065 | ["root_id = ? AND lft >= ? AND rgt <= ? ", old_root_id, lft, rgt]) |
|
1074 | ["root_id = ? AND lft >= ? AND rgt <= ? ", old_root_id, lft, rgt]) | |
1066 | self[left_column_name] = lft + offset |
|
1075 | self[left_column_name] = lft + offset | |
1067 | self[right_column_name] = rgt + offset |
|
1076 | self[right_column_name] = rgt + offset | |
1068 | if @parent_issue |
|
1077 | if @parent_issue | |
1069 | move_to_child_of(@parent_issue) |
|
1078 | move_to_child_of(@parent_issue) | |
1070 | end |
|
1079 | end | |
1071 | end |
|
1080 | end | |
1072 | reload |
|
1081 | reload | |
1073 | # delete invalid relations of all descendants |
|
1082 | # delete invalid relations of all descendants | |
1074 | self_and_descendants.each do |issue| |
|
1083 | self_and_descendants.each do |issue| | |
1075 | issue.relations.each do |relation| |
|
1084 | issue.relations.each do |relation| | |
1076 | relation.destroy unless relation.valid? |
|
1085 | relation.destroy unless relation.valid? | |
1077 | end |
|
1086 | end | |
1078 | end |
|
1087 | end | |
1079 | # update former parent |
|
1088 | # update former parent | |
1080 | recalculate_attributes_for(former_parent_id) if former_parent_id |
|
1089 | recalculate_attributes_for(former_parent_id) if former_parent_id | |
1081 | end |
|
1090 | end | |
1082 | remove_instance_variable(:@parent_issue) if instance_variable_defined?(:@parent_issue) |
|
1091 | remove_instance_variable(:@parent_issue) if instance_variable_defined?(:@parent_issue) | |
1083 | end |
|
1092 | end | |
1084 |
|
1093 | |||
1085 | def update_parent_attributes |
|
1094 | def update_parent_attributes | |
1086 | recalculate_attributes_for(parent_id) if parent_id |
|
1095 | recalculate_attributes_for(parent_id) if parent_id | |
1087 | end |
|
1096 | end | |
1088 |
|
1097 | |||
1089 | def recalculate_attributes_for(issue_id) |
|
1098 | def recalculate_attributes_for(issue_id) | |
1090 | if issue_id && p = Issue.find_by_id(issue_id) |
|
1099 | if issue_id && p = Issue.find_by_id(issue_id) | |
1091 | # priority = highest priority of children |
|
1100 | # priority = highest priority of children | |
1092 | if priority_position = p.children.maximum("#{IssuePriority.table_name}.position", :joins => :priority) |
|
1101 | if priority_position = p.children.maximum("#{IssuePriority.table_name}.position", :joins => :priority) | |
1093 | p.priority = IssuePriority.find_by_position(priority_position) |
|
1102 | p.priority = IssuePriority.find_by_position(priority_position) | |
1094 | end |
|
1103 | end | |
1095 |
|
1104 | |||
1096 | # start/due dates = lowest/highest dates of children |
|
1105 | # start/due dates = lowest/highest dates of children | |
1097 | p.start_date = p.children.minimum(:start_date) |
|
1106 | p.start_date = p.children.minimum(:start_date) | |
1098 | p.due_date = p.children.maximum(:due_date) |
|
1107 | p.due_date = p.children.maximum(:due_date) | |
1099 | if p.start_date && p.due_date && p.due_date < p.start_date |
|
1108 | if p.start_date && p.due_date && p.due_date < p.start_date | |
1100 | p.start_date, p.due_date = p.due_date, p.start_date |
|
1109 | p.start_date, p.due_date = p.due_date, p.start_date | |
1101 | end |
|
1110 | end | |
1102 |
|
1111 | |||
1103 | # done ratio = weighted average ratio of leaves |
|
1112 | # done ratio = weighted average ratio of leaves | |
1104 | unless Issue.use_status_for_done_ratio? && p.status && p.status.default_done_ratio |
|
1113 | unless Issue.use_status_for_done_ratio? && p.status && p.status.default_done_ratio | |
1105 | leaves_count = p.leaves.count |
|
1114 | leaves_count = p.leaves.count | |
1106 | if leaves_count > 0 |
|
1115 | if leaves_count > 0 | |
1107 | average = p.leaves.average(:estimated_hours).to_f |
|
1116 | average = p.leaves.average(:estimated_hours).to_f | |
1108 | if average == 0 |
|
1117 | if average == 0 | |
1109 | average = 1 |
|
1118 | average = 1 | |
1110 | end |
|
1119 | end | |
1111 | done = p.leaves.sum("COALESCE(estimated_hours, #{average}) * (CASE WHEN is_closed = #{connection.quoted_true} THEN 100 ELSE COALESCE(done_ratio, 0) END)", :joins => :status).to_f |
|
1120 | done = p.leaves.sum("COALESCE(estimated_hours, #{average}) * (CASE WHEN is_closed = #{connection.quoted_true} THEN 100 ELSE COALESCE(done_ratio, 0) END)", :joins => :status).to_f | |
1112 | progress = done / (average * leaves_count) |
|
1121 | progress = done / (average * leaves_count) | |
1113 | p.done_ratio = progress.round |
|
1122 | p.done_ratio = progress.round | |
1114 | end |
|
1123 | end | |
1115 | end |
|
1124 | end | |
1116 |
|
1125 | |||
1117 | # estimate = sum of leaves estimates |
|
1126 | # estimate = sum of leaves estimates | |
1118 | p.estimated_hours = p.leaves.sum(:estimated_hours).to_f |
|
1127 | p.estimated_hours = p.leaves.sum(:estimated_hours).to_f | |
1119 | p.estimated_hours = nil if p.estimated_hours == 0.0 |
|
1128 | p.estimated_hours = nil if p.estimated_hours == 0.0 | |
1120 |
|
1129 | |||
1121 | # ancestors will be recursively updated |
|
1130 | # ancestors will be recursively updated | |
1122 | p.save(:validate => false) |
|
1131 | p.save(:validate => false) | |
1123 | end |
|
1132 | end | |
1124 | end |
|
1133 | end | |
1125 |
|
1134 | |||
1126 | # Update issues so their versions are not pointing to a |
|
1135 | # Update issues so their versions are not pointing to a | |
1127 | # fixed_version that is not shared with the issue's project |
|
1136 | # fixed_version that is not shared with the issue's project | |
1128 | def self.update_versions(conditions=nil) |
|
1137 | def self.update_versions(conditions=nil) | |
1129 | # Only need to update issues with a fixed_version from |
|
1138 | # Only need to update issues with a fixed_version from | |
1130 | # a different project and that is not systemwide shared |
|
1139 | # a different project and that is not systemwide shared | |
1131 | Issue.scoped(:conditions => conditions).all( |
|
1140 | Issue.scoped(:conditions => conditions).all( | |
1132 | :conditions => "#{Issue.table_name}.fixed_version_id IS NOT NULL" + |
|
1141 | :conditions => "#{Issue.table_name}.fixed_version_id IS NOT NULL" + | |
1133 | " AND #{Issue.table_name}.project_id <> #{Version.table_name}.project_id" + |
|
1142 | " AND #{Issue.table_name}.project_id <> #{Version.table_name}.project_id" + | |
1134 | " AND #{Version.table_name}.sharing <> 'system'", |
|
1143 | " AND #{Version.table_name}.sharing <> 'system'", | |
1135 | :include => [:project, :fixed_version] |
|
1144 | :include => [:project, :fixed_version] | |
1136 | ).each do |issue| |
|
1145 | ).each do |issue| | |
1137 | next if issue.project.nil? || issue.fixed_version.nil? |
|
1146 | next if issue.project.nil? || issue.fixed_version.nil? | |
1138 | unless issue.project.shared_versions.include?(issue.fixed_version) |
|
1147 | unless issue.project.shared_versions.include?(issue.fixed_version) | |
1139 | issue.init_journal(User.current) |
|
1148 | issue.init_journal(User.current) | |
1140 | issue.fixed_version = nil |
|
1149 | issue.fixed_version = nil | |
1141 | issue.save |
|
1150 | issue.save | |
1142 | end |
|
1151 | end | |
1143 | end |
|
1152 | end | |
1144 | end |
|
1153 | end | |
1145 |
|
1154 | |||
1146 | # Callback on file attachment |
|
1155 | # Callback on file attachment | |
1147 | def attachment_added(obj) |
|
1156 | def attachment_added(obj) | |
1148 | if @current_journal && !obj.new_record? |
|
1157 | if @current_journal && !obj.new_record? | |
1149 | @current_journal.details << JournalDetail.new(:property => 'attachment', :prop_key => obj.id, :value => obj.filename) |
|
1158 | @current_journal.details << JournalDetail.new(:property => 'attachment', :prop_key => obj.id, :value => obj.filename) | |
1150 | end |
|
1159 | end | |
1151 | end |
|
1160 | end | |
1152 |
|
1161 | |||
1153 | # Callback on attachment deletion |
|
1162 | # Callback on attachment deletion | |
1154 | def attachment_removed(obj) |
|
1163 | def attachment_removed(obj) | |
1155 | if @current_journal && !obj.new_record? |
|
1164 | if @current_journal && !obj.new_record? | |
1156 | @current_journal.details << JournalDetail.new(:property => 'attachment', :prop_key => obj.id, :old_value => obj.filename) |
|
1165 | @current_journal.details << JournalDetail.new(:property => 'attachment', :prop_key => obj.id, :old_value => obj.filename) | |
1157 | @current_journal.save |
|
1166 | @current_journal.save | |
1158 | end |
|
1167 | end | |
1159 | end |
|
1168 | end | |
1160 |
|
1169 | |||
1161 | # Default assignment based on category |
|
1170 | # Default assignment based on category | |
1162 | def default_assign |
|
1171 | def default_assign | |
1163 | if assigned_to.nil? && category && category.assigned_to |
|
1172 | if assigned_to.nil? && category && category.assigned_to | |
1164 | self.assigned_to = category.assigned_to |
|
1173 | self.assigned_to = category.assigned_to | |
1165 | end |
|
1174 | end | |
1166 | end |
|
1175 | end | |
1167 |
|
1176 | |||
1168 | # Updates start/due dates of following issues |
|
1177 | # Updates start/due dates of following issues | |
1169 | def reschedule_following_issues |
|
1178 | def reschedule_following_issues | |
1170 | if start_date_changed? || due_date_changed? |
|
1179 | if start_date_changed? || due_date_changed? | |
1171 | relations_from.each do |relation| |
|
1180 | relations_from.each do |relation| | |
1172 | relation.set_issue_to_dates |
|
1181 | relation.set_issue_to_dates | |
1173 | end |
|
1182 | end | |
1174 | end |
|
1183 | end | |
1175 | end |
|
1184 | end | |
1176 |
|
1185 | |||
1177 | # Closes duplicates if the issue is being closed |
|
1186 | # Closes duplicates if the issue is being closed | |
1178 | def close_duplicates |
|
1187 | def close_duplicates | |
1179 | if closing? |
|
1188 | if closing? | |
1180 | duplicates.each do |duplicate| |
|
1189 | duplicates.each do |duplicate| | |
1181 | # Reload is need in case the duplicate was updated by a previous duplicate |
|
1190 | # Reload is need in case the duplicate was updated by a previous duplicate | |
1182 | duplicate.reload |
|
1191 | duplicate.reload | |
1183 | # Don't re-close it if it's already closed |
|
1192 | # Don't re-close it if it's already closed | |
1184 | next if duplicate.closed? |
|
1193 | next if duplicate.closed? | |
1185 | # Same user and notes |
|
1194 | # Same user and notes | |
1186 | if @current_journal |
|
1195 | if @current_journal | |
1187 | duplicate.init_journal(@current_journal.user, @current_journal.notes) |
|
1196 | duplicate.init_journal(@current_journal.user, @current_journal.notes) | |
1188 | end |
|
1197 | end | |
1189 | duplicate.update_attribute :status, self.status |
|
1198 | duplicate.update_attribute :status, self.status | |
1190 | end |
|
1199 | end | |
1191 | end |
|
1200 | end | |
1192 | end |
|
1201 | end | |
1193 |
|
1202 | |||
1194 | # Make sure updated_on is updated when adding a note |
|
1203 | # Make sure updated_on is updated when adding a note | |
1195 | def force_updated_on_change |
|
1204 | def force_updated_on_change | |
1196 | if @current_journal |
|
1205 | if @current_journal | |
1197 | self.updated_on = current_time_from_proper_timezone |
|
1206 | self.updated_on = current_time_from_proper_timezone | |
1198 | end |
|
1207 | end | |
1199 | end |
|
1208 | end | |
1200 |
|
1209 | |||
1201 | # Saves the changes in a Journal |
|
1210 | # Saves the changes in a Journal | |
1202 | # Called after_save |
|
1211 | # Called after_save | |
1203 | def create_journal |
|
1212 | def create_journal | |
1204 | if @current_journal |
|
1213 | if @current_journal | |
1205 | # attributes changes |
|
1214 | # attributes changes | |
1206 | if @attributes_before_change |
|
1215 | if @attributes_before_change | |
1207 | (Issue.column_names - %w(id root_id lft rgt lock_version created_on updated_on)).each {|c| |
|
1216 | (Issue.column_names - %w(id root_id lft rgt lock_version created_on updated_on)).each {|c| | |
1208 | before = @attributes_before_change[c] |
|
1217 | before = @attributes_before_change[c] | |
1209 | after = send(c) |
|
1218 | after = send(c) | |
1210 | next if before == after || (before.blank? && after.blank?) |
|
1219 | next if before == after || (before.blank? && after.blank?) | |
1211 | @current_journal.details << JournalDetail.new(:property => 'attr', |
|
1220 | @current_journal.details << JournalDetail.new(:property => 'attr', | |
1212 | :prop_key => c, |
|
1221 | :prop_key => c, | |
1213 | :old_value => before, |
|
1222 | :old_value => before, | |
1214 | :value => after) |
|
1223 | :value => after) | |
1215 | } |
|
1224 | } | |
1216 | end |
|
1225 | end | |
1217 | if @custom_values_before_change |
|
1226 | if @custom_values_before_change | |
1218 | # custom fields changes |
|
1227 | # custom fields changes | |
1219 | custom_field_values.each {|c| |
|
1228 | custom_field_values.each {|c| | |
1220 | before = @custom_values_before_change[c.custom_field_id] |
|
1229 | before = @custom_values_before_change[c.custom_field_id] | |
1221 | after = c.value |
|
1230 | after = c.value | |
1222 | next if before == after || (before.blank? && after.blank?) |
|
1231 | next if before == after || (before.blank? && after.blank?) | |
1223 |
|
1232 | |||
1224 | if before.is_a?(Array) || after.is_a?(Array) |
|
1233 | if before.is_a?(Array) || after.is_a?(Array) | |
1225 | before = [before] unless before.is_a?(Array) |
|
1234 | before = [before] unless before.is_a?(Array) | |
1226 | after = [after] unless after.is_a?(Array) |
|
1235 | after = [after] unless after.is_a?(Array) | |
1227 |
|
1236 | |||
1228 | # values removed |
|
1237 | # values removed | |
1229 | (before - after).reject(&:blank?).each do |value| |
|
1238 | (before - after).reject(&:blank?).each do |value| | |
1230 | @current_journal.details << JournalDetail.new(:property => 'cf', |
|
1239 | @current_journal.details << JournalDetail.new(:property => 'cf', | |
1231 | :prop_key => c.custom_field_id, |
|
1240 | :prop_key => c.custom_field_id, | |
1232 | :old_value => value, |
|
1241 | :old_value => value, | |
1233 | :value => nil) |
|
1242 | :value => nil) | |
1234 | end |
|
1243 | end | |
1235 | # values added |
|
1244 | # values added | |
1236 | (after - before).reject(&:blank?).each do |value| |
|
1245 | (after - before).reject(&:blank?).each do |value| | |
1237 | @current_journal.details << JournalDetail.new(:property => 'cf', |
|
1246 | @current_journal.details << JournalDetail.new(:property => 'cf', | |
1238 | :prop_key => c.custom_field_id, |
|
1247 | :prop_key => c.custom_field_id, | |
1239 | :old_value => nil, |
|
1248 | :old_value => nil, | |
1240 | :value => value) |
|
1249 | :value => value) | |
1241 | end |
|
1250 | end | |
1242 | else |
|
1251 | else | |
1243 | @current_journal.details << JournalDetail.new(:property => 'cf', |
|
1252 | @current_journal.details << JournalDetail.new(:property => 'cf', | |
1244 | :prop_key => c.custom_field_id, |
|
1253 | :prop_key => c.custom_field_id, | |
1245 | :old_value => before, |
|
1254 | :old_value => before, | |
1246 | :value => after) |
|
1255 | :value => after) | |
1247 | end |
|
1256 | end | |
1248 | } |
|
1257 | } | |
1249 | end |
|
1258 | end | |
1250 | @current_journal.save |
|
1259 | @current_journal.save | |
1251 | # reset current journal |
|
1260 | # reset current journal | |
1252 | init_journal @current_journal.user, @current_journal.notes |
|
1261 | init_journal @current_journal.user, @current_journal.notes | |
1253 | end |
|
1262 | end | |
1254 | end |
|
1263 | end | |
1255 |
|
1264 | |||
1256 | # Query generator for selecting groups of issue counts for a project |
|
1265 | # Query generator for selecting groups of issue counts for a project | |
1257 | # based on specific criteria |
|
1266 | # based on specific criteria | |
1258 | # |
|
1267 | # | |
1259 | # Options |
|
1268 | # Options | |
1260 | # * project - Project to search in. |
|
1269 | # * project - Project to search in. | |
1261 | # * field - String. Issue field to key off of in the grouping. |
|
1270 | # * field - String. Issue field to key off of in the grouping. | |
1262 | # * joins - String. The table name to join against. |
|
1271 | # * joins - String. The table name to join against. | |
1263 | def self.count_and_group_by(options) |
|
1272 | def self.count_and_group_by(options) | |
1264 | project = options.delete(:project) |
|
1273 | project = options.delete(:project) | |
1265 | select_field = options.delete(:field) |
|
1274 | select_field = options.delete(:field) | |
1266 | joins = options.delete(:joins) |
|
1275 | joins = options.delete(:joins) | |
1267 |
|
1276 | |||
1268 | where = "#{Issue.table_name}.#{select_field}=j.id" |
|
1277 | where = "#{Issue.table_name}.#{select_field}=j.id" | |
1269 |
|
1278 | |||
1270 | ActiveRecord::Base.connection.select_all("select s.id as status_id, |
|
1279 | ActiveRecord::Base.connection.select_all("select s.id as status_id, | |
1271 | s.is_closed as closed, |
|
1280 | s.is_closed as closed, | |
1272 | j.id as #{select_field}, |
|
1281 | j.id as #{select_field}, | |
1273 | count(#{Issue.table_name}.id) as total |
|
1282 | count(#{Issue.table_name}.id) as total | |
1274 | from |
|
1283 | from | |
1275 | #{Issue.table_name}, #{Project.table_name}, #{IssueStatus.table_name} s, #{joins} j |
|
1284 | #{Issue.table_name}, #{Project.table_name}, #{IssueStatus.table_name} s, #{joins} j | |
1276 | where |
|
1285 | where | |
1277 | #{Issue.table_name}.status_id=s.id |
|
1286 | #{Issue.table_name}.status_id=s.id | |
1278 | and #{where} |
|
1287 | and #{where} | |
1279 | and #{Issue.table_name}.project_id=#{Project.table_name}.id |
|
1288 | and #{Issue.table_name}.project_id=#{Project.table_name}.id | |
1280 | and #{visible_condition(User.current, :project => project)} |
|
1289 | and #{visible_condition(User.current, :project => project)} | |
1281 | group by s.id, s.is_closed, j.id") |
|
1290 | group by s.id, s.is_closed, j.id") | |
1282 | end |
|
1291 | end | |
1283 | end |
|
1292 | end |
@@ -1,143 +1,147 | |||||
1 | # Redmine - project management software |
|
1 | # Redmine - project management software | |
2 | # Copyright (C) 2006-2012 Jean-Philippe Lang |
|
2 | # Copyright (C) 2006-2012 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 IssueRelation < ActiveRecord::Base |
|
18 | class IssueRelation < ActiveRecord::Base | |
19 | belongs_to :issue_from, :class_name => 'Issue', :foreign_key => 'issue_from_id' |
|
19 | belongs_to :issue_from, :class_name => 'Issue', :foreign_key => 'issue_from_id' | |
20 | belongs_to :issue_to, :class_name => 'Issue', :foreign_key => 'issue_to_id' |
|
20 | belongs_to :issue_to, :class_name => 'Issue', :foreign_key => 'issue_to_id' | |
21 |
|
21 | |||
22 | TYPE_RELATES = "relates" |
|
22 | TYPE_RELATES = "relates" | |
23 | TYPE_DUPLICATES = "duplicates" |
|
23 | TYPE_DUPLICATES = "duplicates" | |
24 | TYPE_DUPLICATED = "duplicated" |
|
24 | TYPE_DUPLICATED = "duplicated" | |
25 | TYPE_BLOCKS = "blocks" |
|
25 | TYPE_BLOCKS = "blocks" | |
26 | TYPE_BLOCKED = "blocked" |
|
26 | TYPE_BLOCKED = "blocked" | |
27 | TYPE_PRECEDES = "precedes" |
|
27 | TYPE_PRECEDES = "precedes" | |
28 | TYPE_FOLLOWS = "follows" |
|
28 | TYPE_FOLLOWS = "follows" | |
|
29 | TYPE_COPIED_TO = "copied_to" | |||
|
30 | TYPE_COPIED_FROM = "copied_from" | |||
29 |
|
31 | |||
30 | TYPES = { TYPE_RELATES => { :name => :label_relates_to, :sym_name => :label_relates_to, :order => 1, :sym => TYPE_RELATES }, |
|
32 | TYPES = { TYPE_RELATES => { :name => :label_relates_to, :sym_name => :label_relates_to, :order => 1, :sym => TYPE_RELATES }, | |
31 | TYPE_DUPLICATES => { :name => :label_duplicates, :sym_name => :label_duplicated_by, :order => 2, :sym => TYPE_DUPLICATED }, |
|
33 | TYPE_DUPLICATES => { :name => :label_duplicates, :sym_name => :label_duplicated_by, :order => 2, :sym => TYPE_DUPLICATED }, | |
32 | TYPE_DUPLICATED => { :name => :label_duplicated_by, :sym_name => :label_duplicates, :order => 3, :sym => TYPE_DUPLICATES, :reverse => TYPE_DUPLICATES }, |
|
34 | TYPE_DUPLICATED => { :name => :label_duplicated_by, :sym_name => :label_duplicates, :order => 3, :sym => TYPE_DUPLICATES, :reverse => TYPE_DUPLICATES }, | |
33 | TYPE_BLOCKS => { :name => :label_blocks, :sym_name => :label_blocked_by, :order => 4, :sym => TYPE_BLOCKED }, |
|
35 | TYPE_BLOCKS => { :name => :label_blocks, :sym_name => :label_blocked_by, :order => 4, :sym => TYPE_BLOCKED }, | |
34 | TYPE_BLOCKED => { :name => :label_blocked_by, :sym_name => :label_blocks, :order => 5, :sym => TYPE_BLOCKS, :reverse => TYPE_BLOCKS }, |
|
36 | TYPE_BLOCKED => { :name => :label_blocked_by, :sym_name => :label_blocks, :order => 5, :sym => TYPE_BLOCKS, :reverse => TYPE_BLOCKS }, | |
35 | TYPE_PRECEDES => { :name => :label_precedes, :sym_name => :label_follows, :order => 6, :sym => TYPE_FOLLOWS }, |
|
37 | TYPE_PRECEDES => { :name => :label_precedes, :sym_name => :label_follows, :order => 6, :sym => TYPE_FOLLOWS }, | |
36 | TYPE_FOLLOWS => { :name => :label_follows, :sym_name => :label_precedes, :order => 7, :sym => TYPE_PRECEDES, :reverse => TYPE_PRECEDES } |
|
38 | TYPE_FOLLOWS => { :name => :label_follows, :sym_name => :label_precedes, :order => 7, :sym => TYPE_PRECEDES, :reverse => TYPE_PRECEDES }, | |
|
39 | TYPE_COPIED_TO => { :name => :label_copied_to, :sym_name => :label_copied_from, :order => 8, :sym => TYPE_COPIED_FROM }, | |||
|
40 | TYPE_COPIED_FROM => { :name => :label_copied_from, :sym_name => :label_copied_to, :order => 9, :sym => TYPE_COPIED_TO, :reverse => TYPE_COPIED_TO } | |||
37 | }.freeze |
|
41 | }.freeze | |
38 |
|
42 | |||
39 | validates_presence_of :issue_from, :issue_to, :relation_type |
|
43 | validates_presence_of :issue_from, :issue_to, :relation_type | |
40 | validates_inclusion_of :relation_type, :in => TYPES.keys |
|
44 | validates_inclusion_of :relation_type, :in => TYPES.keys | |
41 | validates_numericality_of :delay, :allow_nil => true |
|
45 | validates_numericality_of :delay, :allow_nil => true | |
42 | validates_uniqueness_of :issue_to_id, :scope => :issue_from_id |
|
46 | validates_uniqueness_of :issue_to_id, :scope => :issue_from_id | |
43 |
|
47 | |||
44 | validate :validate_issue_relation |
|
48 | validate :validate_issue_relation | |
45 |
|
49 | |||
46 | attr_protected :issue_from_id, :issue_to_id |
|
50 | attr_protected :issue_from_id, :issue_to_id | |
47 |
|
51 | |||
48 | before_save :handle_issue_order |
|
52 | before_save :handle_issue_order | |
49 |
|
53 | |||
50 | def visible?(user=User.current) |
|
54 | def visible?(user=User.current) | |
51 | (issue_from.nil? || issue_from.visible?(user)) && (issue_to.nil? || issue_to.visible?(user)) |
|
55 | (issue_from.nil? || issue_from.visible?(user)) && (issue_to.nil? || issue_to.visible?(user)) | |
52 | end |
|
56 | end | |
53 |
|
57 | |||
54 | def deletable?(user=User.current) |
|
58 | def deletable?(user=User.current) | |
55 | visible?(user) && |
|
59 | visible?(user) && | |
56 | ((issue_from.nil? || user.allowed_to?(:manage_issue_relations, issue_from.project)) || |
|
60 | ((issue_from.nil? || user.allowed_to?(:manage_issue_relations, issue_from.project)) || | |
57 | (issue_to.nil? || user.allowed_to?(:manage_issue_relations, issue_to.project))) |
|
61 | (issue_to.nil? || user.allowed_to?(:manage_issue_relations, issue_to.project))) | |
58 | end |
|
62 | end | |
59 |
|
63 | |||
60 | def initialize(attributes=nil, *args) |
|
64 | def initialize(attributes=nil, *args) | |
61 | super |
|
65 | super | |
62 | if new_record? |
|
66 | if new_record? | |
63 | if relation_type.blank? |
|
67 | if relation_type.blank? | |
64 | self.relation_type = IssueRelation::TYPE_RELATES |
|
68 | self.relation_type = IssueRelation::TYPE_RELATES | |
65 | end |
|
69 | end | |
66 | end |
|
70 | end | |
67 | end |
|
71 | end | |
68 |
|
72 | |||
69 | def validate_issue_relation |
|
73 | def validate_issue_relation | |
70 | if issue_from && issue_to |
|
74 | if issue_from && issue_to | |
71 | errors.add :issue_to_id, :invalid if issue_from_id == issue_to_id |
|
75 | errors.add :issue_to_id, :invalid if issue_from_id == issue_to_id | |
72 | errors.add :issue_to_id, :not_same_project unless issue_from.project_id == issue_to.project_id || Setting.cross_project_issue_relations? |
|
76 | errors.add :issue_to_id, :not_same_project unless issue_from.project_id == issue_to.project_id || Setting.cross_project_issue_relations? | |
73 | #detect circular dependencies depending wether the relation should be reversed |
|
77 | #detect circular dependencies depending wether the relation should be reversed | |
74 | if TYPES.has_key?(relation_type) && TYPES[relation_type][:reverse] |
|
78 | if TYPES.has_key?(relation_type) && TYPES[relation_type][:reverse] | |
75 | errors.add :base, :circular_dependency if issue_from.all_dependent_issues.include? issue_to |
|
79 | errors.add :base, :circular_dependency if issue_from.all_dependent_issues.include? issue_to | |
76 | else |
|
80 | else | |
77 | errors.add :base, :circular_dependency if issue_to.all_dependent_issues.include? issue_from |
|
81 | errors.add :base, :circular_dependency if issue_to.all_dependent_issues.include? issue_from | |
78 | end |
|
82 | end | |
79 | errors.add :base, :cant_link_an_issue_with_a_descendant if issue_from.is_descendant_of?(issue_to) || issue_from.is_ancestor_of?(issue_to) |
|
83 | errors.add :base, :cant_link_an_issue_with_a_descendant if issue_from.is_descendant_of?(issue_to) || issue_from.is_ancestor_of?(issue_to) | |
80 | end |
|
84 | end | |
81 | end |
|
85 | end | |
82 |
|
86 | |||
83 | def other_issue(issue) |
|
87 | def other_issue(issue) | |
84 | (self.issue_from_id == issue.id) ? issue_to : issue_from |
|
88 | (self.issue_from_id == issue.id) ? issue_to : issue_from | |
85 | end |
|
89 | end | |
86 |
|
90 | |||
87 | # Returns the relation type for +issue+ |
|
91 | # Returns the relation type for +issue+ | |
88 | def relation_type_for(issue) |
|
92 | def relation_type_for(issue) | |
89 | if TYPES[relation_type] |
|
93 | if TYPES[relation_type] | |
90 | if self.issue_from_id == issue.id |
|
94 | if self.issue_from_id == issue.id | |
91 | relation_type |
|
95 | relation_type | |
92 | else |
|
96 | else | |
93 | TYPES[relation_type][:sym] |
|
97 | TYPES[relation_type][:sym] | |
94 | end |
|
98 | end | |
95 | end |
|
99 | end | |
96 | end |
|
100 | end | |
97 |
|
101 | |||
98 | def label_for(issue) |
|
102 | def label_for(issue) | |
99 | TYPES[relation_type] ? TYPES[relation_type][(self.issue_from_id == issue.id) ? :name : :sym_name] : :unknow |
|
103 | TYPES[relation_type] ? TYPES[relation_type][(self.issue_from_id == issue.id) ? :name : :sym_name] : :unknow | |
100 | end |
|
104 | end | |
101 |
|
105 | |||
102 | def handle_issue_order |
|
106 | def handle_issue_order | |
103 | reverse_if_needed |
|
107 | reverse_if_needed | |
104 |
|
108 | |||
105 | if TYPE_PRECEDES == relation_type |
|
109 | if TYPE_PRECEDES == relation_type | |
106 | self.delay ||= 0 |
|
110 | self.delay ||= 0 | |
107 | else |
|
111 | else | |
108 | self.delay = nil |
|
112 | self.delay = nil | |
109 | end |
|
113 | end | |
110 | set_issue_to_dates |
|
114 | set_issue_to_dates | |
111 | end |
|
115 | end | |
112 |
|
116 | |||
113 | def set_issue_to_dates |
|
117 | def set_issue_to_dates | |
114 | soonest_start = self.successor_soonest_start |
|
118 | soonest_start = self.successor_soonest_start | |
115 | if soonest_start && issue_to |
|
119 | if soonest_start && issue_to | |
116 | issue_to.reschedule_after(soonest_start) |
|
120 | issue_to.reschedule_after(soonest_start) | |
117 | end |
|
121 | end | |
118 | end |
|
122 | end | |
119 |
|
123 | |||
120 | def successor_soonest_start |
|
124 | def successor_soonest_start | |
121 | if (TYPE_PRECEDES == self.relation_type) && delay && issue_from && (issue_from.start_date || issue_from.due_date) |
|
125 | if (TYPE_PRECEDES == self.relation_type) && delay && issue_from && (issue_from.start_date || issue_from.due_date) | |
122 | (issue_from.due_date || issue_from.start_date) + 1 + delay |
|
126 | (issue_from.due_date || issue_from.start_date) + 1 + delay | |
123 | end |
|
127 | end | |
124 | end |
|
128 | end | |
125 |
|
129 | |||
126 | def <=>(relation) |
|
130 | def <=>(relation) | |
127 | TYPES[self.relation_type][:order] <=> TYPES[relation.relation_type][:order] |
|
131 | TYPES[self.relation_type][:order] <=> TYPES[relation.relation_type][:order] | |
128 | end |
|
132 | end | |
129 |
|
133 | |||
130 | private |
|
134 | private | |
131 |
|
135 | |||
132 | # Reverses the relation if needed so that it gets stored in the proper way |
|
136 | # Reverses the relation if needed so that it gets stored in the proper way | |
133 | # Should not be reversed before validation so that it can be displayed back |
|
137 | # Should not be reversed before validation so that it can be displayed back | |
134 | # as entered on new relation form |
|
138 | # as entered on new relation form | |
135 | def reverse_if_needed |
|
139 | def reverse_if_needed | |
136 | if TYPES.has_key?(relation_type) && TYPES[relation_type][:reverse] |
|
140 | if TYPES.has_key?(relation_type) && TYPES[relation_type][:reverse] | |
137 | issue_tmp = issue_to |
|
141 | issue_tmp = issue_to | |
138 | self.issue_to = issue_from |
|
142 | self.issue_to = issue_from | |
139 | self.issue_from = issue_tmp |
|
143 | self.issue_from = issue_tmp | |
140 | self.relation_type = TYPES[relation_type][:reverse] |
|
144 | self.relation_type = TYPES[relation_type][:reverse] | |
141 | end |
|
145 | end | |
142 | end |
|
146 | end | |
143 | end |
|
147 | end |
@@ -1,1062 +1,1064 | |||||
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: "can't be empty" |
|
113 | empty: "can't be empty" | |
114 | blank: "can't be blank" |
|
114 | blank: "can't 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 |
|
132 | |||
133 | actionview_instancetag_blank_option: Please select |
|
133 | actionview_instancetag_blank_option: Please select | |
134 |
|
134 | |||
135 | general_text_No: 'No' |
|
135 | general_text_No: 'No' | |
136 | general_text_Yes: 'Yes' |
|
136 | general_text_Yes: 'Yes' | |
137 | general_text_no: 'no' |
|
137 | general_text_no: 'no' | |
138 | general_text_yes: 'yes' |
|
138 | general_text_yes: 'yes' | |
139 | general_lang_name: 'English' |
|
139 | general_lang_name: 'English' | |
140 | general_csv_separator: ',' |
|
140 | general_csv_separator: ',' | |
141 | general_csv_decimal_separator: '.' |
|
141 | general_csv_decimal_separator: '.' | |
142 | general_csv_encoding: ISO-8859-1 |
|
142 | general_csv_encoding: ISO-8859-1 | |
143 | general_pdf_encoding: UTF-8 |
|
143 | general_pdf_encoding: UTF-8 | |
144 | general_first_day_of_week: '7' |
|
144 | general_first_day_of_week: '7' | |
145 |
|
145 | |||
146 | notice_account_updated: Account was successfully updated. |
|
146 | notice_account_updated: Account was successfully updated. | |
147 | notice_account_invalid_creditentials: Invalid user or password |
|
147 | notice_account_invalid_creditentials: Invalid user or password | |
148 | notice_account_password_updated: Password was successfully updated. |
|
148 | notice_account_password_updated: Password was successfully updated. | |
149 | notice_account_wrong_password: Wrong password |
|
149 | notice_account_wrong_password: Wrong password | |
150 | notice_account_register_done: Account was successfully created. To activate your account, click on the link that was emailed to you. |
|
150 | notice_account_register_done: Account was successfully created. To activate your account, click on the link that was emailed to you. | |
151 | notice_account_unknown_email: Unknown user. |
|
151 | notice_account_unknown_email: Unknown user. | |
152 | notice_can_t_change_password: This account uses an external authentication source. Impossible to change the password. |
|
152 | notice_can_t_change_password: This account uses an external authentication source. Impossible to change the password. | |
153 | notice_account_lost_email_sent: An email with instructions to choose a new password has been sent to you. |
|
153 | notice_account_lost_email_sent: An email with instructions to choose a new password has been sent to you. | |
154 | notice_account_activated: Your account has been activated. You can now log in. |
|
154 | notice_account_activated: Your account has been activated. You can now log in. | |
155 | notice_successful_create: Successful creation. |
|
155 | notice_successful_create: Successful creation. | |
156 | notice_successful_update: Successful update. |
|
156 | notice_successful_update: Successful update. | |
157 | notice_successful_delete: Successful deletion. |
|
157 | notice_successful_delete: Successful deletion. | |
158 | notice_successful_connection: Successful connection. |
|
158 | notice_successful_connection: Successful connection. | |
159 | notice_file_not_found: The page you were trying to access doesn't exist or has been removed. |
|
159 | notice_file_not_found: The page you were trying to access doesn't exist or has been removed. | |
160 | notice_locking_conflict: Data has been updated by another user. |
|
160 | notice_locking_conflict: Data has been updated by another user. | |
161 | notice_not_authorized: You are not authorized to access this page. |
|
161 | notice_not_authorized: You are not authorized to access this page. | |
162 | notice_not_authorized_archived_project: The project you're trying to access has been archived. |
|
162 | notice_not_authorized_archived_project: The project you're trying to access has been archived. | |
163 | notice_email_sent: "An email was sent to %{value}" |
|
163 | notice_email_sent: "An email was sent to %{value}" | |
164 | notice_email_error: "An error occurred while sending mail (%{value})" |
|
164 | notice_email_error: "An error occurred while sending mail (%{value})" | |
165 | notice_feeds_access_key_reseted: Your RSS access key was reset. |
|
165 | notice_feeds_access_key_reseted: Your RSS access key was reset. | |
166 | notice_api_access_key_reseted: Your API access key was reset. |
|
166 | notice_api_access_key_reseted: Your API access key was reset. | |
167 | notice_failed_to_save_issues: "Failed to save %{count} issue(s) on %{total} selected: %{ids}." |
|
167 | notice_failed_to_save_issues: "Failed to save %{count} issue(s) on %{total} selected: %{ids}." | |
168 | notice_failed_to_save_time_entries: "Failed to save %{count} time entrie(s) on %{total} selected: %{ids}." |
|
168 | notice_failed_to_save_time_entries: "Failed to save %{count} time entrie(s) on %{total} selected: %{ids}." | |
169 | notice_failed_to_save_members: "Failed to save member(s): %{errors}." |
|
169 | notice_failed_to_save_members: "Failed to save member(s): %{errors}." | |
170 | notice_no_issue_selected: "No issue is selected! Please, check the issues you want to edit." |
|
170 | notice_no_issue_selected: "No issue is selected! Please, check the issues you want to edit." | |
171 | notice_account_pending: "Your account was created and is now pending administrator approval." |
|
171 | notice_account_pending: "Your account was created and is now pending administrator approval." | |
172 | notice_default_data_loaded: Default configuration successfully loaded. |
|
172 | notice_default_data_loaded: Default configuration successfully loaded. | |
173 | notice_unable_delete_version: Unable to delete version. |
|
173 | notice_unable_delete_version: Unable to delete version. | |
174 | notice_unable_delete_time_entry: Unable to delete time log entry. |
|
174 | notice_unable_delete_time_entry: Unable to delete time log entry. | |
175 | notice_issue_done_ratios_updated: Issue done ratios updated. |
|
175 | notice_issue_done_ratios_updated: Issue done ratios updated. | |
176 | notice_gantt_chart_truncated: "The chart was truncated because it exceeds the maximum number of items that can be displayed (%{max})" |
|
176 | notice_gantt_chart_truncated: "The chart was truncated because it exceeds the maximum number of items that can be displayed (%{max})" | |
177 | notice_issue_successful_create: "Issue %{id} created." |
|
177 | notice_issue_successful_create: "Issue %{id} created." | |
178 | notice_issue_update_conflict: "The issue has been updated by an other user while you were editing it." |
|
178 | notice_issue_update_conflict: "The issue has been updated by an other user while you were editing it." | |
179 | notice_account_deleted: "Your account has been permanently deleted." |
|
179 | notice_account_deleted: "Your account has been permanently deleted." | |
180 | notice_user_successful_create: "User %{id} created." |
|
180 | notice_user_successful_create: "User %{id} created." | |
181 |
|
181 | |||
182 | error_can_t_load_default_data: "Default configuration could not be loaded: %{value}" |
|
182 | error_can_t_load_default_data: "Default configuration could not be loaded: %{value}" | |
183 | error_scm_not_found: "The entry or revision was not found in the repository." |
|
183 | error_scm_not_found: "The entry or revision was not found in the repository." | |
184 | error_scm_command_failed: "An error occurred when trying to access the repository: %{value}" |
|
184 | error_scm_command_failed: "An error occurred when trying to access the repository: %{value}" | |
185 | error_scm_annotate: "The entry does not exist or cannot be annotated." |
|
185 | error_scm_annotate: "The entry does not exist or cannot be annotated." | |
186 | error_scm_annotate_big_text_file: "The entry cannot be annotated, as it exceeds the maximum text file size." |
|
186 | error_scm_annotate_big_text_file: "The entry cannot be annotated, as it exceeds the maximum text file size." | |
187 | error_issue_not_found_in_project: 'The issue was not found or does not belong to this project' |
|
187 | error_issue_not_found_in_project: 'The issue was not found or does not belong to this project' | |
188 | error_no_tracker_in_project: 'No tracker is associated to this project. Please check the Project settings.' |
|
188 | error_no_tracker_in_project: 'No tracker is associated to this project. Please check the Project settings.' | |
189 | error_no_default_issue_status: 'No default issue status is defined. Please check your configuration (Go to "Administration -> Issue statuses").' |
|
189 | error_no_default_issue_status: 'No default issue status is defined. Please check your configuration (Go to "Administration -> Issue statuses").' | |
190 | error_can_not_delete_custom_field: Unable to delete custom field |
|
190 | error_can_not_delete_custom_field: Unable to delete custom field | |
191 | error_can_not_delete_tracker: "This tracker contains issues and cannot be deleted." |
|
191 | error_can_not_delete_tracker: "This tracker contains issues and cannot be deleted." | |
192 | error_can_not_remove_role: "This role is in use and cannot be deleted." |
|
192 | error_can_not_remove_role: "This role is in use and cannot be deleted." | |
193 | error_can_not_reopen_issue_on_closed_version: 'An issue assigned to a closed version cannot be reopened' |
|
193 | error_can_not_reopen_issue_on_closed_version: 'An issue assigned to a closed version cannot be reopened' | |
194 | error_can_not_archive_project: This project cannot be archived |
|
194 | error_can_not_archive_project: This project cannot be archived | |
195 | error_issue_done_ratios_not_updated: "Issue done ratios not updated." |
|
195 | error_issue_done_ratios_not_updated: "Issue done ratios not updated." | |
196 | error_workflow_copy_source: 'Please select a source tracker or role' |
|
196 | error_workflow_copy_source: 'Please select a source tracker or role' | |
197 | error_workflow_copy_target: 'Please select target tracker(s) and role(s)' |
|
197 | error_workflow_copy_target: 'Please select target tracker(s) and role(s)' | |
198 | error_unable_delete_issue_status: 'Unable to delete issue status' |
|
198 | error_unable_delete_issue_status: 'Unable to delete issue status' | |
199 | error_unable_to_connect: "Unable to connect (%{value})" |
|
199 | error_unable_to_connect: "Unable to connect (%{value})" | |
200 | error_attachment_too_big: "This file cannot be uploaded because it exceeds the maximum allowed file size (%{max_size})" |
|
200 | error_attachment_too_big: "This file cannot be uploaded because it exceeds the maximum allowed file size (%{max_size})" | |
201 | error_session_expired: "Your session has expired. Please login again." |
|
201 | error_session_expired: "Your session has expired. Please login again." | |
202 | warning_attachments_not_saved: "%{count} file(s) could not be saved." |
|
202 | warning_attachments_not_saved: "%{count} file(s) could not be saved." | |
203 |
|
203 | |||
204 | mail_subject_lost_password: "Your %{value} password" |
|
204 | mail_subject_lost_password: "Your %{value} password" | |
205 | mail_body_lost_password: 'To change your password, click on the following link:' |
|
205 | mail_body_lost_password: 'To change your password, click on the following link:' | |
206 | mail_subject_register: "Your %{value} account activation" |
|
206 | mail_subject_register: "Your %{value} account activation" | |
207 | mail_body_register: 'To activate your account, click on the following link:' |
|
207 | mail_body_register: 'To activate your account, click on the following link:' | |
208 | mail_body_account_information_external: "You can use your %{value} account to log in." |
|
208 | mail_body_account_information_external: "You can use your %{value} account to log in." | |
209 | mail_body_account_information: Your account information |
|
209 | mail_body_account_information: Your account information | |
210 | mail_subject_account_activation_request: "%{value} account activation request" |
|
210 | mail_subject_account_activation_request: "%{value} account activation request" | |
211 | mail_body_account_activation_request: "A new user (%{value}) has registered. The account is pending your approval:" |
|
211 | mail_body_account_activation_request: "A new user (%{value}) has registered. The account is pending your approval:" | |
212 | mail_subject_reminder: "%{count} issue(s) due in the next %{days} days" |
|
212 | mail_subject_reminder: "%{count} issue(s) due in the next %{days} days" | |
213 | mail_body_reminder: "%{count} issue(s) that are assigned to you are due in the next %{days} days:" |
|
213 | mail_body_reminder: "%{count} issue(s) that are assigned to you are due in the next %{days} days:" | |
214 | mail_subject_wiki_content_added: "'%{id}' wiki page has been added" |
|
214 | mail_subject_wiki_content_added: "'%{id}' wiki page has been added" | |
215 | mail_body_wiki_content_added: "The '%{id}' wiki page has been added by %{author}." |
|
215 | mail_body_wiki_content_added: "The '%{id}' wiki page has been added by %{author}." | |
216 | mail_subject_wiki_content_updated: "'%{id}' wiki page has been updated" |
|
216 | mail_subject_wiki_content_updated: "'%{id}' wiki page has been updated" | |
217 | mail_body_wiki_content_updated: "The '%{id}' wiki page has been updated by %{author}." |
|
217 | mail_body_wiki_content_updated: "The '%{id}' wiki page has been updated by %{author}." | |
218 |
|
218 | |||
219 | gui_validation_error: 1 error |
|
219 | gui_validation_error: 1 error | |
220 | gui_validation_error_plural: "%{count} errors" |
|
220 | gui_validation_error_plural: "%{count} errors" | |
221 |
|
221 | |||
222 | field_name: Name |
|
222 | field_name: Name | |
223 | field_description: Description |
|
223 | field_description: Description | |
224 | field_summary: Summary |
|
224 | field_summary: Summary | |
225 | field_is_required: Required |
|
225 | field_is_required: Required | |
226 | field_firstname: First name |
|
226 | field_firstname: First name | |
227 | field_lastname: Last name |
|
227 | field_lastname: Last name | |
228 | field_mail: Email |
|
228 | field_mail: Email | |
229 | field_filename: File |
|
229 | field_filename: File | |
230 | field_filesize: Size |
|
230 | field_filesize: Size | |
231 | field_downloads: Downloads |
|
231 | field_downloads: Downloads | |
232 | field_author: Author |
|
232 | field_author: Author | |
233 | field_created_on: Created |
|
233 | field_created_on: Created | |
234 | field_updated_on: Updated |
|
234 | field_updated_on: Updated | |
235 | field_field_format: Format |
|
235 | field_field_format: Format | |
236 | field_is_for_all: For all projects |
|
236 | field_is_for_all: For all projects | |
237 | field_possible_values: Possible values |
|
237 | field_possible_values: Possible values | |
238 | field_regexp: Regular expression |
|
238 | field_regexp: Regular expression | |
239 | field_min_length: Minimum length |
|
239 | field_min_length: Minimum length | |
240 | field_max_length: Maximum length |
|
240 | field_max_length: Maximum length | |
241 | field_value: Value |
|
241 | field_value: Value | |
242 | field_category: Category |
|
242 | field_category: Category | |
243 | field_title: Title |
|
243 | field_title: Title | |
244 | field_project: Project |
|
244 | field_project: Project | |
245 | field_issue: Issue |
|
245 | field_issue: Issue | |
246 | field_status: Status |
|
246 | field_status: Status | |
247 | field_notes: Notes |
|
247 | field_notes: Notes | |
248 | field_is_closed: Issue closed |
|
248 | field_is_closed: Issue closed | |
249 | field_is_default: Default value |
|
249 | field_is_default: Default value | |
250 | field_tracker: Tracker |
|
250 | field_tracker: Tracker | |
251 | field_subject: Subject |
|
251 | field_subject: Subject | |
252 | field_due_date: Due date |
|
252 | field_due_date: Due date | |
253 | field_assigned_to: Assignee |
|
253 | field_assigned_to: Assignee | |
254 | field_priority: Priority |
|
254 | field_priority: Priority | |
255 | field_fixed_version: Target version |
|
255 | field_fixed_version: Target version | |
256 | field_user: User |
|
256 | field_user: User | |
257 | field_principal: Principal |
|
257 | field_principal: Principal | |
258 | field_role: Role |
|
258 | field_role: Role | |
259 | field_homepage: Homepage |
|
259 | field_homepage: Homepage | |
260 | field_is_public: Public |
|
260 | field_is_public: Public | |
261 | field_parent: Subproject of |
|
261 | field_parent: Subproject of | |
262 | field_is_in_roadmap: Issues displayed in roadmap |
|
262 | field_is_in_roadmap: Issues displayed in roadmap | |
263 | field_login: Login |
|
263 | field_login: Login | |
264 | field_mail_notification: Email notifications |
|
264 | field_mail_notification: Email notifications | |
265 | field_admin: Administrator |
|
265 | field_admin: Administrator | |
266 | field_last_login_on: Last connection |
|
266 | field_last_login_on: Last connection | |
267 | field_language: Language |
|
267 | field_language: Language | |
268 | field_effective_date: Date |
|
268 | field_effective_date: Date | |
269 | field_password: Password |
|
269 | field_password: Password | |
270 | field_new_password: New password |
|
270 | field_new_password: New password | |
271 | field_password_confirmation: Confirmation |
|
271 | field_password_confirmation: Confirmation | |
272 | field_version: Version |
|
272 | field_version: Version | |
273 | field_type: Type |
|
273 | field_type: Type | |
274 | field_host: Host |
|
274 | field_host: Host | |
275 | field_port: Port |
|
275 | field_port: Port | |
276 | field_account: Account |
|
276 | field_account: Account | |
277 | field_base_dn: Base DN |
|
277 | field_base_dn: Base DN | |
278 | field_attr_login: Login attribute |
|
278 | field_attr_login: Login attribute | |
279 | field_attr_firstname: Firstname attribute |
|
279 | field_attr_firstname: Firstname attribute | |
280 | field_attr_lastname: Lastname attribute |
|
280 | field_attr_lastname: Lastname attribute | |
281 | field_attr_mail: Email attribute |
|
281 | field_attr_mail: Email attribute | |
282 | field_onthefly: On-the-fly user creation |
|
282 | field_onthefly: On-the-fly user creation | |
283 | field_start_date: Start date |
|
283 | field_start_date: Start date | |
284 | field_done_ratio: "% Done" |
|
284 | field_done_ratio: "% Done" | |
285 | field_auth_source: Authentication mode |
|
285 | field_auth_source: Authentication mode | |
286 | field_hide_mail: Hide my email address |
|
286 | field_hide_mail: Hide my email address | |
287 | field_comments: Comment |
|
287 | field_comments: Comment | |
288 | field_url: URL |
|
288 | field_url: URL | |
289 | field_start_page: Start page |
|
289 | field_start_page: Start page | |
290 | field_subproject: Subproject |
|
290 | field_subproject: Subproject | |
291 | field_hours: Hours |
|
291 | field_hours: Hours | |
292 | field_activity: Activity |
|
292 | field_activity: Activity | |
293 | field_spent_on: Date |
|
293 | field_spent_on: Date | |
294 | field_identifier: Identifier |
|
294 | field_identifier: Identifier | |
295 | field_is_filter: Used as a filter |
|
295 | field_is_filter: Used as a filter | |
296 | field_issue_to: Related issue |
|
296 | field_issue_to: Related issue | |
297 | field_delay: Delay |
|
297 | field_delay: Delay | |
298 | field_assignable: Issues can be assigned to this role |
|
298 | field_assignable: Issues can be assigned to this role | |
299 | field_redirect_existing_links: Redirect existing links |
|
299 | field_redirect_existing_links: Redirect existing links | |
300 | field_estimated_hours: Estimated time |
|
300 | field_estimated_hours: Estimated time | |
301 | field_column_names: Columns |
|
301 | field_column_names: Columns | |
302 | field_time_entries: Log time |
|
302 | field_time_entries: Log time | |
303 | field_time_zone: Time zone |
|
303 | field_time_zone: Time zone | |
304 | field_searchable: Searchable |
|
304 | field_searchable: Searchable | |
305 | field_default_value: Default value |
|
305 | field_default_value: Default value | |
306 | field_comments_sorting: Display comments |
|
306 | field_comments_sorting: Display comments | |
307 | field_parent_title: Parent page |
|
307 | field_parent_title: Parent page | |
308 | field_editable: Editable |
|
308 | field_editable: Editable | |
309 | field_watcher: Watcher |
|
309 | field_watcher: Watcher | |
310 | field_identity_url: OpenID URL |
|
310 | field_identity_url: OpenID URL | |
311 | field_content: Content |
|
311 | field_content: Content | |
312 | field_group_by: Group results by |
|
312 | field_group_by: Group results by | |
313 | field_sharing: Sharing |
|
313 | field_sharing: Sharing | |
314 | field_parent_issue: Parent task |
|
314 | field_parent_issue: Parent task | |
315 | field_member_of_group: "Assignee's group" |
|
315 | field_member_of_group: "Assignee's group" | |
316 | field_assigned_to_role: "Assignee's role" |
|
316 | field_assigned_to_role: "Assignee's role" | |
317 | field_text: Text field |
|
317 | field_text: Text field | |
318 | field_visible: Visible |
|
318 | field_visible: Visible | |
319 | field_warn_on_leaving_unsaved: "Warn me when leaving a page with unsaved text" |
|
319 | field_warn_on_leaving_unsaved: "Warn me when leaving a page with unsaved text" | |
320 | field_issues_visibility: Issues visibility |
|
320 | field_issues_visibility: Issues visibility | |
321 | field_is_private: Private |
|
321 | field_is_private: Private | |
322 | field_commit_logs_encoding: Commit messages encoding |
|
322 | field_commit_logs_encoding: Commit messages encoding | |
323 | field_scm_path_encoding: Path encoding |
|
323 | field_scm_path_encoding: Path encoding | |
324 | field_path_to_repository: Path to repository |
|
324 | field_path_to_repository: Path to repository | |
325 | field_root_directory: Root directory |
|
325 | field_root_directory: Root directory | |
326 | field_cvsroot: CVSROOT |
|
326 | field_cvsroot: CVSROOT | |
327 | field_cvs_module: Module |
|
327 | field_cvs_module: Module | |
328 | field_repository_is_default: Main repository |
|
328 | field_repository_is_default: Main repository | |
329 | field_multiple: Multiple values |
|
329 | field_multiple: Multiple values | |
330 | field_auth_source_ldap_filter: LDAP filter |
|
330 | field_auth_source_ldap_filter: LDAP filter | |
331 | field_core_fields: Standard fields |
|
331 | field_core_fields: Standard fields | |
332 | field_timeout: "Timeout (in seconds)" |
|
332 | field_timeout: "Timeout (in seconds)" | |
333 | field_board_parent: Parent forum |
|
333 | field_board_parent: Parent forum | |
334 |
|
334 | |||
335 | setting_app_title: Application title |
|
335 | setting_app_title: Application title | |
336 | setting_app_subtitle: Application subtitle |
|
336 | setting_app_subtitle: Application subtitle | |
337 | setting_welcome_text: Welcome text |
|
337 | setting_welcome_text: Welcome text | |
338 | setting_default_language: Default language |
|
338 | setting_default_language: Default language | |
339 | setting_login_required: Authentication required |
|
339 | setting_login_required: Authentication required | |
340 | setting_self_registration: Self-registration |
|
340 | setting_self_registration: Self-registration | |
341 | setting_attachment_max_size: Maximum attachment size |
|
341 | setting_attachment_max_size: Maximum attachment size | |
342 | setting_issues_export_limit: Issues export limit |
|
342 | setting_issues_export_limit: Issues export limit | |
343 | setting_mail_from: Emission email address |
|
343 | setting_mail_from: Emission email address | |
344 | setting_bcc_recipients: Blind carbon copy recipients (bcc) |
|
344 | setting_bcc_recipients: Blind carbon copy recipients (bcc) | |
345 | setting_plain_text_mail: Plain text mail (no HTML) |
|
345 | setting_plain_text_mail: Plain text mail (no HTML) | |
346 | setting_host_name: Host name and path |
|
346 | setting_host_name: Host name and path | |
347 | setting_text_formatting: Text formatting |
|
347 | setting_text_formatting: Text formatting | |
348 | setting_wiki_compression: Wiki history compression |
|
348 | setting_wiki_compression: Wiki history compression | |
349 | setting_feeds_limit: Maximum number of items in Atom feeds |
|
349 | setting_feeds_limit: Maximum number of items in Atom feeds | |
350 | setting_default_projects_public: New projects are public by default |
|
350 | setting_default_projects_public: New projects are public by default | |
351 | setting_autofetch_changesets: Fetch commits automatically |
|
351 | setting_autofetch_changesets: Fetch commits automatically | |
352 | setting_sys_api_enabled: Enable WS for repository management |
|
352 | setting_sys_api_enabled: Enable WS for repository management | |
353 | setting_commit_ref_keywords: Referencing keywords |
|
353 | setting_commit_ref_keywords: Referencing keywords | |
354 | setting_commit_fix_keywords: Fixing keywords |
|
354 | setting_commit_fix_keywords: Fixing keywords | |
355 | setting_autologin: Autologin |
|
355 | setting_autologin: Autologin | |
356 | setting_date_format: Date format |
|
356 | setting_date_format: Date format | |
357 | setting_time_format: Time format |
|
357 | setting_time_format: Time format | |
358 | setting_cross_project_issue_relations: Allow cross-project issue relations |
|
358 | setting_cross_project_issue_relations: Allow cross-project issue relations | |
359 | setting_issue_list_default_columns: Default columns displayed on the issue list |
|
359 | setting_issue_list_default_columns: Default columns displayed on the issue list | |
360 | setting_repositories_encodings: Attachments and repositories encodings |
|
360 | setting_repositories_encodings: Attachments and repositories encodings | |
361 | setting_emails_header: Emails header |
|
361 | setting_emails_header: Emails header | |
362 | setting_emails_footer: Emails footer |
|
362 | setting_emails_footer: Emails footer | |
363 | setting_protocol: Protocol |
|
363 | setting_protocol: Protocol | |
364 | setting_per_page_options: Objects per page options |
|
364 | setting_per_page_options: Objects per page options | |
365 | setting_user_format: Users display format |
|
365 | setting_user_format: Users display format | |
366 | setting_activity_days_default: Days displayed on project activity |
|
366 | setting_activity_days_default: Days displayed on project activity | |
367 | setting_display_subprojects_issues: Display subprojects issues on main projects by default |
|
367 | setting_display_subprojects_issues: Display subprojects issues on main projects by default | |
368 | setting_enabled_scm: Enabled SCM |
|
368 | setting_enabled_scm: Enabled SCM | |
369 | setting_mail_handler_body_delimiters: "Truncate emails after one of these lines" |
|
369 | setting_mail_handler_body_delimiters: "Truncate emails after one of these lines" | |
370 | setting_mail_handler_api_enabled: Enable WS for incoming emails |
|
370 | setting_mail_handler_api_enabled: Enable WS for incoming emails | |
371 | setting_mail_handler_api_key: API key |
|
371 | setting_mail_handler_api_key: API key | |
372 | setting_sequential_project_identifiers: Generate sequential project identifiers |
|
372 | setting_sequential_project_identifiers: Generate sequential project identifiers | |
373 | setting_gravatar_enabled: Use Gravatar user icons |
|
373 | setting_gravatar_enabled: Use Gravatar user icons | |
374 | setting_gravatar_default: Default Gravatar image |
|
374 | setting_gravatar_default: Default Gravatar image | |
375 | setting_diff_max_lines_displayed: Maximum number of diff lines displayed |
|
375 | setting_diff_max_lines_displayed: Maximum number of diff lines displayed | |
376 | setting_file_max_size_displayed: Maximum size of text files displayed inline |
|
376 | setting_file_max_size_displayed: Maximum size of text files displayed inline | |
377 | setting_repository_log_display_limit: Maximum number of revisions displayed on file log |
|
377 | setting_repository_log_display_limit: Maximum number of revisions displayed on file log | |
378 | setting_openid: Allow OpenID login and registration |
|
378 | setting_openid: Allow OpenID login and registration | |
379 | setting_password_min_length: Minimum password length |
|
379 | setting_password_min_length: Minimum password length | |
380 | setting_new_project_user_role_id: Role given to a non-admin user who creates a project |
|
380 | setting_new_project_user_role_id: Role given to a non-admin user who creates a project | |
381 | setting_default_projects_modules: Default enabled modules for new projects |
|
381 | setting_default_projects_modules: Default enabled modules for new projects | |
382 | setting_issue_done_ratio: Calculate the issue done ratio with |
|
382 | setting_issue_done_ratio: Calculate the issue done ratio with | |
383 | setting_issue_done_ratio_issue_field: Use the issue field |
|
383 | setting_issue_done_ratio_issue_field: Use the issue field | |
384 | setting_issue_done_ratio_issue_status: Use the issue status |
|
384 | setting_issue_done_ratio_issue_status: Use the issue status | |
385 | setting_start_of_week: Start calendars on |
|
385 | setting_start_of_week: Start calendars on | |
386 | setting_rest_api_enabled: Enable REST web service |
|
386 | setting_rest_api_enabled: Enable REST web service | |
387 | setting_cache_formatted_text: Cache formatted text |
|
387 | setting_cache_formatted_text: Cache formatted text | |
388 | setting_default_notification_option: Default notification option |
|
388 | setting_default_notification_option: Default notification option | |
389 | setting_commit_logtime_enabled: Enable time logging |
|
389 | setting_commit_logtime_enabled: Enable time logging | |
390 | setting_commit_logtime_activity_id: Activity for logged time |
|
390 | setting_commit_logtime_activity_id: Activity for logged time | |
391 | setting_gantt_items_limit: Maximum number of items displayed on the gantt chart |
|
391 | setting_gantt_items_limit: Maximum number of items displayed on the gantt chart | |
392 | setting_issue_group_assignment: Allow issue assignment to groups |
|
392 | setting_issue_group_assignment: Allow issue assignment to groups | |
393 | setting_default_issue_start_date_to_creation_date: Use current date as start date for new issues |
|
393 | setting_default_issue_start_date_to_creation_date: Use current date as start date for new issues | |
394 | setting_commit_cross_project_ref: Allow issues of all the other projects to be referenced and fixed |
|
394 | setting_commit_cross_project_ref: Allow issues of all the other projects to be referenced and fixed | |
395 | setting_unsubscribe: Allow users to delete their own account |
|
395 | setting_unsubscribe: Allow users to delete their own account | |
396 | setting_session_lifetime: Session maximum lifetime |
|
396 | setting_session_lifetime: Session maximum lifetime | |
397 | setting_session_timeout: Session inactivity timeout |
|
397 | setting_session_timeout: Session inactivity timeout | |
398 | setting_thumbnails_enabled: Display attachment thumbnails |
|
398 | setting_thumbnails_enabled: Display attachment thumbnails | |
399 | setting_thumbnails_size: Thumbnails size (in pixels) |
|
399 | setting_thumbnails_size: Thumbnails size (in pixels) | |
400 |
|
400 | |||
401 | permission_add_project: Create project |
|
401 | permission_add_project: Create project | |
402 | permission_add_subprojects: Create subprojects |
|
402 | permission_add_subprojects: Create subprojects | |
403 | permission_edit_project: Edit project |
|
403 | permission_edit_project: Edit project | |
404 | permission_close_project: Close / reopen the project |
|
404 | permission_close_project: Close / reopen the project | |
405 | permission_select_project_modules: Select project modules |
|
405 | permission_select_project_modules: Select project modules | |
406 | permission_manage_members: Manage members |
|
406 | permission_manage_members: Manage members | |
407 | permission_manage_project_activities: Manage project activities |
|
407 | permission_manage_project_activities: Manage project activities | |
408 | permission_manage_versions: Manage versions |
|
408 | permission_manage_versions: Manage versions | |
409 | permission_manage_categories: Manage issue categories |
|
409 | permission_manage_categories: Manage issue categories | |
410 | permission_view_issues: View Issues |
|
410 | permission_view_issues: View Issues | |
411 | permission_add_issues: Add issues |
|
411 | permission_add_issues: Add issues | |
412 | permission_edit_issues: Edit issues |
|
412 | permission_edit_issues: Edit issues | |
413 | permission_manage_issue_relations: Manage issue relations |
|
413 | permission_manage_issue_relations: Manage issue relations | |
414 | permission_set_issues_private: Set issues public or private |
|
414 | permission_set_issues_private: Set issues public or private | |
415 | permission_set_own_issues_private: Set own issues public or private |
|
415 | permission_set_own_issues_private: Set own issues public or private | |
416 | permission_add_issue_notes: Add notes |
|
416 | permission_add_issue_notes: Add notes | |
417 | permission_edit_issue_notes: Edit notes |
|
417 | permission_edit_issue_notes: Edit notes | |
418 | permission_edit_own_issue_notes: Edit own notes |
|
418 | permission_edit_own_issue_notes: Edit own notes | |
419 | permission_move_issues: Move issues |
|
419 | permission_move_issues: Move issues | |
420 | permission_delete_issues: Delete issues |
|
420 | permission_delete_issues: Delete issues | |
421 | permission_manage_public_queries: Manage public queries |
|
421 | permission_manage_public_queries: Manage public queries | |
422 | permission_save_queries: Save queries |
|
422 | permission_save_queries: Save queries | |
423 | permission_view_gantt: View gantt chart |
|
423 | permission_view_gantt: View gantt chart | |
424 | permission_view_calendar: View calendar |
|
424 | permission_view_calendar: View calendar | |
425 | permission_view_issue_watchers: View watchers list |
|
425 | permission_view_issue_watchers: View watchers list | |
426 | permission_add_issue_watchers: Add watchers |
|
426 | permission_add_issue_watchers: Add watchers | |
427 | permission_delete_issue_watchers: Delete watchers |
|
427 | permission_delete_issue_watchers: Delete watchers | |
428 | permission_log_time: Log spent time |
|
428 | permission_log_time: Log spent time | |
429 | permission_view_time_entries: View spent time |
|
429 | permission_view_time_entries: View spent time | |
430 | permission_edit_time_entries: Edit time logs |
|
430 | permission_edit_time_entries: Edit time logs | |
431 | permission_edit_own_time_entries: Edit own time logs |
|
431 | permission_edit_own_time_entries: Edit own time logs | |
432 | permission_manage_news: Manage news |
|
432 | permission_manage_news: Manage news | |
433 | permission_comment_news: Comment news |
|
433 | permission_comment_news: Comment news | |
434 | permission_manage_documents: Manage documents |
|
434 | permission_manage_documents: Manage documents | |
435 | permission_view_documents: View documents |
|
435 | permission_view_documents: View documents | |
436 | permission_manage_files: Manage files |
|
436 | permission_manage_files: Manage files | |
437 | permission_view_files: View files |
|
437 | permission_view_files: View files | |
438 | permission_manage_wiki: Manage wiki |
|
438 | permission_manage_wiki: Manage wiki | |
439 | permission_rename_wiki_pages: Rename wiki pages |
|
439 | permission_rename_wiki_pages: Rename wiki pages | |
440 | permission_delete_wiki_pages: Delete wiki pages |
|
440 | permission_delete_wiki_pages: Delete wiki pages | |
441 | permission_view_wiki_pages: View wiki |
|
441 | permission_view_wiki_pages: View wiki | |
442 | permission_view_wiki_edits: View wiki history |
|
442 | permission_view_wiki_edits: View wiki history | |
443 | permission_edit_wiki_pages: Edit wiki pages |
|
443 | permission_edit_wiki_pages: Edit wiki pages | |
444 | permission_delete_wiki_pages_attachments: Delete attachments |
|
444 | permission_delete_wiki_pages_attachments: Delete attachments | |
445 | permission_protect_wiki_pages: Protect wiki pages |
|
445 | permission_protect_wiki_pages: Protect wiki pages | |
446 | permission_manage_repository: Manage repository |
|
446 | permission_manage_repository: Manage repository | |
447 | permission_browse_repository: Browse repository |
|
447 | permission_browse_repository: Browse repository | |
448 | permission_view_changesets: View changesets |
|
448 | permission_view_changesets: View changesets | |
449 | permission_commit_access: Commit access |
|
449 | permission_commit_access: Commit access | |
450 | permission_manage_boards: Manage forums |
|
450 | permission_manage_boards: Manage forums | |
451 | permission_view_messages: View messages |
|
451 | permission_view_messages: View messages | |
452 | permission_add_messages: Post messages |
|
452 | permission_add_messages: Post messages | |
453 | permission_edit_messages: Edit messages |
|
453 | permission_edit_messages: Edit messages | |
454 | permission_edit_own_messages: Edit own messages |
|
454 | permission_edit_own_messages: Edit own messages | |
455 | permission_delete_messages: Delete messages |
|
455 | permission_delete_messages: Delete messages | |
456 | permission_delete_own_messages: Delete own messages |
|
456 | permission_delete_own_messages: Delete own messages | |
457 | permission_export_wiki_pages: Export wiki pages |
|
457 | permission_export_wiki_pages: Export wiki pages | |
458 | permission_manage_subtasks: Manage subtasks |
|
458 | permission_manage_subtasks: Manage subtasks | |
459 | permission_manage_related_issues: Manage related issues |
|
459 | permission_manage_related_issues: Manage related issues | |
460 |
|
460 | |||
461 | project_module_issue_tracking: Issue tracking |
|
461 | project_module_issue_tracking: Issue tracking | |
462 | project_module_time_tracking: Time tracking |
|
462 | project_module_time_tracking: Time tracking | |
463 | project_module_news: News |
|
463 | project_module_news: News | |
464 | project_module_documents: Documents |
|
464 | project_module_documents: Documents | |
465 | project_module_files: Files |
|
465 | project_module_files: Files | |
466 | project_module_wiki: Wiki |
|
466 | project_module_wiki: Wiki | |
467 | project_module_repository: Repository |
|
467 | project_module_repository: Repository | |
468 | project_module_boards: Forums |
|
468 | project_module_boards: Forums | |
469 | project_module_calendar: Calendar |
|
469 | project_module_calendar: Calendar | |
470 | project_module_gantt: Gantt |
|
470 | project_module_gantt: Gantt | |
471 |
|
471 | |||
472 | label_user: User |
|
472 | label_user: User | |
473 | label_user_plural: Users |
|
473 | label_user_plural: Users | |
474 | label_user_new: New user |
|
474 | label_user_new: New user | |
475 | label_user_anonymous: Anonymous |
|
475 | label_user_anonymous: Anonymous | |
476 | label_project: Project |
|
476 | label_project: Project | |
477 | label_project_new: New project |
|
477 | label_project_new: New project | |
478 | label_project_plural: Projects |
|
478 | label_project_plural: Projects | |
479 | label_x_projects: |
|
479 | label_x_projects: | |
480 | zero: no projects |
|
480 | zero: no projects | |
481 | one: 1 project |
|
481 | one: 1 project | |
482 | other: "%{count} projects" |
|
482 | other: "%{count} projects" | |
483 | label_project_all: All Projects |
|
483 | label_project_all: All Projects | |
484 | label_project_latest: Latest projects |
|
484 | label_project_latest: Latest projects | |
485 | label_issue: Issue |
|
485 | label_issue: Issue | |
486 | label_issue_new: New issue |
|
486 | label_issue_new: New issue | |
487 | label_issue_plural: Issues |
|
487 | label_issue_plural: Issues | |
488 | label_issue_view_all: View all issues |
|
488 | label_issue_view_all: View all issues | |
489 | label_issues_by: "Issues by %{value}" |
|
489 | label_issues_by: "Issues by %{value}" | |
490 | label_issue_added: Issue added |
|
490 | label_issue_added: Issue added | |
491 | label_issue_updated: Issue updated |
|
491 | label_issue_updated: Issue updated | |
492 | label_issue_note_added: Note added |
|
492 | label_issue_note_added: Note added | |
493 | label_issue_status_updated: Status updated |
|
493 | label_issue_status_updated: Status updated | |
494 | label_issue_priority_updated: Priority updated |
|
494 | label_issue_priority_updated: Priority updated | |
495 | label_document: Document |
|
495 | label_document: Document | |
496 | label_document_new: New document |
|
496 | label_document_new: New document | |
497 | label_document_plural: Documents |
|
497 | label_document_plural: Documents | |
498 | label_document_added: Document added |
|
498 | label_document_added: Document added | |
499 | label_role: Role |
|
499 | label_role: Role | |
500 | label_role_plural: Roles |
|
500 | label_role_plural: Roles | |
501 | label_role_new: New role |
|
501 | label_role_new: New role | |
502 | label_role_and_permissions: Roles and permissions |
|
502 | label_role_and_permissions: Roles and permissions | |
503 | label_role_anonymous: Anonymous |
|
503 | label_role_anonymous: Anonymous | |
504 | label_role_non_member: Non member |
|
504 | label_role_non_member: Non member | |
505 | label_member: Member |
|
505 | label_member: Member | |
506 | label_member_new: New member |
|
506 | label_member_new: New member | |
507 | label_member_plural: Members |
|
507 | label_member_plural: Members | |
508 | label_tracker: Tracker |
|
508 | label_tracker: Tracker | |
509 | label_tracker_plural: Trackers |
|
509 | label_tracker_plural: Trackers | |
510 | label_tracker_new: New tracker |
|
510 | label_tracker_new: New tracker | |
511 | label_workflow: Workflow |
|
511 | label_workflow: Workflow | |
512 | label_issue_status: Issue status |
|
512 | label_issue_status: Issue status | |
513 | label_issue_status_plural: Issue statuses |
|
513 | label_issue_status_plural: Issue statuses | |
514 | label_issue_status_new: New status |
|
514 | label_issue_status_new: New status | |
515 | label_issue_category: Issue category |
|
515 | label_issue_category: Issue category | |
516 | label_issue_category_plural: Issue categories |
|
516 | label_issue_category_plural: Issue categories | |
517 | label_issue_category_new: New category |
|
517 | label_issue_category_new: New category | |
518 | label_custom_field: Custom field |
|
518 | label_custom_field: Custom field | |
519 | label_custom_field_plural: Custom fields |
|
519 | label_custom_field_plural: Custom fields | |
520 | label_custom_field_new: New custom field |
|
520 | label_custom_field_new: New custom field | |
521 | label_enumerations: Enumerations |
|
521 | label_enumerations: Enumerations | |
522 | label_enumeration_new: New value |
|
522 | label_enumeration_new: New value | |
523 | label_information: Information |
|
523 | label_information: Information | |
524 | label_information_plural: Information |
|
524 | label_information_plural: Information | |
525 | label_please_login: Please log in |
|
525 | label_please_login: Please log in | |
526 | label_register: Register |
|
526 | label_register: Register | |
527 | label_login_with_open_id_option: or login with OpenID |
|
527 | label_login_with_open_id_option: or login with OpenID | |
528 | label_password_lost: Lost password |
|
528 | label_password_lost: Lost password | |
529 | label_home: Home |
|
529 | label_home: Home | |
530 | label_my_page: My page |
|
530 | label_my_page: My page | |
531 | label_my_account: My account |
|
531 | label_my_account: My account | |
532 | label_my_projects: My projects |
|
532 | label_my_projects: My projects | |
533 | label_my_page_block: My page block |
|
533 | label_my_page_block: My page block | |
534 | label_administration: Administration |
|
534 | label_administration: Administration | |
535 | label_login: Sign in |
|
535 | label_login: Sign in | |
536 | label_logout: Sign out |
|
536 | label_logout: Sign out | |
537 | label_help: Help |
|
537 | label_help: Help | |
538 | label_reported_issues: Reported issues |
|
538 | label_reported_issues: Reported issues | |
539 | label_assigned_to_me_issues: Issues assigned to me |
|
539 | label_assigned_to_me_issues: Issues assigned to me | |
540 | label_last_login: Last connection |
|
540 | label_last_login: Last connection | |
541 | label_registered_on: Registered on |
|
541 | label_registered_on: Registered on | |
542 | label_activity: Activity |
|
542 | label_activity: Activity | |
543 | label_overall_activity: Overall activity |
|
543 | label_overall_activity: Overall activity | |
544 | label_user_activity: "%{value}'s activity" |
|
544 | label_user_activity: "%{value}'s activity" | |
545 | label_new: New |
|
545 | label_new: New | |
546 | label_logged_as: Logged in as |
|
546 | label_logged_as: Logged in as | |
547 | label_environment: Environment |
|
547 | label_environment: Environment | |
548 | label_authentication: Authentication |
|
548 | label_authentication: Authentication | |
549 | label_auth_source: Authentication mode |
|
549 | label_auth_source: Authentication mode | |
550 | label_auth_source_new: New authentication mode |
|
550 | label_auth_source_new: New authentication mode | |
551 | label_auth_source_plural: Authentication modes |
|
551 | label_auth_source_plural: Authentication modes | |
552 | label_subproject_plural: Subprojects |
|
552 | label_subproject_plural: Subprojects | |
553 | label_subproject_new: New subproject |
|
553 | label_subproject_new: New subproject | |
554 | label_and_its_subprojects: "%{value} and its subprojects" |
|
554 | label_and_its_subprojects: "%{value} and its subprojects" | |
555 | label_min_max_length: Min - Max length |
|
555 | label_min_max_length: Min - Max length | |
556 | label_list: List |
|
556 | label_list: List | |
557 | label_date: Date |
|
557 | label_date: Date | |
558 | label_integer: Integer |
|
558 | label_integer: Integer | |
559 | label_float: Float |
|
559 | label_float: Float | |
560 | label_boolean: Boolean |
|
560 | label_boolean: Boolean | |
561 | label_string: Text |
|
561 | label_string: Text | |
562 | label_text: Long text |
|
562 | label_text: Long text | |
563 | label_attribute: Attribute |
|
563 | label_attribute: Attribute | |
564 | label_attribute_plural: Attributes |
|
564 | label_attribute_plural: Attributes | |
565 | label_download: "%{count} Download" |
|
565 | label_download: "%{count} Download" | |
566 | label_download_plural: "%{count} Downloads" |
|
566 | label_download_plural: "%{count} Downloads" | |
567 | label_no_data: No data to display |
|
567 | label_no_data: No data to display | |
568 | label_change_status: Change status |
|
568 | label_change_status: Change status | |
569 | label_history: History |
|
569 | label_history: History | |
570 | label_attachment: File |
|
570 | label_attachment: File | |
571 | label_attachment_new: New file |
|
571 | label_attachment_new: New file | |
572 | label_attachment_delete: Delete file |
|
572 | label_attachment_delete: Delete file | |
573 | label_attachment_plural: Files |
|
573 | label_attachment_plural: Files | |
574 | label_file_added: File added |
|
574 | label_file_added: File added | |
575 | label_report: Report |
|
575 | label_report: Report | |
576 | label_report_plural: Reports |
|
576 | label_report_plural: Reports | |
577 | label_news: News |
|
577 | label_news: News | |
578 | label_news_new: Add news |
|
578 | label_news_new: Add news | |
579 | label_news_plural: News |
|
579 | label_news_plural: News | |
580 | label_news_latest: Latest news |
|
580 | label_news_latest: Latest news | |
581 | label_news_view_all: View all news |
|
581 | label_news_view_all: View all news | |
582 | label_news_added: News added |
|
582 | label_news_added: News added | |
583 | label_news_comment_added: Comment added to a news |
|
583 | label_news_comment_added: Comment added to a news | |
584 | label_settings: Settings |
|
584 | label_settings: Settings | |
585 | label_overview: Overview |
|
585 | label_overview: Overview | |
586 | label_version: Version |
|
586 | label_version: Version | |
587 | label_version_new: New version |
|
587 | label_version_new: New version | |
588 | label_version_plural: Versions |
|
588 | label_version_plural: Versions | |
589 | label_close_versions: Close completed versions |
|
589 | label_close_versions: Close completed versions | |
590 | label_confirmation: Confirmation |
|
590 | label_confirmation: Confirmation | |
591 | label_export_to: 'Also available in:' |
|
591 | label_export_to: 'Also available in:' | |
592 | label_read: Read... |
|
592 | label_read: Read... | |
593 | label_public_projects: Public projects |
|
593 | label_public_projects: Public projects | |
594 | label_open_issues: open |
|
594 | label_open_issues: open | |
595 | label_open_issues_plural: open |
|
595 | label_open_issues_plural: open | |
596 | label_closed_issues: closed |
|
596 | label_closed_issues: closed | |
597 | label_closed_issues_plural: closed |
|
597 | label_closed_issues_plural: closed | |
598 | label_x_open_issues_abbr_on_total: |
|
598 | label_x_open_issues_abbr_on_total: | |
599 | zero: 0 open / %{total} |
|
599 | zero: 0 open / %{total} | |
600 | one: 1 open / %{total} |
|
600 | one: 1 open / %{total} | |
601 | other: "%{count} open / %{total}" |
|
601 | other: "%{count} open / %{total}" | |
602 | label_x_open_issues_abbr: |
|
602 | label_x_open_issues_abbr: | |
603 | zero: 0 open |
|
603 | zero: 0 open | |
604 | one: 1 open |
|
604 | one: 1 open | |
605 | other: "%{count} open" |
|
605 | other: "%{count} open" | |
606 | label_x_closed_issues_abbr: |
|
606 | label_x_closed_issues_abbr: | |
607 | zero: 0 closed |
|
607 | zero: 0 closed | |
608 | one: 1 closed |
|
608 | one: 1 closed | |
609 | other: "%{count} closed" |
|
609 | other: "%{count} closed" | |
610 | label_x_issues: |
|
610 | label_x_issues: | |
611 | zero: 0 issues |
|
611 | zero: 0 issues | |
612 | one: 1 issue |
|
612 | one: 1 issue | |
613 | other: "%{count} issues" |
|
613 | other: "%{count} issues" | |
614 | label_total: Total |
|
614 | label_total: Total | |
615 | label_permissions: Permissions |
|
615 | label_permissions: Permissions | |
616 | label_current_status: Current status |
|
616 | label_current_status: Current status | |
617 | label_new_statuses_allowed: New statuses allowed |
|
617 | label_new_statuses_allowed: New statuses allowed | |
618 | label_all: all |
|
618 | label_all: all | |
619 | label_none: none |
|
619 | label_none: none | |
620 | label_nobody: nobody |
|
620 | label_nobody: nobody | |
621 | label_next: Next |
|
621 | label_next: Next | |
622 | label_previous: Previous |
|
622 | label_previous: Previous | |
623 | label_used_by: Used by |
|
623 | label_used_by: Used by | |
624 | label_details: Details |
|
624 | label_details: Details | |
625 | label_add_note: Add a note |
|
625 | label_add_note: Add a note | |
626 | label_per_page: Per page |
|
626 | label_per_page: Per page | |
627 | label_calendar: Calendar |
|
627 | label_calendar: Calendar | |
628 | label_months_from: months from |
|
628 | label_months_from: months from | |
629 | label_gantt: Gantt |
|
629 | label_gantt: Gantt | |
630 | label_internal: Internal |
|
630 | label_internal: Internal | |
631 | label_last_changes: "last %{count} changes" |
|
631 | label_last_changes: "last %{count} changes" | |
632 | label_change_view_all: View all changes |
|
632 | label_change_view_all: View all changes | |
633 | label_personalize_page: Personalize this page |
|
633 | label_personalize_page: Personalize this page | |
634 | label_comment: Comment |
|
634 | label_comment: Comment | |
635 | label_comment_plural: Comments |
|
635 | label_comment_plural: Comments | |
636 | label_x_comments: |
|
636 | label_x_comments: | |
637 | zero: no comments |
|
637 | zero: no comments | |
638 | one: 1 comment |
|
638 | one: 1 comment | |
639 | other: "%{count} comments" |
|
639 | other: "%{count} comments" | |
640 | label_comment_add: Add a comment |
|
640 | label_comment_add: Add a comment | |
641 | label_comment_added: Comment added |
|
641 | label_comment_added: Comment added | |
642 | label_comment_delete: Delete comments |
|
642 | label_comment_delete: Delete comments | |
643 | label_query: Custom query |
|
643 | label_query: Custom query | |
644 | label_query_plural: Custom queries |
|
644 | label_query_plural: Custom queries | |
645 | label_query_new: New query |
|
645 | label_query_new: New query | |
646 | label_my_queries: My custom queries |
|
646 | label_my_queries: My custom queries | |
647 | label_filter_add: Add filter |
|
647 | label_filter_add: Add filter | |
648 | label_filter_plural: Filters |
|
648 | label_filter_plural: Filters | |
649 | label_equals: is |
|
649 | label_equals: is | |
650 | label_not_equals: is not |
|
650 | label_not_equals: is not | |
651 | label_in_less_than: in less than |
|
651 | label_in_less_than: in less than | |
652 | label_in_more_than: in more than |
|
652 | label_in_more_than: in more than | |
653 | label_greater_or_equal: '>=' |
|
653 | label_greater_or_equal: '>=' | |
654 | label_less_or_equal: '<=' |
|
654 | label_less_or_equal: '<=' | |
655 | label_between: between |
|
655 | label_between: between | |
656 | label_in: in |
|
656 | label_in: in | |
657 | label_today: today |
|
657 | label_today: today | |
658 | label_all_time: all time |
|
658 | label_all_time: all time | |
659 | label_yesterday: yesterday |
|
659 | label_yesterday: yesterday | |
660 | label_this_week: this week |
|
660 | label_this_week: this week | |
661 | label_last_week: last week |
|
661 | label_last_week: last week | |
662 | label_last_n_days: "last %{count} days" |
|
662 | label_last_n_days: "last %{count} days" | |
663 | label_this_month: this month |
|
663 | label_this_month: this month | |
664 | label_last_month: last month |
|
664 | label_last_month: last month | |
665 | label_this_year: this year |
|
665 | label_this_year: this year | |
666 | label_date_range: Date range |
|
666 | label_date_range: Date range | |
667 | label_less_than_ago: less than days ago |
|
667 | label_less_than_ago: less than days ago | |
668 | label_more_than_ago: more than days ago |
|
668 | label_more_than_ago: more than days ago | |
669 | label_ago: days ago |
|
669 | label_ago: days ago | |
670 | label_contains: contains |
|
670 | label_contains: contains | |
671 | label_not_contains: doesn't contain |
|
671 | label_not_contains: doesn't contain | |
672 | label_day_plural: days |
|
672 | label_day_plural: days | |
673 | label_repository: Repository |
|
673 | label_repository: Repository | |
674 | label_repository_new: New repository |
|
674 | label_repository_new: New repository | |
675 | label_repository_plural: Repositories |
|
675 | label_repository_plural: Repositories | |
676 | label_browse: Browse |
|
676 | label_browse: Browse | |
677 | label_modification: "%{count} change" |
|
677 | label_modification: "%{count} change" | |
678 | label_modification_plural: "%{count} changes" |
|
678 | label_modification_plural: "%{count} changes" | |
679 | label_branch: Branch |
|
679 | label_branch: Branch | |
680 | label_tag: Tag |
|
680 | label_tag: Tag | |
681 | label_revision: Revision |
|
681 | label_revision: Revision | |
682 | label_revision_plural: Revisions |
|
682 | label_revision_plural: Revisions | |
683 | label_revision_id: "Revision %{value}" |
|
683 | label_revision_id: "Revision %{value}" | |
684 | label_associated_revisions: Associated revisions |
|
684 | label_associated_revisions: Associated revisions | |
685 | label_added: added |
|
685 | label_added: added | |
686 | label_modified: modified |
|
686 | label_modified: modified | |
687 | label_copied: copied |
|
687 | label_copied: copied | |
688 | label_renamed: renamed |
|
688 | label_renamed: renamed | |
689 | label_deleted: deleted |
|
689 | label_deleted: deleted | |
690 | label_latest_revision: Latest revision |
|
690 | label_latest_revision: Latest revision | |
691 | label_latest_revision_plural: Latest revisions |
|
691 | label_latest_revision_plural: Latest revisions | |
692 | label_view_revisions: View revisions |
|
692 | label_view_revisions: View revisions | |
693 | label_view_all_revisions: View all revisions |
|
693 | label_view_all_revisions: View all revisions | |
694 | label_max_size: Maximum size |
|
694 | label_max_size: Maximum size | |
695 | label_sort_highest: Move to top |
|
695 | label_sort_highest: Move to top | |
696 | label_sort_higher: Move up |
|
696 | label_sort_higher: Move up | |
697 | label_sort_lower: Move down |
|
697 | label_sort_lower: Move down | |
698 | label_sort_lowest: Move to bottom |
|
698 | label_sort_lowest: Move to bottom | |
699 | label_roadmap: Roadmap |
|
699 | label_roadmap: Roadmap | |
700 | label_roadmap_due_in: "Due in %{value}" |
|
700 | label_roadmap_due_in: "Due in %{value}" | |
701 | label_roadmap_overdue: "%{value} late" |
|
701 | label_roadmap_overdue: "%{value} late" | |
702 | label_roadmap_no_issues: No issues for this version |
|
702 | label_roadmap_no_issues: No issues for this version | |
703 | label_search: Search |
|
703 | label_search: Search | |
704 | label_result_plural: Results |
|
704 | label_result_plural: Results | |
705 | label_all_words: All words |
|
705 | label_all_words: All words | |
706 | label_wiki: Wiki |
|
706 | label_wiki: Wiki | |
707 | label_wiki_edit: Wiki edit |
|
707 | label_wiki_edit: Wiki edit | |
708 | label_wiki_edit_plural: Wiki edits |
|
708 | label_wiki_edit_plural: Wiki edits | |
709 | label_wiki_page: Wiki page |
|
709 | label_wiki_page: Wiki page | |
710 | label_wiki_page_plural: Wiki pages |
|
710 | label_wiki_page_plural: Wiki pages | |
711 | label_index_by_title: Index by title |
|
711 | label_index_by_title: Index by title | |
712 | label_index_by_date: Index by date |
|
712 | label_index_by_date: Index by date | |
713 | label_current_version: Current version |
|
713 | label_current_version: Current version | |
714 | label_preview: Preview |
|
714 | label_preview: Preview | |
715 | label_feed_plural: Feeds |
|
715 | label_feed_plural: Feeds | |
716 | label_changes_details: Details of all changes |
|
716 | label_changes_details: Details of all changes | |
717 | label_issue_tracking: Issue tracking |
|
717 | label_issue_tracking: Issue tracking | |
718 | label_spent_time: Spent time |
|
718 | label_spent_time: Spent time | |
719 | label_overall_spent_time: Overall spent time |
|
719 | label_overall_spent_time: Overall spent time | |
720 | label_f_hour: "%{value} hour" |
|
720 | label_f_hour: "%{value} hour" | |
721 | label_f_hour_plural: "%{value} hours" |
|
721 | label_f_hour_plural: "%{value} hours" | |
722 | label_time_tracking: Time tracking |
|
722 | label_time_tracking: Time tracking | |
723 | label_change_plural: Changes |
|
723 | label_change_plural: Changes | |
724 | label_statistics: Statistics |
|
724 | label_statistics: Statistics | |
725 | label_commits_per_month: Commits per month |
|
725 | label_commits_per_month: Commits per month | |
726 | label_commits_per_author: Commits per author |
|
726 | label_commits_per_author: Commits per author | |
727 | label_diff: diff |
|
727 | label_diff: diff | |
728 | label_view_diff: View differences |
|
728 | label_view_diff: View differences | |
729 | label_diff_inline: inline |
|
729 | label_diff_inline: inline | |
730 | label_diff_side_by_side: side by side |
|
730 | label_diff_side_by_side: side by side | |
731 | label_options: Options |
|
731 | label_options: Options | |
732 | label_copy_workflow_from: Copy workflow from |
|
732 | label_copy_workflow_from: Copy workflow from | |
733 | label_permissions_report: Permissions report |
|
733 | label_permissions_report: Permissions report | |
734 | label_watched_issues: Watched issues |
|
734 | label_watched_issues: Watched issues | |
735 | label_related_issues: Related issues |
|
735 | label_related_issues: Related issues | |
736 | label_applied_status: Applied status |
|
736 | label_applied_status: Applied status | |
737 | label_loading: Loading... |
|
737 | label_loading: Loading... | |
738 | label_relation_new: New relation |
|
738 | label_relation_new: New relation | |
739 | label_relation_delete: Delete relation |
|
739 | label_relation_delete: Delete relation | |
740 | label_relates_to: related to |
|
740 | label_relates_to: related to | |
741 | label_duplicates: duplicates |
|
741 | label_duplicates: duplicates | |
742 | label_duplicated_by: duplicated by |
|
742 | label_duplicated_by: duplicated by | |
743 | label_blocks: blocks |
|
743 | label_blocks: blocks | |
744 | label_blocked_by: blocked by |
|
744 | label_blocked_by: blocked by | |
745 | label_precedes: precedes |
|
745 | label_precedes: precedes | |
746 | label_follows: follows |
|
746 | label_follows: follows | |
|
747 | label_copied_to: copied to | |||
|
748 | label_copied_from: copied from | |||
747 | label_end_to_start: end to start |
|
749 | label_end_to_start: end to start | |
748 | label_end_to_end: end to end |
|
750 | label_end_to_end: end to end | |
749 | label_start_to_start: start to start |
|
751 | label_start_to_start: start to start | |
750 | label_start_to_end: start to end |
|
752 | label_start_to_end: start to end | |
751 | label_stay_logged_in: Stay logged in |
|
753 | label_stay_logged_in: Stay logged in | |
752 | label_disabled: disabled |
|
754 | label_disabled: disabled | |
753 | label_show_completed_versions: Show completed versions |
|
755 | label_show_completed_versions: Show completed versions | |
754 | label_me: me |
|
756 | label_me: me | |
755 | label_board: Forum |
|
757 | label_board: Forum | |
756 | label_board_new: New forum |
|
758 | label_board_new: New forum | |
757 | label_board_plural: Forums |
|
759 | label_board_plural: Forums | |
758 | label_board_locked: Locked |
|
760 | label_board_locked: Locked | |
759 | label_board_sticky: Sticky |
|
761 | label_board_sticky: Sticky | |
760 | label_topic_plural: Topics |
|
762 | label_topic_plural: Topics | |
761 | label_message_plural: Messages |
|
763 | label_message_plural: Messages | |
762 | label_message_last: Last message |
|
764 | label_message_last: Last message | |
763 | label_message_new: New message |
|
765 | label_message_new: New message | |
764 | label_message_posted: Message added |
|
766 | label_message_posted: Message added | |
765 | label_reply_plural: Replies |
|
767 | label_reply_plural: Replies | |
766 | label_send_information: Send account information to the user |
|
768 | label_send_information: Send account information to the user | |
767 | label_year: Year |
|
769 | label_year: Year | |
768 | label_month: Month |
|
770 | label_month: Month | |
769 | label_week: Week |
|
771 | label_week: Week | |
770 | label_date_from: From |
|
772 | label_date_from: From | |
771 | label_date_to: To |
|
773 | label_date_to: To | |
772 | label_language_based: Based on user's language |
|
774 | label_language_based: Based on user's language | |
773 | label_sort_by: "Sort by %{value}" |
|
775 | label_sort_by: "Sort by %{value}" | |
774 | label_send_test_email: Send a test email |
|
776 | label_send_test_email: Send a test email | |
775 | label_feeds_access_key: RSS access key |
|
777 | label_feeds_access_key: RSS access key | |
776 | label_missing_feeds_access_key: Missing a RSS access key |
|
778 | label_missing_feeds_access_key: Missing a RSS access key | |
777 | label_feeds_access_key_created_on: "RSS access key created %{value} ago" |
|
779 | label_feeds_access_key_created_on: "RSS access key created %{value} ago" | |
778 | label_module_plural: Modules |
|
780 | label_module_plural: Modules | |
779 | label_added_time_by: "Added by %{author} %{age} ago" |
|
781 | label_added_time_by: "Added by %{author} %{age} ago" | |
780 | label_updated_time_by: "Updated by %{author} %{age} ago" |
|
782 | label_updated_time_by: "Updated by %{author} %{age} ago" | |
781 | label_updated_time: "Updated %{value} ago" |
|
783 | label_updated_time: "Updated %{value} ago" | |
782 | label_jump_to_a_project: Jump to a project... |
|
784 | label_jump_to_a_project: Jump to a project... | |
783 | label_file_plural: Files |
|
785 | label_file_plural: Files | |
784 | label_changeset_plural: Changesets |
|
786 | label_changeset_plural: Changesets | |
785 | label_default_columns: Default columns |
|
787 | label_default_columns: Default columns | |
786 | label_no_change_option: (No change) |
|
788 | label_no_change_option: (No change) | |
787 | label_bulk_edit_selected_issues: Bulk edit selected issues |
|
789 | label_bulk_edit_selected_issues: Bulk edit selected issues | |
788 | label_bulk_edit_selected_time_entries: Bulk edit selected time entries |
|
790 | label_bulk_edit_selected_time_entries: Bulk edit selected time entries | |
789 | label_theme: Theme |
|
791 | label_theme: Theme | |
790 | label_default: Default |
|
792 | label_default: Default | |
791 | label_search_titles_only: Search titles only |
|
793 | label_search_titles_only: Search titles only | |
792 | label_user_mail_option_all: "For any event on all my projects" |
|
794 | label_user_mail_option_all: "For any event on all my projects" | |
793 | label_user_mail_option_selected: "For any event on the selected projects only..." |
|
795 | label_user_mail_option_selected: "For any event on the selected projects only..." | |
794 | label_user_mail_option_none: "No events" |
|
796 | label_user_mail_option_none: "No events" | |
795 | label_user_mail_option_only_my_events: "Only for things I watch or I'm involved in" |
|
797 | label_user_mail_option_only_my_events: "Only for things I watch or I'm involved in" | |
796 | label_user_mail_option_only_assigned: "Only for things I am assigned to" |
|
798 | label_user_mail_option_only_assigned: "Only for things I am assigned to" | |
797 | label_user_mail_option_only_owner: "Only for things I am the owner of" |
|
799 | label_user_mail_option_only_owner: "Only for things I am the owner of" | |
798 | label_user_mail_no_self_notified: "I don't want to be notified of changes that I make myself" |
|
800 | label_user_mail_no_self_notified: "I don't want to be notified of changes that I make myself" | |
799 | label_registration_activation_by_email: account activation by email |
|
801 | label_registration_activation_by_email: account activation by email | |
800 | label_registration_manual_activation: manual account activation |
|
802 | label_registration_manual_activation: manual account activation | |
801 | label_registration_automatic_activation: automatic account activation |
|
803 | label_registration_automatic_activation: automatic account activation | |
802 | label_display_per_page: "Per page: %{value}" |
|
804 | label_display_per_page: "Per page: %{value}" | |
803 | label_age: Age |
|
805 | label_age: Age | |
804 | label_change_properties: Change properties |
|
806 | label_change_properties: Change properties | |
805 | label_general: General |
|
807 | label_general: General | |
806 | label_more: More |
|
808 | label_more: More | |
807 | label_scm: SCM |
|
809 | label_scm: SCM | |
808 | label_plugins: Plugins |
|
810 | label_plugins: Plugins | |
809 | label_ldap_authentication: LDAP authentication |
|
811 | label_ldap_authentication: LDAP authentication | |
810 | label_downloads_abbr: D/L |
|
812 | label_downloads_abbr: D/L | |
811 | label_optional_description: Optional description |
|
813 | label_optional_description: Optional description | |
812 | label_add_another_file: Add another file |
|
814 | label_add_another_file: Add another file | |
813 | label_preferences: Preferences |
|
815 | label_preferences: Preferences | |
814 | label_chronological_order: In chronological order |
|
816 | label_chronological_order: In chronological order | |
815 | label_reverse_chronological_order: In reverse chronological order |
|
817 | label_reverse_chronological_order: In reverse chronological order | |
816 | label_planning: Planning |
|
818 | label_planning: Planning | |
817 | label_incoming_emails: Incoming emails |
|
819 | label_incoming_emails: Incoming emails | |
818 | label_generate_key: Generate a key |
|
820 | label_generate_key: Generate a key | |
819 | label_issue_watchers: Watchers |
|
821 | label_issue_watchers: Watchers | |
820 | label_example: Example |
|
822 | label_example: Example | |
821 | label_display: Display |
|
823 | label_display: Display | |
822 | label_sort: Sort |
|
824 | label_sort: Sort | |
823 | label_ascending: Ascending |
|
825 | label_ascending: Ascending | |
824 | label_descending: Descending |
|
826 | label_descending: Descending | |
825 | label_date_from_to: From %{start} to %{end} |
|
827 | label_date_from_to: From %{start} to %{end} | |
826 | label_wiki_content_added: Wiki page added |
|
828 | label_wiki_content_added: Wiki page added | |
827 | label_wiki_content_updated: Wiki page updated |
|
829 | label_wiki_content_updated: Wiki page updated | |
828 | label_group: Group |
|
830 | label_group: Group | |
829 | label_group_plural: Groups |
|
831 | label_group_plural: Groups | |
830 | label_group_new: New group |
|
832 | label_group_new: New group | |
831 | label_time_entry_plural: Spent time |
|
833 | label_time_entry_plural: Spent time | |
832 | label_version_sharing_none: Not shared |
|
834 | label_version_sharing_none: Not shared | |
833 | label_version_sharing_descendants: With subprojects |
|
835 | label_version_sharing_descendants: With subprojects | |
834 | label_version_sharing_hierarchy: With project hierarchy |
|
836 | label_version_sharing_hierarchy: With project hierarchy | |
835 | label_version_sharing_tree: With project tree |
|
837 | label_version_sharing_tree: With project tree | |
836 | label_version_sharing_system: With all projects |
|
838 | label_version_sharing_system: With all projects | |
837 | label_update_issue_done_ratios: Update issue done ratios |
|
839 | label_update_issue_done_ratios: Update issue done ratios | |
838 | label_copy_source: Source |
|
840 | label_copy_source: Source | |
839 | label_copy_target: Target |
|
841 | label_copy_target: Target | |
840 | label_copy_same_as_target: Same as target |
|
842 | label_copy_same_as_target: Same as target | |
841 | label_display_used_statuses_only: Only display statuses that are used by this tracker |
|
843 | label_display_used_statuses_only: Only display statuses that are used by this tracker | |
842 | label_api_access_key: API access key |
|
844 | label_api_access_key: API access key | |
843 | label_missing_api_access_key: Missing an API access key |
|
845 | label_missing_api_access_key: Missing an API access key | |
844 | label_api_access_key_created_on: "API access key created %{value} ago" |
|
846 | label_api_access_key_created_on: "API access key created %{value} ago" | |
845 | label_profile: Profile |
|
847 | label_profile: Profile | |
846 | label_subtask_plural: Subtasks |
|
848 | label_subtask_plural: Subtasks | |
847 | label_project_copy_notifications: Send email notifications during the project copy |
|
849 | label_project_copy_notifications: Send email notifications during the project copy | |
848 | label_principal_search: "Search for user or group:" |
|
850 | label_principal_search: "Search for user or group:" | |
849 | label_user_search: "Search for user:" |
|
851 | label_user_search: "Search for user:" | |
850 | label_additional_workflow_transitions_for_author: Additional transitions allowed when the user is the author |
|
852 | label_additional_workflow_transitions_for_author: Additional transitions allowed when the user is the author | |
851 | label_additional_workflow_transitions_for_assignee: Additional transitions allowed when the user is the assignee |
|
853 | label_additional_workflow_transitions_for_assignee: Additional transitions allowed when the user is the assignee | |
852 | label_issues_visibility_all: All issues |
|
854 | label_issues_visibility_all: All issues | |
853 | label_issues_visibility_public: All non private issues |
|
855 | label_issues_visibility_public: All non private issues | |
854 | label_issues_visibility_own: Issues created by or assigned to the user |
|
856 | label_issues_visibility_own: Issues created by or assigned to the user | |
855 | label_git_report_last_commit: Report last commit for files and directories |
|
857 | label_git_report_last_commit: Report last commit for files and directories | |
856 | label_parent_revision: Parent |
|
858 | label_parent_revision: Parent | |
857 | label_child_revision: Child |
|
859 | label_child_revision: Child | |
858 | label_export_options: "%{export_format} export options" |
|
860 | label_export_options: "%{export_format} export options" | |
859 | label_copy_attachments: Copy attachments |
|
861 | label_copy_attachments: Copy attachments | |
860 | label_copy_subtasks: Copy subtasks |
|
862 | label_copy_subtasks: Copy subtasks | |
861 | label_item_position: "%{position} of %{count}" |
|
863 | label_item_position: "%{position} of %{count}" | |
862 | label_completed_versions: Completed versions |
|
864 | label_completed_versions: Completed versions | |
863 | label_search_for_watchers: Search for watchers to add |
|
865 | label_search_for_watchers: Search for watchers to add | |
864 | label_session_expiration: Session expiration |
|
866 | label_session_expiration: Session expiration | |
865 | label_show_closed_projects: View closed projects |
|
867 | label_show_closed_projects: View closed projects | |
866 | label_status_transitions: Status transitions |
|
868 | label_status_transitions: Status transitions | |
867 | label_fields_permissions: Fields permissions |
|
869 | label_fields_permissions: Fields permissions | |
868 | label_readonly: Read-only |
|
870 | label_readonly: Read-only | |
869 | label_required: Required |
|
871 | label_required: Required | |
870 | label_attribute_of_project: "Project's %{name}" |
|
872 | label_attribute_of_project: "Project's %{name}" | |
871 | label_attribute_of_author: "Author's %{name}" |
|
873 | label_attribute_of_author: "Author's %{name}" | |
872 | label_attribute_of_assigned_to: "Assignee's %{name}" |
|
874 | label_attribute_of_assigned_to: "Assignee's %{name}" | |
873 | label_attribute_of_fixed_version: "Target version's %{name}" |
|
875 | label_attribute_of_fixed_version: "Target version's %{name}" | |
874 |
|
876 | |||
875 | button_login: Login |
|
877 | button_login: Login | |
876 | button_submit: Submit |
|
878 | button_submit: Submit | |
877 | button_save: Save |
|
879 | button_save: Save | |
878 | button_check_all: Check all |
|
880 | button_check_all: Check all | |
879 | button_uncheck_all: Uncheck all |
|
881 | button_uncheck_all: Uncheck all | |
880 | button_collapse_all: Collapse all |
|
882 | button_collapse_all: Collapse all | |
881 | button_expand_all: Expand all |
|
883 | button_expand_all: Expand all | |
882 | button_delete: Delete |
|
884 | button_delete: Delete | |
883 | button_create: Create |
|
885 | button_create: Create | |
884 | button_create_and_continue: Create and continue |
|
886 | button_create_and_continue: Create and continue | |
885 | button_test: Test |
|
887 | button_test: Test | |
886 | button_edit: Edit |
|
888 | button_edit: Edit | |
887 | button_edit_associated_wikipage: "Edit associated Wiki page: %{page_title}" |
|
889 | button_edit_associated_wikipage: "Edit associated Wiki page: %{page_title}" | |
888 | button_add: Add |
|
890 | button_add: Add | |
889 | button_change: Change |
|
891 | button_change: Change | |
890 | button_apply: Apply |
|
892 | button_apply: Apply | |
891 | button_clear: Clear |
|
893 | button_clear: Clear | |
892 | button_lock: Lock |
|
894 | button_lock: Lock | |
893 | button_unlock: Unlock |
|
895 | button_unlock: Unlock | |
894 | button_download: Download |
|
896 | button_download: Download | |
895 | button_list: List |
|
897 | button_list: List | |
896 | button_view: View |
|
898 | button_view: View | |
897 | button_move: Move |
|
899 | button_move: Move | |
898 | button_move_and_follow: Move and follow |
|
900 | button_move_and_follow: Move and follow | |
899 | button_back: Back |
|
901 | button_back: Back | |
900 | button_cancel: Cancel |
|
902 | button_cancel: Cancel | |
901 | button_activate: Activate |
|
903 | button_activate: Activate | |
902 | button_sort: Sort |
|
904 | button_sort: Sort | |
903 | button_log_time: Log time |
|
905 | button_log_time: Log time | |
904 | button_rollback: Rollback to this version |
|
906 | button_rollback: Rollback to this version | |
905 | button_watch: Watch |
|
907 | button_watch: Watch | |
906 | button_unwatch: Unwatch |
|
908 | button_unwatch: Unwatch | |
907 | button_reply: Reply |
|
909 | button_reply: Reply | |
908 | button_archive: Archive |
|
910 | button_archive: Archive | |
909 | button_unarchive: Unarchive |
|
911 | button_unarchive: Unarchive | |
910 | button_reset: Reset |
|
912 | button_reset: Reset | |
911 | button_rename: Rename |
|
913 | button_rename: Rename | |
912 | button_change_password: Change password |
|
914 | button_change_password: Change password | |
913 | button_copy: Copy |
|
915 | button_copy: Copy | |
914 | button_copy_and_follow: Copy and follow |
|
916 | button_copy_and_follow: Copy and follow | |
915 | button_annotate: Annotate |
|
917 | button_annotate: Annotate | |
916 | button_update: Update |
|
918 | button_update: Update | |
917 | button_configure: Configure |
|
919 | button_configure: Configure | |
918 | button_quote: Quote |
|
920 | button_quote: Quote | |
919 | button_duplicate: Duplicate |
|
921 | button_duplicate: Duplicate | |
920 | button_show: Show |
|
922 | button_show: Show | |
921 | button_edit_section: Edit this section |
|
923 | button_edit_section: Edit this section | |
922 | button_export: Export |
|
924 | button_export: Export | |
923 | button_delete_my_account: Delete my account |
|
925 | button_delete_my_account: Delete my account | |
924 | button_close: Close |
|
926 | button_close: Close | |
925 | button_reopen: Reopen |
|
927 | button_reopen: Reopen | |
926 |
|
928 | |||
927 | status_active: active |
|
929 | status_active: active | |
928 | status_registered: registered |
|
930 | status_registered: registered | |
929 | status_locked: locked |
|
931 | status_locked: locked | |
930 |
|
932 | |||
931 | project_status_active: active |
|
933 | project_status_active: active | |
932 | project_status_closed: closed |
|
934 | project_status_closed: closed | |
933 | project_status_archived: archived |
|
935 | project_status_archived: archived | |
934 |
|
936 | |||
935 | version_status_open: open |
|
937 | version_status_open: open | |
936 | version_status_locked: locked |
|
938 | version_status_locked: locked | |
937 | version_status_closed: closed |
|
939 | version_status_closed: closed | |
938 |
|
940 | |||
939 | field_active: Active |
|
941 | field_active: Active | |
940 |
|
942 | |||
941 | text_select_mail_notifications: Select actions for which email notifications should be sent. |
|
943 | text_select_mail_notifications: Select actions for which email notifications should be sent. | |
942 | text_regexp_info: eg. ^[A-Z0-9]+$ |
|
944 | text_regexp_info: eg. ^[A-Z0-9]+$ | |
943 | text_min_max_length_info: 0 means no restriction |
|
945 | text_min_max_length_info: 0 means no restriction | |
944 | text_project_destroy_confirmation: Are you sure you want to delete this project and related data? |
|
946 | text_project_destroy_confirmation: Are you sure you want to delete this project and related data? | |
945 | text_subprojects_destroy_warning: "Its subproject(s): %{value} will be also deleted." |
|
947 | text_subprojects_destroy_warning: "Its subproject(s): %{value} will be also deleted." | |
946 | text_workflow_edit: Select a role and a tracker to edit the workflow |
|
948 | text_workflow_edit: Select a role and a tracker to edit the workflow | |
947 | text_are_you_sure: Are you sure? |
|
949 | text_are_you_sure: Are you sure? | |
948 | text_are_you_sure_with_children: "Delete issue and all child issues?" |
|
950 | text_are_you_sure_with_children: "Delete issue and all child issues?" | |
949 | text_journal_changed: "%{label} changed from %{old} to %{new}" |
|
951 | text_journal_changed: "%{label} changed from %{old} to %{new}" | |
950 | text_journal_changed_no_detail: "%{label} updated" |
|
952 | text_journal_changed_no_detail: "%{label} updated" | |
951 | text_journal_set_to: "%{label} set to %{value}" |
|
953 | text_journal_set_to: "%{label} set to %{value}" | |
952 | text_journal_deleted: "%{label} deleted (%{old})" |
|
954 | text_journal_deleted: "%{label} deleted (%{old})" | |
953 | text_journal_added: "%{label} %{value} added" |
|
955 | text_journal_added: "%{label} %{value} added" | |
954 | text_tip_issue_begin_day: issue beginning this day |
|
956 | text_tip_issue_begin_day: issue beginning this day | |
955 | text_tip_issue_end_day: issue ending this day |
|
957 | text_tip_issue_end_day: issue ending this day | |
956 | text_tip_issue_begin_end_day: issue beginning and ending this day |
|
958 | text_tip_issue_begin_end_day: issue beginning and ending this day | |
957 | text_project_identifier_info: 'Only lower case letters (a-z), numbers, dashes and underscores are allowed.<br />Once saved, the identifier cannot be changed.' |
|
959 | text_project_identifier_info: 'Only lower case letters (a-z), numbers, dashes and underscores are allowed.<br />Once saved, the identifier cannot be changed.' | |
958 | text_caracters_maximum: "%{count} characters maximum." |
|
960 | text_caracters_maximum: "%{count} characters maximum." | |
959 | text_caracters_minimum: "Must be at least %{count} characters long." |
|
961 | text_caracters_minimum: "Must be at least %{count} characters long." | |
960 | text_length_between: "Length between %{min} and %{max} characters." |
|
962 | text_length_between: "Length between %{min} and %{max} characters." | |
961 | text_tracker_no_workflow: No workflow defined for this tracker |
|
963 | text_tracker_no_workflow: No workflow defined for this tracker | |
962 | text_unallowed_characters: Unallowed characters |
|
964 | text_unallowed_characters: Unallowed characters | |
963 | text_comma_separated: Multiple values allowed (comma separated). |
|
965 | text_comma_separated: Multiple values allowed (comma separated). | |
964 | text_line_separated: Multiple values allowed (one line for each value). |
|
966 | text_line_separated: Multiple values allowed (one line for each value). | |
965 | text_issues_ref_in_commit_messages: Referencing and fixing issues in commit messages |
|
967 | text_issues_ref_in_commit_messages: Referencing and fixing issues in commit messages | |
966 | text_issue_added: "Issue %{id} has been reported by %{author}." |
|
968 | text_issue_added: "Issue %{id} has been reported by %{author}." | |
967 | text_issue_updated: "Issue %{id} has been updated by %{author}." |
|
969 | text_issue_updated: "Issue %{id} has been updated by %{author}." | |
968 | text_wiki_destroy_confirmation: Are you sure you want to delete this wiki and all its content? |
|
970 | text_wiki_destroy_confirmation: Are you sure you want to delete this wiki and all its content? | |
969 | text_issue_category_destroy_question: "Some issues (%{count}) are assigned to this category. What do you want to do?" |
|
971 | text_issue_category_destroy_question: "Some issues (%{count}) are assigned to this category. What do you want to do?" | |
970 | text_issue_category_destroy_assignments: Remove category assignments |
|
972 | text_issue_category_destroy_assignments: Remove category assignments | |
971 | text_issue_category_reassign_to: Reassign issues to this category |
|
973 | text_issue_category_reassign_to: Reassign issues to this category | |
972 | 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)." |
|
974 | 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)." | |
973 | 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." |
|
975 | 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." | |
974 | text_load_default_configuration: Load the default configuration |
|
976 | text_load_default_configuration: Load the default configuration | |
975 | text_status_changed_by_changeset: "Applied in changeset %{value}." |
|
977 | text_status_changed_by_changeset: "Applied in changeset %{value}." | |
976 | text_time_logged_by_changeset: "Applied in changeset %{value}." |
|
978 | text_time_logged_by_changeset: "Applied in changeset %{value}." | |
977 | text_issues_destroy_confirmation: 'Are you sure you want to delete the selected issue(s)?' |
|
979 | text_issues_destroy_confirmation: 'Are you sure you want to delete the selected issue(s)?' | |
978 | text_issues_destroy_descendants_confirmation: "This will also delete %{count} subtask(s)." |
|
980 | text_issues_destroy_descendants_confirmation: "This will also delete %{count} subtask(s)." | |
979 | text_time_entries_destroy_confirmation: 'Are you sure you want to delete the selected time entr(y/ies)?' |
|
981 | text_time_entries_destroy_confirmation: 'Are you sure you want to delete the selected time entr(y/ies)?' | |
980 | text_select_project_modules: 'Select modules to enable for this project:' |
|
982 | text_select_project_modules: 'Select modules to enable for this project:' | |
981 | text_default_administrator_account_changed: Default administrator account changed |
|
983 | text_default_administrator_account_changed: Default administrator account changed | |
982 | text_file_repository_writable: Attachments directory writable |
|
984 | text_file_repository_writable: Attachments directory writable | |
983 | text_plugin_assets_writable: Plugin assets directory writable |
|
985 | text_plugin_assets_writable: Plugin assets directory writable | |
984 | text_rmagick_available: RMagick available (optional) |
|
986 | text_rmagick_available: RMagick available (optional) | |
985 | text_destroy_time_entries_question: "%{hours} hours were reported on the issues you are about to delete. What do you want to do?" |
|
987 | text_destroy_time_entries_question: "%{hours} hours were reported on the issues you are about to delete. What do you want to do?" | |
986 | text_destroy_time_entries: Delete reported hours |
|
988 | text_destroy_time_entries: Delete reported hours | |
987 | text_assign_time_entries_to_project: Assign reported hours to the project |
|
989 | text_assign_time_entries_to_project: Assign reported hours to the project | |
988 | text_reassign_time_entries: 'Reassign reported hours to this issue:' |
|
990 | text_reassign_time_entries: 'Reassign reported hours to this issue:' | |
989 | text_user_wrote: "%{value} wrote:" |
|
991 | text_user_wrote: "%{value} wrote:" | |
990 | text_enumeration_destroy_question: "%{count} objects are assigned to this value." |
|
992 | text_enumeration_destroy_question: "%{count} objects are assigned to this value." | |
991 | text_enumeration_category_reassign_to: 'Reassign them to this value:' |
|
993 | text_enumeration_category_reassign_to: 'Reassign them to this value:' | |
992 | 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." |
|
994 | 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." | |
993 | 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." |
|
995 | 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." | |
994 | text_diff_truncated: '... This diff was truncated because it exceeds the maximum size that can be displayed.' |
|
996 | text_diff_truncated: '... This diff was truncated because it exceeds the maximum size that can be displayed.' | |
995 | text_custom_field_possible_values_info: 'One line for each value' |
|
997 | text_custom_field_possible_values_info: 'One line for each value' | |
996 | text_wiki_page_destroy_question: "This page has %{descendants} child page(s) and descendant(s). What do you want to do?" |
|
998 | text_wiki_page_destroy_question: "This page has %{descendants} child page(s) and descendant(s). What do you want to do?" | |
997 | text_wiki_page_nullify_children: "Keep child pages as root pages" |
|
999 | text_wiki_page_nullify_children: "Keep child pages as root pages" | |
998 | text_wiki_page_destroy_children: "Delete child pages and all their descendants" |
|
1000 | text_wiki_page_destroy_children: "Delete child pages and all their descendants" | |
999 | text_wiki_page_reassign_children: "Reassign child pages to this parent page" |
|
1001 | text_wiki_page_reassign_children: "Reassign child pages to this parent page" | |
1000 | 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?" |
|
1002 | 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?" | |
1001 | text_zoom_in: Zoom in |
|
1003 | text_zoom_in: Zoom in | |
1002 | text_zoom_out: Zoom out |
|
1004 | text_zoom_out: Zoom out | |
1003 | text_warn_on_leaving_unsaved: "The current page contains unsaved text that will be lost if you leave this page." |
|
1005 | text_warn_on_leaving_unsaved: "The current page contains unsaved text that will be lost if you leave this page." | |
1004 | text_scm_path_encoding_note: "Default: UTF-8" |
|
1006 | text_scm_path_encoding_note: "Default: UTF-8" | |
1005 | text_git_repository_note: Repository is bare and local (e.g. /gitrepo, c:\gitrepo) |
|
1007 | text_git_repository_note: Repository is bare and local (e.g. /gitrepo, c:\gitrepo) | |
1006 | text_mercurial_repository_note: Local repository (e.g. /hgrepo, c:\hgrepo) |
|
1008 | text_mercurial_repository_note: Local repository (e.g. /hgrepo, c:\hgrepo) | |
1007 | text_scm_command: Command |
|
1009 | text_scm_command: Command | |
1008 | text_scm_command_version: Version |
|
1010 | text_scm_command_version: Version | |
1009 | text_scm_config: You can configure your scm commands in config/configuration.yml. Please restart the application after editing it. |
|
1011 | text_scm_config: You can configure your scm commands in config/configuration.yml. Please restart the application after editing it. | |
1010 | text_scm_command_not_available: Scm command is not available. Please check settings on the administration panel. |
|
1012 | text_scm_command_not_available: Scm command is not available. Please check settings on the administration panel. | |
1011 | text_issue_conflict_resolution_overwrite: "Apply my changes anyway (previous notes will be kept but some changes may be overwritten)" |
|
1013 | text_issue_conflict_resolution_overwrite: "Apply my changes anyway (previous notes will be kept but some changes may be overwritten)" | |
1012 | text_issue_conflict_resolution_add_notes: "Add my notes and discard my other changes" |
|
1014 | text_issue_conflict_resolution_add_notes: "Add my notes and discard my other changes" | |
1013 | text_issue_conflict_resolution_cancel: "Discard all my changes and redisplay %{link}" |
|
1015 | text_issue_conflict_resolution_cancel: "Discard all my changes and redisplay %{link}" | |
1014 | text_account_destroy_confirmation: "Are you sure you want to proceed?\nYour account will be permanently deleted, with no way to reactivate it." |
|
1016 | text_account_destroy_confirmation: "Are you sure you want to proceed?\nYour account will be permanently deleted, with no way to reactivate it." | |
1015 | text_session_expiration_settings: "Warning: changing these settings may expire the current sessions including yours." |
|
1017 | text_session_expiration_settings: "Warning: changing these settings may expire the current sessions including yours." | |
1016 | text_project_closed: This project is closed and read-only. |
|
1018 | text_project_closed: This project is closed and read-only. | |
1017 |
|
1019 | |||
1018 | default_role_manager: Manager |
|
1020 | default_role_manager: Manager | |
1019 | default_role_developer: Developer |
|
1021 | default_role_developer: Developer | |
1020 | default_role_reporter: Reporter |
|
1022 | default_role_reporter: Reporter | |
1021 | default_tracker_bug: Bug |
|
1023 | default_tracker_bug: Bug | |
1022 | default_tracker_feature: Feature |
|
1024 | default_tracker_feature: Feature | |
1023 | default_tracker_support: Support |
|
1025 | default_tracker_support: Support | |
1024 | default_issue_status_new: New |
|
1026 | default_issue_status_new: New | |
1025 | default_issue_status_in_progress: In Progress |
|
1027 | default_issue_status_in_progress: In Progress | |
1026 | default_issue_status_resolved: Resolved |
|
1028 | default_issue_status_resolved: Resolved | |
1027 | default_issue_status_feedback: Feedback |
|
1029 | default_issue_status_feedback: Feedback | |
1028 | default_issue_status_closed: Closed |
|
1030 | default_issue_status_closed: Closed | |
1029 | default_issue_status_rejected: Rejected |
|
1031 | default_issue_status_rejected: Rejected | |
1030 | default_doc_category_user: User documentation |
|
1032 | default_doc_category_user: User documentation | |
1031 | default_doc_category_tech: Technical documentation |
|
1033 | default_doc_category_tech: Technical documentation | |
1032 | default_priority_low: Low |
|
1034 | default_priority_low: Low | |
1033 | default_priority_normal: Normal |
|
1035 | default_priority_normal: Normal | |
1034 | default_priority_high: High |
|
1036 | default_priority_high: High | |
1035 | default_priority_urgent: Urgent |
|
1037 | default_priority_urgent: Urgent | |
1036 | default_priority_immediate: Immediate |
|
1038 | default_priority_immediate: Immediate | |
1037 | default_activity_design: Design |
|
1039 | default_activity_design: Design | |
1038 | default_activity_development: Development |
|
1040 | default_activity_development: Development | |
1039 |
|
1041 | |||
1040 | enumeration_issue_priorities: Issue priorities |
|
1042 | enumeration_issue_priorities: Issue priorities | |
1041 | enumeration_doc_categories: Document categories |
|
1043 | enumeration_doc_categories: Document categories | |
1042 | enumeration_activities: Activities (time tracking) |
|
1044 | enumeration_activities: Activities (time tracking) | |
1043 | enumeration_system_activity: System Activity |
|
1045 | enumeration_system_activity: System Activity | |
1044 | description_filter: Filter |
|
1046 | description_filter: Filter | |
1045 | description_search: Searchfield |
|
1047 | description_search: Searchfield | |
1046 | description_choose_project: Projects |
|
1048 | description_choose_project: Projects | |
1047 | description_project_scope: Search scope |
|
1049 | description_project_scope: Search scope | |
1048 | description_notes: Notes |
|
1050 | description_notes: Notes | |
1049 | description_message_content: Message content |
|
1051 | description_message_content: Message content | |
1050 | description_query_sort_criteria_attribute: Sort attribute |
|
1052 | description_query_sort_criteria_attribute: Sort attribute | |
1051 | description_query_sort_criteria_direction: Sort direction |
|
1053 | description_query_sort_criteria_direction: Sort direction | |
1052 | description_user_mail_notification: Mail notification settings |
|
1054 | description_user_mail_notification: Mail notification settings | |
1053 | description_available_columns: Available Columns |
|
1055 | description_available_columns: Available Columns | |
1054 | description_selected_columns: Selected Columns |
|
1056 | description_selected_columns: Selected Columns | |
1055 | description_all_columns: All Columns |
|
1057 | description_all_columns: All Columns | |
1056 | description_issue_category_reassign: Choose issue category |
|
1058 | description_issue_category_reassign: Choose issue category | |
1057 | description_wiki_subpages_reassign: Choose new parent page |
|
1059 | description_wiki_subpages_reassign: Choose new parent page | |
1058 | description_date_range_list: Choose range from list |
|
1060 | description_date_range_list: Choose range from list | |
1059 | description_date_range_interval: Choose range by selecting start and end date |
|
1061 | description_date_range_interval: Choose range by selecting start and end date | |
1060 | description_date_from: Enter start date |
|
1062 | description_date_from: Enter start date | |
1061 | description_date_to: Enter end date |
|
1063 | description_date_to: Enter end date | |
1062 | text_repository_identifier_info: 'Only lower case letters (a-z), numbers, dashes and underscores are allowed.<br />Once saved, the identifier cannot be changed.' |
|
1064 | 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,1079 +1,1081 | |||||
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 | month_names: [~, janvier, fΓ©vrier, mars, avril, mai, juin, juillet, aoΓ»t, septembre, octobre, novembre, dΓ©cembre] |
|
18 | month_names: [~, janvier, fΓ©vrier, mars, avril, mai, juin, juillet, aoΓ»t, septembre, octobre, novembre, dΓ©cembre] | |
19 | abbr_month_names: [~, jan., fΓ©v., mar., avr., mai, juin, juil., aoΓ»t, sept., oct., nov., dΓ©c.] |
|
19 | abbr_month_names: [~, jan., fΓ©v., mar., avr., mai, juin, juil., aoΓ»t, sept., oct., nov., dΓ©c.] | |
20 | order: |
|
20 | order: | |
21 | - :day |
|
21 | - :day | |
22 | - :month |
|
22 | - :month | |
23 | - :year |
|
23 | - :year | |
24 |
|
24 | |||
25 | time: |
|
25 | time: | |
26 | formats: |
|
26 | formats: | |
27 | default: "%d/%m/%Y %H:%M" |
|
27 | default: "%d/%m/%Y %H:%M" | |
28 | time: "%H:%M" |
|
28 | time: "%H:%M" | |
29 | short: "%d %b %H:%M" |
|
29 | short: "%d %b %H:%M" | |
30 | long: "%A %d %B %Y %H:%M:%S %Z" |
|
30 | long: "%A %d %B %Y %H:%M:%S %Z" | |
31 | long_ordinal: "%A %d %B %Y %H:%M:%S %Z" |
|
31 | long_ordinal: "%A %d %B %Y %H:%M:%S %Z" | |
32 | only_second: "%S" |
|
32 | only_second: "%S" | |
33 | am: 'am' |
|
33 | am: 'am' | |
34 | pm: 'pm' |
|
34 | pm: 'pm' | |
35 |
|
35 | |||
36 | datetime: |
|
36 | datetime: | |
37 | distance_in_words: |
|
37 | distance_in_words: | |
38 | half_a_minute: "30 secondes" |
|
38 | half_a_minute: "30 secondes" | |
39 | less_than_x_seconds: |
|
39 | less_than_x_seconds: | |
40 | zero: "moins d'une seconde" |
|
40 | zero: "moins d'une seconde" | |
41 | one: "moins d'uneΒ seconde" |
|
41 | one: "moins d'uneΒ seconde" | |
42 | other: "moins de %{count}Β secondes" |
|
42 | other: "moins de %{count}Β secondes" | |
43 | x_seconds: |
|
43 | x_seconds: | |
44 | one: "1Β seconde" |
|
44 | one: "1Β seconde" | |
45 | other: "%{count}Β secondes" |
|
45 | other: "%{count}Β secondes" | |
46 | less_than_x_minutes: |
|
46 | less_than_x_minutes: | |
47 | zero: "moins d'une minute" |
|
47 | zero: "moins d'une minute" | |
48 | one: "moins d'uneΒ minute" |
|
48 | one: "moins d'uneΒ minute" | |
49 | other: "moins de %{count}Β minutes" |
|
49 | other: "moins de %{count}Β minutes" | |
50 | x_minutes: |
|
50 | x_minutes: | |
51 | one: "1Β minute" |
|
51 | one: "1Β minute" | |
52 | other: "%{count}Β minutes" |
|
52 | other: "%{count}Β minutes" | |
53 | about_x_hours: |
|
53 | about_x_hours: | |
54 | one: "environ une heure" |
|
54 | one: "environ une heure" | |
55 | other: "environ %{count}Β heures" |
|
55 | other: "environ %{count}Β heures" | |
56 | x_hours: |
|
56 | x_hours: | |
57 | one: "une heure" |
|
57 | one: "une heure" | |
58 | other: "%{count}Β heures" |
|
58 | other: "%{count}Β heures" | |
59 | x_days: |
|
59 | x_days: | |
60 | one: "unΒ jour" |
|
60 | one: "unΒ jour" | |
61 | other: "%{count}Β jours" |
|
61 | other: "%{count}Β jours" | |
62 | about_x_months: |
|
62 | about_x_months: | |
63 | one: "environ un mois" |
|
63 | one: "environ un mois" | |
64 | other: "environ %{count}Β mois" |
|
64 | other: "environ %{count}Β mois" | |
65 | x_months: |
|
65 | x_months: | |
66 | one: "unΒ mois" |
|
66 | one: "unΒ mois" | |
67 | other: "%{count}Β mois" |
|
67 | other: "%{count}Β mois" | |
68 | about_x_years: |
|
68 | about_x_years: | |
69 | one: "environ un an" |
|
69 | one: "environ un an" | |
70 | other: "environ %{count}Β ans" |
|
70 | other: "environ %{count}Β ans" | |
71 | over_x_years: |
|
71 | over_x_years: | |
72 | one: "plus d'un an" |
|
72 | one: "plus d'un an" | |
73 | other: "plus de %{count}Β ans" |
|
73 | other: "plus de %{count}Β ans" | |
74 | almost_x_years: |
|
74 | almost_x_years: | |
75 | one: "presqu'un an" |
|
75 | one: "presqu'un an" | |
76 | other: "presque %{count} ans" |
|
76 | other: "presque %{count} ans" | |
77 | prompts: |
|
77 | prompts: | |
78 | year: "AnnΓ©e" |
|
78 | year: "AnnΓ©e" | |
79 | month: "Mois" |
|
79 | month: "Mois" | |
80 | day: "Jour" |
|
80 | day: "Jour" | |
81 | hour: "Heure" |
|
81 | hour: "Heure" | |
82 | minute: "Minute" |
|
82 | minute: "Minute" | |
83 | second: "Seconde" |
|
83 | second: "Seconde" | |
84 |
|
84 | |||
85 | number: |
|
85 | number: | |
86 | format: |
|
86 | format: | |
87 | precision: 3 |
|
87 | precision: 3 | |
88 | separator: ',' |
|
88 | separator: ',' | |
89 | delimiter: 'Β ' |
|
89 | delimiter: 'Β ' | |
90 | currency: |
|
90 | currency: | |
91 | format: |
|
91 | format: | |
92 | unit: 'β¬' |
|
92 | unit: 'β¬' | |
93 | precision: 2 |
|
93 | precision: 2 | |
94 | format: '%nΒ %u' |
|
94 | format: '%nΒ %u' | |
95 | human: |
|
95 | human: | |
96 | format: |
|
96 | format: | |
97 | precision: 3 |
|
97 | precision: 3 | |
98 | storage_units: |
|
98 | storage_units: | |
99 | format: "%n %u" |
|
99 | format: "%n %u" | |
100 | units: |
|
100 | units: | |
101 | byte: |
|
101 | byte: | |
102 | one: "octet" |
|
102 | one: "octet" | |
103 | other: "octet" |
|
103 | other: "octet" | |
104 | kb: "ko" |
|
104 | kb: "ko" | |
105 | mb: "Mo" |
|
105 | mb: "Mo" | |
106 | gb: "Go" |
|
106 | gb: "Go" | |
107 | tb: "To" |
|
107 | tb: "To" | |
108 |
|
108 | |||
109 | support: |
|
109 | support: | |
110 | array: |
|
110 | array: | |
111 | sentence_connector: 'et' |
|
111 | sentence_connector: 'et' | |
112 | skip_last_comma: true |
|
112 | skip_last_comma: true | |
113 | word_connector: ", " |
|
113 | word_connector: ", " | |
114 | two_words_connector: " et " |
|
114 | two_words_connector: " et " | |
115 | last_word_connector: " et " |
|
115 | last_word_connector: " et " | |
116 |
|
116 | |||
117 | activerecord: |
|
117 | activerecord: | |
118 | errors: |
|
118 | errors: | |
119 | template: |
|
119 | template: | |
120 | header: |
|
120 | header: | |
121 | one: "Impossible d'enregistrer %{model} : une erreur" |
|
121 | one: "Impossible d'enregistrer %{model} : une erreur" | |
122 | other: "Impossible d'enregistrer %{model} : %{count} erreurs." |
|
122 | other: "Impossible d'enregistrer %{model} : %{count} erreurs." | |
123 | body: "Veuillez vΓ©rifier les champs suivantsΒ :" |
|
123 | body: "Veuillez vΓ©rifier les champs suivantsΒ :" | |
124 | messages: |
|
124 | messages: | |
125 | inclusion: "n'est pas inclus(e) dans la liste" |
|
125 | inclusion: "n'est pas inclus(e) dans la liste" | |
126 | exclusion: "n'est pas disponible" |
|
126 | exclusion: "n'est pas disponible" | |
127 | invalid: "n'est pas valide" |
|
127 | invalid: "n'est pas valide" | |
128 | confirmation: "ne concorde pas avec la confirmation" |
|
128 | confirmation: "ne concorde pas avec la confirmation" | |
129 | accepted: "doit Γͺtre acceptΓ©(e)" |
|
129 | accepted: "doit Γͺtre acceptΓ©(e)" | |
130 | empty: "doit Γͺtre renseignΓ©(e)" |
|
130 | empty: "doit Γͺtre renseignΓ©(e)" | |
131 | blank: "doit Γͺtre renseignΓ©(e)" |
|
131 | blank: "doit Γͺtre renseignΓ©(e)" | |
132 | too_long: "est trop long (pas plus de %{count} caractères)" |
|
132 | too_long: "est trop long (pas plus de %{count} caractères)" | |
133 | too_short: "est trop court (au moins %{count} caractères)" |
|
133 | too_short: "est trop court (au moins %{count} caractères)" | |
134 | wrong_length: "ne fait pas la bonne longueur (doit comporter %{count} caractères)" |
|
134 | wrong_length: "ne fait pas la bonne longueur (doit comporter %{count} caractères)" | |
135 | taken: "est dΓ©jΓ utilisΓ©" |
|
135 | taken: "est dΓ©jΓ utilisΓ©" | |
136 | not_a_number: "n'est pas un nombre" |
|
136 | not_a_number: "n'est pas un nombre" | |
137 | not_a_date: "n'est pas une date valide" |
|
137 | not_a_date: "n'est pas une date valide" | |
138 | greater_than: "doit Γͺtre supΓ©rieur Γ %{count}" |
|
138 | greater_than: "doit Γͺtre supΓ©rieur Γ %{count}" | |
139 | greater_than_or_equal_to: "doit Γͺtre supΓ©rieur ou Γ©gal Γ %{count}" |
|
139 | greater_than_or_equal_to: "doit Γͺtre supΓ©rieur ou Γ©gal Γ %{count}" | |
140 | equal_to: "doit Γͺtre Γ©gal Γ %{count}" |
|
140 | equal_to: "doit Γͺtre Γ©gal Γ %{count}" | |
141 | less_than: "doit Γͺtre infΓ©rieur Γ %{count}" |
|
141 | less_than: "doit Γͺtre infΓ©rieur Γ %{count}" | |
142 | less_than_or_equal_to: "doit Γͺtre infΓ©rieur ou Γ©gal Γ %{count}" |
|
142 | less_than_or_equal_to: "doit Γͺtre infΓ©rieur ou Γ©gal Γ %{count}" | |
143 | odd: "doit Γͺtre impair" |
|
143 | odd: "doit Γͺtre impair" | |
144 | even: "doit Γͺtre pair" |
|
144 | even: "doit Γͺtre pair" | |
145 | greater_than_start_date: "doit Γͺtre postΓ©rieure Γ la date de dΓ©but" |
|
145 | greater_than_start_date: "doit Γͺtre postΓ©rieure Γ la date de dΓ©but" | |
146 | not_same_project: "n'appartient pas au mΓͺme projet" |
|
146 | not_same_project: "n'appartient pas au mΓͺme projet" | |
147 | circular_dependency: "Cette relation crΓ©erait une dΓ©pendance circulaire" |
|
147 | circular_dependency: "Cette relation crΓ©erait une dΓ©pendance circulaire" | |
148 | cant_link_an_issue_with_a_descendant: "Une demande ne peut pas Γͺtre liΓ©e Γ l'une de ses sous-tΓ’ches" |
|
148 | cant_link_an_issue_with_a_descendant: "Une demande ne peut pas Γͺtre liΓ©e Γ l'une de ses sous-tΓ’ches" | |
149 |
|
149 | |||
150 | actionview_instancetag_blank_option: Choisir |
|
150 | actionview_instancetag_blank_option: Choisir | |
151 |
|
151 | |||
152 | general_text_No: 'Non' |
|
152 | general_text_No: 'Non' | |
153 | general_text_Yes: 'Oui' |
|
153 | general_text_Yes: 'Oui' | |
154 | general_text_no: 'non' |
|
154 | general_text_no: 'non' | |
155 | general_text_yes: 'oui' |
|
155 | general_text_yes: 'oui' | |
156 | general_lang_name: 'FranΓ§ais' |
|
156 | general_lang_name: 'FranΓ§ais' | |
157 | general_csv_separator: ';' |
|
157 | general_csv_separator: ';' | |
158 | general_csv_decimal_separator: ',' |
|
158 | general_csv_decimal_separator: ',' | |
159 | general_csv_encoding: ISO-8859-1 |
|
159 | general_csv_encoding: ISO-8859-1 | |
160 | general_pdf_encoding: UTF-8 |
|
160 | general_pdf_encoding: UTF-8 | |
161 | general_first_day_of_week: '1' |
|
161 | general_first_day_of_week: '1' | |
162 |
|
162 | |||
163 | notice_account_updated: Le compte a été mis à jour avec succès. |
|
163 | notice_account_updated: Le compte a été mis à jour avec succès. | |
164 | notice_account_invalid_creditentials: Identifiant ou mot de passe invalide. |
|
164 | notice_account_invalid_creditentials: Identifiant ou mot de passe invalide. | |
165 | notice_account_password_updated: Mot de passe mis à jour avec succès. |
|
165 | notice_account_password_updated: Mot de passe mis à jour avec succès. | |
166 | notice_account_wrong_password: Mot de passe incorrect |
|
166 | notice_account_wrong_password: Mot de passe incorrect | |
167 | notice_account_register_done: Un message contenant les instructions pour activer votre compte vous a Γ©tΓ© envoyΓ©. |
|
167 | notice_account_register_done: Un message contenant les instructions pour activer votre compte vous a Γ©tΓ© envoyΓ©. | |
168 | notice_account_unknown_email: Aucun compte ne correspond Γ cette adresse. |
|
168 | notice_account_unknown_email: Aucun compte ne correspond Γ cette adresse. | |
169 | notice_can_t_change_password: Ce compte utilise une authentification externe. Impossible de changer le mot de passe. |
|
169 | notice_can_t_change_password: Ce compte utilise une authentification externe. Impossible de changer le mot de passe. | |
170 | notice_account_lost_email_sent: Un message contenant les instructions pour choisir un nouveau mot de passe vous a Γ©tΓ© envoyΓ©. |
|
170 | notice_account_lost_email_sent: Un message contenant les instructions pour choisir un nouveau mot de passe vous a Γ©tΓ© envoyΓ©. | |
171 | notice_account_activated: Votre compte a Γ©tΓ© activΓ©. Vous pouvez Γ prΓ©sent vous connecter. |
|
171 | notice_account_activated: Votre compte a Γ©tΓ© activΓ©. Vous pouvez Γ prΓ©sent vous connecter. | |
172 | notice_successful_create: Création effectuée avec succès. |
|
172 | notice_successful_create: Création effectuée avec succès. | |
173 | notice_successful_update: Mise à jour effectuée avec succès. |
|
173 | notice_successful_update: Mise à jour effectuée avec succès. | |
174 | notice_successful_delete: Suppression effectuée avec succès. |
|
174 | notice_successful_delete: Suppression effectuée avec succès. | |
175 | notice_successful_connection: Connexion rΓ©ussie. |
|
175 | notice_successful_connection: Connexion rΓ©ussie. | |
176 | notice_file_not_found: "La page Γ laquelle vous souhaitez accΓ©der n'existe pas ou a Γ©tΓ© supprimΓ©e." |
|
176 | notice_file_not_found: "La page Γ laquelle vous souhaitez accΓ©der n'existe pas ou a Γ©tΓ© supprimΓ©e." | |
177 | notice_locking_conflict: Les donnΓ©es ont Γ©tΓ© mises Γ jour par un autre utilisateur. Mise Γ jour impossible. |
|
177 | notice_locking_conflict: Les donnΓ©es ont Γ©tΓ© mises Γ jour par un autre utilisateur. Mise Γ jour impossible. | |
178 | notice_not_authorized: "Vous n'Γͺtes pas autorisΓ© Γ accΓ©der Γ cette page." |
|
178 | notice_not_authorized: "Vous n'Γͺtes pas autorisΓ© Γ accΓ©der Γ cette page." | |
179 | notice_not_authorized_archived_project: Le projet auquel vous tentez d'accΓ©der a Γ©tΓ© archivΓ©. |
|
179 | notice_not_authorized_archived_project: Le projet auquel vous tentez d'accΓ©der a Γ©tΓ© archivΓ©. | |
180 | notice_email_sent: "Un email a Γ©tΓ© envoyΓ© Γ %{value}" |
|
180 | notice_email_sent: "Un email a Γ©tΓ© envoyΓ© Γ %{value}" | |
181 | notice_email_error: "Erreur lors de l'envoi de l'email (%{value})" |
|
181 | notice_email_error: "Erreur lors de l'envoi de l'email (%{value})" | |
182 | notice_feeds_access_key_reseted: "Votre clé d'accès aux flux RSS a été réinitialisée." |
|
182 | notice_feeds_access_key_reseted: "Votre clé d'accès aux flux RSS a été réinitialisée." | |
183 | notice_failed_to_save_issues: "%{count} demande(s) sur les %{total} sΓ©lectionnΓ©es n'ont pas pu Γͺtre mise(s) Γ jour : %{ids}." |
|
183 | notice_failed_to_save_issues: "%{count} demande(s) sur les %{total} sΓ©lectionnΓ©es n'ont pas pu Γͺtre mise(s) Γ jour : %{ids}." | |
184 | notice_failed_to_save_time_entries: "%{count} temps passΓ©(s) sur les %{total} sΓ©lectionnΓ©s n'ont pas pu Γͺtre mis Γ jour: %{ids}." |
|
184 | notice_failed_to_save_time_entries: "%{count} temps passΓ©(s) sur les %{total} sΓ©lectionnΓ©s n'ont pas pu Γͺtre mis Γ jour: %{ids}." | |
185 | notice_no_issue_selected: "Aucune demande sΓ©lectionnΓ©e ! Cochez les demandes que vous voulez mettre Γ jour." |
|
185 | notice_no_issue_selected: "Aucune demande sΓ©lectionnΓ©e ! Cochez les demandes que vous voulez mettre Γ jour." | |
186 | notice_account_pending: "Votre compte a été créé et attend l'approbation de l'administrateur." |
|
186 | notice_account_pending: "Votre compte a été créé et attend l'approbation de l'administrateur." | |
187 | notice_default_data_loaded: Paramétrage par défaut chargé avec succès. |
|
187 | notice_default_data_loaded: Paramétrage par défaut chargé avec succès. | |
188 | notice_unable_delete_version: Impossible de supprimer cette version. |
|
188 | notice_unable_delete_version: Impossible de supprimer cette version. | |
189 | notice_issue_done_ratios_updated: L'avancement des demandes a Γ©tΓ© mis Γ jour. |
|
189 | notice_issue_done_ratios_updated: L'avancement des demandes a Γ©tΓ© mis Γ jour. | |
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_gantt_chart_truncated: "Le diagramme a Γ©tΓ© tronquΓ© car il excΓ¨de le nombre maximal d'Γ©lΓ©ments pouvant Γͺtre affichΓ©s (%{max})" |
|
191 | notice_gantt_chart_truncated: "Le diagramme a Γ©tΓ© tronquΓ© car il excΓ¨de le nombre maximal d'Γ©lΓ©ments pouvant Γͺtre affichΓ©s (%{max})" | |
192 | notice_issue_successful_create: "Demande %{id} créée." |
|
192 | notice_issue_successful_create: "Demande %{id} créée." | |
193 | notice_issue_update_conflict: "La demande a Γ©tΓ© mise Γ jour par un autre utilisateur pendant que vous la modifiez." |
|
193 | notice_issue_update_conflict: "La demande a Γ©tΓ© mise Γ jour par un autre utilisateur pendant que vous la modifiez." | |
194 | notice_account_deleted: "Votre compte a Γ©tΓ© dΓ©finitivement supprimΓ©." |
|
194 | notice_account_deleted: "Votre compte a Γ©tΓ© dΓ©finitivement supprimΓ©." | |
195 | notice_user_successful_create: "Utilisateur %{id} créé." |
|
195 | notice_user_successful_create: "Utilisateur %{id} créé." | |
196 |
|
196 | |||
197 | error_can_t_load_default_data: "Une erreur s'est produite lors du chargement du paramΓ©trage : %{value}" |
|
197 | error_can_t_load_default_data: "Une erreur s'est produite lors du chargement du paramΓ©trage : %{value}" | |
198 | error_scm_not_found: "L'entrΓ©e et/ou la rΓ©vision demandΓ©e n'existe pas dans le dΓ©pΓ΄t." |
|
198 | error_scm_not_found: "L'entrΓ©e et/ou la rΓ©vision demandΓ©e n'existe pas dans le dΓ©pΓ΄t." | |
199 | error_scm_command_failed: "Une erreur s'est produite lors de l'accès au dépôt : %{value}" |
|
199 | error_scm_command_failed: "Une erreur s'est produite lors de l'accès au dépôt : %{value}" | |
200 | error_scm_annotate: "L'entrΓ©e n'existe pas ou ne peut pas Γͺtre annotΓ©e." |
|
200 | error_scm_annotate: "L'entrΓ©e n'existe pas ou ne peut pas Γͺtre annotΓ©e." | |
201 | error_issue_not_found_in_project: "La demande n'existe pas ou n'appartient pas Γ ce projet" |
|
201 | error_issue_not_found_in_project: "La demande n'existe pas ou n'appartient pas Γ ce projet" | |
202 | error_can_not_reopen_issue_on_closed_version: 'Une demande assignΓ©e Γ une version fermΓ©e ne peut pas Γͺtre rΓ©ouverte' |
|
202 | error_can_not_reopen_issue_on_closed_version: 'Une demande assignΓ©e Γ une version fermΓ©e ne peut pas Γͺtre rΓ©ouverte' | |
203 | error_can_not_archive_project: "Ce projet ne peut pas Γͺtre archivΓ©" |
|
203 | error_can_not_archive_project: "Ce projet ne peut pas Γͺtre archivΓ©" | |
204 | error_workflow_copy_source: 'Veuillez sΓ©lectionner un tracker et/ou un rΓ΄le source' |
|
204 | error_workflow_copy_source: 'Veuillez sΓ©lectionner un tracker et/ou un rΓ΄le source' | |
205 | error_workflow_copy_target: 'Veuillez sΓ©lectionner les trackers et rΓ΄les cibles' |
|
205 | error_workflow_copy_target: 'Veuillez sΓ©lectionner les trackers et rΓ΄les cibles' | |
206 | error_issue_done_ratios_not_updated: L'avancement des demandes n'a pas pu Γͺtre mis Γ jour. |
|
206 | error_issue_done_ratios_not_updated: L'avancement des demandes n'a pas pu Γͺtre mis Γ jour. | |
207 | error_attachment_too_big: Ce fichier ne peut pas Γͺtre attachΓ© car il excΓ¨de la taille maximale autorisΓ©e (%{max_size}) |
|
207 | error_attachment_too_big: Ce fichier ne peut pas Γͺtre attachΓ© car il excΓ¨de la taille maximale autorisΓ©e (%{max_size}) | |
208 | error_session_expired: "Votre session a expirΓ©. Veuillez vous reconnecter." |
|
208 | error_session_expired: "Votre session a expirΓ©. Veuillez vous reconnecter." | |
209 |
|
209 | |||
210 | warning_attachments_not_saved: "%{count} fichier(s) n'ont pas pu Γͺtre sauvegardΓ©s." |
|
210 | warning_attachments_not_saved: "%{count} fichier(s) n'ont pas pu Γͺtre sauvegardΓ©s." | |
211 |
|
211 | |||
212 | mail_subject_lost_password: "Votre mot de passe %{value}" |
|
212 | mail_subject_lost_password: "Votre mot de passe %{value}" | |
213 | mail_body_lost_password: 'Pour changer votre mot de passe, cliquez sur le lien suivant :' |
|
213 | mail_body_lost_password: 'Pour changer votre mot de passe, cliquez sur le lien suivant :' | |
214 | mail_subject_register: "Activation de votre compte %{value}" |
|
214 | mail_subject_register: "Activation de votre compte %{value}" | |
215 | mail_body_register: 'Pour activer votre compte, cliquez sur le lien suivant :' |
|
215 | mail_body_register: 'Pour activer votre compte, cliquez sur le lien suivant :' | |
216 | mail_body_account_information_external: "Vous pouvez utiliser votre compte %{value} pour vous connecter." |
|
216 | mail_body_account_information_external: "Vous pouvez utiliser votre compte %{value} pour vous connecter." | |
217 | mail_body_account_information: Paramètres de connexion de votre compte |
|
217 | mail_body_account_information: Paramètres de connexion de votre compte | |
218 | mail_subject_account_activation_request: "Demande d'activation d'un compte %{value}" |
|
218 | mail_subject_account_activation_request: "Demande d'activation d'un compte %{value}" | |
219 | mail_body_account_activation_request: "Un nouvel utilisateur (%{value}) s'est inscrit. Son compte nΓ©cessite votre approbation :" |
|
219 | mail_body_account_activation_request: "Un nouvel utilisateur (%{value}) s'est inscrit. Son compte nΓ©cessite votre approbation :" | |
220 | mail_subject_reminder: "%{count} demande(s) arrivent Γ Γ©chΓ©ance (%{days})" |
|
220 | mail_subject_reminder: "%{count} demande(s) arrivent Γ Γ©chΓ©ance (%{days})" | |
221 | mail_body_reminder: "%{count} demande(s) qui vous sont assignΓ©es arrivent Γ Γ©chΓ©ance dans les %{days} prochains jours :" |
|
221 | mail_body_reminder: "%{count} demande(s) qui vous sont assignΓ©es arrivent Γ Γ©chΓ©ance dans les %{days} prochains jours :" | |
222 | mail_subject_wiki_content_added: "Page wiki '%{id}' ajoutΓ©e" |
|
222 | mail_subject_wiki_content_added: "Page wiki '%{id}' ajoutΓ©e" | |
223 | mail_body_wiki_content_added: "La page wiki '%{id}' a Γ©tΓ© ajoutΓ©e par %{author}." |
|
223 | mail_body_wiki_content_added: "La page wiki '%{id}' a Γ©tΓ© ajoutΓ©e par %{author}." | |
224 | mail_subject_wiki_content_updated: "Page wiki '%{id}' mise Γ jour" |
|
224 | mail_subject_wiki_content_updated: "Page wiki '%{id}' mise Γ jour" | |
225 | mail_body_wiki_content_updated: "La page wiki '%{id}' a Γ©tΓ© mise Γ jour par %{author}." |
|
225 | mail_body_wiki_content_updated: "La page wiki '%{id}' a Γ©tΓ© mise Γ jour par %{author}." | |
226 |
|
226 | |||
227 | gui_validation_error: 1 erreur |
|
227 | gui_validation_error: 1 erreur | |
228 | gui_validation_error_plural: "%{count} erreurs" |
|
228 | gui_validation_error_plural: "%{count} erreurs" | |
229 |
|
229 | |||
230 | field_name: Nom |
|
230 | field_name: Nom | |
231 | field_description: Description |
|
231 | field_description: Description | |
232 | field_summary: RΓ©sumΓ© |
|
232 | field_summary: RΓ©sumΓ© | |
233 | field_is_required: Obligatoire |
|
233 | field_is_required: Obligatoire | |
234 | field_firstname: PrΓ©nom |
|
234 | field_firstname: PrΓ©nom | |
235 | field_lastname: Nom |
|
235 | field_lastname: Nom | |
236 | field_mail: "Email " |
|
236 | field_mail: "Email " | |
237 | field_filename: Fichier |
|
237 | field_filename: Fichier | |
238 | field_filesize: Taille |
|
238 | field_filesize: Taille | |
239 | field_downloads: TΓ©lΓ©chargements |
|
239 | field_downloads: TΓ©lΓ©chargements | |
240 | field_author: Auteur |
|
240 | field_author: Auteur | |
241 | field_created_on: "Créé " |
|
241 | field_created_on: "Créé " | |
242 | field_updated_on: "Mis-Γ -jour " |
|
242 | field_updated_on: "Mis-Γ -jour " | |
243 | field_field_format: Format |
|
243 | field_field_format: Format | |
244 | field_is_for_all: Pour tous les projets |
|
244 | field_is_for_all: Pour tous les projets | |
245 | field_possible_values: Valeurs possibles |
|
245 | field_possible_values: Valeurs possibles | |
246 | field_regexp: Expression régulière |
|
246 | field_regexp: Expression régulière | |
247 | field_min_length: Longueur minimum |
|
247 | field_min_length: Longueur minimum | |
248 | field_max_length: Longueur maximum |
|
248 | field_max_length: Longueur maximum | |
249 | field_value: Valeur |
|
249 | field_value: Valeur | |
250 | field_category: CatΓ©gorie |
|
250 | field_category: CatΓ©gorie | |
251 | field_title: Titre |
|
251 | field_title: Titre | |
252 | field_project: Projet |
|
252 | field_project: Projet | |
253 | field_issue: Demande |
|
253 | field_issue: Demande | |
254 | field_status: Statut |
|
254 | field_status: Statut | |
255 | field_notes: Notes |
|
255 | field_notes: Notes | |
256 | field_is_closed: Demande fermΓ©e |
|
256 | field_is_closed: Demande fermΓ©e | |
257 | field_is_default: Valeur par dΓ©faut |
|
257 | field_is_default: Valeur par dΓ©faut | |
258 | field_tracker: Tracker |
|
258 | field_tracker: Tracker | |
259 | field_subject: Sujet |
|
259 | field_subject: Sujet | |
260 | field_due_date: EchΓ©ance |
|
260 | field_due_date: EchΓ©ance | |
261 | field_assigned_to: AssignΓ© Γ |
|
261 | field_assigned_to: AssignΓ© Γ | |
262 | field_priority: PrioritΓ© |
|
262 | field_priority: PrioritΓ© | |
263 | field_fixed_version: Version cible |
|
263 | field_fixed_version: Version cible | |
264 | field_user: Utilisateur |
|
264 | field_user: Utilisateur | |
265 | field_role: RΓ΄le |
|
265 | field_role: RΓ΄le | |
266 | field_homepage: "Site web " |
|
266 | field_homepage: "Site web " | |
267 | field_is_public: Public |
|
267 | field_is_public: Public | |
268 | field_parent: Sous-projet de |
|
268 | field_parent: Sous-projet de | |
269 | field_is_in_roadmap: Demandes affichΓ©es dans la roadmap |
|
269 | field_is_in_roadmap: Demandes affichΓ©es dans la roadmap | |
270 | field_login: "Identifiant " |
|
270 | field_login: "Identifiant " | |
271 | field_mail_notification: Notifications par mail |
|
271 | field_mail_notification: Notifications par mail | |
272 | field_admin: Administrateur |
|
272 | field_admin: Administrateur | |
273 | field_last_login_on: "Dernière connexion " |
|
273 | field_last_login_on: "Dernière connexion " | |
274 | field_language: Langue |
|
274 | field_language: Langue | |
275 | field_effective_date: Date |
|
275 | field_effective_date: Date | |
276 | field_password: Mot de passe |
|
276 | field_password: Mot de passe | |
277 | field_new_password: Nouveau mot de passe |
|
277 | field_new_password: Nouveau mot de passe | |
278 | field_password_confirmation: Confirmation |
|
278 | field_password_confirmation: Confirmation | |
279 | field_version: Version |
|
279 | field_version: Version | |
280 | field_type: Type |
|
280 | field_type: Type | |
281 | field_host: HΓ΄te |
|
281 | field_host: HΓ΄te | |
282 | field_port: Port |
|
282 | field_port: Port | |
283 | field_account: Compte |
|
283 | field_account: Compte | |
284 | field_base_dn: Base DN |
|
284 | field_base_dn: Base DN | |
285 | field_attr_login: Attribut Identifiant |
|
285 | field_attr_login: Attribut Identifiant | |
286 | field_attr_firstname: Attribut PrΓ©nom |
|
286 | field_attr_firstname: Attribut PrΓ©nom | |
287 | field_attr_lastname: Attribut Nom |
|
287 | field_attr_lastname: Attribut Nom | |
288 | field_attr_mail: Attribut Email |
|
288 | field_attr_mail: Attribut Email | |
289 | field_onthefly: CrΓ©ation des utilisateurs Γ la volΓ©e |
|
289 | field_onthefly: CrΓ©ation des utilisateurs Γ la volΓ©e | |
290 | field_start_date: DΓ©but |
|
290 | field_start_date: DΓ©but | |
291 | field_done_ratio: "% rΓ©alisΓ©" |
|
291 | field_done_ratio: "% rΓ©alisΓ©" | |
292 | field_auth_source: Mode d'authentification |
|
292 | field_auth_source: Mode d'authentification | |
293 | field_hide_mail: Cacher mon adresse mail |
|
293 | field_hide_mail: Cacher mon adresse mail | |
294 | field_comments: Commentaire |
|
294 | field_comments: Commentaire | |
295 | field_url: URL |
|
295 | field_url: URL | |
296 | field_start_page: Page de dΓ©marrage |
|
296 | field_start_page: Page de dΓ©marrage | |
297 | field_subproject: Sous-projet |
|
297 | field_subproject: Sous-projet | |
298 | field_hours: Heures |
|
298 | field_hours: Heures | |
299 | field_activity: ActivitΓ© |
|
299 | field_activity: ActivitΓ© | |
300 | field_spent_on: Date |
|
300 | field_spent_on: Date | |
301 | field_identifier: Identifiant |
|
301 | field_identifier: Identifiant | |
302 | field_is_filter: UtilisΓ© comme filtre |
|
302 | field_is_filter: UtilisΓ© comme filtre | |
303 | field_issue_to: Demande liΓ©e |
|
303 | field_issue_to: Demande liΓ©e | |
304 | field_delay: Retard |
|
304 | field_delay: Retard | |
305 | field_assignable: Demandes assignables Γ ce rΓ΄le |
|
305 | field_assignable: Demandes assignables Γ ce rΓ΄le | |
306 | field_redirect_existing_links: Rediriger les liens existants |
|
306 | field_redirect_existing_links: Rediriger les liens existants | |
307 | field_estimated_hours: Temps estimΓ© |
|
307 | field_estimated_hours: Temps estimΓ© | |
308 | field_column_names: Colonnes |
|
308 | field_column_names: Colonnes | |
309 | field_time_zone: Fuseau horaire |
|
309 | field_time_zone: Fuseau horaire | |
310 | field_searchable: UtilisΓ© pour les recherches |
|
310 | field_searchable: UtilisΓ© pour les recherches | |
311 | field_default_value: Valeur par dΓ©faut |
|
311 | field_default_value: Valeur par dΓ©faut | |
312 | field_comments_sorting: Afficher les commentaires |
|
312 | field_comments_sorting: Afficher les commentaires | |
313 | field_parent_title: Page parent |
|
313 | field_parent_title: Page parent | |
314 | field_editable: Modifiable |
|
314 | field_editable: Modifiable | |
315 | field_watcher: Observateur |
|
315 | field_watcher: Observateur | |
316 | field_identity_url: URL OpenID |
|
316 | field_identity_url: URL OpenID | |
317 | field_content: Contenu |
|
317 | field_content: Contenu | |
318 | field_group_by: Grouper par |
|
318 | field_group_by: Grouper par | |
319 | field_sharing: Partage |
|
319 | field_sharing: Partage | |
320 | field_active: Actif |
|
320 | field_active: Actif | |
321 | field_parent_issue: TΓ’che parente |
|
321 | field_parent_issue: TΓ’che parente | |
322 | field_visible: Visible |
|
322 | field_visible: Visible | |
323 | field_warn_on_leaving_unsaved: "M'avertir lorsque je quitte une page contenant du texte non sauvegardΓ©" |
|
323 | field_warn_on_leaving_unsaved: "M'avertir lorsque je quitte une page contenant du texte non sauvegardΓ©" | |
324 | field_issues_visibility: VisibilitΓ© des demandes |
|
324 | field_issues_visibility: VisibilitΓ© des demandes | |
325 | field_is_private: PrivΓ©e |
|
325 | field_is_private: PrivΓ©e | |
326 | field_commit_logs_encoding: Encodage des messages de commit |
|
326 | field_commit_logs_encoding: Encodage des messages de commit | |
327 | field_repository_is_default: DΓ©pΓ΄t principal |
|
327 | field_repository_is_default: DΓ©pΓ΄t principal | |
328 | field_multiple: Valeurs multiples |
|
328 | field_multiple: Valeurs multiples | |
329 | field_auth_source_ldap_filter: Filtre LDAP |
|
329 | field_auth_source_ldap_filter: Filtre LDAP | |
330 | field_core_fields: Champs standards |
|
330 | field_core_fields: Champs standards | |
331 | field_timeout: "Timeout (en secondes)" |
|
331 | field_timeout: "Timeout (en secondes)" | |
332 | field_board_parent: Forum parent |
|
332 | field_board_parent: Forum parent | |
333 |
|
333 | |||
334 | setting_app_title: Titre de l'application |
|
334 | setting_app_title: Titre de l'application | |
335 | setting_app_subtitle: Sous-titre de l'application |
|
335 | setting_app_subtitle: Sous-titre de l'application | |
336 | setting_welcome_text: Texte d'accueil |
|
336 | setting_welcome_text: Texte d'accueil | |
337 | setting_default_language: Langue par dΓ©faut |
|
337 | setting_default_language: Langue par dΓ©faut | |
338 | setting_login_required: Authentification obligatoire |
|
338 | setting_login_required: Authentification obligatoire | |
339 | setting_self_registration: Inscription des nouveaux utilisateurs |
|
339 | setting_self_registration: Inscription des nouveaux utilisateurs | |
340 | setting_attachment_max_size: Taille maximale des fichiers |
|
340 | setting_attachment_max_size: Taille maximale des fichiers | |
341 | setting_issues_export_limit: Limite d'exportation des demandes |
|
341 | setting_issues_export_limit: Limite d'exportation des demandes | |
342 | setting_mail_from: Adresse d'Γ©mission |
|
342 | setting_mail_from: Adresse d'Γ©mission | |
343 | setting_bcc_recipients: Destinataires en copie cachΓ©e (cci) |
|
343 | setting_bcc_recipients: Destinataires en copie cachΓ©e (cci) | |
344 | setting_plain_text_mail: Mail en texte brut (non HTML) |
|
344 | setting_plain_text_mail: Mail en texte brut (non HTML) | |
345 | setting_host_name: Nom d'hΓ΄te et chemin |
|
345 | setting_host_name: Nom d'hΓ΄te et chemin | |
346 | setting_text_formatting: Formatage du texte |
|
346 | setting_text_formatting: Formatage du texte | |
347 | setting_wiki_compression: Compression de l'historique des pages wiki |
|
347 | setting_wiki_compression: Compression de l'historique des pages wiki | |
348 | setting_feeds_limit: Nombre maximal d'Γ©lΓ©ments dans les flux Atom |
|
348 | setting_feeds_limit: Nombre maximal d'Γ©lΓ©ments dans les flux Atom | |
349 | setting_default_projects_public: DΓ©finir les nouveaux projets comme publics par dΓ©faut |
|
349 | setting_default_projects_public: DΓ©finir les nouveaux projets comme publics par dΓ©faut | |
350 | setting_autofetch_changesets: RΓ©cupΓ©ration automatique des commits |
|
350 | setting_autofetch_changesets: RΓ©cupΓ©ration automatique des commits | |
351 | setting_sys_api_enabled: Activer les WS pour la gestion des dΓ©pΓ΄ts |
|
351 | setting_sys_api_enabled: Activer les WS pour la gestion des dΓ©pΓ΄ts | |
352 | setting_commit_ref_keywords: Mots-clΓ©s de rΓ©fΓ©rencement |
|
352 | setting_commit_ref_keywords: Mots-clΓ©s de rΓ©fΓ©rencement | |
353 | setting_commit_fix_keywords: Mots-clΓ©s de rΓ©solution |
|
353 | setting_commit_fix_keywords: Mots-clΓ©s de rΓ©solution | |
354 | setting_autologin: DurΓ©e maximale de connexion automatique |
|
354 | setting_autologin: DurΓ©e maximale de connexion automatique | |
355 | setting_date_format: Format de date |
|
355 | setting_date_format: Format de date | |
356 | setting_time_format: Format d'heure |
|
356 | setting_time_format: Format d'heure | |
357 | setting_cross_project_issue_relations: Autoriser les relations entre demandes de diffΓ©rents projets |
|
357 | setting_cross_project_issue_relations: Autoriser les relations entre demandes de diffΓ©rents projets | |
358 | setting_issue_list_default_columns: Colonnes affichΓ©es par dΓ©faut sur la liste des demandes |
|
358 | setting_issue_list_default_columns: Colonnes affichΓ©es par dΓ©faut sur la liste des demandes | |
359 | setting_emails_footer: Pied-de-page des emails |
|
359 | setting_emails_footer: Pied-de-page des emails | |
360 | setting_protocol: Protocole |
|
360 | setting_protocol: Protocole | |
361 | setting_per_page_options: Options d'objets affichΓ©s par page |
|
361 | setting_per_page_options: Options d'objets affichΓ©s par page | |
362 | setting_user_format: Format d'affichage des utilisateurs |
|
362 | setting_user_format: Format d'affichage des utilisateurs | |
363 | setting_activity_days_default: Nombre de jours affichΓ©s sur l'activitΓ© des projets |
|
363 | setting_activity_days_default: Nombre de jours affichΓ©s sur l'activitΓ© des projets | |
364 | setting_display_subprojects_issues: Afficher par dΓ©faut les demandes des sous-projets sur les projets principaux |
|
364 | setting_display_subprojects_issues: Afficher par dΓ©faut les demandes des sous-projets sur les projets principaux | |
365 | setting_enabled_scm: SCM activΓ©s |
|
365 | setting_enabled_scm: SCM activΓ©s | |
366 | setting_mail_handler_body_delimiters: "Tronquer les emails après l'une de ces lignes" |
|
366 | setting_mail_handler_body_delimiters: "Tronquer les emails après l'une de ces lignes" | |
367 | setting_mail_handler_api_enabled: "Activer le WS pour la rΓ©ception d'emails" |
|
367 | setting_mail_handler_api_enabled: "Activer le WS pour la rΓ©ception d'emails" | |
368 | setting_mail_handler_api_key: ClΓ© de protection de l'API |
|
368 | setting_mail_handler_api_key: ClΓ© de protection de l'API | |
369 | setting_sequential_project_identifiers: GΓ©nΓ©rer des identifiants de projet sΓ©quentiels |
|
369 | setting_sequential_project_identifiers: GΓ©nΓ©rer des identifiants de projet sΓ©quentiels | |
370 | setting_gravatar_enabled: Afficher les Gravatar des utilisateurs |
|
370 | setting_gravatar_enabled: Afficher les Gravatar des utilisateurs | |
371 | setting_diff_max_lines_displayed: Nombre maximum de lignes de diff affichΓ©es |
|
371 | setting_diff_max_lines_displayed: Nombre maximum de lignes de diff affichΓ©es | |
372 | setting_file_max_size_displayed: Taille maximum des fichiers texte affichΓ©s en ligne |
|
372 | setting_file_max_size_displayed: Taille maximum des fichiers texte affichΓ©s en ligne | |
373 | setting_repository_log_display_limit: "Nombre maximum de rΓ©visions affichΓ©es sur l'historique d'un fichier" |
|
373 | setting_repository_log_display_limit: "Nombre maximum de rΓ©visions affichΓ©es sur l'historique d'un fichier" | |
374 | setting_openid: "Autoriser l'authentification et l'enregistrement OpenID" |
|
374 | setting_openid: "Autoriser l'authentification et l'enregistrement OpenID" | |
375 | setting_password_min_length: Longueur minimum des mots de passe |
|
375 | setting_password_min_length: Longueur minimum des mots de passe | |
376 | setting_new_project_user_role_id: RΓ΄le donnΓ© Γ un utilisateur non-administrateur qui crΓ©e un projet |
|
376 | setting_new_project_user_role_id: RΓ΄le donnΓ© Γ un utilisateur non-administrateur qui crΓ©e un projet | |
377 | setting_default_projects_modules: Modules activΓ©s par dΓ©faut pour les nouveaux projets |
|
377 | setting_default_projects_modules: Modules activΓ©s par dΓ©faut pour les nouveaux projets | |
378 | setting_issue_done_ratio: Calcul de l'avancement des demandes |
|
378 | setting_issue_done_ratio: Calcul de l'avancement des demandes | |
379 | setting_issue_done_ratio_issue_status: Utiliser le statut |
|
379 | setting_issue_done_ratio_issue_status: Utiliser le statut | |
380 | setting_issue_done_ratio_issue_field: 'Utiliser le champ % effectuΓ©' |
|
380 | setting_issue_done_ratio_issue_field: 'Utiliser le champ % effectuΓ©' | |
381 | setting_rest_api_enabled: Activer l'API REST |
|
381 | setting_rest_api_enabled: Activer l'API REST | |
382 | setting_gravatar_default: Image Gravatar par dΓ©faut |
|
382 | setting_gravatar_default: Image Gravatar par dΓ©faut | |
383 | setting_start_of_week: Jour de dΓ©but des calendriers |
|
383 | setting_start_of_week: Jour de dΓ©but des calendriers | |
384 | setting_cache_formatted_text: Mettre en cache le texte formatΓ© |
|
384 | setting_cache_formatted_text: Mettre en cache le texte formatΓ© | |
385 | setting_commit_logtime_enabled: Permettre la saisie de temps |
|
385 | setting_commit_logtime_enabled: Permettre la saisie de temps | |
386 | setting_commit_logtime_activity_id: ActivitΓ© pour le temps saisi |
|
386 | setting_commit_logtime_activity_id: ActivitΓ© pour le temps saisi | |
387 | setting_gantt_items_limit: Nombre maximum d'Γ©lΓ©ments affichΓ©s sur le gantt |
|
387 | setting_gantt_items_limit: Nombre maximum d'Γ©lΓ©ments affichΓ©s sur le gantt | |
388 | setting_issue_group_assignment: Permettre l'assignement des demandes aux groupes |
|
388 | setting_issue_group_assignment: Permettre l'assignement des demandes aux groupes | |
389 | 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 |
|
389 | 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 | |
390 | setting_commit_cross_project_ref: Permettre le rΓ©fΓ©rencement et la rΓ©solution des demandes de tous les autres projets |
|
390 | setting_commit_cross_project_ref: Permettre le rΓ©fΓ©rencement et la rΓ©solution des demandes de tous les autres projets | |
391 | setting_unsubscribe: Permettre aux utilisateurs de supprimer leur propre compte |
|
391 | setting_unsubscribe: Permettre aux utilisateurs de supprimer leur propre compte | |
392 | setting_session_lifetime: DurΓ©e de vie maximale des sessions |
|
392 | setting_session_lifetime: DurΓ©e de vie maximale des sessions | |
393 | setting_session_timeout: DurΓ©e maximale d'inactivitΓ© |
|
393 | setting_session_timeout: DurΓ©e maximale d'inactivitΓ© | |
394 | setting_thumbnails_enabled: Afficher les vignettes des images |
|
394 | setting_thumbnails_enabled: Afficher les vignettes des images | |
395 | setting_thumbnails_size: Taille des vignettes (en pixels) |
|
395 | setting_thumbnails_size: Taille des vignettes (en pixels) | |
396 |
|
396 | |||
397 | permission_add_project: CrΓ©er un projet |
|
397 | permission_add_project: CrΓ©er un projet | |
398 | permission_add_subprojects: CrΓ©er des sous-projets |
|
398 | permission_add_subprojects: CrΓ©er des sous-projets | |
399 | permission_edit_project: Modifier le projet |
|
399 | permission_edit_project: Modifier le projet | |
400 | permission_close_project: Fermer / rΓ©ouvrir le projet |
|
400 | permission_close_project: Fermer / rΓ©ouvrir le projet | |
401 | permission_select_project_modules: Choisir les modules |
|
401 | permission_select_project_modules: Choisir les modules | |
402 | permission_manage_members: GΓ©rer les membres |
|
402 | permission_manage_members: GΓ©rer les membres | |
403 | permission_manage_versions: GΓ©rer les versions |
|
403 | permission_manage_versions: GΓ©rer les versions | |
404 | permission_manage_categories: GΓ©rer les catΓ©gories de demandes |
|
404 | permission_manage_categories: GΓ©rer les catΓ©gories de demandes | |
405 | permission_view_issues: Voir les demandes |
|
405 | permission_view_issues: Voir les demandes | |
406 | permission_add_issues: CrΓ©er des demandes |
|
406 | permission_add_issues: CrΓ©er des demandes | |
407 | permission_edit_issues: Modifier les demandes |
|
407 | permission_edit_issues: Modifier les demandes | |
408 | permission_manage_issue_relations: GΓ©rer les relations |
|
408 | permission_manage_issue_relations: GΓ©rer les relations | |
409 | permission_set_issues_private: Rendre les demandes publiques ou privΓ©es |
|
409 | permission_set_issues_private: Rendre les demandes publiques ou privΓ©es | |
410 | permission_set_own_issues_private: Rendre ses propres demandes publiques ou privΓ©es |
|
410 | permission_set_own_issues_private: Rendre ses propres demandes publiques ou privΓ©es | |
411 | permission_add_issue_notes: Ajouter des notes |
|
411 | permission_add_issue_notes: Ajouter des notes | |
412 | permission_edit_issue_notes: Modifier les notes |
|
412 | permission_edit_issue_notes: Modifier les notes | |
413 | permission_edit_own_issue_notes: Modifier ses propres notes |
|
413 | permission_edit_own_issue_notes: Modifier ses propres notes | |
414 | permission_move_issues: DΓ©placer les demandes |
|
414 | permission_move_issues: DΓ©placer les demandes | |
415 | permission_delete_issues: Supprimer les demandes |
|
415 | permission_delete_issues: Supprimer les demandes | |
416 | permission_manage_public_queries: GΓ©rer les requΓͺtes publiques |
|
416 | permission_manage_public_queries: GΓ©rer les requΓͺtes publiques | |
417 | permission_save_queries: Sauvegarder les requΓͺtes |
|
417 | permission_save_queries: Sauvegarder les requΓͺtes | |
418 | permission_view_gantt: Voir le gantt |
|
418 | permission_view_gantt: Voir le gantt | |
419 | permission_view_calendar: Voir le calendrier |
|
419 | permission_view_calendar: Voir le calendrier | |
420 | permission_view_issue_watchers: Voir la liste des observateurs |
|
420 | permission_view_issue_watchers: Voir la liste des observateurs | |
421 | permission_add_issue_watchers: Ajouter des observateurs |
|
421 | permission_add_issue_watchers: Ajouter des observateurs | |
422 | permission_delete_issue_watchers: Supprimer des observateurs |
|
422 | permission_delete_issue_watchers: Supprimer des observateurs | |
423 | permission_log_time: Saisir le temps passΓ© |
|
423 | permission_log_time: Saisir le temps passΓ© | |
424 | permission_view_time_entries: Voir le temps passΓ© |
|
424 | permission_view_time_entries: Voir le temps passΓ© | |
425 | permission_edit_time_entries: Modifier les temps passΓ©s |
|
425 | permission_edit_time_entries: Modifier les temps passΓ©s | |
426 | permission_edit_own_time_entries: Modifier son propre temps passΓ© |
|
426 | permission_edit_own_time_entries: Modifier son propre temps passΓ© | |
427 | permission_manage_news: GΓ©rer les annonces |
|
427 | permission_manage_news: GΓ©rer les annonces | |
428 | permission_comment_news: Commenter les annonces |
|
428 | permission_comment_news: Commenter les annonces | |
429 | permission_manage_documents: GΓ©rer les documents |
|
429 | permission_manage_documents: GΓ©rer les documents | |
430 | permission_view_documents: Voir les documents |
|
430 | permission_view_documents: Voir les documents | |
431 | permission_manage_files: GΓ©rer les fichiers |
|
431 | permission_manage_files: GΓ©rer les fichiers | |
432 | permission_view_files: Voir les fichiers |
|
432 | permission_view_files: Voir les fichiers | |
433 | permission_manage_wiki: GΓ©rer le wiki |
|
433 | permission_manage_wiki: GΓ©rer le wiki | |
434 | permission_rename_wiki_pages: Renommer les pages |
|
434 | permission_rename_wiki_pages: Renommer les pages | |
435 | permission_delete_wiki_pages: Supprimer les pages |
|
435 | permission_delete_wiki_pages: Supprimer les pages | |
436 | permission_view_wiki_pages: Voir le wiki |
|
436 | permission_view_wiki_pages: Voir le wiki | |
437 | permission_view_wiki_edits: "Voir l'historique des modifications" |
|
437 | permission_view_wiki_edits: "Voir l'historique des modifications" | |
438 | permission_edit_wiki_pages: Modifier les pages |
|
438 | permission_edit_wiki_pages: Modifier les pages | |
439 | permission_delete_wiki_pages_attachments: Supprimer les fichiers joints |
|
439 | permission_delete_wiki_pages_attachments: Supprimer les fichiers joints | |
440 | permission_protect_wiki_pages: ProtΓ©ger les pages |
|
440 | permission_protect_wiki_pages: ProtΓ©ger les pages | |
441 | permission_manage_repository: GΓ©rer le dΓ©pΓ΄t de sources |
|
441 | permission_manage_repository: GΓ©rer le dΓ©pΓ΄t de sources | |
442 | permission_browse_repository: Parcourir les sources |
|
442 | permission_browse_repository: Parcourir les sources | |
443 | permission_view_changesets: Voir les rΓ©visions |
|
443 | permission_view_changesets: Voir les rΓ©visions | |
444 | permission_commit_access: Droit de commit |
|
444 | permission_commit_access: Droit de commit | |
445 | permission_manage_boards: GΓ©rer les forums |
|
445 | permission_manage_boards: GΓ©rer les forums | |
446 | permission_view_messages: Voir les messages |
|
446 | permission_view_messages: Voir les messages | |
447 | permission_add_messages: Poster un message |
|
447 | permission_add_messages: Poster un message | |
448 | permission_edit_messages: Modifier les messages |
|
448 | permission_edit_messages: Modifier les messages | |
449 | permission_edit_own_messages: Modifier ses propres messages |
|
449 | permission_edit_own_messages: Modifier ses propres messages | |
450 | permission_delete_messages: Supprimer les messages |
|
450 | permission_delete_messages: Supprimer les messages | |
451 | permission_delete_own_messages: Supprimer ses propres messages |
|
451 | permission_delete_own_messages: Supprimer ses propres messages | |
452 | permission_export_wiki_pages: Exporter les pages |
|
452 | permission_export_wiki_pages: Exporter les pages | |
453 | permission_manage_project_activities: GΓ©rer les activitΓ©s |
|
453 | permission_manage_project_activities: GΓ©rer les activitΓ©s | |
454 | permission_manage_subtasks: GΓ©rer les sous-tΓ’ches |
|
454 | permission_manage_subtasks: GΓ©rer les sous-tΓ’ches | |
455 | permission_manage_related_issues: GΓ©rer les demandes associΓ©es |
|
455 | permission_manage_related_issues: GΓ©rer les demandes associΓ©es | |
456 |
|
456 | |||
457 | project_module_issue_tracking: Suivi des demandes |
|
457 | project_module_issue_tracking: Suivi des demandes | |
458 | project_module_time_tracking: Suivi du temps passΓ© |
|
458 | project_module_time_tracking: Suivi du temps passΓ© | |
459 | project_module_news: Publication d'annonces |
|
459 | project_module_news: Publication d'annonces | |
460 | project_module_documents: Publication de documents |
|
460 | project_module_documents: Publication de documents | |
461 | project_module_files: Publication de fichiers |
|
461 | project_module_files: Publication de fichiers | |
462 | project_module_wiki: Wiki |
|
462 | project_module_wiki: Wiki | |
463 | project_module_repository: DΓ©pΓ΄t de sources |
|
463 | project_module_repository: DΓ©pΓ΄t de sources | |
464 | project_module_boards: Forums de discussion |
|
464 | project_module_boards: Forums de discussion | |
465 |
|
465 | |||
466 | label_user: Utilisateur |
|
466 | label_user: Utilisateur | |
467 | label_user_plural: Utilisateurs |
|
467 | label_user_plural: Utilisateurs | |
468 | label_user_new: Nouvel utilisateur |
|
468 | label_user_new: Nouvel utilisateur | |
469 | label_user_anonymous: Anonyme |
|
469 | label_user_anonymous: Anonyme | |
470 | label_project: Projet |
|
470 | label_project: Projet | |
471 | label_project_new: Nouveau projet |
|
471 | label_project_new: Nouveau projet | |
472 | label_project_plural: Projets |
|
472 | label_project_plural: Projets | |
473 | label_x_projects: |
|
473 | label_x_projects: | |
474 | zero: aucun projet |
|
474 | zero: aucun projet | |
475 | one: un projet |
|
475 | one: un projet | |
476 | other: "%{count} projets" |
|
476 | other: "%{count} projets" | |
477 | label_project_all: Tous les projets |
|
477 | label_project_all: Tous les projets | |
478 | label_project_latest: Derniers projets |
|
478 | label_project_latest: Derniers projets | |
479 | label_issue: Demande |
|
479 | label_issue: Demande | |
480 | label_issue_new: Nouvelle demande |
|
480 | label_issue_new: Nouvelle demande | |
481 | label_issue_plural: Demandes |
|
481 | label_issue_plural: Demandes | |
482 | label_issue_view_all: Voir toutes les demandes |
|
482 | label_issue_view_all: Voir toutes les demandes | |
483 | label_issue_added: Demande ajoutΓ©e |
|
483 | label_issue_added: Demande ajoutΓ©e | |
484 | label_issue_updated: Demande mise Γ jour |
|
484 | label_issue_updated: Demande mise Γ jour | |
485 | label_issue_note_added: Note ajoutΓ©e |
|
485 | label_issue_note_added: Note ajoutΓ©e | |
486 | label_issue_status_updated: Statut changΓ© |
|
486 | label_issue_status_updated: Statut changΓ© | |
487 | label_issue_priority_updated: PrioritΓ© changΓ©e |
|
487 | label_issue_priority_updated: PrioritΓ© changΓ©e | |
488 | label_issues_by: "Demandes par %{value}" |
|
488 | label_issues_by: "Demandes par %{value}" | |
489 | label_document: Document |
|
489 | label_document: Document | |
490 | label_document_new: Nouveau document |
|
490 | label_document_new: Nouveau document | |
491 | label_document_plural: Documents |
|
491 | label_document_plural: Documents | |
492 | label_document_added: Document ajoutΓ© |
|
492 | label_document_added: Document ajoutΓ© | |
493 | label_role: RΓ΄le |
|
493 | label_role: RΓ΄le | |
494 | label_role_plural: RΓ΄les |
|
494 | label_role_plural: RΓ΄les | |
495 | label_role_new: Nouveau rΓ΄le |
|
495 | label_role_new: Nouveau rΓ΄le | |
496 | label_role_and_permissions: RΓ΄les et permissions |
|
496 | label_role_and_permissions: RΓ΄les et permissions | |
497 | label_role_anonymous: Anonyme |
|
497 | label_role_anonymous: Anonyme | |
498 | label_role_non_member: Non membre |
|
498 | label_role_non_member: Non membre | |
499 | label_member: Membre |
|
499 | label_member: Membre | |
500 | label_member_new: Nouveau membre |
|
500 | label_member_new: Nouveau membre | |
501 | label_member_plural: Membres |
|
501 | label_member_plural: Membres | |
502 | label_tracker: Tracker |
|
502 | label_tracker: Tracker | |
503 | label_tracker_plural: Trackers |
|
503 | label_tracker_plural: Trackers | |
504 | label_tracker_new: Nouveau tracker |
|
504 | label_tracker_new: Nouveau tracker | |
505 | label_workflow: Workflow |
|
505 | label_workflow: Workflow | |
506 | label_issue_status: Statut de demandes |
|
506 | label_issue_status: Statut de demandes | |
507 | label_issue_status_plural: Statuts de demandes |
|
507 | label_issue_status_plural: Statuts de demandes | |
508 | label_issue_status_new: Nouveau statut |
|
508 | label_issue_status_new: Nouveau statut | |
509 | label_issue_category: CatΓ©gorie de demandes |
|
509 | label_issue_category: CatΓ©gorie de demandes | |
510 | label_issue_category_plural: CatΓ©gories de demandes |
|
510 | label_issue_category_plural: CatΓ©gories de demandes | |
511 | label_issue_category_new: Nouvelle catΓ©gorie |
|
511 | label_issue_category_new: Nouvelle catΓ©gorie | |
512 | label_custom_field: Champ personnalisΓ© |
|
512 | label_custom_field: Champ personnalisΓ© | |
513 | label_custom_field_plural: Champs personnalisΓ©s |
|
513 | label_custom_field_plural: Champs personnalisΓ©s | |
514 | label_custom_field_new: Nouveau champ personnalisΓ© |
|
514 | label_custom_field_new: Nouveau champ personnalisΓ© | |
515 | label_enumerations: Listes de valeurs |
|
515 | label_enumerations: Listes de valeurs | |
516 | label_enumeration_new: Nouvelle valeur |
|
516 | label_enumeration_new: Nouvelle valeur | |
517 | label_information: Information |
|
517 | label_information: Information | |
518 | label_information_plural: Informations |
|
518 | label_information_plural: Informations | |
519 | label_please_login: Identification |
|
519 | label_please_login: Identification | |
520 | label_register: S'enregistrer |
|
520 | label_register: S'enregistrer | |
521 | label_login_with_open_id_option: S'authentifier avec OpenID |
|
521 | label_login_with_open_id_option: S'authentifier avec OpenID | |
522 | label_password_lost: Mot de passe perdu |
|
522 | label_password_lost: Mot de passe perdu | |
523 | label_home: Accueil |
|
523 | label_home: Accueil | |
524 | label_my_page: Ma page |
|
524 | label_my_page: Ma page | |
525 | label_my_account: Mon compte |
|
525 | label_my_account: Mon compte | |
526 | label_my_projects: Mes projets |
|
526 | label_my_projects: Mes projets | |
527 | label_my_page_block: Blocs disponibles |
|
527 | label_my_page_block: Blocs disponibles | |
528 | label_administration: Administration |
|
528 | label_administration: Administration | |
529 | label_login: Connexion |
|
529 | label_login: Connexion | |
530 | label_logout: DΓ©connexion |
|
530 | label_logout: DΓ©connexion | |
531 | label_help: Aide |
|
531 | label_help: Aide | |
532 | label_reported_issues: "Demandes soumises " |
|
532 | label_reported_issues: "Demandes soumises " | |
533 | label_assigned_to_me_issues: Demandes qui me sont assignΓ©es |
|
533 | label_assigned_to_me_issues: Demandes qui me sont assignΓ©es | |
534 | label_last_login: "Dernière connexion " |
|
534 | label_last_login: "Dernière connexion " | |
535 | label_registered_on: "Inscrit le " |
|
535 | label_registered_on: "Inscrit le " | |
536 | label_activity: ActivitΓ© |
|
536 | label_activity: ActivitΓ© | |
537 | label_overall_activity: ActivitΓ© globale |
|
537 | label_overall_activity: ActivitΓ© globale | |
538 | label_user_activity: "ActivitΓ© de %{value}" |
|
538 | label_user_activity: "ActivitΓ© de %{value}" | |
539 | label_new: Nouveau |
|
539 | label_new: Nouveau | |
540 | label_logged_as: ConnectΓ© en tant que |
|
540 | label_logged_as: ConnectΓ© en tant que | |
541 | label_environment: Environnement |
|
541 | label_environment: Environnement | |
542 | label_authentication: Authentification |
|
542 | label_authentication: Authentification | |
543 | label_auth_source: Mode d'authentification |
|
543 | label_auth_source: Mode d'authentification | |
544 | label_auth_source_new: Nouveau mode d'authentification |
|
544 | label_auth_source_new: Nouveau mode d'authentification | |
545 | label_auth_source_plural: Modes d'authentification |
|
545 | label_auth_source_plural: Modes d'authentification | |
546 | label_subproject_plural: Sous-projets |
|
546 | label_subproject_plural: Sous-projets | |
547 | label_subproject_new: Nouveau sous-projet |
|
547 | label_subproject_new: Nouveau sous-projet | |
548 | label_and_its_subprojects: "%{value} et ses sous-projets" |
|
548 | label_and_its_subprojects: "%{value} et ses sous-projets" | |
549 | label_min_max_length: Longueurs mini - maxi |
|
549 | label_min_max_length: Longueurs mini - maxi | |
550 | label_list: Liste |
|
550 | label_list: Liste | |
551 | label_date: Date |
|
551 | label_date: Date | |
552 | label_integer: Entier |
|
552 | label_integer: Entier | |
553 | label_float: Nombre dΓ©cimal |
|
553 | label_float: Nombre dΓ©cimal | |
554 | label_boolean: BoolΓ©en |
|
554 | label_boolean: BoolΓ©en | |
555 | label_string: Texte |
|
555 | label_string: Texte | |
556 | label_text: Texte long |
|
556 | label_text: Texte long | |
557 | label_attribute: Attribut |
|
557 | label_attribute: Attribut | |
558 | label_attribute_plural: Attributs |
|
558 | label_attribute_plural: Attributs | |
559 | label_download: "%{count} tΓ©lΓ©chargement" |
|
559 | label_download: "%{count} tΓ©lΓ©chargement" | |
560 | label_download_plural: "%{count} tΓ©lΓ©chargements" |
|
560 | label_download_plural: "%{count} tΓ©lΓ©chargements" | |
561 | label_no_data: Aucune donnΓ©e Γ afficher |
|
561 | label_no_data: Aucune donnΓ©e Γ afficher | |
562 | label_change_status: Changer le statut |
|
562 | label_change_status: Changer le statut | |
563 | label_history: Historique |
|
563 | label_history: Historique | |
564 | label_attachment: Fichier |
|
564 | label_attachment: Fichier | |
565 | label_attachment_new: Nouveau fichier |
|
565 | label_attachment_new: Nouveau fichier | |
566 | label_attachment_delete: Supprimer le fichier |
|
566 | label_attachment_delete: Supprimer le fichier | |
567 | label_attachment_plural: Fichiers |
|
567 | label_attachment_plural: Fichiers | |
568 | label_file_added: Fichier ajoutΓ© |
|
568 | label_file_added: Fichier ajoutΓ© | |
569 | label_report: Rapport |
|
569 | label_report: Rapport | |
570 | label_report_plural: Rapports |
|
570 | label_report_plural: Rapports | |
571 | label_news: Annonce |
|
571 | label_news: Annonce | |
572 | label_news_new: Nouvelle annonce |
|
572 | label_news_new: Nouvelle annonce | |
573 | label_news_plural: Annonces |
|
573 | label_news_plural: Annonces | |
574 | label_news_latest: Dernières annonces |
|
574 | label_news_latest: Dernières annonces | |
575 | label_news_view_all: Voir toutes les annonces |
|
575 | label_news_view_all: Voir toutes les annonces | |
576 | label_news_added: Annonce ajoutΓ©e |
|
576 | label_news_added: Annonce ajoutΓ©e | |
577 | label_news_comment_added: Commentaire ajoutΓ© Γ une annonce |
|
577 | label_news_comment_added: Commentaire ajoutΓ© Γ une annonce | |
578 | label_settings: Configuration |
|
578 | label_settings: Configuration | |
579 | label_overview: AperΓ§u |
|
579 | label_overview: AperΓ§u | |
580 | label_version: Version |
|
580 | label_version: Version | |
581 | label_version_new: Nouvelle version |
|
581 | label_version_new: Nouvelle version | |
582 | label_version_plural: Versions |
|
582 | label_version_plural: Versions | |
583 | label_confirmation: Confirmation |
|
583 | label_confirmation: Confirmation | |
584 | label_export_to: 'Formats disponibles :' |
|
584 | label_export_to: 'Formats disponibles :' | |
585 | label_read: Lire... |
|
585 | label_read: Lire... | |
586 | label_public_projects: Projets publics |
|
586 | label_public_projects: Projets publics | |
587 | label_open_issues: ouvert |
|
587 | label_open_issues: ouvert | |
588 | label_open_issues_plural: ouverts |
|
588 | label_open_issues_plural: ouverts | |
589 | label_closed_issues: fermΓ© |
|
589 | label_closed_issues: fermΓ© | |
590 | label_closed_issues_plural: fermΓ©s |
|
590 | label_closed_issues_plural: fermΓ©s | |
591 | label_x_open_issues_abbr_on_total: |
|
591 | label_x_open_issues_abbr_on_total: | |
592 | zero: 0 ouverte sur %{total} |
|
592 | zero: 0 ouverte sur %{total} | |
593 | one: 1 ouverte sur %{total} |
|
593 | one: 1 ouverte sur %{total} | |
594 | other: "%{count} ouvertes sur %{total}" |
|
594 | other: "%{count} ouvertes sur %{total}" | |
595 | label_x_open_issues_abbr: |
|
595 | label_x_open_issues_abbr: | |
596 | zero: 0 ouverte |
|
596 | zero: 0 ouverte | |
597 | one: 1 ouverte |
|
597 | one: 1 ouverte | |
598 | other: "%{count} ouvertes" |
|
598 | other: "%{count} ouvertes" | |
599 | label_x_closed_issues_abbr: |
|
599 | label_x_closed_issues_abbr: | |
600 | zero: 0 fermΓ©e |
|
600 | zero: 0 fermΓ©e | |
601 | one: 1 fermΓ©e |
|
601 | one: 1 fermΓ©e | |
602 | other: "%{count} fermΓ©es" |
|
602 | other: "%{count} fermΓ©es" | |
603 | label_x_issues: |
|
603 | label_x_issues: | |
604 | zero: 0 demande |
|
604 | zero: 0 demande | |
605 | one: 1 demande |
|
605 | one: 1 demande | |
606 | other: "%{count} demandes" |
|
606 | other: "%{count} demandes" | |
607 | label_total: Total |
|
607 | label_total: Total | |
608 | label_permissions: Permissions |
|
608 | label_permissions: Permissions | |
609 | label_current_status: Statut actuel |
|
609 | label_current_status: Statut actuel | |
610 | label_new_statuses_allowed: Nouveaux statuts autorisΓ©s |
|
610 | label_new_statuses_allowed: Nouveaux statuts autorisΓ©s | |
611 | label_all: tous |
|
611 | label_all: tous | |
612 | label_none: aucun |
|
612 | label_none: aucun | |
613 | label_nobody: personne |
|
613 | label_nobody: personne | |
614 | label_next: Suivant |
|
614 | label_next: Suivant | |
615 | label_previous: PrΓ©cΓ©dent |
|
615 | label_previous: PrΓ©cΓ©dent | |
616 | label_used_by: UtilisΓ© par |
|
616 | label_used_by: UtilisΓ© par | |
617 | label_details: DΓ©tails |
|
617 | label_details: DΓ©tails | |
618 | label_add_note: Ajouter une note |
|
618 | label_add_note: Ajouter une note | |
619 | label_per_page: Par page |
|
619 | label_per_page: Par page | |
620 | label_calendar: Calendrier |
|
620 | label_calendar: Calendrier | |
621 | label_months_from: mois depuis |
|
621 | label_months_from: mois depuis | |
622 | label_gantt: Gantt |
|
622 | label_gantt: Gantt | |
623 | label_internal: Interne |
|
623 | label_internal: Interne | |
624 | label_last_changes: "%{count} derniers changements" |
|
624 | label_last_changes: "%{count} derniers changements" | |
625 | label_change_view_all: Voir tous les changements |
|
625 | label_change_view_all: Voir tous les changements | |
626 | label_personalize_page: Personnaliser cette page |
|
626 | label_personalize_page: Personnaliser cette page | |
627 | label_comment: Commentaire |
|
627 | label_comment: Commentaire | |
628 | label_comment_plural: Commentaires |
|
628 | label_comment_plural: Commentaires | |
629 | label_x_comments: |
|
629 | label_x_comments: | |
630 | zero: aucun commentaire |
|
630 | zero: aucun commentaire | |
631 | one: un commentaire |
|
631 | one: un commentaire | |
632 | other: "%{count} commentaires" |
|
632 | other: "%{count} commentaires" | |
633 | label_comment_add: Ajouter un commentaire |
|
633 | label_comment_add: Ajouter un commentaire | |
634 | label_comment_added: Commentaire ajoutΓ© |
|
634 | label_comment_added: Commentaire ajoutΓ© | |
635 | label_comment_delete: Supprimer les commentaires |
|
635 | label_comment_delete: Supprimer les commentaires | |
636 | label_query: Rapport personnalisΓ© |
|
636 | label_query: Rapport personnalisΓ© | |
637 | label_query_plural: Rapports personnalisΓ©s |
|
637 | label_query_plural: Rapports personnalisΓ©s | |
638 | label_query_new: Nouveau rapport |
|
638 | label_query_new: Nouveau rapport | |
639 | label_my_queries: Mes rapports personnalisΓ©s |
|
639 | label_my_queries: Mes rapports personnalisΓ©s | |
640 | label_filter_add: "Ajouter le filtre " |
|
640 | label_filter_add: "Ajouter le filtre " | |
641 | label_filter_plural: Filtres |
|
641 | label_filter_plural: Filtres | |
642 | label_equals: Γ©gal |
|
642 | label_equals: Γ©gal | |
643 | label_not_equals: diffΓ©rent |
|
643 | label_not_equals: diffΓ©rent | |
644 | label_in_less_than: dans moins de |
|
644 | label_in_less_than: dans moins de | |
645 | label_in_more_than: dans plus de |
|
645 | label_in_more_than: dans plus de | |
646 | label_in: dans |
|
646 | label_in: dans | |
647 | label_today: aujourd'hui |
|
647 | label_today: aujourd'hui | |
648 | label_all_time: toute la pΓ©riode |
|
648 | label_all_time: toute la pΓ©riode | |
649 | label_yesterday: hier |
|
649 | label_yesterday: hier | |
650 | label_this_week: cette semaine |
|
650 | label_this_week: cette semaine | |
651 | label_last_week: la semaine dernière |
|
651 | label_last_week: la semaine dernière | |
652 | label_last_n_days: "les %{count} derniers jours" |
|
652 | label_last_n_days: "les %{count} derniers jours" | |
653 | label_this_month: ce mois-ci |
|
653 | label_this_month: ce mois-ci | |
654 | label_last_month: le mois dernier |
|
654 | label_last_month: le mois dernier | |
655 | label_this_year: cette annΓ©e |
|
655 | label_this_year: cette annΓ©e | |
656 | label_date_range: PΓ©riode |
|
656 | label_date_range: PΓ©riode | |
657 | label_less_than_ago: il y a moins de |
|
657 | label_less_than_ago: il y a moins de | |
658 | label_more_than_ago: il y a plus de |
|
658 | label_more_than_ago: il y a plus de | |
659 | label_ago: il y a |
|
659 | label_ago: il y a | |
660 | label_contains: contient |
|
660 | label_contains: contient | |
661 | label_not_contains: ne contient pas |
|
661 | label_not_contains: ne contient pas | |
662 | label_day_plural: jours |
|
662 | label_day_plural: jours | |
663 | label_repository: DΓ©pΓ΄t |
|
663 | label_repository: DΓ©pΓ΄t | |
664 | label_repository_new: Nouveau dΓ©pΓ΄t |
|
664 | label_repository_new: Nouveau dΓ©pΓ΄t | |
665 | label_repository_plural: DΓ©pΓ΄ts |
|
665 | label_repository_plural: DΓ©pΓ΄ts | |
666 | label_browse: Parcourir |
|
666 | label_browse: Parcourir | |
667 | label_modification: "%{count} modification" |
|
667 | label_modification: "%{count} modification" | |
668 | label_modification_plural: "%{count} modifications" |
|
668 | label_modification_plural: "%{count} modifications" | |
669 | label_revision: "RΓ©vision " |
|
669 | label_revision: "RΓ©vision " | |
670 | label_revision_plural: RΓ©visions |
|
670 | label_revision_plural: RΓ©visions | |
671 | label_associated_revisions: RΓ©visions associΓ©es |
|
671 | label_associated_revisions: RΓ©visions associΓ©es | |
672 | label_added: ajoutΓ© |
|
672 | label_added: ajoutΓ© | |
673 | label_modified: modifiΓ© |
|
673 | label_modified: modifiΓ© | |
674 | label_copied: copiΓ© |
|
674 | label_copied: copiΓ© | |
675 | label_renamed: renommΓ© |
|
675 | label_renamed: renommΓ© | |
676 | label_deleted: supprimΓ© |
|
676 | label_deleted: supprimΓ© | |
677 | label_latest_revision: Dernière révision |
|
677 | label_latest_revision: Dernière révision | |
678 | label_latest_revision_plural: Dernières révisions |
|
678 | label_latest_revision_plural: Dernières révisions | |
679 | label_view_revisions: Voir les rΓ©visions |
|
679 | label_view_revisions: Voir les rΓ©visions | |
680 | label_max_size: Taille maximale |
|
680 | label_max_size: Taille maximale | |
681 | label_sort_highest: Remonter en premier |
|
681 | label_sort_highest: Remonter en premier | |
682 | label_sort_higher: Remonter |
|
682 | label_sort_higher: Remonter | |
683 | label_sort_lower: Descendre |
|
683 | label_sort_lower: Descendre | |
684 | label_sort_lowest: Descendre en dernier |
|
684 | label_sort_lowest: Descendre en dernier | |
685 | label_roadmap: Roadmap |
|
685 | label_roadmap: Roadmap | |
686 | label_roadmap_due_in: "ΓchΓ©ance dans %{value}" |
|
686 | label_roadmap_due_in: "ΓchΓ©ance dans %{value}" | |
687 | label_roadmap_overdue: "En retard de %{value}" |
|
687 | label_roadmap_overdue: "En retard de %{value}" | |
688 | label_roadmap_no_issues: Aucune demande pour cette version |
|
688 | label_roadmap_no_issues: Aucune demande pour cette version | |
689 | label_search: "Recherche " |
|
689 | label_search: "Recherche " | |
690 | label_result_plural: RΓ©sultats |
|
690 | label_result_plural: RΓ©sultats | |
691 | label_all_words: Tous les mots |
|
691 | label_all_words: Tous les mots | |
692 | label_wiki: Wiki |
|
692 | label_wiki: Wiki | |
693 | label_wiki_edit: RΓ©vision wiki |
|
693 | label_wiki_edit: RΓ©vision wiki | |
694 | label_wiki_edit_plural: RΓ©visions wiki |
|
694 | label_wiki_edit_plural: RΓ©visions wiki | |
695 | label_wiki_page: Page wiki |
|
695 | label_wiki_page: Page wiki | |
696 | label_wiki_page_plural: Pages wiki |
|
696 | label_wiki_page_plural: Pages wiki | |
697 | label_index_by_title: Index par titre |
|
697 | label_index_by_title: Index par titre | |
698 | label_index_by_date: Index par date |
|
698 | label_index_by_date: Index par date | |
699 | label_current_version: Version actuelle |
|
699 | label_current_version: Version actuelle | |
700 | label_preview: PrΓ©visualisation |
|
700 | label_preview: PrΓ©visualisation | |
701 | label_feed_plural: Flux RSS |
|
701 | label_feed_plural: Flux RSS | |
702 | label_changes_details: DΓ©tails de tous les changements |
|
702 | label_changes_details: DΓ©tails de tous les changements | |
703 | label_issue_tracking: Suivi des demandes |
|
703 | label_issue_tracking: Suivi des demandes | |
704 | label_spent_time: Temps passΓ© |
|
704 | label_spent_time: Temps passΓ© | |
705 | label_f_hour: "%{value} heure" |
|
705 | label_f_hour: "%{value} heure" | |
706 | label_f_hour_plural: "%{value} heures" |
|
706 | label_f_hour_plural: "%{value} heures" | |
707 | label_time_tracking: Suivi du temps |
|
707 | label_time_tracking: Suivi du temps | |
708 | label_change_plural: Changements |
|
708 | label_change_plural: Changements | |
709 | label_statistics: Statistiques |
|
709 | label_statistics: Statistiques | |
710 | label_commits_per_month: Commits par mois |
|
710 | label_commits_per_month: Commits par mois | |
711 | label_commits_per_author: Commits par auteur |
|
711 | label_commits_per_author: Commits par auteur | |
712 | label_view_diff: Voir les diffΓ©rences |
|
712 | label_view_diff: Voir les diffΓ©rences | |
713 | label_diff_inline: en ligne |
|
713 | label_diff_inline: en ligne | |
714 | label_diff_side_by_side: cΓ΄te Γ cΓ΄te |
|
714 | label_diff_side_by_side: cΓ΄te Γ cΓ΄te | |
715 | label_options: Options |
|
715 | label_options: Options | |
716 | label_copy_workflow_from: Copier le workflow de |
|
716 | label_copy_workflow_from: Copier le workflow de | |
717 | label_permissions_report: Synthèse des permissions |
|
717 | label_permissions_report: Synthèse des permissions | |
718 | label_watched_issues: Demandes surveillΓ©es |
|
718 | label_watched_issues: Demandes surveillΓ©es | |
719 | label_related_issues: Demandes liΓ©es |
|
719 | label_related_issues: Demandes liΓ©es | |
720 | label_applied_status: Statut appliquΓ© |
|
720 | label_applied_status: Statut appliquΓ© | |
721 | label_loading: Chargement... |
|
721 | label_loading: Chargement... | |
722 | label_relation_new: Nouvelle relation |
|
722 | label_relation_new: Nouvelle relation | |
723 | label_relation_delete: Supprimer la relation |
|
723 | label_relation_delete: Supprimer la relation | |
724 | label_relates_to: liΓ© Γ |
|
724 | label_relates_to: liΓ© Γ | |
725 | label_duplicates: duplique |
|
725 | label_duplicates: duplique | |
726 | label_duplicated_by: dupliquΓ© par |
|
726 | label_duplicated_by: dupliquΓ© par | |
727 | label_blocks: bloque |
|
727 | label_blocks: bloque | |
728 | label_blocked_by: bloquΓ© par |
|
728 | label_blocked_by: bloquΓ© par | |
729 | label_precedes: précède |
|
729 | label_precedes: précède | |
730 | label_follows: suit |
|
730 | label_follows: suit | |
|
731 | label_copied_to: copiΓ© vers | |||
|
732 | label_copied_from: copiΓ© depuis | |||
731 | label_end_to_start: fin Γ dΓ©but |
|
733 | label_end_to_start: fin Γ dΓ©but | |
732 | label_end_to_end: fin Γ fin |
|
734 | label_end_to_end: fin Γ fin | |
733 | label_start_to_start: dΓ©but Γ dΓ©but |
|
735 | label_start_to_start: dΓ©but Γ dΓ©but | |
734 | label_start_to_end: dΓ©but Γ fin |
|
736 | label_start_to_end: dΓ©but Γ fin | |
735 | label_stay_logged_in: Rester connectΓ© |
|
737 | label_stay_logged_in: Rester connectΓ© | |
736 | label_disabled: dΓ©sactivΓ© |
|
738 | label_disabled: dΓ©sactivΓ© | |
737 | label_show_completed_versions: Voir les versions passΓ©es |
|
739 | label_show_completed_versions: Voir les versions passΓ©es | |
738 | label_me: moi |
|
740 | label_me: moi | |
739 | label_board: Forum |
|
741 | label_board: Forum | |
740 | label_board_new: Nouveau forum |
|
742 | label_board_new: Nouveau forum | |
741 | label_board_plural: Forums |
|
743 | label_board_plural: Forums | |
742 | label_topic_plural: Discussions |
|
744 | label_topic_plural: Discussions | |
743 | label_message_plural: Messages |
|
745 | label_message_plural: Messages | |
744 | label_message_last: Dernier message |
|
746 | label_message_last: Dernier message | |
745 | label_message_new: Nouveau message |
|
747 | label_message_new: Nouveau message | |
746 | label_message_posted: Message ajoutΓ© |
|
748 | label_message_posted: Message ajoutΓ© | |
747 | label_reply_plural: RΓ©ponses |
|
749 | label_reply_plural: RΓ©ponses | |
748 | label_send_information: Envoyer les informations Γ l'utilisateur |
|
750 | label_send_information: Envoyer les informations Γ l'utilisateur | |
749 | label_year: AnnΓ©e |
|
751 | label_year: AnnΓ©e | |
750 | label_month: Mois |
|
752 | label_month: Mois | |
751 | label_week: Semaine |
|
753 | label_week: Semaine | |
752 | label_date_from: Du |
|
754 | label_date_from: Du | |
753 | label_date_to: Au |
|
755 | label_date_to: Au | |
754 | label_language_based: BasΓ© sur la langue de l'utilisateur |
|
756 | label_language_based: BasΓ© sur la langue de l'utilisateur | |
755 | label_sort_by: "Trier par %{value}" |
|
757 | label_sort_by: "Trier par %{value}" | |
756 | label_send_test_email: Envoyer un email de test |
|
758 | label_send_test_email: Envoyer un email de test | |
757 | label_feeds_access_key_created_on: "Clé d'accès RSS créée il y a %{value}" |
|
759 | label_feeds_access_key_created_on: "Clé d'accès RSS créée il y a %{value}" | |
758 | label_module_plural: Modules |
|
760 | label_module_plural: Modules | |
759 | label_added_time_by: "AjoutΓ© par %{author} il y a %{age}" |
|
761 | label_added_time_by: "AjoutΓ© par %{author} il y a %{age}" | |
760 | label_updated_time_by: "Mis Γ jour par %{author} il y a %{age}" |
|
762 | label_updated_time_by: "Mis Γ jour par %{author} il y a %{age}" | |
761 | label_updated_time: "Mis Γ jour il y a %{value}" |
|
763 | label_updated_time: "Mis Γ jour il y a %{value}" | |
762 | label_jump_to_a_project: Aller Γ un projet... |
|
764 | label_jump_to_a_project: Aller Γ un projet... | |
763 | label_file_plural: Fichiers |
|
765 | label_file_plural: Fichiers | |
764 | label_changeset_plural: RΓ©visions |
|
766 | label_changeset_plural: RΓ©visions | |
765 | label_default_columns: Colonnes par dΓ©faut |
|
767 | label_default_columns: Colonnes par dΓ©faut | |
766 | label_no_change_option: (Pas de changement) |
|
768 | label_no_change_option: (Pas de changement) | |
767 | label_bulk_edit_selected_issues: Modifier les demandes sΓ©lectionnΓ©es |
|
769 | label_bulk_edit_selected_issues: Modifier les demandes sΓ©lectionnΓ©es | |
768 | label_theme: Thème |
|
770 | label_theme: Thème | |
769 | label_default: DΓ©faut |
|
771 | label_default: DΓ©faut | |
770 | label_search_titles_only: Uniquement dans les titres |
|
772 | label_search_titles_only: Uniquement dans les titres | |
771 | label_user_mail_option_all: "Pour tous les Γ©vΓ©nements de tous mes projets" |
|
773 | label_user_mail_option_all: "Pour tous les Γ©vΓ©nements de tous mes projets" | |
772 | label_user_mail_option_selected: "Pour tous les Γ©vΓ©nements des projets sΓ©lectionnΓ©s..." |
|
774 | label_user_mail_option_selected: "Pour tous les Γ©vΓ©nements des projets sΓ©lectionnΓ©s..." | |
773 | label_user_mail_no_self_notified: "Je ne veux pas Γͺtre notifiΓ© des changements que j'effectue" |
|
775 | label_user_mail_no_self_notified: "Je ne veux pas Γͺtre notifiΓ© des changements que j'effectue" | |
774 | label_registration_activation_by_email: activation du compte par email |
|
776 | label_registration_activation_by_email: activation du compte par email | |
775 | label_registration_manual_activation: activation manuelle du compte |
|
777 | label_registration_manual_activation: activation manuelle du compte | |
776 | label_registration_automatic_activation: activation automatique du compte |
|
778 | label_registration_automatic_activation: activation automatique du compte | |
777 | label_display_per_page: "Par page : %{value}" |
|
779 | label_display_per_page: "Par page : %{value}" | |
778 | label_age: Γge |
|
780 | label_age: Γge | |
779 | label_change_properties: Changer les propriΓ©tΓ©s |
|
781 | label_change_properties: Changer les propriΓ©tΓ©s | |
780 | label_general: GΓ©nΓ©ral |
|
782 | label_general: GΓ©nΓ©ral | |
781 | label_more: Plus |
|
783 | label_more: Plus | |
782 | label_scm: SCM |
|
784 | label_scm: SCM | |
783 | label_plugins: Plugins |
|
785 | label_plugins: Plugins | |
784 | label_ldap_authentication: Authentification LDAP |
|
786 | label_ldap_authentication: Authentification LDAP | |
785 | label_downloads_abbr: D/L |
|
787 | label_downloads_abbr: D/L | |
786 | label_optional_description: Description facultative |
|
788 | label_optional_description: Description facultative | |
787 | label_add_another_file: Ajouter un autre fichier |
|
789 | label_add_another_file: Ajouter un autre fichier | |
788 | label_preferences: PrΓ©fΓ©rences |
|
790 | label_preferences: PrΓ©fΓ©rences | |
789 | label_chronological_order: Dans l'ordre chronologique |
|
791 | label_chronological_order: Dans l'ordre chronologique | |
790 | label_reverse_chronological_order: Dans l'ordre chronologique inverse |
|
792 | label_reverse_chronological_order: Dans l'ordre chronologique inverse | |
791 | label_planning: Planning |
|
793 | label_planning: Planning | |
792 | label_incoming_emails: Emails entrants |
|
794 | label_incoming_emails: Emails entrants | |
793 | label_generate_key: GΓ©nΓ©rer une clΓ© |
|
795 | label_generate_key: GΓ©nΓ©rer une clΓ© | |
794 | label_issue_watchers: Observateurs |
|
796 | label_issue_watchers: Observateurs | |
795 | label_example: Exemple |
|
797 | label_example: Exemple | |
796 | label_display: Affichage |
|
798 | label_display: Affichage | |
797 | label_sort: Tri |
|
799 | label_sort: Tri | |
798 | label_ascending: Croissant |
|
800 | label_ascending: Croissant | |
799 | label_descending: DΓ©croissant |
|
801 | label_descending: DΓ©croissant | |
800 | label_date_from_to: Du %{start} au %{end} |
|
802 | label_date_from_to: Du %{start} au %{end} | |
801 | label_wiki_content_added: Page wiki ajoutΓ©e |
|
803 | label_wiki_content_added: Page wiki ajoutΓ©e | |
802 | label_wiki_content_updated: Page wiki mise Γ jour |
|
804 | label_wiki_content_updated: Page wiki mise Γ jour | |
803 | label_group_plural: Groupes |
|
805 | label_group_plural: Groupes | |
804 | label_group: Groupe |
|
806 | label_group: Groupe | |
805 | label_group_new: Nouveau groupe |
|
807 | label_group_new: Nouveau groupe | |
806 | label_time_entry_plural: Temps passΓ© |
|
808 | label_time_entry_plural: Temps passΓ© | |
807 | label_version_sharing_none: Non partagΓ© |
|
809 | label_version_sharing_none: Non partagΓ© | |
808 | label_version_sharing_descendants: Avec les sous-projets |
|
810 | label_version_sharing_descendants: Avec les sous-projets | |
809 | label_version_sharing_hierarchy: Avec toute la hiΓ©rarchie |
|
811 | label_version_sharing_hierarchy: Avec toute la hiΓ©rarchie | |
810 | label_version_sharing_tree: Avec tout l'arbre |
|
812 | label_version_sharing_tree: Avec tout l'arbre | |
811 | label_version_sharing_system: Avec tous les projets |
|
813 | label_version_sharing_system: Avec tous les projets | |
812 | label_copy_source: Source |
|
814 | label_copy_source: Source | |
813 | label_copy_target: Cible |
|
815 | label_copy_target: Cible | |
814 | label_copy_same_as_target: Comme la cible |
|
816 | label_copy_same_as_target: Comme la cible | |
815 | label_update_issue_done_ratios: Mettre Γ jour l'avancement des demandes |
|
817 | label_update_issue_done_ratios: Mettre Γ jour l'avancement des demandes | |
816 | label_display_used_statuses_only: N'afficher que les statuts utilisΓ©s dans ce tracker |
|
818 | label_display_used_statuses_only: N'afficher que les statuts utilisΓ©s dans ce tracker | |
817 | label_api_access_key: Clé d'accès API |
|
819 | label_api_access_key: Clé d'accès API | |
818 | label_api_access_key_created_on: Clé d'accès API créée il y a %{value} |
|
820 | label_api_access_key_created_on: Clé d'accès API créée il y a %{value} | |
819 | label_feeds_access_key: Clé d'accès RSS |
|
821 | label_feeds_access_key: Clé d'accès RSS | |
820 | label_missing_api_access_key: Clé d'accès API manquante |
|
822 | label_missing_api_access_key: Clé d'accès API manquante | |
821 | label_missing_feeds_access_key: Clé d'accès RSS manquante |
|
823 | label_missing_feeds_access_key: Clé d'accès RSS manquante | |
822 | label_close_versions: Fermer les versions terminΓ©es |
|
824 | label_close_versions: Fermer les versions terminΓ©es | |
823 | label_revision_id: RΓ©vision %{value} |
|
825 | label_revision_id: RΓ©vision %{value} | |
824 | label_profile: Profil |
|
826 | label_profile: Profil | |
825 | label_subtask_plural: Sous-tΓ’ches |
|
827 | label_subtask_plural: Sous-tΓ’ches | |
826 | label_project_copy_notifications: Envoyer les notifications durant la copie du projet |
|
828 | label_project_copy_notifications: Envoyer les notifications durant la copie du projet | |
827 | label_principal_search: "Rechercher un utilisateur ou un groupe :" |
|
829 | label_principal_search: "Rechercher un utilisateur ou un groupe :" | |
828 | label_user_search: "Rechercher un utilisateur :" |
|
830 | label_user_search: "Rechercher un utilisateur :" | |
829 | label_additional_workflow_transitions_for_author: Autorisations supplémentaires lorsque l'utilisateur a créé la demande |
|
831 | label_additional_workflow_transitions_for_author: Autorisations supplémentaires lorsque l'utilisateur a créé la demande | |
830 | label_additional_workflow_transitions_for_assignee: Autorisations supplΓ©mentaires lorsque la demande est assignΓ©e Γ l'utilisateur |
|
832 | label_additional_workflow_transitions_for_assignee: Autorisations supplΓ©mentaires lorsque la demande est assignΓ©e Γ l'utilisateur | |
831 | label_issues_visibility_all: Toutes les demandes |
|
833 | label_issues_visibility_all: Toutes les demandes | |
832 | label_issues_visibility_public: Toutes les demandes non privΓ©es |
|
834 | label_issues_visibility_public: Toutes les demandes non privΓ©es | |
833 | label_issues_visibility_own: Demandes créées par ou assignées à l'utilisateur |
|
835 | label_issues_visibility_own: Demandes créées par ou assignées à l'utilisateur | |
834 | label_export_options: Options d'exportation %{export_format} |
|
836 | label_export_options: Options d'exportation %{export_format} | |
835 | label_copy_attachments: Copier les fichiers |
|
837 | label_copy_attachments: Copier les fichiers | |
836 | label_copy_subtasks: Copier les sous-tΓ’ches |
|
838 | label_copy_subtasks: Copier les sous-tΓ’ches | |
837 | label_item_position: "%{position} sur %{count}" |
|
839 | label_item_position: "%{position} sur %{count}" | |
838 | label_completed_versions: Versions passΓ©es |
|
840 | label_completed_versions: Versions passΓ©es | |
839 | label_session_expiration: Expiration des sessions |
|
841 | label_session_expiration: Expiration des sessions | |
840 | label_show_closed_projects: Voir les projets fermΓ©s |
|
842 | label_show_closed_projects: Voir les projets fermΓ©s | |
841 | label_status_transitions: Changements de statut |
|
843 | label_status_transitions: Changements de statut | |
842 | label_fields_permissions: Permissions sur les champs |
|
844 | label_fields_permissions: Permissions sur les champs | |
843 | label_readonly: Lecture |
|
845 | label_readonly: Lecture | |
844 | label_required: Obligatoire |
|
846 | label_required: Obligatoire | |
845 | label_attribute_of_project: "%{name} du projet" |
|
847 | label_attribute_of_project: "%{name} du projet" | |
846 | label_attribute_of_author: "%{name} de l'auteur" |
|
848 | label_attribute_of_author: "%{name} de l'auteur" | |
847 | label_attribute_of_assigned_to: "%{name} de l'assignΓ©" |
|
849 | label_attribute_of_assigned_to: "%{name} de l'assignΓ©" | |
848 | label_attribute_of_fixed_version: "%{name} de la version cible" |
|
850 | label_attribute_of_fixed_version: "%{name} de la version cible" | |
849 |
|
851 | |||
850 | button_login: Connexion |
|
852 | button_login: Connexion | |
851 | button_submit: Soumettre |
|
853 | button_submit: Soumettre | |
852 | button_save: Sauvegarder |
|
854 | button_save: Sauvegarder | |
853 | button_check_all: Tout cocher |
|
855 | button_check_all: Tout cocher | |
854 | button_uncheck_all: Tout dΓ©cocher |
|
856 | button_uncheck_all: Tout dΓ©cocher | |
855 | button_collapse_all: Plier tout |
|
857 | button_collapse_all: Plier tout | |
856 | button_expand_all: DΓ©plier tout |
|
858 | button_expand_all: DΓ©plier tout | |
857 | button_delete: Supprimer |
|
859 | button_delete: Supprimer | |
858 | button_create: CrΓ©er |
|
860 | button_create: CrΓ©er | |
859 | button_create_and_continue: CrΓ©er et continuer |
|
861 | button_create_and_continue: CrΓ©er et continuer | |
860 | button_test: Tester |
|
862 | button_test: Tester | |
861 | button_edit: Modifier |
|
863 | button_edit: Modifier | |
862 | button_add: Ajouter |
|
864 | button_add: Ajouter | |
863 | button_change: Changer |
|
865 | button_change: Changer | |
864 | button_apply: Appliquer |
|
866 | button_apply: Appliquer | |
865 | button_clear: Effacer |
|
867 | button_clear: Effacer | |
866 | button_lock: Verrouiller |
|
868 | button_lock: Verrouiller | |
867 | button_unlock: DΓ©verrouiller |
|
869 | button_unlock: DΓ©verrouiller | |
868 | button_download: TΓ©lΓ©charger |
|
870 | button_download: TΓ©lΓ©charger | |
869 | button_list: Lister |
|
871 | button_list: Lister | |
870 | button_view: Voir |
|
872 | button_view: Voir | |
871 | button_move: DΓ©placer |
|
873 | button_move: DΓ©placer | |
872 | button_move_and_follow: DΓ©placer et suivre |
|
874 | button_move_and_follow: DΓ©placer et suivre | |
873 | button_back: Retour |
|
875 | button_back: Retour | |
874 | button_cancel: Annuler |
|
876 | button_cancel: Annuler | |
875 | button_activate: Activer |
|
877 | button_activate: Activer | |
876 | button_sort: Trier |
|
878 | button_sort: Trier | |
877 | button_log_time: Saisir temps |
|
879 | button_log_time: Saisir temps | |
878 | button_rollback: Revenir Γ cette version |
|
880 | button_rollback: Revenir Γ cette version | |
879 | button_watch: Surveiller |
|
881 | button_watch: Surveiller | |
880 | button_unwatch: Ne plus surveiller |
|
882 | button_unwatch: Ne plus surveiller | |
881 | button_reply: RΓ©pondre |
|
883 | button_reply: RΓ©pondre | |
882 | button_archive: Archiver |
|
884 | button_archive: Archiver | |
883 | button_unarchive: DΓ©sarchiver |
|
885 | button_unarchive: DΓ©sarchiver | |
884 | button_reset: RΓ©initialiser |
|
886 | button_reset: RΓ©initialiser | |
885 | button_rename: Renommer |
|
887 | button_rename: Renommer | |
886 | button_change_password: Changer de mot de passe |
|
888 | button_change_password: Changer de mot de passe | |
887 | button_copy: Copier |
|
889 | button_copy: Copier | |
888 | button_copy_and_follow: Copier et suivre |
|
890 | button_copy_and_follow: Copier et suivre | |
889 | button_annotate: Annoter |
|
891 | button_annotate: Annoter | |
890 | button_update: Mettre Γ jour |
|
892 | button_update: Mettre Γ jour | |
891 | button_configure: Configurer |
|
893 | button_configure: Configurer | |
892 | button_quote: Citer |
|
894 | button_quote: Citer | |
893 | button_duplicate: Dupliquer |
|
895 | button_duplicate: Dupliquer | |
894 | button_show: Afficher |
|
896 | button_show: Afficher | |
895 | button_edit_section: Modifier cette section |
|
897 | button_edit_section: Modifier cette section | |
896 | button_export: Exporter |
|
898 | button_export: Exporter | |
897 | button_delete_my_account: Supprimer mon compte |
|
899 | button_delete_my_account: Supprimer mon compte | |
898 | button_close: Fermer |
|
900 | button_close: Fermer | |
899 | button_reopen: RΓ©ouvrir |
|
901 | button_reopen: RΓ©ouvrir | |
900 |
|
902 | |||
901 | status_active: actif |
|
903 | status_active: actif | |
902 | status_registered: enregistrΓ© |
|
904 | status_registered: enregistrΓ© | |
903 | status_locked: verrouillΓ© |
|
905 | status_locked: verrouillΓ© | |
904 |
|
906 | |||
905 | project_status_active: actif |
|
907 | project_status_active: actif | |
906 | project_status_closed: fermΓ© |
|
908 | project_status_closed: fermΓ© | |
907 | project_status_archived: archivΓ© |
|
909 | project_status_archived: archivΓ© | |
908 |
|
910 | |||
909 | version_status_open: ouvert |
|
911 | version_status_open: ouvert | |
910 | version_status_locked: verrouillΓ© |
|
912 | version_status_locked: verrouillΓ© | |
911 | version_status_closed: fermΓ© |
|
913 | version_status_closed: fermΓ© | |
912 |
|
914 | |||
913 | text_select_mail_notifications: Actions pour lesquelles une notification par e-mail est envoyΓ©e |
|
915 | text_select_mail_notifications: Actions pour lesquelles une notification par e-mail est envoyΓ©e | |
914 | text_regexp_info: ex. ^[A-Z0-9]+$ |
|
916 | text_regexp_info: ex. ^[A-Z0-9]+$ | |
915 | text_min_max_length_info: 0 pour aucune restriction |
|
917 | text_min_max_length_info: 0 pour aucune restriction | |
916 | text_project_destroy_confirmation: Γtes-vous sΓ»r de vouloir supprimer ce projet et toutes ses donnΓ©es ? |
|
918 | text_project_destroy_confirmation: Γtes-vous sΓ»r de vouloir supprimer ce projet et toutes ses donnΓ©es ? | |
917 | text_subprojects_destroy_warning: "Ses sous-projets : %{value} seront Γ©galement supprimΓ©s." |
|
919 | text_subprojects_destroy_warning: "Ses sous-projets : %{value} seront Γ©galement supprimΓ©s." | |
918 | text_workflow_edit: SΓ©lectionner un tracker et un rΓ΄le pour Γ©diter le workflow |
|
920 | text_workflow_edit: SΓ©lectionner un tracker et un rΓ΄le pour Γ©diter le workflow | |
919 | text_are_you_sure: Γtes-vous sΓ»r ? |
|
921 | text_are_you_sure: Γtes-vous sΓ»r ? | |
920 | text_tip_issue_begin_day: tΓ’che commenΓ§ant ce jour |
|
922 | text_tip_issue_begin_day: tΓ’che commenΓ§ant ce jour | |
921 | text_tip_issue_end_day: tΓ’che finissant ce jour |
|
923 | text_tip_issue_end_day: tΓ’che finissant ce jour | |
922 | text_tip_issue_begin_end_day: tΓ’che commenΓ§ant et finissant ce jour |
|
924 | text_tip_issue_begin_end_day: tΓ’che commenΓ§ant et finissant ce jour | |
923 | text_project_identifier_info: 'Seuls les lettres minuscules (a-z), chiffres, tirets et underscore sont autorisΓ©s.<br />Un fois sauvegardΓ©, l''identifiant ne pourra plus Γͺtre modifiΓ©.' |
|
925 | text_project_identifier_info: 'Seuls les lettres minuscules (a-z), chiffres, tirets et underscore sont autorisΓ©s.<br />Un fois sauvegardΓ©, l''identifiant ne pourra plus Γͺtre modifiΓ©.' | |
924 | text_caracters_maximum: "%{count} caractères maximum." |
|
926 | text_caracters_maximum: "%{count} caractères maximum." | |
925 | text_caracters_minimum: "%{count} caractères minimum." |
|
927 | text_caracters_minimum: "%{count} caractères minimum." | |
926 | text_length_between: "Longueur comprise entre %{min} et %{max} caractères." |
|
928 | text_length_between: "Longueur comprise entre %{min} et %{max} caractères." | |
927 | text_tracker_no_workflow: Aucun worflow n'est dΓ©fini pour ce tracker |
|
929 | text_tracker_no_workflow: Aucun worflow n'est dΓ©fini pour ce tracker | |
928 | text_unallowed_characters: Caractères non autorisés |
|
930 | text_unallowed_characters: Caractères non autorisés | |
929 | text_comma_separated: Plusieurs valeurs possibles (sΓ©parΓ©es par des virgules). |
|
931 | text_comma_separated: Plusieurs valeurs possibles (sΓ©parΓ©es par des virgules). | |
930 | text_line_separated: Plusieurs valeurs possibles (une valeur par ligne). |
|
932 | text_line_separated: Plusieurs valeurs possibles (une valeur par ligne). | |
931 | text_issues_ref_in_commit_messages: RΓ©fΓ©rencement et rΓ©solution des demandes dans les commentaires de commits |
|
933 | text_issues_ref_in_commit_messages: RΓ©fΓ©rencement et rΓ©solution des demandes dans les commentaires de commits | |
932 | text_issue_added: "La demande %{id} a Γ©tΓ© soumise par %{author}." |
|
934 | text_issue_added: "La demande %{id} a Γ©tΓ© soumise par %{author}." | |
933 | text_issue_updated: "La demande %{id} a Γ©tΓ© mise Γ jour par %{author}." |
|
935 | text_issue_updated: "La demande %{id} a Γ©tΓ© mise Γ jour par %{author}." | |
934 | text_wiki_destroy_confirmation: Etes-vous sΓ»r de vouloir supprimer ce wiki et tout son contenu ? |
|
936 | text_wiki_destroy_confirmation: Etes-vous sΓ»r de vouloir supprimer ce wiki et tout son contenu ? | |
935 | text_issue_category_destroy_question: "%{count} demandes sont affectΓ©es Γ cette catΓ©gorie. Que voulez-vous faire ?" |
|
937 | text_issue_category_destroy_question: "%{count} demandes sont affectΓ©es Γ cette catΓ©gorie. Que voulez-vous faire ?" | |
936 | text_issue_category_destroy_assignments: N'affecter les demandes Γ aucune autre catΓ©gorie |
|
938 | text_issue_category_destroy_assignments: N'affecter les demandes Γ aucune autre catΓ©gorie | |
937 | text_issue_category_reassign_to: RΓ©affecter les demandes Γ cette catΓ©gorie |
|
939 | text_issue_category_reassign_to: RΓ©affecter les demandes Γ cette catΓ©gorie | |
938 | 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)." |
|
940 | 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)." | |
939 | 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Γ©." |
|
941 | 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Γ©." | |
940 | text_load_default_configuration: Charger le paramΓ©trage par dΓ©faut |
|
942 | text_load_default_configuration: Charger le paramΓ©trage par dΓ©faut | |
941 | text_status_changed_by_changeset: "AppliquΓ© par commit %{value}." |
|
943 | text_status_changed_by_changeset: "AppliquΓ© par commit %{value}." | |
942 | text_time_logged_by_changeset: "AppliquΓ© par commit %{value}" |
|
944 | text_time_logged_by_changeset: "AppliquΓ© par commit %{value}" | |
943 | text_issues_destroy_confirmation: 'Γtes-vous sΓ»r de vouloir supprimer la ou les demandes(s) selectionnΓ©e(s) ?' |
|
945 | text_issues_destroy_confirmation: 'Γtes-vous sΓ»r de vouloir supprimer la ou les demandes(s) selectionnΓ©e(s) ?' | |
944 | text_issues_destroy_descendants_confirmation: "Cela entrainera Γ©galement la suppression de %{count} sous-tΓ’che(s)." |
|
946 | text_issues_destroy_descendants_confirmation: "Cela entrainera Γ©galement la suppression de %{count} sous-tΓ’che(s)." | |
945 | text_select_project_modules: 'SΓ©lectionner les modules Γ activer pour ce projet :' |
|
947 | text_select_project_modules: 'SΓ©lectionner les modules Γ activer pour ce projet :' | |
946 | text_default_administrator_account_changed: Compte administrateur par dΓ©faut changΓ© |
|
948 | text_default_administrator_account_changed: Compte administrateur par dΓ©faut changΓ© | |
947 | text_file_repository_writable: RΓ©pertoire de stockage des fichiers accessible en Γ©criture |
|
949 | text_file_repository_writable: RΓ©pertoire de stockage des fichiers accessible en Γ©criture | |
948 | text_plugin_assets_writable: RΓ©pertoire public des plugins accessible en Γ©criture |
|
950 | text_plugin_assets_writable: RΓ©pertoire public des plugins accessible en Γ©criture | |
949 | text_rmagick_available: Bibliothèque RMagick présente (optionnelle) |
|
951 | text_rmagick_available: Bibliothèque RMagick présente (optionnelle) | |
950 | text_destroy_time_entries_question: "%{hours} heures ont Γ©tΓ© enregistrΓ©es sur les demandes Γ supprimer. Que voulez-vous faire ?" |
|
952 | text_destroy_time_entries_question: "%{hours} heures ont Γ©tΓ© enregistrΓ©es sur les demandes Γ supprimer. Que voulez-vous faire ?" | |
951 | text_destroy_time_entries: Supprimer les heures |
|
953 | text_destroy_time_entries: Supprimer les heures | |
952 | text_assign_time_entries_to_project: Reporter les heures sur le projet |
|
954 | text_assign_time_entries_to_project: Reporter les heures sur le projet | |
953 | text_reassign_time_entries: 'Reporter les heures sur cette demande:' |
|
955 | text_reassign_time_entries: 'Reporter les heures sur cette demande:' | |
954 | text_user_wrote: "%{value} a Γ©crit :" |
|
956 | text_user_wrote: "%{value} a Γ©crit :" | |
955 | text_enumeration_destroy_question: "Cette valeur est affectΓ©e Γ %{count} objets." |
|
957 | text_enumeration_destroy_question: "Cette valeur est affectΓ©e Γ %{count} objets." | |
956 | text_enumeration_category_reassign_to: 'RΓ©affecter les objets Γ cette valeur:' |
|
958 | text_enumeration_category_reassign_to: 'RΓ©affecter les objets Γ cette valeur:' | |
957 | 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." |
|
959 | 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." | |
958 | 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." |
|
960 | 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." | |
959 | text_diff_truncated: '... Ce diffΓ©rentiel a Γ©tΓ© tronquΓ© car il excΓ¨de la taille maximale pouvant Γͺtre affichΓ©e.' |
|
961 | text_diff_truncated: '... Ce diffΓ©rentiel a Γ©tΓ© tronquΓ© car il excΓ¨de la taille maximale pouvant Γͺtre affichΓ©e.' | |
960 | text_custom_field_possible_values_info: 'Une ligne par valeur' |
|
962 | text_custom_field_possible_values_info: 'Une ligne par valeur' | |
961 | text_wiki_page_destroy_question: "Cette page possède %{descendants} sous-page(s) et descendante(s). Que voulez-vous faire ?" |
|
963 | text_wiki_page_destroy_question: "Cette page possède %{descendants} sous-page(s) et descendante(s). Que voulez-vous faire ?" | |
962 | text_wiki_page_nullify_children: "Conserver les sous-pages en tant que pages racines" |
|
964 | text_wiki_page_nullify_children: "Conserver les sous-pages en tant que pages racines" | |
963 | text_wiki_page_destroy_children: "Supprimer les sous-pages et toutes leurs descedantes" |
|
965 | text_wiki_page_destroy_children: "Supprimer les sous-pages et toutes leurs descedantes" | |
964 | text_wiki_page_reassign_children: "RΓ©affecter les sous-pages Γ cette page" |
|
966 | text_wiki_page_reassign_children: "RΓ©affecter les sous-pages Γ cette page" | |
965 | 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 ?" |
|
967 | 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 ?" | |
966 | text_warn_on_leaving_unsaved: "Cette page contient du texte non sauvegardΓ© qui sera perdu si vous quittez la page." |
|
968 | text_warn_on_leaving_unsaved: "Cette page contient du texte non sauvegardΓ© qui sera perdu si vous quittez la page." | |
967 | 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)" |
|
969 | 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)" | |
968 | text_issue_conflict_resolution_add_notes: "Ajouter mes notes et ignorer mes autres changements" |
|
970 | text_issue_conflict_resolution_add_notes: "Ajouter mes notes et ignorer mes autres changements" | |
969 | text_issue_conflict_resolution_cancel: "Annuler ma mise Γ jour et rΓ©afficher %{link}" |
|
971 | text_issue_conflict_resolution_cancel: "Annuler ma mise Γ jour et rΓ©afficher %{link}" | |
970 | text_account_destroy_confirmation: "Γtes-vous sΓ»r de vouloir continuer ?\nVotre compte sera dΓ©finitivement supprimΓ©, sans aucune possibilitΓ© de le rΓ©activer." |
|
972 | text_account_destroy_confirmation: "Γtes-vous sΓ»r de vouloir continuer ?\nVotre compte sera dΓ©finitivement supprimΓ©, sans aucune possibilitΓ© de le rΓ©activer." | |
971 | 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." |
|
973 | 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." | |
972 | text_project_closed: Ce projet est fermΓ© et accessible en lecture seule. |
|
974 | text_project_closed: Ce projet est fermΓ© et accessible en lecture seule. | |
973 |
|
975 | |||
974 | default_role_manager: "Manager " |
|
976 | default_role_manager: "Manager " | |
975 | default_role_developer: "DΓ©veloppeur " |
|
977 | default_role_developer: "DΓ©veloppeur " | |
976 | default_role_reporter: "Rapporteur " |
|
978 | default_role_reporter: "Rapporteur " | |
977 | default_tracker_bug: Anomalie |
|
979 | default_tracker_bug: Anomalie | |
978 | default_tracker_feature: Evolution |
|
980 | default_tracker_feature: Evolution | |
979 | default_tracker_support: Assistance |
|
981 | default_tracker_support: Assistance | |
980 | default_issue_status_new: Nouveau |
|
982 | default_issue_status_new: Nouveau | |
981 | default_issue_status_in_progress: En cours |
|
983 | default_issue_status_in_progress: En cours | |
982 | default_issue_status_resolved: RΓ©solu |
|
984 | default_issue_status_resolved: RΓ©solu | |
983 | default_issue_status_feedback: Commentaire |
|
985 | default_issue_status_feedback: Commentaire | |
984 | default_issue_status_closed: FermΓ© |
|
986 | default_issue_status_closed: FermΓ© | |
985 | default_issue_status_rejected: RejetΓ© |
|
987 | default_issue_status_rejected: RejetΓ© | |
986 | default_doc_category_user: Documentation utilisateur |
|
988 | default_doc_category_user: Documentation utilisateur | |
987 | default_doc_category_tech: Documentation technique |
|
989 | default_doc_category_tech: Documentation technique | |
988 | default_priority_low: Bas |
|
990 | default_priority_low: Bas | |
989 | default_priority_normal: Normal |
|
991 | default_priority_normal: Normal | |
990 | default_priority_high: Haut |
|
992 | default_priority_high: Haut | |
991 | default_priority_urgent: Urgent |
|
993 | default_priority_urgent: Urgent | |
992 | default_priority_immediate: ImmΓ©diat |
|
994 | default_priority_immediate: ImmΓ©diat | |
993 | default_activity_design: Conception |
|
995 | default_activity_design: Conception | |
994 | default_activity_development: DΓ©veloppement |
|
996 | default_activity_development: DΓ©veloppement | |
995 |
|
997 | |||
996 | enumeration_issue_priorities: PrioritΓ©s des demandes |
|
998 | enumeration_issue_priorities: PrioritΓ©s des demandes | |
997 | enumeration_doc_categories: CatΓ©gories des documents |
|
999 | enumeration_doc_categories: CatΓ©gories des documents | |
998 | enumeration_activities: ActivitΓ©s (suivi du temps) |
|
1000 | enumeration_activities: ActivitΓ©s (suivi du temps) | |
999 | label_greater_or_equal: ">=" |
|
1001 | label_greater_or_equal: ">=" | |
1000 | label_less_or_equal: "<=" |
|
1002 | label_less_or_equal: "<=" | |
1001 | label_between: entre |
|
1003 | label_between: entre | |
1002 | label_view_all_revisions: Voir toutes les rΓ©visions |
|
1004 | label_view_all_revisions: Voir toutes les rΓ©visions | |
1003 | label_tag: Tag |
|
1005 | label_tag: Tag | |
1004 | label_branch: Branche |
|
1006 | label_branch: Branche | |
1005 | error_no_tracker_in_project: "Aucun tracker n'est associΓ© Γ ce projet. VΓ©rifier la configuration du projet." |
|
1007 | error_no_tracker_in_project: "Aucun tracker n'est associΓ© Γ ce projet. VΓ©rifier la configuration du projet." | |
1006 | error_no_default_issue_status: "Aucun statut de demande n'est dΓ©fini par dΓ©faut. VΓ©rifier votre configuration (Administration -> Statuts de demandes)." |
|
1008 | error_no_default_issue_status: "Aucun statut de demande n'est dΓ©fini par dΓ©faut. VΓ©rifier votre configuration (Administration -> Statuts de demandes)." | |
1007 | text_journal_changed: "%{label} changΓ© de %{old} Γ %{new}" |
|
1009 | text_journal_changed: "%{label} changΓ© de %{old} Γ %{new}" | |
1008 | text_journal_changed_no_detail: "%{label} mis Γ jour" |
|
1010 | text_journal_changed_no_detail: "%{label} mis Γ jour" | |
1009 | text_journal_set_to: "%{label} mis Γ %{value}" |
|
1011 | text_journal_set_to: "%{label} mis Γ %{value}" | |
1010 | text_journal_deleted: "%{label} %{old} supprimΓ©" |
|
1012 | text_journal_deleted: "%{label} %{old} supprimΓ©" | |
1011 | text_journal_added: "%{label} %{value} ajoutΓ©" |
|
1013 | text_journal_added: "%{label} %{value} ajoutΓ©" | |
1012 | enumeration_system_activity: Activité système |
|
1014 | enumeration_system_activity: Activité système | |
1013 | label_board_sticky: Sticky |
|
1015 | label_board_sticky: Sticky | |
1014 | label_board_locked: VerrouillΓ© |
|
1016 | label_board_locked: VerrouillΓ© | |
1015 | error_unable_delete_issue_status: Impossible de supprimer le statut de demande |
|
1017 | error_unable_delete_issue_status: Impossible de supprimer le statut de demande | |
1016 | error_can_not_delete_custom_field: Impossible de supprimer le champ personnalisΓ© |
|
1018 | error_can_not_delete_custom_field: Impossible de supprimer le champ personnalisΓ© | |
1017 | error_unable_to_connect: Connexion impossible (%{value}) |
|
1019 | error_unable_to_connect: Connexion impossible (%{value}) | |
1018 | error_can_not_remove_role: Ce rΓ΄le est utilisΓ© et ne peut pas Γͺtre supprimΓ©. |
|
1020 | error_can_not_remove_role: Ce rΓ΄le est utilisΓ© et ne peut pas Γͺtre supprimΓ©. | |
1019 | error_can_not_delete_tracker: Ce tracker contient des demandes et ne peut pas Γͺtre supprimΓ©. |
|
1021 | error_can_not_delete_tracker: Ce tracker contient des demandes et ne peut pas Γͺtre supprimΓ©. | |
1020 | field_principal: Principal |
|
1022 | field_principal: Principal | |
1021 | notice_failed_to_save_members: "Erreur lors de la sauvegarde des membres: %{errors}." |
|
1023 | notice_failed_to_save_members: "Erreur lors de la sauvegarde des membres: %{errors}." | |
1022 | text_zoom_out: Zoom arrière |
|
1024 | text_zoom_out: Zoom arrière | |
1023 | text_zoom_in: Zoom avant |
|
1025 | text_zoom_in: Zoom avant | |
1024 | notice_unable_delete_time_entry: Impossible de supprimer le temps passΓ©. |
|
1026 | notice_unable_delete_time_entry: Impossible de supprimer le temps passΓ©. | |
1025 | label_overall_spent_time: Temps passΓ© global |
|
1027 | label_overall_spent_time: Temps passΓ© global | |
1026 | field_time_entries: Temps passΓ© |
|
1028 | field_time_entries: Temps passΓ© | |
1027 | project_module_gantt: Gantt |
|
1029 | project_module_gantt: Gantt | |
1028 | project_module_calendar: Calendrier |
|
1030 | project_module_calendar: Calendrier | |
1029 | button_edit_associated_wikipage: "Modifier la page wiki associΓ©e: %{page_title}" |
|
1031 | button_edit_associated_wikipage: "Modifier la page wiki associΓ©e: %{page_title}" | |
1030 | text_are_you_sure_with_children: Supprimer la demande et toutes ses sous-demandes ? |
|
1032 | text_are_you_sure_with_children: Supprimer la demande et toutes ses sous-demandes ? | |
1031 | field_text: Champ texte |
|
1033 | field_text: Champ texte | |
1032 | label_user_mail_option_only_owner: Seulement pour ce que j'ai créé |
|
1034 | label_user_mail_option_only_owner: Seulement pour ce que j'ai créé | |
1033 | setting_default_notification_option: Option de notification par dΓ©faut |
|
1035 | setting_default_notification_option: Option de notification par dΓ©faut | |
1034 | label_user_mail_option_only_my_events: Seulement pour ce que je surveille |
|
1036 | label_user_mail_option_only_my_events: Seulement pour ce que je surveille | |
1035 | label_user_mail_option_only_assigned: Seulement pour ce qui m'est assignΓ© |
|
1037 | label_user_mail_option_only_assigned: Seulement pour ce qui m'est assignΓ© | |
1036 | label_user_mail_option_none: Aucune notification |
|
1038 | label_user_mail_option_none: Aucune notification | |
1037 | field_member_of_group: Groupe de l'assignΓ© |
|
1039 | field_member_of_group: Groupe de l'assignΓ© | |
1038 | field_assigned_to_role: RΓ΄le de l'assignΓ© |
|
1040 | field_assigned_to_role: RΓ΄le de l'assignΓ© | |
1039 | setting_emails_header: En-tΓͺte des emails |
|
1041 | setting_emails_header: En-tΓͺte des emails | |
1040 | label_bulk_edit_selected_time_entries: Modifier les temps passΓ©s sΓ©lectionnΓ©s |
|
1042 | label_bulk_edit_selected_time_entries: Modifier les temps passΓ©s sΓ©lectionnΓ©s | |
1041 | text_time_entries_destroy_confirmation: "Etes-vous sΓ»r de vouloir supprimer les temps passΓ©s sΓ©lectionnΓ©s ?" |
|
1043 | text_time_entries_destroy_confirmation: "Etes-vous sΓ»r de vouloir supprimer les temps passΓ©s sΓ©lectionnΓ©s ?" | |
1042 | field_scm_path_encoding: Encodage des chemins |
|
1044 | field_scm_path_encoding: Encodage des chemins | |
1043 | text_scm_path_encoding_note: "DΓ©faut : UTF-8" |
|
1045 | text_scm_path_encoding_note: "DΓ©faut : UTF-8" | |
1044 | field_path_to_repository: Chemin du dΓ©pΓ΄t |
|
1046 | field_path_to_repository: Chemin du dΓ©pΓ΄t | |
1045 | field_root_directory: RΓ©pertoire racine |
|
1047 | field_root_directory: RΓ©pertoire racine | |
1046 | field_cvs_module: Module |
|
1048 | field_cvs_module: Module | |
1047 | field_cvsroot: CVSROOT |
|
1049 | field_cvsroot: CVSROOT | |
1048 | text_mercurial_repository_note: "DΓ©pΓ΄t local (exemples : /hgrepo, c:\\hgrepo)" |
|
1050 | text_mercurial_repository_note: "DΓ©pΓ΄t local (exemples : /hgrepo, c:\\hgrepo)" | |
1049 | text_scm_command: Commande |
|
1051 | text_scm_command: Commande | |
1050 | text_scm_command_version: Version |
|
1052 | text_scm_command_version: Version | |
1051 | label_git_report_last_commit: Afficher le dernier commit des fichiers et rΓ©pertoires |
|
1053 | label_git_report_last_commit: Afficher le dernier commit des fichiers et rΓ©pertoires | |
1052 | text_scm_config: Vous pouvez configurer les commandes des SCM dans config/configuration.yml. Redémarrer l'application après modification. |
|
1054 | text_scm_config: Vous pouvez configurer les commandes des SCM dans config/configuration.yml. Redémarrer l'application après modification. | |
1053 | text_scm_command_not_available: Ce SCM n'est pas disponible. Vérifier les paramètres dans la section administration. |
|
1055 | text_scm_command_not_available: Ce SCM n'est pas disponible. Vérifier les paramètres dans la section administration. | |
1054 | label_diff: diff |
|
1056 | label_diff: diff | |
1055 | text_git_repository_note: Repository is bare and local (e.g. /gitrepo, c:\gitrepo) |
|
1057 | text_git_repository_note: Repository is bare and local (e.g. /gitrepo, c:\gitrepo) | |
1056 | description_query_sort_criteria_direction: Ordre de tri |
|
1058 | description_query_sort_criteria_direction: Ordre de tri | |
1057 | description_project_scope: Périmètre de recherche |
|
1059 | description_project_scope: Périmètre de recherche | |
1058 | description_filter: Filtre |
|
1060 | description_filter: Filtre | |
1059 | description_user_mail_notification: Option de notification |
|
1061 | description_user_mail_notification: Option de notification | |
1060 | description_date_from: Date de dΓ©but |
|
1062 | description_date_from: Date de dΓ©but | |
1061 | description_message_content: Contenu du message |
|
1063 | description_message_content: Contenu du message | |
1062 | description_available_columns: Colonnes disponibles |
|
1064 | description_available_columns: Colonnes disponibles | |
1063 | description_all_columns: Toutes les colonnes |
|
1065 | description_all_columns: Toutes les colonnes | |
1064 | description_date_range_interval: Choisir une pΓ©riode |
|
1066 | description_date_range_interval: Choisir une pΓ©riode | |
1065 | description_issue_category_reassign: Choisir une catΓ©gorie |
|
1067 | description_issue_category_reassign: Choisir une catΓ©gorie | |
1066 | description_search: Champ de recherche |
|
1068 | description_search: Champ de recherche | |
1067 | description_notes: Notes |
|
1069 | description_notes: Notes | |
1068 | description_date_range_list: Choisir une pΓ©riode prΓ©dΓ©finie |
|
1070 | description_date_range_list: Choisir une pΓ©riode prΓ©dΓ©finie | |
1069 | description_choose_project: Projets |
|
1071 | description_choose_project: Projets | |
1070 | description_date_to: Date de fin |
|
1072 | description_date_to: Date de fin | |
1071 | description_query_sort_criteria_attribute: Critère de tri |
|
1073 | description_query_sort_criteria_attribute: Critère de tri | |
1072 | description_wiki_subpages_reassign: Choisir une nouvelle page parent |
|
1074 | description_wiki_subpages_reassign: Choisir une nouvelle page parent | |
1073 | description_selected_columns: Colonnes sΓ©lectionnΓ©es |
|
1075 | description_selected_columns: Colonnes sΓ©lectionnΓ©es | |
1074 | label_parent_revision: Parent |
|
1076 | label_parent_revision: Parent | |
1075 | label_child_revision: Enfant |
|
1077 | label_child_revision: Enfant | |
1076 | error_scm_annotate_big_text_file: Cette entrΓ©e ne peut pas Γͺtre annotΓ©e car elle excΓ¨de la taille maximale. |
|
1078 | error_scm_annotate_big_text_file: Cette entrΓ©e ne peut pas Γͺtre annotΓ©e car elle excΓ¨de la taille maximale. | |
1077 | setting_repositories_encodings: Encodages des fichiers et des dΓ©pΓ΄ts |
|
1079 | setting_repositories_encodings: Encodages des fichiers et des dΓ©pΓ΄ts | |
1078 | label_search_for_watchers: Rechercher des observateurs |
|
1080 | label_search_for_watchers: Rechercher des observateurs | |
1079 | text_repository_identifier_info: 'Seuls les lettres minuscules (a-z), chiffres, tirets et underscore sont autorisΓ©s.<br />Un fois sauvegardΓ©, l''identifiant ne pourra plus Γͺtre modifiΓ©.' |
|
1081 | text_repository_identifier_info: 'Seuls les lettres minuscules (a-z), chiffres, tirets et underscore sont autorisΓ©s.<br />Un fois sauvegardΓ©, l''identifiant ne pourra plus Γͺtre modifiΓ©.' |
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,1579 +1,1592 | |||||
1 | # Redmine - project management software |
|
1 | # Redmine - project management software | |
2 | # Copyright (C) 2006-2012 Jean-Philippe Lang |
|
2 | # Copyright (C) 2006-2012 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 IssueTest < ActiveSupport::TestCase |
|
20 | class IssueTest < ActiveSupport::TestCase | |
21 | fixtures :projects, :users, :members, :member_roles, :roles, |
|
21 | fixtures :projects, :users, :members, :member_roles, :roles, | |
22 | :groups_users, |
|
22 | :groups_users, | |
23 | :trackers, :projects_trackers, |
|
23 | :trackers, :projects_trackers, | |
24 | :enabled_modules, |
|
24 | :enabled_modules, | |
25 | :versions, |
|
25 | :versions, | |
26 | :issue_statuses, :issue_categories, :issue_relations, :workflows, |
|
26 | :issue_statuses, :issue_categories, :issue_relations, :workflows, | |
27 | :enumerations, |
|
27 | :enumerations, | |
28 | :issues, :journals, :journal_details, |
|
28 | :issues, :journals, :journal_details, | |
29 | :custom_fields, :custom_fields_projects, :custom_fields_trackers, :custom_values, |
|
29 | :custom_fields, :custom_fields_projects, :custom_fields_trackers, :custom_values, | |
30 | :time_entries |
|
30 | :time_entries | |
31 |
|
31 | |||
32 | include Redmine::I18n |
|
32 | include Redmine::I18n | |
33 |
|
33 | |||
34 | def teardown |
|
34 | def teardown | |
35 | User.current = nil |
|
35 | User.current = nil | |
36 | end |
|
36 | end | |
37 |
|
37 | |||
38 | def test_create |
|
38 | def test_create | |
39 | issue = Issue.new(:project_id => 1, :tracker_id => 1, :author_id => 3, |
|
39 | issue = Issue.new(:project_id => 1, :tracker_id => 1, :author_id => 3, | |
40 | :status_id => 1, :priority => IssuePriority.all.first, |
|
40 | :status_id => 1, :priority => IssuePriority.all.first, | |
41 | :subject => 'test_create', |
|
41 | :subject => 'test_create', | |
42 | :description => 'IssueTest#test_create', :estimated_hours => '1:30') |
|
42 | :description => 'IssueTest#test_create', :estimated_hours => '1:30') | |
43 | assert issue.save |
|
43 | assert issue.save | |
44 | issue.reload |
|
44 | issue.reload | |
45 | assert_equal 1.5, issue.estimated_hours |
|
45 | assert_equal 1.5, issue.estimated_hours | |
46 | end |
|
46 | end | |
47 |
|
47 | |||
48 | def test_create_minimal |
|
48 | def test_create_minimal | |
49 | issue = Issue.new(:project_id => 1, :tracker_id => 1, :author_id => 3, |
|
49 | issue = Issue.new(:project_id => 1, :tracker_id => 1, :author_id => 3, | |
50 | :status_id => 1, :priority => IssuePriority.all.first, |
|
50 | :status_id => 1, :priority => IssuePriority.all.first, | |
51 | :subject => 'test_create') |
|
51 | :subject => 'test_create') | |
52 | assert issue.save |
|
52 | assert issue.save | |
53 | assert issue.description.nil? |
|
53 | assert issue.description.nil? | |
54 | assert_nil issue.estimated_hours |
|
54 | assert_nil issue.estimated_hours | |
55 | end |
|
55 | end | |
56 |
|
56 | |||
57 | def test_create_with_required_custom_field |
|
57 | def test_create_with_required_custom_field | |
58 | set_language_if_valid 'en' |
|
58 | set_language_if_valid 'en' | |
59 | field = IssueCustomField.find_by_name('Database') |
|
59 | field = IssueCustomField.find_by_name('Database') | |
60 | field.update_attribute(:is_required, true) |
|
60 | field.update_attribute(:is_required, true) | |
61 |
|
61 | |||
62 | issue = Issue.new(:project_id => 1, :tracker_id => 1, :author_id => 1, |
|
62 | issue = Issue.new(:project_id => 1, :tracker_id => 1, :author_id => 1, | |
63 | :status_id => 1, :subject => 'test_create', |
|
63 | :status_id => 1, :subject => 'test_create', | |
64 | :description => 'IssueTest#test_create_with_required_custom_field') |
|
64 | :description => 'IssueTest#test_create_with_required_custom_field') | |
65 | assert issue.available_custom_fields.include?(field) |
|
65 | assert issue.available_custom_fields.include?(field) | |
66 | # No value for the custom field |
|
66 | # No value for the custom field | |
67 | assert !issue.save |
|
67 | assert !issue.save | |
68 | assert_equal ["Database can't be blank"], issue.errors.full_messages |
|
68 | assert_equal ["Database can't be blank"], issue.errors.full_messages | |
69 | # Blank value |
|
69 | # Blank value | |
70 | issue.custom_field_values = { field.id => '' } |
|
70 | issue.custom_field_values = { field.id => '' } | |
71 | assert !issue.save |
|
71 | assert !issue.save | |
72 | assert_equal ["Database can't be blank"], issue.errors.full_messages |
|
72 | assert_equal ["Database can't be blank"], issue.errors.full_messages | |
73 | # Invalid value |
|
73 | # Invalid value | |
74 | issue.custom_field_values = { field.id => 'SQLServer' } |
|
74 | issue.custom_field_values = { field.id => 'SQLServer' } | |
75 | assert !issue.save |
|
75 | assert !issue.save | |
76 | assert_equal ["Database is not included in the list"], issue.errors.full_messages |
|
76 | assert_equal ["Database is not included in the list"], issue.errors.full_messages | |
77 | # Valid value |
|
77 | # Valid value | |
78 | issue.custom_field_values = { field.id => 'PostgreSQL' } |
|
78 | issue.custom_field_values = { field.id => 'PostgreSQL' } | |
79 | assert issue.save |
|
79 | assert issue.save | |
80 | issue.reload |
|
80 | issue.reload | |
81 | assert_equal 'PostgreSQL', issue.custom_value_for(field).value |
|
81 | assert_equal 'PostgreSQL', issue.custom_value_for(field).value | |
82 | end |
|
82 | end | |
83 |
|
83 | |||
84 | def test_create_with_group_assignment |
|
84 | def test_create_with_group_assignment | |
85 | with_settings :issue_group_assignment => '1' do |
|
85 | with_settings :issue_group_assignment => '1' do | |
86 | assert Issue.new(:project_id => 2, :tracker_id => 1, :author_id => 1, |
|
86 | assert Issue.new(:project_id => 2, :tracker_id => 1, :author_id => 1, | |
87 | :subject => 'Group assignment', |
|
87 | :subject => 'Group assignment', | |
88 | :assigned_to_id => 11).save |
|
88 | :assigned_to_id => 11).save | |
89 | issue = Issue.first(:order => 'id DESC') |
|
89 | issue = Issue.first(:order => 'id DESC') | |
90 | assert_kind_of Group, issue.assigned_to |
|
90 | assert_kind_of Group, issue.assigned_to | |
91 | assert_equal Group.find(11), issue.assigned_to |
|
91 | assert_equal Group.find(11), issue.assigned_to | |
92 | end |
|
92 | end | |
93 | end |
|
93 | end | |
94 |
|
94 | |||
95 | def assert_visibility_match(user, issues) |
|
95 | def assert_visibility_match(user, issues) | |
96 | assert_equal issues.collect(&:id).sort, Issue.all.select {|issue| issue.visible?(user)}.collect(&:id).sort |
|
96 | assert_equal issues.collect(&:id).sort, Issue.all.select {|issue| issue.visible?(user)}.collect(&:id).sort | |
97 | end |
|
97 | end | |
98 |
|
98 | |||
99 | def test_visible_scope_for_anonymous |
|
99 | def test_visible_scope_for_anonymous | |
100 | # Anonymous user should see issues of public projects only |
|
100 | # Anonymous user should see issues of public projects only | |
101 | issues = Issue.visible(User.anonymous).all |
|
101 | issues = Issue.visible(User.anonymous).all | |
102 | assert issues.any? |
|
102 | assert issues.any? | |
103 | assert_nil issues.detect {|issue| !issue.project.is_public?} |
|
103 | assert_nil issues.detect {|issue| !issue.project.is_public?} | |
104 | assert_nil issues.detect {|issue| issue.is_private?} |
|
104 | assert_nil issues.detect {|issue| issue.is_private?} | |
105 | assert_visibility_match User.anonymous, issues |
|
105 | assert_visibility_match User.anonymous, issues | |
106 | end |
|
106 | end | |
107 |
|
107 | |||
108 | def test_visible_scope_for_anonymous_without_view_issues_permissions |
|
108 | def test_visible_scope_for_anonymous_without_view_issues_permissions | |
109 | # Anonymous user should not see issues without permission |
|
109 | # Anonymous user should not see issues without permission | |
110 | Role.anonymous.remove_permission!(:view_issues) |
|
110 | Role.anonymous.remove_permission!(:view_issues) | |
111 | issues = Issue.visible(User.anonymous).all |
|
111 | issues = Issue.visible(User.anonymous).all | |
112 | assert issues.empty? |
|
112 | assert issues.empty? | |
113 | assert_visibility_match User.anonymous, issues |
|
113 | assert_visibility_match User.anonymous, issues | |
114 | end |
|
114 | end | |
115 |
|
115 | |||
116 | def test_anonymous_should_not_see_private_issues_with_issues_visibility_set_to_default |
|
116 | def test_anonymous_should_not_see_private_issues_with_issues_visibility_set_to_default | |
117 | assert Role.anonymous.update_attribute(:issues_visibility, 'default') |
|
117 | assert Role.anonymous.update_attribute(:issues_visibility, 'default') | |
118 | issue = Issue.generate_for_project!(Project.find(1), :author => User.anonymous, :assigned_to => User.anonymous, :is_private => true) |
|
118 | issue = Issue.generate_for_project!(Project.find(1), :author => User.anonymous, :assigned_to => User.anonymous, :is_private => true) | |
119 | assert_nil Issue.where(:id => issue.id).visible(User.anonymous).first |
|
119 | assert_nil Issue.where(:id => issue.id).visible(User.anonymous).first | |
120 | assert !issue.visible?(User.anonymous) |
|
120 | assert !issue.visible?(User.anonymous) | |
121 | end |
|
121 | end | |
122 |
|
122 | |||
123 | def test_anonymous_should_not_see_private_issues_with_issues_visibility_set_to_own |
|
123 | def test_anonymous_should_not_see_private_issues_with_issues_visibility_set_to_own | |
124 | assert Role.anonymous.update_attribute(:issues_visibility, 'own') |
|
124 | assert Role.anonymous.update_attribute(:issues_visibility, 'own') | |
125 | issue = Issue.generate_for_project!(Project.find(1), :author => User.anonymous, :assigned_to => User.anonymous, :is_private => true) |
|
125 | issue = Issue.generate_for_project!(Project.find(1), :author => User.anonymous, :assigned_to => User.anonymous, :is_private => true) | |
126 | assert_nil Issue.where(:id => issue.id).visible(User.anonymous).first |
|
126 | assert_nil Issue.where(:id => issue.id).visible(User.anonymous).first | |
127 | assert !issue.visible?(User.anonymous) |
|
127 | assert !issue.visible?(User.anonymous) | |
128 | end |
|
128 | end | |
129 |
|
129 | |||
130 | def test_visible_scope_for_non_member |
|
130 | def test_visible_scope_for_non_member | |
131 | user = User.find(9) |
|
131 | user = User.find(9) | |
132 | assert user.projects.empty? |
|
132 | assert user.projects.empty? | |
133 | # Non member user should see issues of public projects only |
|
133 | # Non member user should see issues of public projects only | |
134 | issues = Issue.visible(user).all |
|
134 | issues = Issue.visible(user).all | |
135 | assert issues.any? |
|
135 | assert issues.any? | |
136 | assert_nil issues.detect {|issue| !issue.project.is_public?} |
|
136 | assert_nil issues.detect {|issue| !issue.project.is_public?} | |
137 | assert_nil issues.detect {|issue| issue.is_private?} |
|
137 | assert_nil issues.detect {|issue| issue.is_private?} | |
138 | assert_visibility_match user, issues |
|
138 | assert_visibility_match user, issues | |
139 | end |
|
139 | end | |
140 |
|
140 | |||
141 | def test_visible_scope_for_non_member_with_own_issues_visibility |
|
141 | def test_visible_scope_for_non_member_with_own_issues_visibility | |
142 | Role.non_member.update_attribute :issues_visibility, 'own' |
|
142 | Role.non_member.update_attribute :issues_visibility, 'own' | |
143 | Issue.create!(:project_id => 1, :tracker_id => 1, :author_id => 9, :subject => 'Issue by non member') |
|
143 | Issue.create!(:project_id => 1, :tracker_id => 1, :author_id => 9, :subject => 'Issue by non member') | |
144 | user = User.find(9) |
|
144 | user = User.find(9) | |
145 |
|
145 | |||
146 | issues = Issue.visible(user).all |
|
146 | issues = Issue.visible(user).all | |
147 | assert issues.any? |
|
147 | assert issues.any? | |
148 | assert_nil issues.detect {|issue| issue.author != user} |
|
148 | assert_nil issues.detect {|issue| issue.author != user} | |
149 | assert_visibility_match user, issues |
|
149 | assert_visibility_match user, issues | |
150 | end |
|
150 | end | |
151 |
|
151 | |||
152 | def test_visible_scope_for_non_member_without_view_issues_permissions |
|
152 | def test_visible_scope_for_non_member_without_view_issues_permissions | |
153 | # Non member user should not see issues without permission |
|
153 | # Non member user should not see issues without permission | |
154 | Role.non_member.remove_permission!(:view_issues) |
|
154 | Role.non_member.remove_permission!(:view_issues) | |
155 | user = User.find(9) |
|
155 | user = User.find(9) | |
156 | assert user.projects.empty? |
|
156 | assert user.projects.empty? | |
157 | issues = Issue.visible(user).all |
|
157 | issues = Issue.visible(user).all | |
158 | assert issues.empty? |
|
158 | assert issues.empty? | |
159 | assert_visibility_match user, issues |
|
159 | assert_visibility_match user, issues | |
160 | end |
|
160 | end | |
161 |
|
161 | |||
162 | def test_visible_scope_for_member |
|
162 | def test_visible_scope_for_member | |
163 | user = User.find(9) |
|
163 | user = User.find(9) | |
164 | # User should see issues of projects for which he has view_issues permissions only |
|
164 | # User should see issues of projects for which he has view_issues permissions only | |
165 | Role.non_member.remove_permission!(:view_issues) |
|
165 | Role.non_member.remove_permission!(:view_issues) | |
166 | Member.create!(:principal => user, :project_id => 3, :role_ids => [2]) |
|
166 | Member.create!(:principal => user, :project_id => 3, :role_ids => [2]) | |
167 | issues = Issue.visible(user).all |
|
167 | issues = Issue.visible(user).all | |
168 | assert issues.any? |
|
168 | assert issues.any? | |
169 | assert_nil issues.detect {|issue| issue.project_id != 3} |
|
169 | assert_nil issues.detect {|issue| issue.project_id != 3} | |
170 | assert_nil issues.detect {|issue| issue.is_private?} |
|
170 | assert_nil issues.detect {|issue| issue.is_private?} | |
171 | assert_visibility_match user, issues |
|
171 | assert_visibility_match user, issues | |
172 | end |
|
172 | end | |
173 |
|
173 | |||
174 | def test_visible_scope_for_member_with_groups_should_return_assigned_issues |
|
174 | def test_visible_scope_for_member_with_groups_should_return_assigned_issues | |
175 | user = User.find(8) |
|
175 | user = User.find(8) | |
176 | assert user.groups.any? |
|
176 | assert user.groups.any? | |
177 | Member.create!(:principal => user.groups.first, :project_id => 1, :role_ids => [2]) |
|
177 | Member.create!(:principal => user.groups.first, :project_id => 1, :role_ids => [2]) | |
178 | Role.non_member.remove_permission!(:view_issues) |
|
178 | Role.non_member.remove_permission!(:view_issues) | |
179 |
|
179 | |||
180 | issue = Issue.create(:project_id => 1, :tracker_id => 1, :author_id => 3, |
|
180 | issue = Issue.create(:project_id => 1, :tracker_id => 1, :author_id => 3, | |
181 | :status_id => 1, :priority => IssuePriority.all.first, |
|
181 | :status_id => 1, :priority => IssuePriority.all.first, | |
182 | :subject => 'Assignment test', |
|
182 | :subject => 'Assignment test', | |
183 | :assigned_to => user.groups.first, |
|
183 | :assigned_to => user.groups.first, | |
184 | :is_private => true) |
|
184 | :is_private => true) | |
185 |
|
185 | |||
186 | Role.find(2).update_attribute :issues_visibility, 'default' |
|
186 | Role.find(2).update_attribute :issues_visibility, 'default' | |
187 | issues = Issue.visible(User.find(8)).all |
|
187 | issues = Issue.visible(User.find(8)).all | |
188 | assert issues.any? |
|
188 | assert issues.any? | |
189 | assert issues.include?(issue) |
|
189 | assert issues.include?(issue) | |
190 |
|
190 | |||
191 | Role.find(2).update_attribute :issues_visibility, 'own' |
|
191 | Role.find(2).update_attribute :issues_visibility, 'own' | |
192 | issues = Issue.visible(User.find(8)).all |
|
192 | issues = Issue.visible(User.find(8)).all | |
193 | assert issues.any? |
|
193 | assert issues.any? | |
194 | assert issues.include?(issue) |
|
194 | assert issues.include?(issue) | |
195 | end |
|
195 | end | |
196 |
|
196 | |||
197 | def test_visible_scope_for_admin |
|
197 | def test_visible_scope_for_admin | |
198 | user = User.find(1) |
|
198 | user = User.find(1) | |
199 | user.members.each(&:destroy) |
|
199 | user.members.each(&:destroy) | |
200 | assert user.projects.empty? |
|
200 | assert user.projects.empty? | |
201 | issues = Issue.visible(user).all |
|
201 | issues = Issue.visible(user).all | |
202 | assert issues.any? |
|
202 | assert issues.any? | |
203 | # Admin should see issues on private projects that he does not belong to |
|
203 | # Admin should see issues on private projects that he does not belong to | |
204 | assert issues.detect {|issue| !issue.project.is_public?} |
|
204 | assert issues.detect {|issue| !issue.project.is_public?} | |
205 | # Admin should see private issues of other users |
|
205 | # Admin should see private issues of other users | |
206 | assert issues.detect {|issue| issue.is_private? && issue.author != user} |
|
206 | assert issues.detect {|issue| issue.is_private? && issue.author != user} | |
207 | assert_visibility_match user, issues |
|
207 | assert_visibility_match user, issues | |
208 | end |
|
208 | end | |
209 |
|
209 | |||
210 | def test_visible_scope_with_project |
|
210 | def test_visible_scope_with_project | |
211 | project = Project.find(1) |
|
211 | project = Project.find(1) | |
212 | issues = Issue.visible(User.find(2), :project => project).all |
|
212 | issues = Issue.visible(User.find(2), :project => project).all | |
213 | projects = issues.collect(&:project).uniq |
|
213 | projects = issues.collect(&:project).uniq | |
214 | assert_equal 1, projects.size |
|
214 | assert_equal 1, projects.size | |
215 | assert_equal project, projects.first |
|
215 | assert_equal project, projects.first | |
216 | end |
|
216 | end | |
217 |
|
217 | |||
218 | def test_visible_scope_with_project_and_subprojects |
|
218 | def test_visible_scope_with_project_and_subprojects | |
219 | project = Project.find(1) |
|
219 | project = Project.find(1) | |
220 | issues = Issue.visible(User.find(2), :project => project, :with_subprojects => true).all |
|
220 | issues = Issue.visible(User.find(2), :project => project, :with_subprojects => true).all | |
221 | projects = issues.collect(&:project).uniq |
|
221 | projects = issues.collect(&:project).uniq | |
222 | assert projects.size > 1 |
|
222 | assert projects.size > 1 | |
223 | assert_equal [], projects.select {|p| !p.is_or_is_descendant_of?(project)} |
|
223 | assert_equal [], projects.select {|p| !p.is_or_is_descendant_of?(project)} | |
224 | end |
|
224 | end | |
225 |
|
225 | |||
226 | def test_visible_and_nested_set_scopes |
|
226 | def test_visible_and_nested_set_scopes | |
227 | assert_equal 0, Issue.find(1).descendants.visible.all.size |
|
227 | assert_equal 0, Issue.find(1).descendants.visible.all.size | |
228 | end |
|
228 | end | |
229 |
|
229 | |||
230 | def test_open_scope |
|
230 | def test_open_scope | |
231 | issues = Issue.open.all |
|
231 | issues = Issue.open.all | |
232 | assert_nil issues.detect(&:closed?) |
|
232 | assert_nil issues.detect(&:closed?) | |
233 | end |
|
233 | end | |
234 |
|
234 | |||
235 | def test_open_scope_with_arg |
|
235 | def test_open_scope_with_arg | |
236 | issues = Issue.open(false).all |
|
236 | issues = Issue.open(false).all | |
237 | assert_equal issues, issues.select(&:closed?) |
|
237 | assert_equal issues, issues.select(&:closed?) | |
238 | end |
|
238 | end | |
239 |
|
239 | |||
240 | def test_errors_full_messages_should_include_custom_fields_errors |
|
240 | def test_errors_full_messages_should_include_custom_fields_errors | |
241 | field = IssueCustomField.find_by_name('Database') |
|
241 | field = IssueCustomField.find_by_name('Database') | |
242 |
|
242 | |||
243 | issue = Issue.new(:project_id => 1, :tracker_id => 1, :author_id => 1, |
|
243 | issue = Issue.new(:project_id => 1, :tracker_id => 1, :author_id => 1, | |
244 | :status_id => 1, :subject => 'test_create', |
|
244 | :status_id => 1, :subject => 'test_create', | |
245 | :description => 'IssueTest#test_create_with_required_custom_field') |
|
245 | :description => 'IssueTest#test_create_with_required_custom_field') | |
246 | assert issue.available_custom_fields.include?(field) |
|
246 | assert issue.available_custom_fields.include?(field) | |
247 | # Invalid value |
|
247 | # Invalid value | |
248 | issue.custom_field_values = { field.id => 'SQLServer' } |
|
248 | issue.custom_field_values = { field.id => 'SQLServer' } | |
249 |
|
249 | |||
250 | assert !issue.valid? |
|
250 | assert !issue.valid? | |
251 | assert_equal 1, issue.errors.full_messages.size |
|
251 | assert_equal 1, issue.errors.full_messages.size | |
252 | assert_equal "Database #{I18n.translate('activerecord.errors.messages.inclusion')}", |
|
252 | assert_equal "Database #{I18n.translate('activerecord.errors.messages.inclusion')}", | |
253 | issue.errors.full_messages.first |
|
253 | issue.errors.full_messages.first | |
254 | end |
|
254 | end | |
255 |
|
255 | |||
256 | def test_update_issue_with_required_custom_field |
|
256 | def test_update_issue_with_required_custom_field | |
257 | field = IssueCustomField.find_by_name('Database') |
|
257 | field = IssueCustomField.find_by_name('Database') | |
258 | field.update_attribute(:is_required, true) |
|
258 | field.update_attribute(:is_required, true) | |
259 |
|
259 | |||
260 | issue = Issue.find(1) |
|
260 | issue = Issue.find(1) | |
261 | assert_nil issue.custom_value_for(field) |
|
261 | assert_nil issue.custom_value_for(field) | |
262 | assert issue.available_custom_fields.include?(field) |
|
262 | assert issue.available_custom_fields.include?(field) | |
263 | # No change to custom values, issue can be saved |
|
263 | # No change to custom values, issue can be saved | |
264 | assert issue.save |
|
264 | assert issue.save | |
265 | # Blank value |
|
265 | # Blank value | |
266 | issue.custom_field_values = { field.id => '' } |
|
266 | issue.custom_field_values = { field.id => '' } | |
267 | assert !issue.save |
|
267 | assert !issue.save | |
268 | # Valid value |
|
268 | # Valid value | |
269 | issue.custom_field_values = { field.id => 'PostgreSQL' } |
|
269 | issue.custom_field_values = { field.id => 'PostgreSQL' } | |
270 | assert issue.save |
|
270 | assert issue.save | |
271 | issue.reload |
|
271 | issue.reload | |
272 | assert_equal 'PostgreSQL', issue.custom_value_for(field).value |
|
272 | assert_equal 'PostgreSQL', issue.custom_value_for(field).value | |
273 | end |
|
273 | end | |
274 |
|
274 | |||
275 | def test_should_not_update_attributes_if_custom_fields_validation_fails |
|
275 | def test_should_not_update_attributes_if_custom_fields_validation_fails | |
276 | issue = Issue.find(1) |
|
276 | issue = Issue.find(1) | |
277 | field = IssueCustomField.find_by_name('Database') |
|
277 | field = IssueCustomField.find_by_name('Database') | |
278 | assert issue.available_custom_fields.include?(field) |
|
278 | assert issue.available_custom_fields.include?(field) | |
279 |
|
279 | |||
280 | issue.custom_field_values = { field.id => 'Invalid' } |
|
280 | issue.custom_field_values = { field.id => 'Invalid' } | |
281 | issue.subject = 'Should be not be saved' |
|
281 | issue.subject = 'Should be not be saved' | |
282 | assert !issue.save |
|
282 | assert !issue.save | |
283 |
|
283 | |||
284 | issue.reload |
|
284 | issue.reload | |
285 | assert_equal "Can't print recipes", issue.subject |
|
285 | assert_equal "Can't print recipes", issue.subject | |
286 | end |
|
286 | end | |
287 |
|
287 | |||
288 | def test_should_not_recreate_custom_values_objects_on_update |
|
288 | def test_should_not_recreate_custom_values_objects_on_update | |
289 | field = IssueCustomField.find_by_name('Database') |
|
289 | field = IssueCustomField.find_by_name('Database') | |
290 |
|
290 | |||
291 | issue = Issue.find(1) |
|
291 | issue = Issue.find(1) | |
292 | issue.custom_field_values = { field.id => 'PostgreSQL' } |
|
292 | issue.custom_field_values = { field.id => 'PostgreSQL' } | |
293 | assert issue.save |
|
293 | assert issue.save | |
294 | custom_value = issue.custom_value_for(field) |
|
294 | custom_value = issue.custom_value_for(field) | |
295 | issue.reload |
|
295 | issue.reload | |
296 | issue.custom_field_values = { field.id => 'MySQL' } |
|
296 | issue.custom_field_values = { field.id => 'MySQL' } | |
297 | assert issue.save |
|
297 | assert issue.save | |
298 | issue.reload |
|
298 | issue.reload | |
299 | assert_equal custom_value.id, issue.custom_value_for(field).id |
|
299 | assert_equal custom_value.id, issue.custom_value_for(field).id | |
300 | end |
|
300 | end | |
301 |
|
301 | |||
302 | def test_should_not_update_custom_fields_on_changing_tracker_with_different_custom_fields |
|
302 | def test_should_not_update_custom_fields_on_changing_tracker_with_different_custom_fields | |
303 | issue = Issue.create!(:project_id => 1, :tracker_id => 1, :author_id => 1, :status_id => 1, :subject => 'Test', :custom_field_values => {'2' => 'Test'}) |
|
303 | issue = Issue.create!(:project_id => 1, :tracker_id => 1, :author_id => 1, :status_id => 1, :subject => 'Test', :custom_field_values => {'2' => 'Test'}) | |
304 | assert !Tracker.find(2).custom_field_ids.include?(2) |
|
304 | assert !Tracker.find(2).custom_field_ids.include?(2) | |
305 |
|
305 | |||
306 | issue = Issue.find(issue.id) |
|
306 | issue = Issue.find(issue.id) | |
307 | issue.attributes = {:tracker_id => 2, :custom_field_values => {'1' => ''}} |
|
307 | issue.attributes = {:tracker_id => 2, :custom_field_values => {'1' => ''}} | |
308 |
|
308 | |||
309 | issue = Issue.find(issue.id) |
|
309 | issue = Issue.find(issue.id) | |
310 | custom_value = issue.custom_value_for(2) |
|
310 | custom_value = issue.custom_value_for(2) | |
311 | assert_not_nil custom_value |
|
311 | assert_not_nil custom_value | |
312 | assert_equal 'Test', custom_value.value |
|
312 | assert_equal 'Test', custom_value.value | |
313 | end |
|
313 | end | |
314 |
|
314 | |||
315 | def test_assigning_tracker_id_should_reload_custom_fields_values |
|
315 | def test_assigning_tracker_id_should_reload_custom_fields_values | |
316 | issue = Issue.new(:project => Project.find(1)) |
|
316 | issue = Issue.new(:project => Project.find(1)) | |
317 | assert issue.custom_field_values.empty? |
|
317 | assert issue.custom_field_values.empty? | |
318 | issue.tracker_id = 1 |
|
318 | issue.tracker_id = 1 | |
319 | assert issue.custom_field_values.any? |
|
319 | assert issue.custom_field_values.any? | |
320 | end |
|
320 | end | |
321 |
|
321 | |||
322 | def test_assigning_attributes_should_assign_project_and_tracker_first |
|
322 | def test_assigning_attributes_should_assign_project_and_tracker_first | |
323 | seq = sequence('seq') |
|
323 | seq = sequence('seq') | |
324 | issue = Issue.new |
|
324 | issue = Issue.new | |
325 | issue.expects(:project_id=).in_sequence(seq) |
|
325 | issue.expects(:project_id=).in_sequence(seq) | |
326 | issue.expects(:tracker_id=).in_sequence(seq) |
|
326 | issue.expects(:tracker_id=).in_sequence(seq) | |
327 | issue.expects(:subject=).in_sequence(seq) |
|
327 | issue.expects(:subject=).in_sequence(seq) | |
328 | issue.attributes = {:tracker_id => 2, :project_id => 1, :subject => 'Test'} |
|
328 | issue.attributes = {:tracker_id => 2, :project_id => 1, :subject => 'Test'} | |
329 | end |
|
329 | end | |
330 |
|
330 | |||
331 | def test_assigning_tracker_and_custom_fields_should_assign_custom_fields |
|
331 | def test_assigning_tracker_and_custom_fields_should_assign_custom_fields | |
332 | attributes = ActiveSupport::OrderedHash.new |
|
332 | attributes = ActiveSupport::OrderedHash.new | |
333 | attributes['custom_field_values'] = { '1' => 'MySQL' } |
|
333 | attributes['custom_field_values'] = { '1' => 'MySQL' } | |
334 | attributes['tracker_id'] = '1' |
|
334 | attributes['tracker_id'] = '1' | |
335 | issue = Issue.new(:project => Project.find(1)) |
|
335 | issue = Issue.new(:project => Project.find(1)) | |
336 | issue.attributes = attributes |
|
336 | issue.attributes = attributes | |
337 | assert_equal 'MySQL', issue.custom_field_value(1) |
|
337 | assert_equal 'MySQL', issue.custom_field_value(1) | |
338 | end |
|
338 | end | |
339 |
|
339 | |||
340 | def test_should_update_issue_with_disabled_tracker |
|
340 | def test_should_update_issue_with_disabled_tracker | |
341 | p = Project.find(1) |
|
341 | p = Project.find(1) | |
342 | issue = Issue.find(1) |
|
342 | issue = Issue.find(1) | |
343 |
|
343 | |||
344 | p.trackers.delete(issue.tracker) |
|
344 | p.trackers.delete(issue.tracker) | |
345 | assert !p.trackers.include?(issue.tracker) |
|
345 | assert !p.trackers.include?(issue.tracker) | |
346 |
|
346 | |||
347 | issue.reload |
|
347 | issue.reload | |
348 | issue.subject = 'New subject' |
|
348 | issue.subject = 'New subject' | |
349 | assert issue.save |
|
349 | assert issue.save | |
350 | end |
|
350 | end | |
351 |
|
351 | |||
352 | def test_should_not_set_a_disabled_tracker |
|
352 | def test_should_not_set_a_disabled_tracker | |
353 | p = Project.find(1) |
|
353 | p = Project.find(1) | |
354 | p.trackers.delete(Tracker.find(2)) |
|
354 | p.trackers.delete(Tracker.find(2)) | |
355 |
|
355 | |||
356 | issue = Issue.find(1) |
|
356 | issue = Issue.find(1) | |
357 | issue.tracker_id = 2 |
|
357 | issue.tracker_id = 2 | |
358 | issue.subject = 'New subject' |
|
358 | issue.subject = 'New subject' | |
359 | assert !issue.save |
|
359 | assert !issue.save | |
360 | assert_not_nil issue.errors[:tracker_id] |
|
360 | assert_not_nil issue.errors[:tracker_id] | |
361 | end |
|
361 | end | |
362 |
|
362 | |||
363 | def test_category_based_assignment |
|
363 | def test_category_based_assignment | |
364 | issue = Issue.create(:project_id => 1, :tracker_id => 1, :author_id => 3, |
|
364 | issue = Issue.create(:project_id => 1, :tracker_id => 1, :author_id => 3, | |
365 | :status_id => 1, :priority => IssuePriority.all.first, |
|
365 | :status_id => 1, :priority => IssuePriority.all.first, | |
366 | :subject => 'Assignment test', |
|
366 | :subject => 'Assignment test', | |
367 | :description => 'Assignment test', :category_id => 1) |
|
367 | :description => 'Assignment test', :category_id => 1) | |
368 | assert_equal IssueCategory.find(1).assigned_to, issue.assigned_to |
|
368 | assert_equal IssueCategory.find(1).assigned_to, issue.assigned_to | |
369 | end |
|
369 | end | |
370 |
|
370 | |||
371 | def test_new_statuses_allowed_to |
|
371 | def test_new_statuses_allowed_to | |
372 | WorkflowTransition.delete_all |
|
372 | WorkflowTransition.delete_all | |
373 |
|
373 | |||
374 | WorkflowTransition.create!(:role_id => 1, :tracker_id => 1, :old_status_id => 1, :new_status_id => 2, :author => false, :assignee => false) |
|
374 | WorkflowTransition.create!(:role_id => 1, :tracker_id => 1, :old_status_id => 1, :new_status_id => 2, :author => false, :assignee => false) | |
375 | WorkflowTransition.create!(:role_id => 1, :tracker_id => 1, :old_status_id => 1, :new_status_id => 3, :author => true, :assignee => false) |
|
375 | WorkflowTransition.create!(:role_id => 1, :tracker_id => 1, :old_status_id => 1, :new_status_id => 3, :author => true, :assignee => false) | |
376 | WorkflowTransition.create!(:role_id => 1, :tracker_id => 1, :old_status_id => 1, :new_status_id => 4, :author => false, :assignee => true) |
|
376 | WorkflowTransition.create!(:role_id => 1, :tracker_id => 1, :old_status_id => 1, :new_status_id => 4, :author => false, :assignee => true) | |
377 | WorkflowTransition.create!(:role_id => 1, :tracker_id => 1, :old_status_id => 1, :new_status_id => 5, :author => true, :assignee => true) |
|
377 | WorkflowTransition.create!(:role_id => 1, :tracker_id => 1, :old_status_id => 1, :new_status_id => 5, :author => true, :assignee => true) | |
378 | status = IssueStatus.find(1) |
|
378 | status = IssueStatus.find(1) | |
379 | role = Role.find(1) |
|
379 | role = Role.find(1) | |
380 | tracker = Tracker.find(1) |
|
380 | tracker = Tracker.find(1) | |
381 | user = User.find(2) |
|
381 | user = User.find(2) | |
382 |
|
382 | |||
383 | issue = Issue.generate!(:tracker => tracker, :status => status, :project_id => 1, :author_id => 1) |
|
383 | issue = Issue.generate!(:tracker => tracker, :status => status, :project_id => 1, :author_id => 1) | |
384 | assert_equal [1, 2], issue.new_statuses_allowed_to(user).map(&:id) |
|
384 | assert_equal [1, 2], issue.new_statuses_allowed_to(user).map(&:id) | |
385 |
|
385 | |||
386 | issue = Issue.generate!(:tracker => tracker, :status => status, :project_id => 1, :author => user) |
|
386 | issue = Issue.generate!(:tracker => tracker, :status => status, :project_id => 1, :author => user) | |
387 | assert_equal [1, 2, 3, 5], issue.new_statuses_allowed_to(user).map(&:id) |
|
387 | assert_equal [1, 2, 3, 5], issue.new_statuses_allowed_to(user).map(&:id) | |
388 |
|
388 | |||
389 | issue = Issue.generate!(:tracker => tracker, :status => status, :project_id => 1, :author_id => 1, :assigned_to => user) |
|
389 | issue = Issue.generate!(:tracker => tracker, :status => status, :project_id => 1, :author_id => 1, :assigned_to => user) | |
390 | assert_equal [1, 2, 4, 5], issue.new_statuses_allowed_to(user).map(&:id) |
|
390 | assert_equal [1, 2, 4, 5], issue.new_statuses_allowed_to(user).map(&:id) | |
391 |
|
391 | |||
392 | issue = Issue.generate!(:tracker => tracker, :status => status, :project_id => 1, :author => user, :assigned_to => user) |
|
392 | issue = Issue.generate!(:tracker => tracker, :status => status, :project_id => 1, :author => user, :assigned_to => user) | |
393 | assert_equal [1, 2, 3, 4, 5], issue.new_statuses_allowed_to(user).map(&:id) |
|
393 | assert_equal [1, 2, 3, 4, 5], issue.new_statuses_allowed_to(user).map(&:id) | |
394 | end |
|
394 | end | |
395 |
|
395 | |||
396 | def test_new_statuses_allowed_to_should_return_all_transitions_for_admin |
|
396 | def test_new_statuses_allowed_to_should_return_all_transitions_for_admin | |
397 | admin = User.find(1) |
|
397 | admin = User.find(1) | |
398 | issue = Issue.find(1) |
|
398 | issue = Issue.find(1) | |
399 | assert !admin.member_of?(issue.project) |
|
399 | assert !admin.member_of?(issue.project) | |
400 | expected_statuses = [issue.status] + WorkflowTransition.find_all_by_old_status_id(issue.status_id).map(&:new_status).uniq.sort |
|
400 | expected_statuses = [issue.status] + WorkflowTransition.find_all_by_old_status_id(issue.status_id).map(&:new_status).uniq.sort | |
401 |
|
401 | |||
402 | assert_equal expected_statuses, issue.new_statuses_allowed_to(admin) |
|
402 | assert_equal expected_statuses, issue.new_statuses_allowed_to(admin) | |
403 | end |
|
403 | end | |
404 |
|
404 | |||
405 | def test_new_statuses_allowed_to_should_return_default_and_current_status_when_copying |
|
405 | def test_new_statuses_allowed_to_should_return_default_and_current_status_when_copying | |
406 | issue = Issue.find(1).copy |
|
406 | issue = Issue.find(1).copy | |
407 | assert_equal [1], issue.new_statuses_allowed_to(User.find(2)).map(&:id) |
|
407 | assert_equal [1], issue.new_statuses_allowed_to(User.find(2)).map(&:id) | |
408 |
|
408 | |||
409 | issue = Issue.find(2).copy |
|
409 | issue = Issue.find(2).copy | |
410 | assert_equal [1, 2], issue.new_statuses_allowed_to(User.find(2)).map(&:id) |
|
410 | assert_equal [1, 2], issue.new_statuses_allowed_to(User.find(2)).map(&:id) | |
411 | end |
|
411 | end | |
412 |
|
412 | |||
413 | def test_safe_attributes_names_should_not_include_disabled_field |
|
413 | def test_safe_attributes_names_should_not_include_disabled_field | |
414 | tracker = Tracker.new(:core_fields => %w(assigned_to_id fixed_version_id)) |
|
414 | tracker = Tracker.new(:core_fields => %w(assigned_to_id fixed_version_id)) | |
415 |
|
415 | |||
416 | issue = Issue.new(:tracker => tracker) |
|
416 | issue = Issue.new(:tracker => tracker) | |
417 | assert_include 'tracker_id', issue.safe_attribute_names |
|
417 | assert_include 'tracker_id', issue.safe_attribute_names | |
418 | assert_include 'status_id', issue.safe_attribute_names |
|
418 | assert_include 'status_id', issue.safe_attribute_names | |
419 | assert_include 'subject', issue.safe_attribute_names |
|
419 | assert_include 'subject', issue.safe_attribute_names | |
420 | assert_include 'description', issue.safe_attribute_names |
|
420 | assert_include 'description', issue.safe_attribute_names | |
421 | assert_include 'custom_field_values', issue.safe_attribute_names |
|
421 | assert_include 'custom_field_values', issue.safe_attribute_names | |
422 | assert_include 'custom_fields', issue.safe_attribute_names |
|
422 | assert_include 'custom_fields', issue.safe_attribute_names | |
423 | assert_include 'lock_version', issue.safe_attribute_names |
|
423 | assert_include 'lock_version', issue.safe_attribute_names | |
424 |
|
424 | |||
425 | tracker.core_fields.each do |field| |
|
425 | tracker.core_fields.each do |field| | |
426 | assert_include field, issue.safe_attribute_names |
|
426 | assert_include field, issue.safe_attribute_names | |
427 | end |
|
427 | end | |
428 |
|
428 | |||
429 | tracker.disabled_core_fields.each do |field| |
|
429 | tracker.disabled_core_fields.each do |field| | |
430 | assert_not_include field, issue.safe_attribute_names |
|
430 | assert_not_include field, issue.safe_attribute_names | |
431 | end |
|
431 | end | |
432 | end |
|
432 | end | |
433 |
|
433 | |||
434 | def test_safe_attributes_should_ignore_disabled_fields |
|
434 | def test_safe_attributes_should_ignore_disabled_fields | |
435 | tracker = Tracker.find(1) |
|
435 | tracker = Tracker.find(1) | |
436 | tracker.core_fields = %w(assigned_to_id due_date) |
|
436 | tracker.core_fields = %w(assigned_to_id due_date) | |
437 | tracker.save! |
|
437 | tracker.save! | |
438 |
|
438 | |||
439 | issue = Issue.new(:tracker => tracker) |
|
439 | issue = Issue.new(:tracker => tracker) | |
440 | issue.safe_attributes = {'start_date' => '2012-07-14', 'due_date' => '2012-07-14'} |
|
440 | issue.safe_attributes = {'start_date' => '2012-07-14', 'due_date' => '2012-07-14'} | |
441 | assert_nil issue.start_date |
|
441 | assert_nil issue.start_date | |
442 | assert_equal Date.parse('2012-07-14'), issue.due_date |
|
442 | assert_equal Date.parse('2012-07-14'), issue.due_date | |
443 | end |
|
443 | end | |
444 |
|
444 | |||
445 | def test_safe_attributes_should_accept_target_tracker_enabled_fields |
|
445 | def test_safe_attributes_should_accept_target_tracker_enabled_fields | |
446 | source = Tracker.find(1) |
|
446 | source = Tracker.find(1) | |
447 | source.core_fields = [] |
|
447 | source.core_fields = [] | |
448 | source.save! |
|
448 | source.save! | |
449 | target = Tracker.find(2) |
|
449 | target = Tracker.find(2) | |
450 | target.core_fields = %w(assigned_to_id due_date) |
|
450 | target.core_fields = %w(assigned_to_id due_date) | |
451 | target.save! |
|
451 | target.save! | |
452 |
|
452 | |||
453 | issue = Issue.new(:tracker => source) |
|
453 | issue = Issue.new(:tracker => source) | |
454 | issue.safe_attributes = {'tracker_id' => 2, 'due_date' => '2012-07-14'} |
|
454 | issue.safe_attributes = {'tracker_id' => 2, 'due_date' => '2012-07-14'} | |
455 | assert_equal target, issue.tracker |
|
455 | assert_equal target, issue.tracker | |
456 | assert_equal Date.parse('2012-07-14'), issue.due_date |
|
456 | assert_equal Date.parse('2012-07-14'), issue.due_date | |
457 | end |
|
457 | end | |
458 |
|
458 | |||
459 | def test_safe_attributes_should_not_include_readonly_fields |
|
459 | def test_safe_attributes_should_not_include_readonly_fields | |
460 | WorkflowPermission.delete_all |
|
460 | WorkflowPermission.delete_all | |
461 | WorkflowPermission.create!(:old_status_id => 1, :tracker_id => 1, :role_id => 1, :field_name => 'due_date', :rule => 'readonly') |
|
461 | WorkflowPermission.create!(:old_status_id => 1, :tracker_id => 1, :role_id => 1, :field_name => 'due_date', :rule => 'readonly') | |
462 | user = User.find(2) |
|
462 | user = User.find(2) | |
463 |
|
463 | |||
464 | issue = Issue.new(:project_id => 1, :tracker_id => 1) |
|
464 | issue = Issue.new(:project_id => 1, :tracker_id => 1) | |
465 | assert_equal %w(due_date), issue.read_only_attribute_names(user) |
|
465 | assert_equal %w(due_date), issue.read_only_attribute_names(user) | |
466 | assert_not_include 'due_date', issue.safe_attribute_names(user) |
|
466 | assert_not_include 'due_date', issue.safe_attribute_names(user) | |
467 |
|
467 | |||
468 | issue.send :safe_attributes=, {'start_date' => '2012-07-14', 'due_date' => '2012-07-14'}, user |
|
468 | issue.send :safe_attributes=, {'start_date' => '2012-07-14', 'due_date' => '2012-07-14'}, user | |
469 | assert_equal Date.parse('2012-07-14'), issue.start_date |
|
469 | assert_equal Date.parse('2012-07-14'), issue.start_date | |
470 | assert_nil issue.due_date |
|
470 | assert_nil issue.due_date | |
471 | end |
|
471 | end | |
472 |
|
472 | |||
473 | def test_safe_attributes_should_not_include_readonly_custom_fields |
|
473 | def test_safe_attributes_should_not_include_readonly_custom_fields | |
474 | cf1 = IssueCustomField.create!(:name => 'Writable field', :field_format => 'string', :is_for_all => true, :tracker_ids => [1]) |
|
474 | cf1 = IssueCustomField.create!(:name => 'Writable field', :field_format => 'string', :is_for_all => true, :tracker_ids => [1]) | |
475 | cf2 = IssueCustomField.create!(:name => 'Readonly field', :field_format => 'string', :is_for_all => true, :tracker_ids => [1]) |
|
475 | cf2 = IssueCustomField.create!(:name => 'Readonly field', :field_format => 'string', :is_for_all => true, :tracker_ids => [1]) | |
476 |
|
476 | |||
477 | WorkflowPermission.delete_all |
|
477 | WorkflowPermission.delete_all | |
478 | WorkflowPermission.create!(:old_status_id => 1, :tracker_id => 1, :role_id => 1, :field_name => cf2.id.to_s, :rule => 'readonly') |
|
478 | WorkflowPermission.create!(:old_status_id => 1, :tracker_id => 1, :role_id => 1, :field_name => cf2.id.to_s, :rule => 'readonly') | |
479 | user = User.find(2) |
|
479 | user = User.find(2) | |
480 |
|
480 | |||
481 | issue = Issue.new(:project_id => 1, :tracker_id => 1) |
|
481 | issue = Issue.new(:project_id => 1, :tracker_id => 1) | |
482 | assert_equal [cf2.id.to_s], issue.read_only_attribute_names(user) |
|
482 | assert_equal [cf2.id.to_s], issue.read_only_attribute_names(user) | |
483 | assert_not_include cf2.id.to_s, issue.safe_attribute_names(user) |
|
483 | assert_not_include cf2.id.to_s, issue.safe_attribute_names(user) | |
484 |
|
484 | |||
485 | issue.send :safe_attributes=, {'custom_field_values' => {cf1.id.to_s => 'value1', cf2.id.to_s => 'value2'}}, user |
|
485 | issue.send :safe_attributes=, {'custom_field_values' => {cf1.id.to_s => 'value1', cf2.id.to_s => 'value2'}}, user | |
486 | assert_equal 'value1', issue.custom_field_value(cf1) |
|
486 | assert_equal 'value1', issue.custom_field_value(cf1) | |
487 | assert_nil issue.custom_field_value(cf2) |
|
487 | assert_nil issue.custom_field_value(cf2) | |
488 |
|
488 | |||
489 | issue.send :safe_attributes=, {'custom_fields' => [{'id' => cf1.id.to_s, 'value' => 'valuea'}, {'id' => cf2.id.to_s, 'value' => 'valueb'}]}, user |
|
489 | issue.send :safe_attributes=, {'custom_fields' => [{'id' => cf1.id.to_s, 'value' => 'valuea'}, {'id' => cf2.id.to_s, 'value' => 'valueb'}]}, user | |
490 | assert_equal 'valuea', issue.custom_field_value(cf1) |
|
490 | assert_equal 'valuea', issue.custom_field_value(cf1) | |
491 | assert_nil issue.custom_field_value(cf2) |
|
491 | assert_nil issue.custom_field_value(cf2) | |
492 | end |
|
492 | end | |
493 |
|
493 | |||
494 | def test_editable_custom_field_values_should_return_non_readonly_custom_values |
|
494 | def test_editable_custom_field_values_should_return_non_readonly_custom_values | |
495 | cf1 = IssueCustomField.create!(:name => 'Writable field', :field_format => 'string', :is_for_all => true, :tracker_ids => [1, 2]) |
|
495 | cf1 = IssueCustomField.create!(:name => 'Writable field', :field_format => 'string', :is_for_all => true, :tracker_ids => [1, 2]) | |
496 | cf2 = IssueCustomField.create!(:name => 'Readonly field', :field_format => 'string', :is_for_all => true, :tracker_ids => [1, 2]) |
|
496 | cf2 = IssueCustomField.create!(:name => 'Readonly field', :field_format => 'string', :is_for_all => true, :tracker_ids => [1, 2]) | |
497 |
|
497 | |||
498 | WorkflowPermission.delete_all |
|
498 | WorkflowPermission.delete_all | |
499 | WorkflowPermission.create!(:old_status_id => 1, :tracker_id => 1, :role_id => 1, :field_name => cf2.id.to_s, :rule => 'readonly') |
|
499 | WorkflowPermission.create!(:old_status_id => 1, :tracker_id => 1, :role_id => 1, :field_name => cf2.id.to_s, :rule => 'readonly') | |
500 | user = User.find(2) |
|
500 | user = User.find(2) | |
501 |
|
501 | |||
502 | issue = Issue.new(:project_id => 1, :tracker_id => 1) |
|
502 | issue = Issue.new(:project_id => 1, :tracker_id => 1) | |
503 | values = issue.editable_custom_field_values(user) |
|
503 | values = issue.editable_custom_field_values(user) | |
504 | assert values.detect {|value| value.custom_field == cf1} |
|
504 | assert values.detect {|value| value.custom_field == cf1} | |
505 | assert_nil values.detect {|value| value.custom_field == cf2} |
|
505 | assert_nil values.detect {|value| value.custom_field == cf2} | |
506 |
|
506 | |||
507 | issue.tracker_id = 2 |
|
507 | issue.tracker_id = 2 | |
508 | values = issue.editable_custom_field_values(user) |
|
508 | values = issue.editable_custom_field_values(user) | |
509 | assert values.detect {|value| value.custom_field == cf1} |
|
509 | assert values.detect {|value| value.custom_field == cf1} | |
510 | assert values.detect {|value| value.custom_field == cf2} |
|
510 | assert values.detect {|value| value.custom_field == cf2} | |
511 | end |
|
511 | end | |
512 |
|
512 | |||
513 | def test_safe_attributes_should_accept_target_tracker_writable_fields |
|
513 | def test_safe_attributes_should_accept_target_tracker_writable_fields | |
514 | WorkflowPermission.delete_all |
|
514 | WorkflowPermission.delete_all | |
515 | WorkflowPermission.create!(:old_status_id => 1, :tracker_id => 1, :role_id => 1, :field_name => 'due_date', :rule => 'readonly') |
|
515 | WorkflowPermission.create!(:old_status_id => 1, :tracker_id => 1, :role_id => 1, :field_name => 'due_date', :rule => 'readonly') | |
516 | WorkflowPermission.create!(:old_status_id => 1, :tracker_id => 2, :role_id => 1, :field_name => 'start_date', :rule => 'readonly') |
|
516 | WorkflowPermission.create!(:old_status_id => 1, :tracker_id => 2, :role_id => 1, :field_name => 'start_date', :rule => 'readonly') | |
517 | user = User.find(2) |
|
517 | user = User.find(2) | |
518 |
|
518 | |||
519 | issue = Issue.new(:project_id => 1, :tracker_id => 1, :status_id => 1) |
|
519 | issue = Issue.new(:project_id => 1, :tracker_id => 1, :status_id => 1) | |
520 |
|
520 | |||
521 | issue.send :safe_attributes=, {'start_date' => '2012-07-12', 'due_date' => '2012-07-14'}, user |
|
521 | issue.send :safe_attributes=, {'start_date' => '2012-07-12', 'due_date' => '2012-07-14'}, user | |
522 | assert_equal Date.parse('2012-07-12'), issue.start_date |
|
522 | assert_equal Date.parse('2012-07-12'), issue.start_date | |
523 | assert_nil issue.due_date |
|
523 | assert_nil issue.due_date | |
524 |
|
524 | |||
525 | issue.send :safe_attributes=, {'start_date' => '2012-07-15', 'due_date' => '2012-07-16', 'tracker_id' => 2}, user |
|
525 | issue.send :safe_attributes=, {'start_date' => '2012-07-15', 'due_date' => '2012-07-16', 'tracker_id' => 2}, user | |
526 | assert_equal Date.parse('2012-07-12'), issue.start_date |
|
526 | assert_equal Date.parse('2012-07-12'), issue.start_date | |
527 | assert_equal Date.parse('2012-07-16'), issue.due_date |
|
527 | assert_equal Date.parse('2012-07-16'), issue.due_date | |
528 | end |
|
528 | end | |
529 |
|
529 | |||
530 | def test_safe_attributes_should_accept_target_status_writable_fields |
|
530 | def test_safe_attributes_should_accept_target_status_writable_fields | |
531 | WorkflowPermission.delete_all |
|
531 | WorkflowPermission.delete_all | |
532 | WorkflowPermission.create!(:old_status_id => 1, :tracker_id => 1, :role_id => 1, :field_name => 'due_date', :rule => 'readonly') |
|
532 | WorkflowPermission.create!(:old_status_id => 1, :tracker_id => 1, :role_id => 1, :field_name => 'due_date', :rule => 'readonly') | |
533 | WorkflowPermission.create!(:old_status_id => 2, :tracker_id => 1, :role_id => 1, :field_name => 'start_date', :rule => 'readonly') |
|
533 | WorkflowPermission.create!(:old_status_id => 2, :tracker_id => 1, :role_id => 1, :field_name => 'start_date', :rule => 'readonly') | |
534 | user = User.find(2) |
|
534 | user = User.find(2) | |
535 |
|
535 | |||
536 | issue = Issue.new(:project_id => 1, :tracker_id => 1, :status_id => 1) |
|
536 | issue = Issue.new(:project_id => 1, :tracker_id => 1, :status_id => 1) | |
537 |
|
537 | |||
538 | issue.send :safe_attributes=, {'start_date' => '2012-07-12', 'due_date' => '2012-07-14'}, user |
|
538 | issue.send :safe_attributes=, {'start_date' => '2012-07-12', 'due_date' => '2012-07-14'}, user | |
539 | assert_equal Date.parse('2012-07-12'), issue.start_date |
|
539 | assert_equal Date.parse('2012-07-12'), issue.start_date | |
540 | assert_nil issue.due_date |
|
540 | assert_nil issue.due_date | |
541 |
|
541 | |||
542 | issue.send :safe_attributes=, {'start_date' => '2012-07-15', 'due_date' => '2012-07-16', 'status_id' => 2}, user |
|
542 | issue.send :safe_attributes=, {'start_date' => '2012-07-15', 'due_date' => '2012-07-16', 'status_id' => 2}, user | |
543 | assert_equal Date.parse('2012-07-12'), issue.start_date |
|
543 | assert_equal Date.parse('2012-07-12'), issue.start_date | |
544 | assert_equal Date.parse('2012-07-16'), issue.due_date |
|
544 | assert_equal Date.parse('2012-07-16'), issue.due_date | |
545 | end |
|
545 | end | |
546 |
|
546 | |||
547 | def test_required_attributes_should_be_validated |
|
547 | def test_required_attributes_should_be_validated | |
548 | cf = IssueCustomField.create!(:name => 'Foo', :field_format => 'string', :is_for_all => true, :tracker_ids => [1, 2]) |
|
548 | cf = IssueCustomField.create!(:name => 'Foo', :field_format => 'string', :is_for_all => true, :tracker_ids => [1, 2]) | |
549 |
|
549 | |||
550 | WorkflowPermission.delete_all |
|
550 | WorkflowPermission.delete_all | |
551 | WorkflowPermission.create!(:old_status_id => 1, :tracker_id => 1, :role_id => 1, :field_name => 'due_date', :rule => 'required') |
|
551 | WorkflowPermission.create!(:old_status_id => 1, :tracker_id => 1, :role_id => 1, :field_name => 'due_date', :rule => 'required') | |
552 | WorkflowPermission.create!(:old_status_id => 1, :tracker_id => 1, :role_id => 1, :field_name => 'category_id', :rule => 'required') |
|
552 | WorkflowPermission.create!(:old_status_id => 1, :tracker_id => 1, :role_id => 1, :field_name => 'category_id', :rule => 'required') | |
553 | WorkflowPermission.create!(:old_status_id => 1, :tracker_id => 1, :role_id => 1, :field_name => cf.id.to_s, :rule => 'required') |
|
553 | WorkflowPermission.create!(:old_status_id => 1, :tracker_id => 1, :role_id => 1, :field_name => cf.id.to_s, :rule => 'required') | |
554 |
|
554 | |||
555 | WorkflowPermission.create!(:old_status_id => 1, :tracker_id => 2, :role_id => 1, :field_name => 'start_date', :rule => 'required') |
|
555 | WorkflowPermission.create!(:old_status_id => 1, :tracker_id => 2, :role_id => 1, :field_name => 'start_date', :rule => 'required') | |
556 | WorkflowPermission.create!(:old_status_id => 1, :tracker_id => 2, :role_id => 1, :field_name => cf.id.to_s, :rule => 'required') |
|
556 | WorkflowPermission.create!(:old_status_id => 1, :tracker_id => 2, :role_id => 1, :field_name => cf.id.to_s, :rule => 'required') | |
557 | user = User.find(2) |
|
557 | user = User.find(2) | |
558 |
|
558 | |||
559 | issue = Issue.new(:project_id => 1, :tracker_id => 1, :status_id => 1, :subject => 'Required fields', :author => user) |
|
559 | issue = Issue.new(:project_id => 1, :tracker_id => 1, :status_id => 1, :subject => 'Required fields', :author => user) | |
560 | assert_equal [cf.id.to_s, "category_id", "due_date"], issue.required_attribute_names(user).sort |
|
560 | assert_equal [cf.id.to_s, "category_id", "due_date"], issue.required_attribute_names(user).sort | |
561 | assert !issue.save, "Issue was saved" |
|
561 | assert !issue.save, "Issue was saved" | |
562 | assert_equal ["Category can't be blank", "Due date can't be blank", "Foo can't be blank"], issue.errors.full_messages.sort |
|
562 | assert_equal ["Category can't be blank", "Due date can't be blank", "Foo can't be blank"], issue.errors.full_messages.sort | |
563 |
|
563 | |||
564 | issue.tracker_id = 2 |
|
564 | issue.tracker_id = 2 | |
565 | assert_equal [cf.id.to_s, "start_date"], issue.required_attribute_names(user).sort |
|
565 | assert_equal [cf.id.to_s, "start_date"], issue.required_attribute_names(user).sort | |
566 | assert !issue.save, "Issue was saved" |
|
566 | assert !issue.save, "Issue was saved" | |
567 | assert_equal ["Foo can't be blank", "Start date can't be blank"], issue.errors.full_messages.sort |
|
567 | assert_equal ["Foo can't be blank", "Start date can't be blank"], issue.errors.full_messages.sort | |
568 |
|
568 | |||
569 | issue.start_date = Date.today |
|
569 | issue.start_date = Date.today | |
570 | issue.custom_field_values = {cf.id.to_s => 'bar'} |
|
570 | issue.custom_field_values = {cf.id.to_s => 'bar'} | |
571 | assert issue.save |
|
571 | assert issue.save | |
572 | end |
|
572 | end | |
573 |
|
573 | |||
574 | def test_required_attribute_names_for_multiple_roles_should_intersect_rules |
|
574 | def test_required_attribute_names_for_multiple_roles_should_intersect_rules | |
575 | WorkflowPermission.delete_all |
|
575 | WorkflowPermission.delete_all | |
576 | WorkflowPermission.create!(:old_status_id => 1, :tracker_id => 1, :role_id => 1, :field_name => 'due_date', :rule => 'required') |
|
576 | WorkflowPermission.create!(:old_status_id => 1, :tracker_id => 1, :role_id => 1, :field_name => 'due_date', :rule => 'required') | |
577 | WorkflowPermission.create!(:old_status_id => 1, :tracker_id => 1, :role_id => 1, :field_name => 'start_date', :rule => 'required') |
|
577 | WorkflowPermission.create!(:old_status_id => 1, :tracker_id => 1, :role_id => 1, :field_name => 'start_date', :rule => 'required') | |
578 | user = User.find(2) |
|
578 | user = User.find(2) | |
579 | member = Member.find(1) |
|
579 | member = Member.find(1) | |
580 | issue = Issue.new(:project_id => 1, :tracker_id => 1, :status_id => 1) |
|
580 | issue = Issue.new(:project_id => 1, :tracker_id => 1, :status_id => 1) | |
581 |
|
581 | |||
582 | assert_equal %w(due_date start_date), issue.required_attribute_names(user).sort |
|
582 | assert_equal %w(due_date start_date), issue.required_attribute_names(user).sort | |
583 |
|
583 | |||
584 | member.role_ids = [1, 2] |
|
584 | member.role_ids = [1, 2] | |
585 | member.save! |
|
585 | member.save! | |
586 | assert_equal [], issue.required_attribute_names(user.reload) |
|
586 | assert_equal [], issue.required_attribute_names(user.reload) | |
587 |
|
587 | |||
588 | WorkflowPermission.create!(:old_status_id => 1, :tracker_id => 1, :role_id => 2, :field_name => 'due_date', :rule => 'required') |
|
588 | WorkflowPermission.create!(:old_status_id => 1, :tracker_id => 1, :role_id => 2, :field_name => 'due_date', :rule => 'required') | |
589 | assert_equal %w(due_date), issue.required_attribute_names(user) |
|
589 | assert_equal %w(due_date), issue.required_attribute_names(user) | |
590 |
|
590 | |||
591 | member.role_ids = [1, 2, 3] |
|
591 | member.role_ids = [1, 2, 3] | |
592 | member.save! |
|
592 | member.save! | |
593 | assert_equal [], issue.required_attribute_names(user.reload) |
|
593 | assert_equal [], issue.required_attribute_names(user.reload) | |
594 |
|
594 | |||
595 | WorkflowPermission.create!(:old_status_id => 1, :tracker_id => 1, :role_id => 2, :field_name => 'due_date', :rule => 'readonly') |
|
595 | WorkflowPermission.create!(:old_status_id => 1, :tracker_id => 1, :role_id => 2, :field_name => 'due_date', :rule => 'readonly') | |
596 | # required + readonly => required |
|
596 | # required + readonly => required | |
597 | assert_equal %w(due_date), issue.required_attribute_names(user) |
|
597 | assert_equal %w(due_date), issue.required_attribute_names(user) | |
598 | end |
|
598 | end | |
599 |
|
599 | |||
600 | def test_read_only_attribute_names_for_multiple_roles_should_intersect_rules |
|
600 | def test_read_only_attribute_names_for_multiple_roles_should_intersect_rules | |
601 | WorkflowPermission.delete_all |
|
601 | WorkflowPermission.delete_all | |
602 | WorkflowPermission.create!(:old_status_id => 1, :tracker_id => 1, :role_id => 1, :field_name => 'due_date', :rule => 'readonly') |
|
602 | WorkflowPermission.create!(:old_status_id => 1, :tracker_id => 1, :role_id => 1, :field_name => 'due_date', :rule => 'readonly') | |
603 | WorkflowPermission.create!(:old_status_id => 1, :tracker_id => 1, :role_id => 1, :field_name => 'start_date', :rule => 'readonly') |
|
603 | WorkflowPermission.create!(:old_status_id => 1, :tracker_id => 1, :role_id => 1, :field_name => 'start_date', :rule => 'readonly') | |
604 | user = User.find(2) |
|
604 | user = User.find(2) | |
605 | member = Member.find(1) |
|
605 | member = Member.find(1) | |
606 | issue = Issue.new(:project_id => 1, :tracker_id => 1, :status_id => 1) |
|
606 | issue = Issue.new(:project_id => 1, :tracker_id => 1, :status_id => 1) | |
607 |
|
607 | |||
608 | assert_equal %w(due_date start_date), issue.read_only_attribute_names(user).sort |
|
608 | assert_equal %w(due_date start_date), issue.read_only_attribute_names(user).sort | |
609 |
|
609 | |||
610 | member.role_ids = [1, 2] |
|
610 | member.role_ids = [1, 2] | |
611 | member.save! |
|
611 | member.save! | |
612 | assert_equal [], issue.read_only_attribute_names(user.reload) |
|
612 | assert_equal [], issue.read_only_attribute_names(user.reload) | |
613 |
|
613 | |||
614 | WorkflowPermission.create!(:old_status_id => 1, :tracker_id => 1, :role_id => 2, :field_name => 'due_date', :rule => 'readonly') |
|
614 | WorkflowPermission.create!(:old_status_id => 1, :tracker_id => 1, :role_id => 2, :field_name => 'due_date', :rule => 'readonly') | |
615 | assert_equal %w(due_date), issue.read_only_attribute_names(user) |
|
615 | assert_equal %w(due_date), issue.read_only_attribute_names(user) | |
616 | end |
|
616 | end | |
617 |
|
617 | |||
618 | def test_copy |
|
618 | def test_copy | |
619 | issue = Issue.new.copy_from(1) |
|
619 | issue = Issue.new.copy_from(1) | |
620 | assert issue.copy? |
|
620 | assert issue.copy? | |
621 | assert issue.save |
|
621 | assert issue.save | |
622 | issue.reload |
|
622 | issue.reload | |
623 | orig = Issue.find(1) |
|
623 | orig = Issue.find(1) | |
624 | assert_equal orig.subject, issue.subject |
|
624 | assert_equal orig.subject, issue.subject | |
625 | assert_equal orig.tracker, issue.tracker |
|
625 | assert_equal orig.tracker, issue.tracker | |
626 | assert_equal "125", issue.custom_value_for(2).value |
|
626 | assert_equal "125", issue.custom_value_for(2).value | |
627 | end |
|
627 | end | |
628 |
|
628 | |||
629 | def test_copy_should_copy_status |
|
629 | def test_copy_should_copy_status | |
630 | orig = Issue.find(8) |
|
630 | orig = Issue.find(8) | |
631 | assert orig.status != IssueStatus.default |
|
631 | assert orig.status != IssueStatus.default | |
632 |
|
632 | |||
633 | issue = Issue.new.copy_from(orig) |
|
633 | issue = Issue.new.copy_from(orig) | |
634 | assert issue.save |
|
634 | assert issue.save | |
635 | issue.reload |
|
635 | issue.reload | |
636 | assert_equal orig.status, issue.status |
|
636 | assert_equal orig.status, issue.status | |
637 | end |
|
637 | end | |
638 |
|
638 | |||
|
639 | def test_copy_should_add_relation_with_copied_issue | |||
|
640 | copied = Issue.find(1) | |||
|
641 | issue = Issue.new.copy_from(copied) | |||
|
642 | assert issue.save | |||
|
643 | issue.reload | |||
|
644 | ||||
|
645 | assert_equal 1, issue.relations.size | |||
|
646 | relation = issue.relations.first | |||
|
647 | assert_equal 'copied_to', relation.relation_type | |||
|
648 | assert_equal copied, relation.issue_from | |||
|
649 | assert_equal issue, relation.issue_to | |||
|
650 | end | |||
|
651 | ||||
639 | def test_copy_should_copy_subtasks |
|
652 | def test_copy_should_copy_subtasks | |
640 | issue = Issue.generate_with_descendants!(Project.find(1), :subject => 'Parent') |
|
653 | issue = Issue.generate_with_descendants!(Project.find(1), :subject => 'Parent') | |
641 |
|
654 | |||
642 | copy = issue.reload.copy |
|
655 | copy = issue.reload.copy | |
643 | copy.author = User.find(7) |
|
656 | copy.author = User.find(7) | |
644 | assert_difference 'Issue.count', 1+issue.descendants.count do |
|
657 | assert_difference 'Issue.count', 1+issue.descendants.count do | |
645 | assert copy.save |
|
658 | assert copy.save | |
646 | end |
|
659 | end | |
647 | copy.reload |
|
660 | copy.reload | |
648 | assert_equal %w(Child1 Child2), copy.children.map(&:subject).sort |
|
661 | assert_equal %w(Child1 Child2), copy.children.map(&:subject).sort | |
649 | child_copy = copy.children.detect {|c| c.subject == 'Child1'} |
|
662 | child_copy = copy.children.detect {|c| c.subject == 'Child1'} | |
650 | assert_equal %w(Child11), child_copy.children.map(&:subject).sort |
|
663 | assert_equal %w(Child11), child_copy.children.map(&:subject).sort | |
651 | assert_equal copy.author, child_copy.author |
|
664 | assert_equal copy.author, child_copy.author | |
652 | end |
|
665 | end | |
653 |
|
666 | |||
654 | def test_copy_should_copy_subtasks_to_target_project |
|
667 | def test_copy_should_copy_subtasks_to_target_project | |
655 | issue = Issue.generate_with_descendants!(Project.find(1), :subject => 'Parent') |
|
668 | issue = Issue.generate_with_descendants!(Project.find(1), :subject => 'Parent') | |
656 |
|
669 | |||
657 | copy = issue.copy(:project_id => 3) |
|
670 | copy = issue.copy(:project_id => 3) | |
658 | assert_difference 'Issue.count', 1+issue.descendants.count do |
|
671 | assert_difference 'Issue.count', 1+issue.descendants.count do | |
659 | assert copy.save |
|
672 | assert copy.save | |
660 | end |
|
673 | end | |
661 | assert_equal [3], copy.reload.descendants.map(&:project_id).uniq |
|
674 | assert_equal [3], copy.reload.descendants.map(&:project_id).uniq | |
662 | end |
|
675 | end | |
663 |
|
676 | |||
664 | def test_copy_should_not_copy_subtasks_twice_when_saving_twice |
|
677 | def test_copy_should_not_copy_subtasks_twice_when_saving_twice | |
665 | issue = Issue.generate_with_descendants!(Project.find(1), :subject => 'Parent') |
|
678 | issue = Issue.generate_with_descendants!(Project.find(1), :subject => 'Parent') | |
666 |
|
679 | |||
667 | copy = issue.reload.copy |
|
680 | copy = issue.reload.copy | |
668 | assert_difference 'Issue.count', 1+issue.descendants.count do |
|
681 | assert_difference 'Issue.count', 1+issue.descendants.count do | |
669 | assert copy.save |
|
682 | assert copy.save | |
670 | assert copy.save |
|
683 | assert copy.save | |
671 | end |
|
684 | end | |
672 | end |
|
685 | end | |
673 |
|
686 | |||
674 | def test_should_not_call_after_project_change_on_creation |
|
687 | def test_should_not_call_after_project_change_on_creation | |
675 | issue = Issue.new(:project_id => 1, :tracker_id => 1, :status_id => 1, :subject => 'Test', :author_id => 1) |
|
688 | issue = Issue.new(:project_id => 1, :tracker_id => 1, :status_id => 1, :subject => 'Test', :author_id => 1) | |
676 | issue.expects(:after_project_change).never |
|
689 | issue.expects(:after_project_change).never | |
677 | issue.save! |
|
690 | issue.save! | |
678 | end |
|
691 | end | |
679 |
|
692 | |||
680 | def test_should_not_call_after_project_change_on_update |
|
693 | def test_should_not_call_after_project_change_on_update | |
681 | issue = Issue.find(1) |
|
694 | issue = Issue.find(1) | |
682 | issue.project = Project.find(1) |
|
695 | issue.project = Project.find(1) | |
683 | issue.subject = 'No project change' |
|
696 | issue.subject = 'No project change' | |
684 | issue.expects(:after_project_change).never |
|
697 | issue.expects(:after_project_change).never | |
685 | issue.save! |
|
698 | issue.save! | |
686 | end |
|
699 | end | |
687 |
|
700 | |||
688 | def test_should_call_after_project_change_on_project_change |
|
701 | def test_should_call_after_project_change_on_project_change | |
689 | issue = Issue.find(1) |
|
702 | issue = Issue.find(1) | |
690 | issue.project = Project.find(2) |
|
703 | issue.project = Project.find(2) | |
691 | issue.expects(:after_project_change).once |
|
704 | issue.expects(:after_project_change).once | |
692 | issue.save! |
|
705 | issue.save! | |
693 | end |
|
706 | end | |
694 |
|
707 | |||
695 | def test_adding_journal_should_update_timestamp |
|
708 | def test_adding_journal_should_update_timestamp | |
696 | issue = Issue.find(1) |
|
709 | issue = Issue.find(1) | |
697 | updated_on_was = issue.updated_on |
|
710 | updated_on_was = issue.updated_on | |
698 |
|
711 | |||
699 | issue.init_journal(User.first, "Adding notes") |
|
712 | issue.init_journal(User.first, "Adding notes") | |
700 | assert_difference 'Journal.count' do |
|
713 | assert_difference 'Journal.count' do | |
701 | assert issue.save |
|
714 | assert issue.save | |
702 | end |
|
715 | end | |
703 | issue.reload |
|
716 | issue.reload | |
704 |
|
717 | |||
705 | assert_not_equal updated_on_was, issue.updated_on |
|
718 | assert_not_equal updated_on_was, issue.updated_on | |
706 | end |
|
719 | end | |
707 |
|
720 | |||
708 | def test_should_close_duplicates |
|
721 | def test_should_close_duplicates | |
709 | # Create 3 issues |
|
722 | # Create 3 issues | |
710 | project = Project.find(1) |
|
723 | project = Project.find(1) | |
711 | issue1 = Issue.generate_for_project!(project) |
|
724 | issue1 = Issue.generate_for_project!(project) | |
712 | issue2 = Issue.generate_for_project!(project) |
|
725 | issue2 = Issue.generate_for_project!(project) | |
713 | issue3 = Issue.generate_for_project!(project) |
|
726 | issue3 = Issue.generate_for_project!(project) | |
714 |
|
727 | |||
715 | # 2 is a dupe of 1 |
|
728 | # 2 is a dupe of 1 | |
716 | IssueRelation.create!(:issue_from => issue2, :issue_to => issue1, :relation_type => IssueRelation::TYPE_DUPLICATES) |
|
729 | IssueRelation.create!(:issue_from => issue2, :issue_to => issue1, :relation_type => IssueRelation::TYPE_DUPLICATES) | |
717 | # And 3 is a dupe of 2 |
|
730 | # And 3 is a dupe of 2 | |
718 | IssueRelation.create!(:issue_from => issue3, :issue_to => issue2, :relation_type => IssueRelation::TYPE_DUPLICATES) |
|
731 | IssueRelation.create!(:issue_from => issue3, :issue_to => issue2, :relation_type => IssueRelation::TYPE_DUPLICATES) | |
719 | # And 3 is a dupe of 1 (circular duplicates) |
|
732 | # And 3 is a dupe of 1 (circular duplicates) | |
720 | IssueRelation.create!(:issue_from => issue3, :issue_to => issue1, :relation_type => IssueRelation::TYPE_DUPLICATES) |
|
733 | IssueRelation.create!(:issue_from => issue3, :issue_to => issue1, :relation_type => IssueRelation::TYPE_DUPLICATES) | |
721 |
|
734 | |||
722 | assert issue1.reload.duplicates.include?(issue2) |
|
735 | assert issue1.reload.duplicates.include?(issue2) | |
723 |
|
736 | |||
724 | # Closing issue 1 |
|
737 | # Closing issue 1 | |
725 | issue1.init_journal(User.find(:first), "Closing issue1") |
|
738 | issue1.init_journal(User.find(:first), "Closing issue1") | |
726 | issue1.status = IssueStatus.find :first, :conditions => {:is_closed => true} |
|
739 | issue1.status = IssueStatus.find :first, :conditions => {:is_closed => true} | |
727 | assert issue1.save |
|
740 | assert issue1.save | |
728 | # 2 and 3 should be also closed |
|
741 | # 2 and 3 should be also closed | |
729 | assert issue2.reload.closed? |
|
742 | assert issue2.reload.closed? | |
730 | assert issue3.reload.closed? |
|
743 | assert issue3.reload.closed? | |
731 | end |
|
744 | end | |
732 |
|
745 | |||
733 | def test_should_not_close_duplicated_issue |
|
746 | def test_should_not_close_duplicated_issue | |
734 | project = Project.find(1) |
|
747 | project = Project.find(1) | |
735 | issue1 = Issue.generate_for_project!(project) |
|
748 | issue1 = Issue.generate_for_project!(project) | |
736 | issue2 = Issue.generate_for_project!(project) |
|
749 | issue2 = Issue.generate_for_project!(project) | |
737 |
|
750 | |||
738 | # 2 is a dupe of 1 |
|
751 | # 2 is a dupe of 1 | |
739 | IssueRelation.create(:issue_from => issue2, :issue_to => issue1, :relation_type => IssueRelation::TYPE_DUPLICATES) |
|
752 | IssueRelation.create(:issue_from => issue2, :issue_to => issue1, :relation_type => IssueRelation::TYPE_DUPLICATES) | |
740 | # 2 is a dup of 1 but 1 is not a duplicate of 2 |
|
753 | # 2 is a dup of 1 but 1 is not a duplicate of 2 | |
741 | assert !issue2.reload.duplicates.include?(issue1) |
|
754 | assert !issue2.reload.duplicates.include?(issue1) | |
742 |
|
755 | |||
743 | # Closing issue 2 |
|
756 | # Closing issue 2 | |
744 | issue2.init_journal(User.find(:first), "Closing issue2") |
|
757 | issue2.init_journal(User.find(:first), "Closing issue2") | |
745 | issue2.status = IssueStatus.find :first, :conditions => {:is_closed => true} |
|
758 | issue2.status = IssueStatus.find :first, :conditions => {:is_closed => true} | |
746 | assert issue2.save |
|
759 | assert issue2.save | |
747 | # 1 should not be also closed |
|
760 | # 1 should not be also closed | |
748 | assert !issue1.reload.closed? |
|
761 | assert !issue1.reload.closed? | |
749 | end |
|
762 | end | |
750 |
|
763 | |||
751 | def test_assignable_versions |
|
764 | def test_assignable_versions | |
752 | issue = Issue.new(:project_id => 1, :tracker_id => 1, :author_id => 1, :status_id => 1, :fixed_version_id => 1, :subject => 'New issue') |
|
765 | issue = Issue.new(:project_id => 1, :tracker_id => 1, :author_id => 1, :status_id => 1, :fixed_version_id => 1, :subject => 'New issue') | |
753 | assert_equal ['open'], issue.assignable_versions.collect(&:status).uniq |
|
766 | assert_equal ['open'], issue.assignable_versions.collect(&:status).uniq | |
754 | end |
|
767 | end | |
755 |
|
768 | |||
756 | def test_should_not_be_able_to_assign_a_new_issue_to_a_closed_version |
|
769 | def test_should_not_be_able_to_assign_a_new_issue_to_a_closed_version | |
757 | issue = Issue.new(:project_id => 1, :tracker_id => 1, :author_id => 1, :status_id => 1, :fixed_version_id => 1, :subject => 'New issue') |
|
770 | issue = Issue.new(:project_id => 1, :tracker_id => 1, :author_id => 1, :status_id => 1, :fixed_version_id => 1, :subject => 'New issue') | |
758 | assert !issue.save |
|
771 | assert !issue.save | |
759 | assert_not_nil issue.errors[:fixed_version_id] |
|
772 | assert_not_nil issue.errors[:fixed_version_id] | |
760 | end |
|
773 | end | |
761 |
|
774 | |||
762 | def test_should_not_be_able_to_assign_a_new_issue_to_a_locked_version |
|
775 | def test_should_not_be_able_to_assign_a_new_issue_to_a_locked_version | |
763 | issue = Issue.new(:project_id => 1, :tracker_id => 1, :author_id => 1, :status_id => 1, :fixed_version_id => 2, :subject => 'New issue') |
|
776 | issue = Issue.new(:project_id => 1, :tracker_id => 1, :author_id => 1, :status_id => 1, :fixed_version_id => 2, :subject => 'New issue') | |
764 | assert !issue.save |
|
777 | assert !issue.save | |
765 | assert_not_nil issue.errors[:fixed_version_id] |
|
778 | assert_not_nil issue.errors[:fixed_version_id] | |
766 | end |
|
779 | end | |
767 |
|
780 | |||
768 | def test_should_be_able_to_assign_a_new_issue_to_an_open_version |
|
781 | def test_should_be_able_to_assign_a_new_issue_to_an_open_version | |
769 | issue = Issue.new(:project_id => 1, :tracker_id => 1, :author_id => 1, :status_id => 1, :fixed_version_id => 3, :subject => 'New issue') |
|
782 | issue = Issue.new(:project_id => 1, :tracker_id => 1, :author_id => 1, :status_id => 1, :fixed_version_id => 3, :subject => 'New issue') | |
770 | assert issue.save |
|
783 | assert issue.save | |
771 | end |
|
784 | end | |
772 |
|
785 | |||
773 | def test_should_be_able_to_update_an_issue_assigned_to_a_closed_version |
|
786 | def test_should_be_able_to_update_an_issue_assigned_to_a_closed_version | |
774 | issue = Issue.find(11) |
|
787 | issue = Issue.find(11) | |
775 | assert_equal 'closed', issue.fixed_version.status |
|
788 | assert_equal 'closed', issue.fixed_version.status | |
776 | issue.subject = 'Subject changed' |
|
789 | issue.subject = 'Subject changed' | |
777 | assert issue.save |
|
790 | assert issue.save | |
778 | end |
|
791 | end | |
779 |
|
792 | |||
780 | def test_should_not_be_able_to_reopen_an_issue_assigned_to_a_closed_version |
|
793 | def test_should_not_be_able_to_reopen_an_issue_assigned_to_a_closed_version | |
781 | issue = Issue.find(11) |
|
794 | issue = Issue.find(11) | |
782 | issue.status_id = 1 |
|
795 | issue.status_id = 1 | |
783 | assert !issue.save |
|
796 | assert !issue.save | |
784 | assert_not_nil issue.errors[:base] |
|
797 | assert_not_nil issue.errors[:base] | |
785 | end |
|
798 | end | |
786 |
|
799 | |||
787 | def test_should_be_able_to_reopen_and_reassign_an_issue_assigned_to_a_closed_version |
|
800 | def test_should_be_able_to_reopen_and_reassign_an_issue_assigned_to_a_closed_version | |
788 | issue = Issue.find(11) |
|
801 | issue = Issue.find(11) | |
789 | issue.status_id = 1 |
|
802 | issue.status_id = 1 | |
790 | issue.fixed_version_id = 3 |
|
803 | issue.fixed_version_id = 3 | |
791 | assert issue.save |
|
804 | assert issue.save | |
792 | end |
|
805 | end | |
793 |
|
806 | |||
794 | def test_should_be_able_to_reopen_an_issue_assigned_to_a_locked_version |
|
807 | def test_should_be_able_to_reopen_an_issue_assigned_to_a_locked_version | |
795 | issue = Issue.find(12) |
|
808 | issue = Issue.find(12) | |
796 | assert_equal 'locked', issue.fixed_version.status |
|
809 | assert_equal 'locked', issue.fixed_version.status | |
797 | issue.status_id = 1 |
|
810 | issue.status_id = 1 | |
798 | assert issue.save |
|
811 | assert issue.save | |
799 | end |
|
812 | end | |
800 |
|
813 | |||
801 | def test_should_not_be_able_to_keep_unshared_version_when_changing_project |
|
814 | def test_should_not_be_able_to_keep_unshared_version_when_changing_project | |
802 | issue = Issue.find(2) |
|
815 | issue = Issue.find(2) | |
803 | assert_equal 2, issue.fixed_version_id |
|
816 | assert_equal 2, issue.fixed_version_id | |
804 | issue.project_id = 3 |
|
817 | issue.project_id = 3 | |
805 | assert_nil issue.fixed_version_id |
|
818 | assert_nil issue.fixed_version_id | |
806 | issue.fixed_version_id = 2 |
|
819 | issue.fixed_version_id = 2 | |
807 | assert !issue.save |
|
820 | assert !issue.save | |
808 | assert_include 'Target version is not included in the list', issue.errors.full_messages |
|
821 | assert_include 'Target version is not included in the list', issue.errors.full_messages | |
809 | end |
|
822 | end | |
810 |
|
823 | |||
811 | def test_should_keep_shared_version_when_changing_project |
|
824 | def test_should_keep_shared_version_when_changing_project | |
812 | Version.find(2).update_attribute :sharing, 'tree' |
|
825 | Version.find(2).update_attribute :sharing, 'tree' | |
813 |
|
826 | |||
814 | issue = Issue.find(2) |
|
827 | issue = Issue.find(2) | |
815 | assert_equal 2, issue.fixed_version_id |
|
828 | assert_equal 2, issue.fixed_version_id | |
816 | issue.project_id = 3 |
|
829 | issue.project_id = 3 | |
817 | assert_equal 2, issue.fixed_version_id |
|
830 | assert_equal 2, issue.fixed_version_id | |
818 | assert issue.save |
|
831 | assert issue.save | |
819 | end |
|
832 | end | |
820 |
|
833 | |||
821 | def test_allowed_target_projects_on_move_should_include_projects_with_issue_tracking_enabled |
|
834 | def test_allowed_target_projects_on_move_should_include_projects_with_issue_tracking_enabled | |
822 | assert_include Project.find(2), Issue.allowed_target_projects_on_move(User.find(2)) |
|
835 | assert_include Project.find(2), Issue.allowed_target_projects_on_move(User.find(2)) | |
823 | end |
|
836 | end | |
824 |
|
837 | |||
825 | def test_allowed_target_projects_on_move_should_not_include_projects_with_issue_tracking_disabled |
|
838 | def test_allowed_target_projects_on_move_should_not_include_projects_with_issue_tracking_disabled | |
826 | Project.find(2).disable_module! :issue_tracking |
|
839 | Project.find(2).disable_module! :issue_tracking | |
827 | assert_not_include Project.find(2), Issue.allowed_target_projects_on_move(User.find(2)) |
|
840 | assert_not_include Project.find(2), Issue.allowed_target_projects_on_move(User.find(2)) | |
828 | end |
|
841 | end | |
829 |
|
842 | |||
830 | def test_move_to_another_project_with_same_category |
|
843 | def test_move_to_another_project_with_same_category | |
831 | issue = Issue.find(1) |
|
844 | issue = Issue.find(1) | |
832 | issue.project = Project.find(2) |
|
845 | issue.project = Project.find(2) | |
833 | assert issue.save |
|
846 | assert issue.save | |
834 | issue.reload |
|
847 | issue.reload | |
835 | assert_equal 2, issue.project_id |
|
848 | assert_equal 2, issue.project_id | |
836 | # Category changes |
|
849 | # Category changes | |
837 | assert_equal 4, issue.category_id |
|
850 | assert_equal 4, issue.category_id | |
838 | # Make sure time entries were move to the target project |
|
851 | # Make sure time entries were move to the target project | |
839 | assert_equal 2, issue.time_entries.first.project_id |
|
852 | assert_equal 2, issue.time_entries.first.project_id | |
840 | end |
|
853 | end | |
841 |
|
854 | |||
842 | def test_move_to_another_project_without_same_category |
|
855 | def test_move_to_another_project_without_same_category | |
843 | issue = Issue.find(2) |
|
856 | issue = Issue.find(2) | |
844 | issue.project = Project.find(2) |
|
857 | issue.project = Project.find(2) | |
845 | assert issue.save |
|
858 | assert issue.save | |
846 | issue.reload |
|
859 | issue.reload | |
847 | assert_equal 2, issue.project_id |
|
860 | assert_equal 2, issue.project_id | |
848 | # Category cleared |
|
861 | # Category cleared | |
849 | assert_nil issue.category_id |
|
862 | assert_nil issue.category_id | |
850 | end |
|
863 | end | |
851 |
|
864 | |||
852 | def test_move_to_another_project_should_clear_fixed_version_when_not_shared |
|
865 | def test_move_to_another_project_should_clear_fixed_version_when_not_shared | |
853 | issue = Issue.find(1) |
|
866 | issue = Issue.find(1) | |
854 | issue.update_attribute(:fixed_version_id, 1) |
|
867 | issue.update_attribute(:fixed_version_id, 1) | |
855 | issue.project = Project.find(2) |
|
868 | issue.project = Project.find(2) | |
856 | assert issue.save |
|
869 | assert issue.save | |
857 | issue.reload |
|
870 | issue.reload | |
858 | assert_equal 2, issue.project_id |
|
871 | assert_equal 2, issue.project_id | |
859 | # Cleared fixed_version |
|
872 | # Cleared fixed_version | |
860 | assert_equal nil, issue.fixed_version |
|
873 | assert_equal nil, issue.fixed_version | |
861 | end |
|
874 | end | |
862 |
|
875 | |||
863 | def test_move_to_another_project_should_keep_fixed_version_when_shared_with_the_target_project |
|
876 | def test_move_to_another_project_should_keep_fixed_version_when_shared_with_the_target_project | |
864 | issue = Issue.find(1) |
|
877 | issue = Issue.find(1) | |
865 | issue.update_attribute(:fixed_version_id, 4) |
|
878 | issue.update_attribute(:fixed_version_id, 4) | |
866 | issue.project = Project.find(5) |
|
879 | issue.project = Project.find(5) | |
867 | assert issue.save |
|
880 | assert issue.save | |
868 | issue.reload |
|
881 | issue.reload | |
869 | assert_equal 5, issue.project_id |
|
882 | assert_equal 5, issue.project_id | |
870 | # Keep fixed_version |
|
883 | # Keep fixed_version | |
871 | assert_equal 4, issue.fixed_version_id |
|
884 | assert_equal 4, issue.fixed_version_id | |
872 | end |
|
885 | end | |
873 |
|
886 | |||
874 | def test_move_to_another_project_should_clear_fixed_version_when_not_shared_with_the_target_project |
|
887 | def test_move_to_another_project_should_clear_fixed_version_when_not_shared_with_the_target_project | |
875 | issue = Issue.find(1) |
|
888 | issue = Issue.find(1) | |
876 | issue.update_attribute(:fixed_version_id, 1) |
|
889 | issue.update_attribute(:fixed_version_id, 1) | |
877 | issue.project = Project.find(5) |
|
890 | issue.project = Project.find(5) | |
878 | assert issue.save |
|
891 | assert issue.save | |
879 | issue.reload |
|
892 | issue.reload | |
880 | assert_equal 5, issue.project_id |
|
893 | assert_equal 5, issue.project_id | |
881 | # Cleared fixed_version |
|
894 | # Cleared fixed_version | |
882 | assert_equal nil, issue.fixed_version |
|
895 | assert_equal nil, issue.fixed_version | |
883 | end |
|
896 | end | |
884 |
|
897 | |||
885 | def test_move_to_another_project_should_keep_fixed_version_when_shared_systemwide |
|
898 | def test_move_to_another_project_should_keep_fixed_version_when_shared_systemwide | |
886 | issue = Issue.find(1) |
|
899 | issue = Issue.find(1) | |
887 | issue.update_attribute(:fixed_version_id, 7) |
|
900 | issue.update_attribute(:fixed_version_id, 7) | |
888 | issue.project = Project.find(2) |
|
901 | issue.project = Project.find(2) | |
889 | assert issue.save |
|
902 | assert issue.save | |
890 | issue.reload |
|
903 | issue.reload | |
891 | assert_equal 2, issue.project_id |
|
904 | assert_equal 2, issue.project_id | |
892 | # Keep fixed_version |
|
905 | # Keep fixed_version | |
893 | assert_equal 7, issue.fixed_version_id |
|
906 | assert_equal 7, issue.fixed_version_id | |
894 | end |
|
907 | end | |
895 |
|
908 | |||
896 | def test_move_to_another_project_with_disabled_tracker |
|
909 | def test_move_to_another_project_with_disabled_tracker | |
897 | issue = Issue.find(1) |
|
910 | issue = Issue.find(1) | |
898 | target = Project.find(2) |
|
911 | target = Project.find(2) | |
899 | target.tracker_ids = [3] |
|
912 | target.tracker_ids = [3] | |
900 | target.save |
|
913 | target.save | |
901 | issue.project = target |
|
914 | issue.project = target | |
902 | assert issue.save |
|
915 | assert issue.save | |
903 | issue.reload |
|
916 | issue.reload | |
904 | assert_equal 2, issue.project_id |
|
917 | assert_equal 2, issue.project_id | |
905 | assert_equal 3, issue.tracker_id |
|
918 | assert_equal 3, issue.tracker_id | |
906 | end |
|
919 | end | |
907 |
|
920 | |||
908 | def test_copy_to_the_same_project |
|
921 | def test_copy_to_the_same_project | |
909 | issue = Issue.find(1) |
|
922 | issue = Issue.find(1) | |
910 | copy = issue.copy |
|
923 | copy = issue.copy | |
911 | assert_difference 'Issue.count' do |
|
924 | assert_difference 'Issue.count' do | |
912 | copy.save! |
|
925 | copy.save! | |
913 | end |
|
926 | end | |
914 | assert_kind_of Issue, copy |
|
927 | assert_kind_of Issue, copy | |
915 | assert_equal issue.project, copy.project |
|
928 | assert_equal issue.project, copy.project | |
916 | assert_equal "125", copy.custom_value_for(2).value |
|
929 | assert_equal "125", copy.custom_value_for(2).value | |
917 | end |
|
930 | end | |
918 |
|
931 | |||
919 | def test_copy_to_another_project_and_tracker |
|
932 | def test_copy_to_another_project_and_tracker | |
920 | issue = Issue.find(1) |
|
933 | issue = Issue.find(1) | |
921 | copy = issue.copy(:project_id => 3, :tracker_id => 2) |
|
934 | copy = issue.copy(:project_id => 3, :tracker_id => 2) | |
922 | assert_difference 'Issue.count' do |
|
935 | assert_difference 'Issue.count' do | |
923 | copy.save! |
|
936 | copy.save! | |
924 | end |
|
937 | end | |
925 | copy.reload |
|
938 | copy.reload | |
926 | assert_kind_of Issue, copy |
|
939 | assert_kind_of Issue, copy | |
927 | assert_equal Project.find(3), copy.project |
|
940 | assert_equal Project.find(3), copy.project | |
928 | assert_equal Tracker.find(2), copy.tracker |
|
941 | assert_equal Tracker.find(2), copy.tracker | |
929 | # Custom field #2 is not associated with target tracker |
|
942 | # Custom field #2 is not associated with target tracker | |
930 | assert_nil copy.custom_value_for(2) |
|
943 | assert_nil copy.custom_value_for(2) | |
931 | end |
|
944 | end | |
932 |
|
945 | |||
933 | context "#copy" do |
|
946 | context "#copy" do | |
934 | setup do |
|
947 | setup do | |
935 | @issue = Issue.find(1) |
|
948 | @issue = Issue.find(1) | |
936 | end |
|
949 | end | |
937 |
|
950 | |||
938 | should "not create a journal" do |
|
951 | should "not create a journal" do | |
939 | copy = @issue.copy(:project_id => 3, :tracker_id => 2, :assigned_to_id => 3) |
|
952 | copy = @issue.copy(:project_id => 3, :tracker_id => 2, :assigned_to_id => 3) | |
940 | copy.save! |
|
953 | copy.save! | |
941 | assert_equal 0, copy.reload.journals.size |
|
954 | assert_equal 0, copy.reload.journals.size | |
942 | end |
|
955 | end | |
943 |
|
956 | |||
944 | should "allow assigned_to changes" do |
|
957 | should "allow assigned_to changes" do | |
945 | copy = @issue.copy(:project_id => 3, :tracker_id => 2, :assigned_to_id => 3) |
|
958 | copy = @issue.copy(:project_id => 3, :tracker_id => 2, :assigned_to_id => 3) | |
946 | assert_equal 3, copy.assigned_to_id |
|
959 | assert_equal 3, copy.assigned_to_id | |
947 | end |
|
960 | end | |
948 |
|
961 | |||
949 | should "allow status changes" do |
|
962 | should "allow status changes" do | |
950 | copy = @issue.copy(:project_id => 3, :tracker_id => 2, :status_id => 2) |
|
963 | copy = @issue.copy(:project_id => 3, :tracker_id => 2, :status_id => 2) | |
951 | assert_equal 2, copy.status_id |
|
964 | assert_equal 2, copy.status_id | |
952 | end |
|
965 | end | |
953 |
|
966 | |||
954 | should "allow start date changes" do |
|
967 | should "allow start date changes" do | |
955 | date = Date.today |
|
968 | date = Date.today | |
956 | copy = @issue.copy(:project_id => 3, :tracker_id => 2, :start_date => date) |
|
969 | copy = @issue.copy(:project_id => 3, :tracker_id => 2, :start_date => date) | |
957 | assert_equal date, copy.start_date |
|
970 | assert_equal date, copy.start_date | |
958 | end |
|
971 | end | |
959 |
|
972 | |||
960 | should "allow due date changes" do |
|
973 | should "allow due date changes" do | |
961 | date = Date.today |
|
974 | date = Date.today | |
962 | copy = @issue.copy(:project_id => 3, :tracker_id => 2, :due_date => date) |
|
975 | copy = @issue.copy(:project_id => 3, :tracker_id => 2, :due_date => date) | |
963 | assert_equal date, copy.due_date |
|
976 | assert_equal date, copy.due_date | |
964 | end |
|
977 | end | |
965 |
|
978 | |||
966 | should "set current user as author" do |
|
979 | should "set current user as author" do | |
967 | User.current = User.find(9) |
|
980 | User.current = User.find(9) | |
968 | copy = @issue.copy(:project_id => 3, :tracker_id => 2) |
|
981 | copy = @issue.copy(:project_id => 3, :tracker_id => 2) | |
969 | assert_equal User.current, copy.author |
|
982 | assert_equal User.current, copy.author | |
970 | end |
|
983 | end | |
971 |
|
984 | |||
972 | should "create a journal with notes" do |
|
985 | should "create a journal with notes" do | |
973 | date = Date.today |
|
986 | date = Date.today | |
974 | notes = "Notes added when copying" |
|
987 | notes = "Notes added when copying" | |
975 | copy = @issue.copy(:project_id => 3, :tracker_id => 2, :start_date => date) |
|
988 | copy = @issue.copy(:project_id => 3, :tracker_id => 2, :start_date => date) | |
976 | copy.init_journal(User.current, notes) |
|
989 | copy.init_journal(User.current, notes) | |
977 | copy.save! |
|
990 | copy.save! | |
978 |
|
991 | |||
979 | assert_equal 1, copy.journals.size |
|
992 | assert_equal 1, copy.journals.size | |
980 | journal = copy.journals.first |
|
993 | journal = copy.journals.first | |
981 | assert_equal 0, journal.details.size |
|
994 | assert_equal 0, journal.details.size | |
982 | assert_equal notes, journal.notes |
|
995 | assert_equal notes, journal.notes | |
983 | end |
|
996 | end | |
984 | end |
|
997 | end | |
985 |
|
998 | |||
986 | def test_recipients_should_include_previous_assignee |
|
999 | def test_recipients_should_include_previous_assignee | |
987 | user = User.find(3) |
|
1000 | user = User.find(3) | |
988 | user.members.update_all ["mail_notification = ?", false] |
|
1001 | user.members.update_all ["mail_notification = ?", false] | |
989 | user.update_attribute :mail_notification, 'only_assigned' |
|
1002 | user.update_attribute :mail_notification, 'only_assigned' | |
990 |
|
1003 | |||
991 | issue = Issue.find(2) |
|
1004 | issue = Issue.find(2) | |
992 | issue.assigned_to = nil |
|
1005 | issue.assigned_to = nil | |
993 | assert_include user.mail, issue.recipients |
|
1006 | assert_include user.mail, issue.recipients | |
994 | issue.save! |
|
1007 | issue.save! | |
995 | assert !issue.recipients.include?(user.mail) |
|
1008 | assert !issue.recipients.include?(user.mail) | |
996 | end |
|
1009 | end | |
997 |
|
1010 | |||
998 | def test_recipients_should_not_include_users_that_cannot_view_the_issue |
|
1011 | def test_recipients_should_not_include_users_that_cannot_view_the_issue | |
999 | issue = Issue.find(12) |
|
1012 | issue = Issue.find(12) | |
1000 | assert issue.recipients.include?(issue.author.mail) |
|
1013 | assert issue.recipients.include?(issue.author.mail) | |
1001 | # copy the issue to a private project |
|
1014 | # copy the issue to a private project | |
1002 | copy = issue.copy(:project_id => 5, :tracker_id => 2) |
|
1015 | copy = issue.copy(:project_id => 5, :tracker_id => 2) | |
1003 | # author is not a member of project anymore |
|
1016 | # author is not a member of project anymore | |
1004 | assert !copy.recipients.include?(copy.author.mail) |
|
1017 | assert !copy.recipients.include?(copy.author.mail) | |
1005 | end |
|
1018 | end | |
1006 |
|
1019 | |||
1007 | def test_recipients_should_include_the_assigned_group_members |
|
1020 | def test_recipients_should_include_the_assigned_group_members | |
1008 | group_member = User.generate! |
|
1021 | group_member = User.generate! | |
1009 | group = Group.generate! |
|
1022 | group = Group.generate! | |
1010 | group.users << group_member |
|
1023 | group.users << group_member | |
1011 |
|
1024 | |||
1012 | issue = Issue.find(12) |
|
1025 | issue = Issue.find(12) | |
1013 | issue.assigned_to = group |
|
1026 | issue.assigned_to = group | |
1014 | assert issue.recipients.include?(group_member.mail) |
|
1027 | assert issue.recipients.include?(group_member.mail) | |
1015 | end |
|
1028 | end | |
1016 |
|
1029 | |||
1017 | def test_watcher_recipients_should_not_include_users_that_cannot_view_the_issue |
|
1030 | def test_watcher_recipients_should_not_include_users_that_cannot_view_the_issue | |
1018 | user = User.find(3) |
|
1031 | user = User.find(3) | |
1019 | issue = Issue.find(9) |
|
1032 | issue = Issue.find(9) | |
1020 | Watcher.create!(:user => user, :watchable => issue) |
|
1033 | Watcher.create!(:user => user, :watchable => issue) | |
1021 | assert issue.watched_by?(user) |
|
1034 | assert issue.watched_by?(user) | |
1022 | assert !issue.watcher_recipients.include?(user.mail) |
|
1035 | assert !issue.watcher_recipients.include?(user.mail) | |
1023 | end |
|
1036 | end | |
1024 |
|
1037 | |||
1025 | def test_issue_destroy |
|
1038 | def test_issue_destroy | |
1026 | Issue.find(1).destroy |
|
1039 | Issue.find(1).destroy | |
1027 | assert_nil Issue.find_by_id(1) |
|
1040 | assert_nil Issue.find_by_id(1) | |
1028 | assert_nil TimeEntry.find_by_issue_id(1) |
|
1041 | assert_nil TimeEntry.find_by_issue_id(1) | |
1029 | end |
|
1042 | end | |
1030 |
|
1043 | |||
1031 | def test_destroying_a_deleted_issue_should_not_raise_an_error |
|
1044 | def test_destroying_a_deleted_issue_should_not_raise_an_error | |
1032 | issue = Issue.find(1) |
|
1045 | issue = Issue.find(1) | |
1033 | Issue.find(1).destroy |
|
1046 | Issue.find(1).destroy | |
1034 |
|
1047 | |||
1035 | assert_nothing_raised do |
|
1048 | assert_nothing_raised do | |
1036 | assert_no_difference 'Issue.count' do |
|
1049 | assert_no_difference 'Issue.count' do | |
1037 | issue.destroy |
|
1050 | issue.destroy | |
1038 | end |
|
1051 | end | |
1039 | assert issue.destroyed? |
|
1052 | assert issue.destroyed? | |
1040 | end |
|
1053 | end | |
1041 | end |
|
1054 | end | |
1042 |
|
1055 | |||
1043 | def test_destroying_a_stale_issue_should_not_raise_an_error |
|
1056 | def test_destroying_a_stale_issue_should_not_raise_an_error | |
1044 | issue = Issue.find(1) |
|
1057 | issue = Issue.find(1) | |
1045 | Issue.find(1).update_attribute :subject, "Updated" |
|
1058 | Issue.find(1).update_attribute :subject, "Updated" | |
1046 |
|
1059 | |||
1047 | assert_nothing_raised do |
|
1060 | assert_nothing_raised do | |
1048 | assert_difference 'Issue.count', -1 do |
|
1061 | assert_difference 'Issue.count', -1 do | |
1049 | issue.destroy |
|
1062 | issue.destroy | |
1050 | end |
|
1063 | end | |
1051 | assert issue.destroyed? |
|
1064 | assert issue.destroyed? | |
1052 | end |
|
1065 | end | |
1053 | end |
|
1066 | end | |
1054 |
|
1067 | |||
1055 | def test_blocked |
|
1068 | def test_blocked | |
1056 | blocked_issue = Issue.find(9) |
|
1069 | blocked_issue = Issue.find(9) | |
1057 | blocking_issue = Issue.find(10) |
|
1070 | blocking_issue = Issue.find(10) | |
1058 |
|
1071 | |||
1059 | assert blocked_issue.blocked? |
|
1072 | assert blocked_issue.blocked? | |
1060 | assert !blocking_issue.blocked? |
|
1073 | assert !blocking_issue.blocked? | |
1061 | end |
|
1074 | end | |
1062 |
|
1075 | |||
1063 | def test_blocked_issues_dont_allow_closed_statuses |
|
1076 | def test_blocked_issues_dont_allow_closed_statuses | |
1064 | blocked_issue = Issue.find(9) |
|
1077 | blocked_issue = Issue.find(9) | |
1065 |
|
1078 | |||
1066 | allowed_statuses = blocked_issue.new_statuses_allowed_to(users(:users_002)) |
|
1079 | allowed_statuses = blocked_issue.new_statuses_allowed_to(users(:users_002)) | |
1067 | assert !allowed_statuses.empty? |
|
1080 | assert !allowed_statuses.empty? | |
1068 | closed_statuses = allowed_statuses.select {|st| st.is_closed?} |
|
1081 | closed_statuses = allowed_statuses.select {|st| st.is_closed?} | |
1069 | assert closed_statuses.empty? |
|
1082 | assert closed_statuses.empty? | |
1070 | end |
|
1083 | end | |
1071 |
|
1084 | |||
1072 | def test_unblocked_issues_allow_closed_statuses |
|
1085 | def test_unblocked_issues_allow_closed_statuses | |
1073 | blocking_issue = Issue.find(10) |
|
1086 | blocking_issue = Issue.find(10) | |
1074 |
|
1087 | |||
1075 | allowed_statuses = blocking_issue.new_statuses_allowed_to(users(:users_002)) |
|
1088 | allowed_statuses = blocking_issue.new_statuses_allowed_to(users(:users_002)) | |
1076 | assert !allowed_statuses.empty? |
|
1089 | assert !allowed_statuses.empty? | |
1077 | closed_statuses = allowed_statuses.select {|st| st.is_closed?} |
|
1090 | closed_statuses = allowed_statuses.select {|st| st.is_closed?} | |
1078 | assert !closed_statuses.empty? |
|
1091 | assert !closed_statuses.empty? | |
1079 | end |
|
1092 | end | |
1080 |
|
1093 | |||
1081 | def test_rescheduling_an_issue_should_reschedule_following_issue |
|
1094 | def test_rescheduling_an_issue_should_reschedule_following_issue | |
1082 | issue1 = Issue.create!(:project_id => 1, :tracker_id => 1, :author_id => 1, :status_id => 1, :subject => '-', :start_date => Date.today, :due_date => Date.today + 2) |
|
1095 | issue1 = Issue.create!(:project_id => 1, :tracker_id => 1, :author_id => 1, :status_id => 1, :subject => '-', :start_date => Date.today, :due_date => Date.today + 2) | |
1083 | issue2 = Issue.create!(:project_id => 1, :tracker_id => 1, :author_id => 1, :status_id => 1, :subject => '-', :start_date => Date.today, :due_date => Date.today + 2) |
|
1096 | issue2 = Issue.create!(:project_id => 1, :tracker_id => 1, :author_id => 1, :status_id => 1, :subject => '-', :start_date => Date.today, :due_date => Date.today + 2) | |
1084 | IssueRelation.create!(:issue_from => issue1, :issue_to => issue2, :relation_type => IssueRelation::TYPE_PRECEDES) |
|
1097 | IssueRelation.create!(:issue_from => issue1, :issue_to => issue2, :relation_type => IssueRelation::TYPE_PRECEDES) | |
1085 | assert_equal issue1.due_date + 1, issue2.reload.start_date |
|
1098 | assert_equal issue1.due_date + 1, issue2.reload.start_date | |
1086 |
|
1099 | |||
1087 | issue1.due_date = Date.today + 5 |
|
1100 | issue1.due_date = Date.today + 5 | |
1088 | issue1.save! |
|
1101 | issue1.save! | |
1089 | assert_equal issue1.due_date + 1, issue2.reload.start_date |
|
1102 | assert_equal issue1.due_date + 1, issue2.reload.start_date | |
1090 | end |
|
1103 | end | |
1091 |
|
1104 | |||
1092 | def test_rescheduling_a_stale_issue_should_not_raise_an_error |
|
1105 | def test_rescheduling_a_stale_issue_should_not_raise_an_error | |
1093 | stale = Issue.find(1) |
|
1106 | stale = Issue.find(1) | |
1094 | issue = Issue.find(1) |
|
1107 | issue = Issue.find(1) | |
1095 | issue.subject = "Updated" |
|
1108 | issue.subject = "Updated" | |
1096 | issue.save! |
|
1109 | issue.save! | |
1097 |
|
1110 | |||
1098 | date = 10.days.from_now.to_date |
|
1111 | date = 10.days.from_now.to_date | |
1099 | assert_nothing_raised do |
|
1112 | assert_nothing_raised do | |
1100 | stale.reschedule_after(date) |
|
1113 | stale.reschedule_after(date) | |
1101 | end |
|
1114 | end | |
1102 | assert_equal date, stale.reload.start_date |
|
1115 | assert_equal date, stale.reload.start_date | |
1103 | end |
|
1116 | end | |
1104 |
|
1117 | |||
1105 | def test_overdue |
|
1118 | def test_overdue | |
1106 | assert Issue.new(:due_date => 1.day.ago.to_date).overdue? |
|
1119 | assert Issue.new(:due_date => 1.day.ago.to_date).overdue? | |
1107 | assert !Issue.new(:due_date => Date.today).overdue? |
|
1120 | assert !Issue.new(:due_date => Date.today).overdue? | |
1108 | assert !Issue.new(:due_date => 1.day.from_now.to_date).overdue? |
|
1121 | assert !Issue.new(:due_date => 1.day.from_now.to_date).overdue? | |
1109 | assert !Issue.new(:due_date => nil).overdue? |
|
1122 | assert !Issue.new(:due_date => nil).overdue? | |
1110 | assert !Issue.new(:due_date => 1.day.ago.to_date, :status => IssueStatus.find(:first, :conditions => {:is_closed => true})).overdue? |
|
1123 | assert !Issue.new(:due_date => 1.day.ago.to_date, :status => IssueStatus.find(:first, :conditions => {:is_closed => true})).overdue? | |
1111 | end |
|
1124 | end | |
1112 |
|
1125 | |||
1113 | context "#behind_schedule?" do |
|
1126 | context "#behind_schedule?" do | |
1114 | should "be false if the issue has no start_date" do |
|
1127 | should "be false if the issue has no start_date" do | |
1115 | assert !Issue.new(:start_date => nil, :due_date => 1.day.from_now.to_date, :done_ratio => 0).behind_schedule? |
|
1128 | assert !Issue.new(:start_date => nil, :due_date => 1.day.from_now.to_date, :done_ratio => 0).behind_schedule? | |
1116 | end |
|
1129 | end | |
1117 |
|
1130 | |||
1118 | should "be false if the issue has no end_date" do |
|
1131 | should "be false if the issue has no end_date" do | |
1119 | assert !Issue.new(:start_date => 1.day.from_now.to_date, :due_date => nil, :done_ratio => 0).behind_schedule? |
|
1132 | assert !Issue.new(:start_date => 1.day.from_now.to_date, :due_date => nil, :done_ratio => 0).behind_schedule? | |
1120 | end |
|
1133 | end | |
1121 |
|
1134 | |||
1122 | should "be false if the issue has more done than it's calendar time" do |
|
1135 | should "be false if the issue has more done than it's calendar time" do | |
1123 | assert !Issue.new(:start_date => 50.days.ago.to_date, :due_date => 50.days.from_now.to_date, :done_ratio => 90).behind_schedule? |
|
1136 | assert !Issue.new(:start_date => 50.days.ago.to_date, :due_date => 50.days.from_now.to_date, :done_ratio => 90).behind_schedule? | |
1124 | end |
|
1137 | end | |
1125 |
|
1138 | |||
1126 | should "be true if the issue hasn't been started at all" do |
|
1139 | should "be true if the issue hasn't been started at all" do | |
1127 | assert Issue.new(:start_date => 1.day.ago.to_date, :due_date => 1.day.from_now.to_date, :done_ratio => 0).behind_schedule? |
|
1140 | assert Issue.new(:start_date => 1.day.ago.to_date, :due_date => 1.day.from_now.to_date, :done_ratio => 0).behind_schedule? | |
1128 | end |
|
1141 | end | |
1129 |
|
1142 | |||
1130 | should "be true if the issue has used more calendar time than it's done ratio" do |
|
1143 | should "be true if the issue has used more calendar time than it's done ratio" do | |
1131 | assert Issue.new(:start_date => 100.days.ago.to_date, :due_date => Date.today, :done_ratio => 90).behind_schedule? |
|
1144 | assert Issue.new(:start_date => 100.days.ago.to_date, :due_date => Date.today, :done_ratio => 90).behind_schedule? | |
1132 | end |
|
1145 | end | |
1133 | end |
|
1146 | end | |
1134 |
|
1147 | |||
1135 | context "#assignable_users" do |
|
1148 | context "#assignable_users" do | |
1136 | should "be Users" do |
|
1149 | should "be Users" do | |
1137 | assert_kind_of User, Issue.find(1).assignable_users.first |
|
1150 | assert_kind_of User, Issue.find(1).assignable_users.first | |
1138 | end |
|
1151 | end | |
1139 |
|
1152 | |||
1140 | should "include the issue author" do |
|
1153 | should "include the issue author" do | |
1141 | project = Project.find(1) |
|
1154 | project = Project.find(1) | |
1142 | non_project_member = User.generate! |
|
1155 | non_project_member = User.generate! | |
1143 | issue = Issue.generate_for_project!(project, :author => non_project_member) |
|
1156 | issue = Issue.generate_for_project!(project, :author => non_project_member) | |
1144 |
|
1157 | |||
1145 | assert issue.assignable_users.include?(non_project_member) |
|
1158 | assert issue.assignable_users.include?(non_project_member) | |
1146 | end |
|
1159 | end | |
1147 |
|
1160 | |||
1148 | should "include the current assignee" do |
|
1161 | should "include the current assignee" do | |
1149 | project = Project.find(1) |
|
1162 | project = Project.find(1) | |
1150 | user = User.generate! |
|
1163 | user = User.generate! | |
1151 | issue = Issue.generate_for_project!(project, :assigned_to => user) |
|
1164 | issue = Issue.generate_for_project!(project, :assigned_to => user) | |
1152 | user.lock! |
|
1165 | user.lock! | |
1153 |
|
1166 | |||
1154 | assert Issue.find(issue.id).assignable_users.include?(user) |
|
1167 | assert Issue.find(issue.id).assignable_users.include?(user) | |
1155 | end |
|
1168 | end | |
1156 |
|
1169 | |||
1157 | should "not show the issue author twice" do |
|
1170 | should "not show the issue author twice" do | |
1158 | assignable_user_ids = Issue.find(1).assignable_users.collect(&:id) |
|
1171 | assignable_user_ids = Issue.find(1).assignable_users.collect(&:id) | |
1159 | assert_equal 2, assignable_user_ids.length |
|
1172 | assert_equal 2, assignable_user_ids.length | |
1160 |
|
1173 | |||
1161 | assignable_user_ids.each do |user_id| |
|
1174 | assignable_user_ids.each do |user_id| | |
1162 | assert_equal 1, assignable_user_ids.select {|i| i == user_id}.length, "User #{user_id} appears more or less than once" |
|
1175 | assert_equal 1, assignable_user_ids.select {|i| i == user_id}.length, "User #{user_id} appears more or less than once" | |
1163 | end |
|
1176 | end | |
1164 | end |
|
1177 | end | |
1165 |
|
1178 | |||
1166 | context "with issue_group_assignment" do |
|
1179 | context "with issue_group_assignment" do | |
1167 | should "include groups" do |
|
1180 | should "include groups" do | |
1168 | issue = Issue.new(:project => Project.find(2)) |
|
1181 | issue = Issue.new(:project => Project.find(2)) | |
1169 |
|
1182 | |||
1170 | with_settings :issue_group_assignment => '1' do |
|
1183 | with_settings :issue_group_assignment => '1' do | |
1171 | assert_equal %w(Group User), issue.assignable_users.map {|a| a.class.name}.uniq.sort |
|
1184 | assert_equal %w(Group User), issue.assignable_users.map {|a| a.class.name}.uniq.sort | |
1172 | assert issue.assignable_users.include?(Group.find(11)) |
|
1185 | assert issue.assignable_users.include?(Group.find(11)) | |
1173 | end |
|
1186 | end | |
1174 | end |
|
1187 | end | |
1175 | end |
|
1188 | end | |
1176 |
|
1189 | |||
1177 | context "without issue_group_assignment" do |
|
1190 | context "without issue_group_assignment" do | |
1178 | should "not include groups" do |
|
1191 | should "not include groups" do | |
1179 | issue = Issue.new(:project => Project.find(2)) |
|
1192 | issue = Issue.new(:project => Project.find(2)) | |
1180 |
|
1193 | |||
1181 | with_settings :issue_group_assignment => '0' do |
|
1194 | with_settings :issue_group_assignment => '0' do | |
1182 | assert_equal %w(User), issue.assignable_users.map {|a| a.class.name}.uniq.sort |
|
1195 | assert_equal %w(User), issue.assignable_users.map {|a| a.class.name}.uniq.sort | |
1183 | assert !issue.assignable_users.include?(Group.find(11)) |
|
1196 | assert !issue.assignable_users.include?(Group.find(11)) | |
1184 | end |
|
1197 | end | |
1185 | end |
|
1198 | end | |
1186 | end |
|
1199 | end | |
1187 | end |
|
1200 | end | |
1188 |
|
1201 | |||
1189 | def test_create_should_send_email_notification |
|
1202 | def test_create_should_send_email_notification | |
1190 | ActionMailer::Base.deliveries.clear |
|
1203 | ActionMailer::Base.deliveries.clear | |
1191 | issue = Issue.new(:project_id => 1, :tracker_id => 1, |
|
1204 | issue = Issue.new(:project_id => 1, :tracker_id => 1, | |
1192 | :author_id => 3, :status_id => 1, |
|
1205 | :author_id => 3, :status_id => 1, | |
1193 | :priority => IssuePriority.all.first, |
|
1206 | :priority => IssuePriority.all.first, | |
1194 | :subject => 'test_create', :estimated_hours => '1:30') |
|
1207 | :subject => 'test_create', :estimated_hours => '1:30') | |
1195 |
|
1208 | |||
1196 | assert issue.save |
|
1209 | assert issue.save | |
1197 | assert_equal 1, ActionMailer::Base.deliveries.size |
|
1210 | assert_equal 1, ActionMailer::Base.deliveries.size | |
1198 | end |
|
1211 | end | |
1199 |
|
1212 | |||
1200 | def test_stale_issue_should_not_send_email_notification |
|
1213 | def test_stale_issue_should_not_send_email_notification | |
1201 | ActionMailer::Base.deliveries.clear |
|
1214 | ActionMailer::Base.deliveries.clear | |
1202 | issue = Issue.find(1) |
|
1215 | issue = Issue.find(1) | |
1203 | stale = Issue.find(1) |
|
1216 | stale = Issue.find(1) | |
1204 |
|
1217 | |||
1205 | issue.init_journal(User.find(1)) |
|
1218 | issue.init_journal(User.find(1)) | |
1206 | issue.subject = 'Subjet update' |
|
1219 | issue.subject = 'Subjet update' | |
1207 | assert issue.save |
|
1220 | assert issue.save | |
1208 | assert_equal 1, ActionMailer::Base.deliveries.size |
|
1221 | assert_equal 1, ActionMailer::Base.deliveries.size | |
1209 | ActionMailer::Base.deliveries.clear |
|
1222 | ActionMailer::Base.deliveries.clear | |
1210 |
|
1223 | |||
1211 | stale.init_journal(User.find(1)) |
|
1224 | stale.init_journal(User.find(1)) | |
1212 | stale.subject = 'Another subjet update' |
|
1225 | stale.subject = 'Another subjet update' | |
1213 | assert_raise ActiveRecord::StaleObjectError do |
|
1226 | assert_raise ActiveRecord::StaleObjectError do | |
1214 | stale.save |
|
1227 | stale.save | |
1215 | end |
|
1228 | end | |
1216 | assert ActionMailer::Base.deliveries.empty? |
|
1229 | assert ActionMailer::Base.deliveries.empty? | |
1217 | end |
|
1230 | end | |
1218 |
|
1231 | |||
1219 | def test_journalized_description |
|
1232 | def test_journalized_description | |
1220 | IssueCustomField.delete_all |
|
1233 | IssueCustomField.delete_all | |
1221 |
|
1234 | |||
1222 | i = Issue.first |
|
1235 | i = Issue.first | |
1223 | old_description = i.description |
|
1236 | old_description = i.description | |
1224 | new_description = "This is the new description" |
|
1237 | new_description = "This is the new description" | |
1225 |
|
1238 | |||
1226 | i.init_journal(User.find(2)) |
|
1239 | i.init_journal(User.find(2)) | |
1227 | i.description = new_description |
|
1240 | i.description = new_description | |
1228 | assert_difference 'Journal.count', 1 do |
|
1241 | assert_difference 'Journal.count', 1 do | |
1229 | assert_difference 'JournalDetail.count', 1 do |
|
1242 | assert_difference 'JournalDetail.count', 1 do | |
1230 | i.save! |
|
1243 | i.save! | |
1231 | end |
|
1244 | end | |
1232 | end |
|
1245 | end | |
1233 |
|
1246 | |||
1234 | detail = JournalDetail.first(:order => 'id DESC') |
|
1247 | detail = JournalDetail.first(:order => 'id DESC') | |
1235 | assert_equal i, detail.journal.journalized |
|
1248 | assert_equal i, detail.journal.journalized | |
1236 | assert_equal 'attr', detail.property |
|
1249 | assert_equal 'attr', detail.property | |
1237 | assert_equal 'description', detail.prop_key |
|
1250 | assert_equal 'description', detail.prop_key | |
1238 | assert_equal old_description, detail.old_value |
|
1251 | assert_equal old_description, detail.old_value | |
1239 | assert_equal new_description, detail.value |
|
1252 | assert_equal new_description, detail.value | |
1240 | end |
|
1253 | end | |
1241 |
|
1254 | |||
1242 | def test_blank_descriptions_should_not_be_journalized |
|
1255 | def test_blank_descriptions_should_not_be_journalized | |
1243 | IssueCustomField.delete_all |
|
1256 | IssueCustomField.delete_all | |
1244 | Issue.update_all("description = NULL", "id=1") |
|
1257 | Issue.update_all("description = NULL", "id=1") | |
1245 |
|
1258 | |||
1246 | i = Issue.find(1) |
|
1259 | i = Issue.find(1) | |
1247 | i.init_journal(User.find(2)) |
|
1260 | i.init_journal(User.find(2)) | |
1248 | i.subject = "blank description" |
|
1261 | i.subject = "blank description" | |
1249 | i.description = "\r\n" |
|
1262 | i.description = "\r\n" | |
1250 |
|
1263 | |||
1251 | assert_difference 'Journal.count', 1 do |
|
1264 | assert_difference 'Journal.count', 1 do | |
1252 | assert_difference 'JournalDetail.count', 1 do |
|
1265 | assert_difference 'JournalDetail.count', 1 do | |
1253 | i.save! |
|
1266 | i.save! | |
1254 | end |
|
1267 | end | |
1255 | end |
|
1268 | end | |
1256 | end |
|
1269 | end | |
1257 |
|
1270 | |||
1258 | def test_journalized_multi_custom_field |
|
1271 | def test_journalized_multi_custom_field | |
1259 | field = IssueCustomField.create!(:name => 'filter', :field_format => 'list', :is_filter => true, :is_for_all => true, |
|
1272 | field = IssueCustomField.create!(:name => 'filter', :field_format => 'list', :is_filter => true, :is_for_all => true, | |
1260 | :tracker_ids => [1], :possible_values => ['value1', 'value2', 'value3'], :multiple => true) |
|
1273 | :tracker_ids => [1], :possible_values => ['value1', 'value2', 'value3'], :multiple => true) | |
1261 |
|
1274 | |||
1262 | issue = Issue.create!(:project_id => 1, :tracker_id => 1, :subject => 'Test', :author_id => 1) |
|
1275 | issue = Issue.create!(:project_id => 1, :tracker_id => 1, :subject => 'Test', :author_id => 1) | |
1263 |
|
1276 | |||
1264 | assert_difference 'Journal.count' do |
|
1277 | assert_difference 'Journal.count' do | |
1265 | assert_difference 'JournalDetail.count' do |
|
1278 | assert_difference 'JournalDetail.count' do | |
1266 | issue.init_journal(User.first) |
|
1279 | issue.init_journal(User.first) | |
1267 | issue.custom_field_values = {field.id => ['value1']} |
|
1280 | issue.custom_field_values = {field.id => ['value1']} | |
1268 | issue.save! |
|
1281 | issue.save! | |
1269 | end |
|
1282 | end | |
1270 | assert_difference 'JournalDetail.count' do |
|
1283 | assert_difference 'JournalDetail.count' do | |
1271 | issue.init_journal(User.first) |
|
1284 | issue.init_journal(User.first) | |
1272 | issue.custom_field_values = {field.id => ['value1', 'value2']} |
|
1285 | issue.custom_field_values = {field.id => ['value1', 'value2']} | |
1273 | issue.save! |
|
1286 | issue.save! | |
1274 | end |
|
1287 | end | |
1275 | assert_difference 'JournalDetail.count', 2 do |
|
1288 | assert_difference 'JournalDetail.count', 2 do | |
1276 | issue.init_journal(User.first) |
|
1289 | issue.init_journal(User.first) | |
1277 | issue.custom_field_values = {field.id => ['value3', 'value2']} |
|
1290 | issue.custom_field_values = {field.id => ['value3', 'value2']} | |
1278 | issue.save! |
|
1291 | issue.save! | |
1279 | end |
|
1292 | end | |
1280 | assert_difference 'JournalDetail.count', 2 do |
|
1293 | assert_difference 'JournalDetail.count', 2 do | |
1281 | issue.init_journal(User.first) |
|
1294 | issue.init_journal(User.first) | |
1282 | issue.custom_field_values = {field.id => nil} |
|
1295 | issue.custom_field_values = {field.id => nil} | |
1283 | issue.save! |
|
1296 | issue.save! | |
1284 | end |
|
1297 | end | |
1285 | end |
|
1298 | end | |
1286 | end |
|
1299 | end | |
1287 |
|
1300 | |||
1288 | def test_description_eol_should_be_normalized |
|
1301 | def test_description_eol_should_be_normalized | |
1289 | i = Issue.new(:description => "CR \r LF \n CRLF \r\n") |
|
1302 | i = Issue.new(:description => "CR \r LF \n CRLF \r\n") | |
1290 | assert_equal "CR \r\n LF \r\n CRLF \r\n", i.description |
|
1303 | assert_equal "CR \r\n LF \r\n CRLF \r\n", i.description | |
1291 | end |
|
1304 | end | |
1292 |
|
1305 | |||
1293 | def test_saving_twice_should_not_duplicate_journal_details |
|
1306 | def test_saving_twice_should_not_duplicate_journal_details | |
1294 | i = Issue.find(:first) |
|
1307 | i = Issue.find(:first) | |
1295 | i.init_journal(User.find(2), 'Some notes') |
|
1308 | i.init_journal(User.find(2), 'Some notes') | |
1296 | # initial changes |
|
1309 | # initial changes | |
1297 | i.subject = 'New subject' |
|
1310 | i.subject = 'New subject' | |
1298 | i.done_ratio = i.done_ratio + 10 |
|
1311 | i.done_ratio = i.done_ratio + 10 | |
1299 | assert_difference 'Journal.count' do |
|
1312 | assert_difference 'Journal.count' do | |
1300 | assert i.save |
|
1313 | assert i.save | |
1301 | end |
|
1314 | end | |
1302 | # 1 more change |
|
1315 | # 1 more change | |
1303 | i.priority = IssuePriority.find(:first, :conditions => ["id <> ?", i.priority_id]) |
|
1316 | i.priority = IssuePriority.find(:first, :conditions => ["id <> ?", i.priority_id]) | |
1304 | assert_no_difference 'Journal.count' do |
|
1317 | assert_no_difference 'Journal.count' do | |
1305 | assert_difference 'JournalDetail.count', 1 do |
|
1318 | assert_difference 'JournalDetail.count', 1 do | |
1306 | i.save |
|
1319 | i.save | |
1307 | end |
|
1320 | end | |
1308 | end |
|
1321 | end | |
1309 | # no more change |
|
1322 | # no more change | |
1310 | assert_no_difference 'Journal.count' do |
|
1323 | assert_no_difference 'Journal.count' do | |
1311 | assert_no_difference 'JournalDetail.count' do |
|
1324 | assert_no_difference 'JournalDetail.count' do | |
1312 | i.save |
|
1325 | i.save | |
1313 | end |
|
1326 | end | |
1314 | end |
|
1327 | end | |
1315 | end |
|
1328 | end | |
1316 |
|
1329 | |||
1317 | def test_all_dependent_issues |
|
1330 | def test_all_dependent_issues | |
1318 | IssueRelation.delete_all |
|
1331 | IssueRelation.delete_all | |
1319 | assert IssueRelation.create!(:issue_from => Issue.find(1), |
|
1332 | assert IssueRelation.create!(:issue_from => Issue.find(1), | |
1320 | :issue_to => Issue.find(2), |
|
1333 | :issue_to => Issue.find(2), | |
1321 | :relation_type => IssueRelation::TYPE_PRECEDES) |
|
1334 | :relation_type => IssueRelation::TYPE_PRECEDES) | |
1322 | assert IssueRelation.create!(:issue_from => Issue.find(2), |
|
1335 | assert IssueRelation.create!(:issue_from => Issue.find(2), | |
1323 | :issue_to => Issue.find(3), |
|
1336 | :issue_to => Issue.find(3), | |
1324 | :relation_type => IssueRelation::TYPE_PRECEDES) |
|
1337 | :relation_type => IssueRelation::TYPE_PRECEDES) | |
1325 | assert IssueRelation.create!(:issue_from => Issue.find(3), |
|
1338 | assert IssueRelation.create!(:issue_from => Issue.find(3), | |
1326 | :issue_to => Issue.find(8), |
|
1339 | :issue_to => Issue.find(8), | |
1327 | :relation_type => IssueRelation::TYPE_PRECEDES) |
|
1340 | :relation_type => IssueRelation::TYPE_PRECEDES) | |
1328 |
|
1341 | |||
1329 | assert_equal [2, 3, 8], Issue.find(1).all_dependent_issues.collect(&:id).sort |
|
1342 | assert_equal [2, 3, 8], Issue.find(1).all_dependent_issues.collect(&:id).sort | |
1330 | end |
|
1343 | end | |
1331 |
|
1344 | |||
1332 | def test_all_dependent_issues_with_persistent_circular_dependency |
|
1345 | def test_all_dependent_issues_with_persistent_circular_dependency | |
1333 | IssueRelation.delete_all |
|
1346 | IssueRelation.delete_all | |
1334 | assert IssueRelation.create!(:issue_from => Issue.find(1), |
|
1347 | assert IssueRelation.create!(:issue_from => Issue.find(1), | |
1335 | :issue_to => Issue.find(2), |
|
1348 | :issue_to => Issue.find(2), | |
1336 | :relation_type => IssueRelation::TYPE_PRECEDES) |
|
1349 | :relation_type => IssueRelation::TYPE_PRECEDES) | |
1337 | assert IssueRelation.create!(:issue_from => Issue.find(2), |
|
1350 | assert IssueRelation.create!(:issue_from => Issue.find(2), | |
1338 | :issue_to => Issue.find(3), |
|
1351 | :issue_to => Issue.find(3), | |
1339 | :relation_type => IssueRelation::TYPE_PRECEDES) |
|
1352 | :relation_type => IssueRelation::TYPE_PRECEDES) | |
1340 |
|
1353 | |||
1341 | r = IssueRelation.create!(:issue_from => Issue.find(3), |
|
1354 | r = IssueRelation.create!(:issue_from => Issue.find(3), | |
1342 | :issue_to => Issue.find(7), |
|
1355 | :issue_to => Issue.find(7), | |
1343 | :relation_type => IssueRelation::TYPE_PRECEDES) |
|
1356 | :relation_type => IssueRelation::TYPE_PRECEDES) | |
1344 | IssueRelation.update_all("issue_to_id = 1", ["id = ?", r.id]) |
|
1357 | IssueRelation.update_all("issue_to_id = 1", ["id = ?", r.id]) | |
1345 |
|
1358 | |||
1346 | assert_equal [2, 3], Issue.find(1).all_dependent_issues.collect(&:id).sort |
|
1359 | assert_equal [2, 3], Issue.find(1).all_dependent_issues.collect(&:id).sort | |
1347 | end |
|
1360 | end | |
1348 |
|
1361 | |||
1349 | def test_all_dependent_issues_with_persistent_multiple_circular_dependencies |
|
1362 | def test_all_dependent_issues_with_persistent_multiple_circular_dependencies | |
1350 | IssueRelation.delete_all |
|
1363 | IssueRelation.delete_all | |
1351 | assert IssueRelation.create!(:issue_from => Issue.find(1), |
|
1364 | assert IssueRelation.create!(:issue_from => Issue.find(1), | |
1352 | :issue_to => Issue.find(2), |
|
1365 | :issue_to => Issue.find(2), | |
1353 | :relation_type => IssueRelation::TYPE_RELATES) |
|
1366 | :relation_type => IssueRelation::TYPE_RELATES) | |
1354 | assert IssueRelation.create!(:issue_from => Issue.find(2), |
|
1367 | assert IssueRelation.create!(:issue_from => Issue.find(2), | |
1355 | :issue_to => Issue.find(3), |
|
1368 | :issue_to => Issue.find(3), | |
1356 | :relation_type => IssueRelation::TYPE_RELATES) |
|
1369 | :relation_type => IssueRelation::TYPE_RELATES) | |
1357 | assert IssueRelation.create!(:issue_from => Issue.find(3), |
|
1370 | assert IssueRelation.create!(:issue_from => Issue.find(3), | |
1358 | :issue_to => Issue.find(8), |
|
1371 | :issue_to => Issue.find(8), | |
1359 | :relation_type => IssueRelation::TYPE_RELATES) |
|
1372 | :relation_type => IssueRelation::TYPE_RELATES) | |
1360 |
|
1373 | |||
1361 | r = IssueRelation.create!(:issue_from => Issue.find(8), |
|
1374 | r = IssueRelation.create!(:issue_from => Issue.find(8), | |
1362 | :issue_to => Issue.find(7), |
|
1375 | :issue_to => Issue.find(7), | |
1363 | :relation_type => IssueRelation::TYPE_RELATES) |
|
1376 | :relation_type => IssueRelation::TYPE_RELATES) | |
1364 | IssueRelation.update_all("issue_to_id = 2", ["id = ?", r.id]) |
|
1377 | IssueRelation.update_all("issue_to_id = 2", ["id = ?", r.id]) | |
1365 |
|
1378 | |||
1366 | r = IssueRelation.create!(:issue_from => Issue.find(3), |
|
1379 | r = IssueRelation.create!(:issue_from => Issue.find(3), | |
1367 | :issue_to => Issue.find(7), |
|
1380 | :issue_to => Issue.find(7), | |
1368 | :relation_type => IssueRelation::TYPE_RELATES) |
|
1381 | :relation_type => IssueRelation::TYPE_RELATES) | |
1369 | IssueRelation.update_all("issue_to_id = 1", ["id = ?", r.id]) |
|
1382 | IssueRelation.update_all("issue_to_id = 1", ["id = ?", r.id]) | |
1370 |
|
1383 | |||
1371 | assert_equal [2, 3, 8], Issue.find(1).all_dependent_issues.collect(&:id).sort |
|
1384 | assert_equal [2, 3, 8], Issue.find(1).all_dependent_issues.collect(&:id).sort | |
1372 | end |
|
1385 | end | |
1373 |
|
1386 | |||
1374 | context "#done_ratio" do |
|
1387 | context "#done_ratio" do | |
1375 | setup do |
|
1388 | setup do | |
1376 | @issue = Issue.find(1) |
|
1389 | @issue = Issue.find(1) | |
1377 | @issue_status = IssueStatus.find(1) |
|
1390 | @issue_status = IssueStatus.find(1) | |
1378 | @issue_status.update_attribute(:default_done_ratio, 50) |
|
1391 | @issue_status.update_attribute(:default_done_ratio, 50) | |
1379 | @issue2 = Issue.find(2) |
|
1392 | @issue2 = Issue.find(2) | |
1380 | @issue_status2 = IssueStatus.find(2) |
|
1393 | @issue_status2 = IssueStatus.find(2) | |
1381 | @issue_status2.update_attribute(:default_done_ratio, 0) |
|
1394 | @issue_status2.update_attribute(:default_done_ratio, 0) | |
1382 | end |
|
1395 | end | |
1383 |
|
1396 | |||
1384 | teardown do |
|
1397 | teardown do | |
1385 | Setting.issue_done_ratio = 'issue_field' |
|
1398 | Setting.issue_done_ratio = 'issue_field' | |
1386 | end |
|
1399 | end | |
1387 |
|
1400 | |||
1388 | context "with Setting.issue_done_ratio using the issue_field" do |
|
1401 | context "with Setting.issue_done_ratio using the issue_field" do | |
1389 | setup do |
|
1402 | setup do | |
1390 | Setting.issue_done_ratio = 'issue_field' |
|
1403 | Setting.issue_done_ratio = 'issue_field' | |
1391 | end |
|
1404 | end | |
1392 |
|
1405 | |||
1393 | should "read the issue's field" do |
|
1406 | should "read the issue's field" do | |
1394 | assert_equal 0, @issue.done_ratio |
|
1407 | assert_equal 0, @issue.done_ratio | |
1395 | assert_equal 30, @issue2.done_ratio |
|
1408 | assert_equal 30, @issue2.done_ratio | |
1396 | end |
|
1409 | end | |
1397 | end |
|
1410 | end | |
1398 |
|
1411 | |||
1399 | context "with Setting.issue_done_ratio using the issue_status" do |
|
1412 | context "with Setting.issue_done_ratio using the issue_status" do | |
1400 | setup do |
|
1413 | setup do | |
1401 | Setting.issue_done_ratio = 'issue_status' |
|
1414 | Setting.issue_done_ratio = 'issue_status' | |
1402 | end |
|
1415 | end | |
1403 |
|
1416 | |||
1404 | should "read the Issue Status's default done ratio" do |
|
1417 | should "read the Issue Status's default done ratio" do | |
1405 | assert_equal 50, @issue.done_ratio |
|
1418 | assert_equal 50, @issue.done_ratio | |
1406 | assert_equal 0, @issue2.done_ratio |
|
1419 | assert_equal 0, @issue2.done_ratio | |
1407 | end |
|
1420 | end | |
1408 | end |
|
1421 | end | |
1409 | end |
|
1422 | end | |
1410 |
|
1423 | |||
1411 | context "#update_done_ratio_from_issue_status" do |
|
1424 | context "#update_done_ratio_from_issue_status" do | |
1412 | setup do |
|
1425 | setup do | |
1413 | @issue = Issue.find(1) |
|
1426 | @issue = Issue.find(1) | |
1414 | @issue_status = IssueStatus.find(1) |
|
1427 | @issue_status = IssueStatus.find(1) | |
1415 | @issue_status.update_attribute(:default_done_ratio, 50) |
|
1428 | @issue_status.update_attribute(:default_done_ratio, 50) | |
1416 | @issue2 = Issue.find(2) |
|
1429 | @issue2 = Issue.find(2) | |
1417 | @issue_status2 = IssueStatus.find(2) |
|
1430 | @issue_status2 = IssueStatus.find(2) | |
1418 | @issue_status2.update_attribute(:default_done_ratio, 0) |
|
1431 | @issue_status2.update_attribute(:default_done_ratio, 0) | |
1419 | end |
|
1432 | end | |
1420 |
|
1433 | |||
1421 | context "with Setting.issue_done_ratio using the issue_field" do |
|
1434 | context "with Setting.issue_done_ratio using the issue_field" do | |
1422 | setup do |
|
1435 | setup do | |
1423 | Setting.issue_done_ratio = 'issue_field' |
|
1436 | Setting.issue_done_ratio = 'issue_field' | |
1424 | end |
|
1437 | end | |
1425 |
|
1438 | |||
1426 | should "not change the issue" do |
|
1439 | should "not change the issue" do | |
1427 | @issue.update_done_ratio_from_issue_status |
|
1440 | @issue.update_done_ratio_from_issue_status | |
1428 | @issue2.update_done_ratio_from_issue_status |
|
1441 | @issue2.update_done_ratio_from_issue_status | |
1429 |
|
1442 | |||
1430 | assert_equal 0, @issue.read_attribute(:done_ratio) |
|
1443 | assert_equal 0, @issue.read_attribute(:done_ratio) | |
1431 | assert_equal 30, @issue2.read_attribute(:done_ratio) |
|
1444 | assert_equal 30, @issue2.read_attribute(:done_ratio) | |
1432 | end |
|
1445 | end | |
1433 | end |
|
1446 | end | |
1434 |
|
1447 | |||
1435 | context "with Setting.issue_done_ratio using the issue_status" do |
|
1448 | context "with Setting.issue_done_ratio using the issue_status" do | |
1436 | setup do |
|
1449 | setup do | |
1437 | Setting.issue_done_ratio = 'issue_status' |
|
1450 | Setting.issue_done_ratio = 'issue_status' | |
1438 | end |
|
1451 | end | |
1439 |
|
1452 | |||
1440 | should "change the issue's done ratio" do |
|
1453 | should "change the issue's done ratio" do | |
1441 | @issue.update_done_ratio_from_issue_status |
|
1454 | @issue.update_done_ratio_from_issue_status | |
1442 | @issue2.update_done_ratio_from_issue_status |
|
1455 | @issue2.update_done_ratio_from_issue_status | |
1443 |
|
1456 | |||
1444 | assert_equal 50, @issue.read_attribute(:done_ratio) |
|
1457 | assert_equal 50, @issue.read_attribute(:done_ratio) | |
1445 | assert_equal 0, @issue2.read_attribute(:done_ratio) |
|
1458 | assert_equal 0, @issue2.read_attribute(:done_ratio) | |
1446 | end |
|
1459 | end | |
1447 | end |
|
1460 | end | |
1448 | end |
|
1461 | end | |
1449 |
|
1462 | |||
1450 | test "#by_tracker" do |
|
1463 | test "#by_tracker" do | |
1451 | User.current = User.anonymous |
|
1464 | User.current = User.anonymous | |
1452 | groups = Issue.by_tracker(Project.find(1)) |
|
1465 | groups = Issue.by_tracker(Project.find(1)) | |
1453 | assert_equal 3, groups.size |
|
1466 | assert_equal 3, groups.size | |
1454 | assert_equal 7, groups.inject(0) {|sum, group| sum + group['total'].to_i} |
|
1467 | assert_equal 7, groups.inject(0) {|sum, group| sum + group['total'].to_i} | |
1455 | end |
|
1468 | end | |
1456 |
|
1469 | |||
1457 | test "#by_version" do |
|
1470 | test "#by_version" do | |
1458 | User.current = User.anonymous |
|
1471 | User.current = User.anonymous | |
1459 | groups = Issue.by_version(Project.find(1)) |
|
1472 | groups = Issue.by_version(Project.find(1)) | |
1460 | assert_equal 3, groups.size |
|
1473 | assert_equal 3, groups.size | |
1461 | assert_equal 3, groups.inject(0) {|sum, group| sum + group['total'].to_i} |
|
1474 | assert_equal 3, groups.inject(0) {|sum, group| sum + group['total'].to_i} | |
1462 | end |
|
1475 | end | |
1463 |
|
1476 | |||
1464 | test "#by_priority" do |
|
1477 | test "#by_priority" do | |
1465 | User.current = User.anonymous |
|
1478 | User.current = User.anonymous | |
1466 | groups = Issue.by_priority(Project.find(1)) |
|
1479 | groups = Issue.by_priority(Project.find(1)) | |
1467 | assert_equal 4, groups.size |
|
1480 | assert_equal 4, groups.size | |
1468 | assert_equal 7, groups.inject(0) {|sum, group| sum + group['total'].to_i} |
|
1481 | assert_equal 7, groups.inject(0) {|sum, group| sum + group['total'].to_i} | |
1469 | end |
|
1482 | end | |
1470 |
|
1483 | |||
1471 | test "#by_category" do |
|
1484 | test "#by_category" do | |
1472 | User.current = User.anonymous |
|
1485 | User.current = User.anonymous | |
1473 | groups = Issue.by_category(Project.find(1)) |
|
1486 | groups = Issue.by_category(Project.find(1)) | |
1474 | assert_equal 2, groups.size |
|
1487 | assert_equal 2, groups.size | |
1475 | assert_equal 3, groups.inject(0) {|sum, group| sum + group['total'].to_i} |
|
1488 | assert_equal 3, groups.inject(0) {|sum, group| sum + group['total'].to_i} | |
1476 | end |
|
1489 | end | |
1477 |
|
1490 | |||
1478 | test "#by_assigned_to" do |
|
1491 | test "#by_assigned_to" do | |
1479 | User.current = User.anonymous |
|
1492 | User.current = User.anonymous | |
1480 | groups = Issue.by_assigned_to(Project.find(1)) |
|
1493 | groups = Issue.by_assigned_to(Project.find(1)) | |
1481 | assert_equal 2, groups.size |
|
1494 | assert_equal 2, groups.size | |
1482 | assert_equal 2, groups.inject(0) {|sum, group| sum + group['total'].to_i} |
|
1495 | assert_equal 2, groups.inject(0) {|sum, group| sum + group['total'].to_i} | |
1483 | end |
|
1496 | end | |
1484 |
|
1497 | |||
1485 | test "#by_author" do |
|
1498 | test "#by_author" do | |
1486 | User.current = User.anonymous |
|
1499 | User.current = User.anonymous | |
1487 | groups = Issue.by_author(Project.find(1)) |
|
1500 | groups = Issue.by_author(Project.find(1)) | |
1488 | assert_equal 4, groups.size |
|
1501 | assert_equal 4, groups.size | |
1489 | assert_equal 7, groups.inject(0) {|sum, group| sum + group['total'].to_i} |
|
1502 | assert_equal 7, groups.inject(0) {|sum, group| sum + group['total'].to_i} | |
1490 | end |
|
1503 | end | |
1491 |
|
1504 | |||
1492 | test "#by_subproject" do |
|
1505 | test "#by_subproject" do | |
1493 | User.current = User.anonymous |
|
1506 | User.current = User.anonymous | |
1494 | groups = Issue.by_subproject(Project.find(1)) |
|
1507 | groups = Issue.by_subproject(Project.find(1)) | |
1495 | # Private descendant not visible |
|
1508 | # Private descendant not visible | |
1496 | assert_equal 1, groups.size |
|
1509 | assert_equal 1, groups.size | |
1497 | assert_equal 2, groups.inject(0) {|sum, group| sum + group['total'].to_i} |
|
1510 | assert_equal 2, groups.inject(0) {|sum, group| sum + group['total'].to_i} | |
1498 | end |
|
1511 | end | |
1499 |
|
1512 | |||
1500 | def test_recently_updated_scope |
|
1513 | def test_recently_updated_scope | |
1501 | #should return the last updated issue |
|
1514 | #should return the last updated issue | |
1502 | assert_equal Issue.reorder("updated_on DESC").first, Issue.recently_updated.limit(1).first |
|
1515 | assert_equal Issue.reorder("updated_on DESC").first, Issue.recently_updated.limit(1).first | |
1503 | end |
|
1516 | end | |
1504 |
|
1517 | |||
1505 | def test_on_active_projects_scope |
|
1518 | def test_on_active_projects_scope | |
1506 | assert Project.find(2).archive |
|
1519 | assert Project.find(2).archive | |
1507 |
|
1520 | |||
1508 | before = Issue.on_active_project.length |
|
1521 | before = Issue.on_active_project.length | |
1509 | # test inclusion to results |
|
1522 | # test inclusion to results | |
1510 | issue = Issue.generate_for_project!(Project.find(1), :tracker => Project.find(2).trackers.first) |
|
1523 | issue = Issue.generate_for_project!(Project.find(1), :tracker => Project.find(2).trackers.first) | |
1511 | assert_equal before + 1, Issue.on_active_project.length |
|
1524 | assert_equal before + 1, Issue.on_active_project.length | |
1512 |
|
1525 | |||
1513 | # Move to an archived project |
|
1526 | # Move to an archived project | |
1514 | issue.project = Project.find(2) |
|
1527 | issue.project = Project.find(2) | |
1515 | assert issue.save |
|
1528 | assert issue.save | |
1516 | assert_equal before, Issue.on_active_project.length |
|
1529 | assert_equal before, Issue.on_active_project.length | |
1517 | end |
|
1530 | end | |
1518 |
|
1531 | |||
1519 | context "Issue#recipients" do |
|
1532 | context "Issue#recipients" do | |
1520 | setup do |
|
1533 | setup do | |
1521 | @project = Project.find(1) |
|
1534 | @project = Project.find(1) | |
1522 | @author = User.generate! |
|
1535 | @author = User.generate! | |
1523 | @assignee = User.generate! |
|
1536 | @assignee = User.generate! | |
1524 | @issue = Issue.generate_for_project!(@project, :assigned_to => @assignee, :author => @author) |
|
1537 | @issue = Issue.generate_for_project!(@project, :assigned_to => @assignee, :author => @author) | |
1525 | end |
|
1538 | end | |
1526 |
|
1539 | |||
1527 | should "include project recipients" do |
|
1540 | should "include project recipients" do | |
1528 | assert @project.recipients.present? |
|
1541 | assert @project.recipients.present? | |
1529 | @project.recipients.each do |project_recipient| |
|
1542 | @project.recipients.each do |project_recipient| | |
1530 | assert @issue.recipients.include?(project_recipient) |
|
1543 | assert @issue.recipients.include?(project_recipient) | |
1531 | end |
|
1544 | end | |
1532 | end |
|
1545 | end | |
1533 |
|
1546 | |||
1534 | should "include the author if the author is active" do |
|
1547 | should "include the author if the author is active" do | |
1535 | assert @issue.author, "No author set for Issue" |
|
1548 | assert @issue.author, "No author set for Issue" | |
1536 | assert @issue.recipients.include?(@issue.author.mail) |
|
1549 | assert @issue.recipients.include?(@issue.author.mail) | |
1537 | end |
|
1550 | end | |
1538 |
|
1551 | |||
1539 | should "include the assigned to user if the assigned to user is active" do |
|
1552 | should "include the assigned to user if the assigned to user is active" do | |
1540 | assert @issue.assigned_to, "No assigned_to set for Issue" |
|
1553 | assert @issue.assigned_to, "No assigned_to set for Issue" | |
1541 | assert @issue.recipients.include?(@issue.assigned_to.mail) |
|
1554 | assert @issue.recipients.include?(@issue.assigned_to.mail) | |
1542 | end |
|
1555 | end | |
1543 |
|
1556 | |||
1544 | should "not include users who opt out of all email" do |
|
1557 | should "not include users who opt out of all email" do | |
1545 | @author.update_attribute(:mail_notification, :none) |
|
1558 | @author.update_attribute(:mail_notification, :none) | |
1546 |
|
1559 | |||
1547 | assert !@issue.recipients.include?(@issue.author.mail) |
|
1560 | assert !@issue.recipients.include?(@issue.author.mail) | |
1548 | end |
|
1561 | end | |
1549 |
|
1562 | |||
1550 | should "not include the issue author if they are only notified of assigned issues" do |
|
1563 | should "not include the issue author if they are only notified of assigned issues" do | |
1551 | @author.update_attribute(:mail_notification, :only_assigned) |
|
1564 | @author.update_attribute(:mail_notification, :only_assigned) | |
1552 |
|
1565 | |||
1553 | assert !@issue.recipients.include?(@issue.author.mail) |
|
1566 | assert !@issue.recipients.include?(@issue.author.mail) | |
1554 | end |
|
1567 | end | |
1555 |
|
1568 | |||
1556 | should "not include the assigned user if they are only notified of owned issues" do |
|
1569 | should "not include the assigned user if they are only notified of owned issues" do | |
1557 | @assignee.update_attribute(:mail_notification, :only_owner) |
|
1570 | @assignee.update_attribute(:mail_notification, :only_owner) | |
1558 |
|
1571 | |||
1559 | assert !@issue.recipients.include?(@issue.assigned_to.mail) |
|
1572 | assert !@issue.recipients.include?(@issue.assigned_to.mail) | |
1560 | end |
|
1573 | end | |
1561 | end |
|
1574 | end | |
1562 |
|
1575 | |||
1563 | def test_last_journal_id_with_journals_should_return_the_journal_id |
|
1576 | def test_last_journal_id_with_journals_should_return_the_journal_id | |
1564 | assert_equal 2, Issue.find(1).last_journal_id |
|
1577 | assert_equal 2, Issue.find(1).last_journal_id | |
1565 | end |
|
1578 | end | |
1566 |
|
1579 | |||
1567 | def test_last_journal_id_without_journals_should_return_nil |
|
1580 | def test_last_journal_id_without_journals_should_return_nil | |
1568 | assert_nil Issue.find(3).last_journal_id |
|
1581 | assert_nil Issue.find(3).last_journal_id | |
1569 | end |
|
1582 | end | |
1570 |
|
1583 | |||
1571 | def test_journals_after_should_return_journals_with_greater_id |
|
1584 | def test_journals_after_should_return_journals_with_greater_id | |
1572 | assert_equal [Journal.find(2)], Issue.find(1).journals_after('1') |
|
1585 | assert_equal [Journal.find(2)], Issue.find(1).journals_after('1') | |
1573 | assert_equal [], Issue.find(1).journals_after('2') |
|
1586 | assert_equal [], Issue.find(1).journals_after('2') | |
1574 | end |
|
1587 | end | |
1575 |
|
1588 | |||
1576 | def test_journals_after_with_blank_arg_should_return_all_journals |
|
1589 | def test_journals_after_with_blank_arg_should_return_all_journals | |
1577 | assert_equal [Journal.find(1), Journal.find(2)], Issue.find(1).journals_after('') |
|
1590 | assert_equal [Journal.find(1), Journal.find(2)], Issue.find(1).journals_after('') | |
1578 | end |
|
1591 | end | |
1579 | end |
|
1592 | end |
General Comments 0
You need to be logged in to leave comments.
Login now