found-version-1.0.4.patch

Brian Lindahl, 2011-01-25 19:22

Download (28.1 KB)

View differences:

redmine-1.0.4-found-version/app/controllers/issue_moves_controller.rb 2011-01-25 10:42:12.475908000 -0700
51 51
    @target_project ||= @project    
52 52
    @trackers = @target_project.trackers
53 53
    @available_statuses = Workflow.available_statuses(@project)
54
    @found_versions = @target_project.shared_versions.locked
54 55
    @notes = params[:notes]
55 56
    @notes ||= ''
56 57
  end
57 58

  
58 59
  def extract_changed_attributes_for_move(params)
59 60
    changed_attributes = {}
60
    [:assigned_to_id, :status_id, :start_date, :due_date, :priority_id].each do |valid_attribute|
61
    [:assigned_to_id, :status_id, :found_version_id, :start_date, :due_date, :priority_id].each do |valid_attribute|
61 62
      unless params[valid_attribute].blank?
62 63
        changed_attributes[valid_attribute] = (params[valid_attribute] == 'none' ? nil : params[valid_attribute])
63 64
      end
redmine-1.0.4-found-version/app/controllers/issues_controller.rb 2011-01-25 10:41:31.819918200 -0700
74 74
      
75 75
      @issue_count = @query.issue_count
76 76
      @issue_pages = Paginator.new self, @issue_count, limit, params['page']
77
      @issues = @query.issues(:include => [:assigned_to, :tracker, :priority, :category, :fixed_version],
77
      @issues = @query.issues(:include => [:assigned_to, :tracker, :priority, :category, :found_version, :fixed_version],
78 78
                              :order => sort_clause, 
79 79
                              :offset => @issue_pages.current.offset, 
80 80
                              :limit => limit)
redmine-1.0.4-found-version/app/controllers/reports_controller.rb 2011-01-25 10:41:31.819918200 -0700
29 29
    @subprojects = @project.descendants.visible
30 30

  
31 31
    @issues_by_tracker = Issue.by_tracker(@project)
32
    @issues_by_version = Issue.by_version(@project)
32
    @issues_by_found_version = Issue.by_found_version(@project)
33
    @issues_by_fixed_version = Issue.by_fixed_version(@project)
33 34
    @issues_by_priority = Issue.by_priority(@project)
34 35
    @issues_by_category = Issue.by_category(@project)
35 36
    @issues_by_assigned_to = Issue.by_assigned_to(@project)
......
46 47
      @rows = @project.trackers
47 48
      @data = Issue.by_tracker(@project)
48 49
      @report_title = l(:field_tracker)
49
    when "version"
50
    when "found_version"
51
      @field = "found_version_id"
52
      @rows = @project.shared_versions.sort
53
      @data = Issue.by_found_version(@project)
54
      @report_title = l(:field_found_version)
55
    when "fixed_version"
50 56
      @field = "fixed_version_id"
51 57
      @rows = @project.shared_versions.sort
52
      @data = Issue.by_version(@project)
53
      @report_title = l(:field_version)
58
      @data = Issue.by_fixed_version(@project)
59
      @report_title = l(:field_fixed_version)
54 60
    when "priority"
55 61
      @field = "priority_id"
56 62
      @rows = IssuePriority.all
redmine-1.0.4-found-version/app/helpers/issues_helper.rb 2011-01-25 10:41:31.835543100 -0700
121 121
        value = format_date(detail.value.to_date) if detail.value
122 122
        old_value = format_date(detail.old_value.to_date) if detail.old_value
123 123

  
124
      when ['project_id', 'status_id', 'tracker_id', 'assigned_to_id', 'priority_id', 'category_id', 'fixed_version_id'].include?(detail.prop_key)
124
      when ['project_id', 'status_id', 'tracker_id', 'assigned_to_id', 'priority_id', 'category_id', 'found_version_id', 'fixed_version_id'].include?(detail.prop_key)
125 125
        value = find_name_by_reflection(field, detail.value)
126 126
        old_value = find_name_by_reflection(field, detail.old_value)
127 127

  
......
200 200
                  l(:field_subject),
201 201
                  l(:field_assigned_to),
202 202
                  l(:field_category),
203
                  l(:field_found_version),
203 204
                  l(:field_fixed_version),
204 205
                  l(:field_author),
205 206
                  l(:field_start_date),
......
227 228
                  issue.subject,
228 229
                  issue.assigned_to,
229 230
                  issue.category,
231
                  issue.found_version,
230 232
                  issue.fixed_version,
231 233
                  issue.author.name,
232 234
                  format_date(issue.start_date),
redmine-1.0.4-found-version/app/models/issue.rb 2011-01-25 10:43:22.553584500 -0700
21 21
  belongs_to :status, :class_name => 'IssueStatus', :foreign_key => 'status_id'
22 22
  belongs_to :author, :class_name => 'User', :foreign_key => 'author_id'
23 23
  belongs_to :assigned_to, :class_name => 'User', :foreign_key => 'assigned_to_id'
24
  belongs_to :found_version, :class_name => 'Version', :foreign_key => 'found_version_id'
24 25
  belongs_to :fixed_version, :class_name => 'Version', :foreign_key => 'fixed_version_id'
25 26
  belongs_to :priority, :class_name => 'IssuePriority', :foreign_key => 'priority_id'
26 27
  belongs_to :category, :class_name => 'IssueCategory', :foreign_key => 'category_id'
......
52 53
  attr_reader :current_journal
53 54

  
54 55
  validates_presence_of :subject, :priority, :project, :tracker, :author, :status
56
  validates_presence_of :found_version, :unless => Proc.new { |issue| issue.found_assignable_versions.empty? }
55 57

  
56 58
  validates_length_of :subject, :maximum => 255
57 59
  validates_inclusion_of :done_ratio, :in => 0..100
......
121 123
      # reassign to the category with same name if any
122 124
      new_category = issue.category.nil? ? nil : new_project.issue_categories.find_by_name(issue.category.name)
123 125
      issue.category = new_category
124
      # Keep the fixed_version if it's still valid in the new_project
126
      # Keep the found version if it's still valid in the new_project
127
      unless new_project.shared_versions.include?(issue.found_version)
128
        issue.found_version = nil
129
      end
130
      # Keep the fixed version if it's still valid in the new_project
125 131
      unless new_project.shared_versions.include?(issue.fixed_version)
126 132
        issue.fixed_version = nil
127 133
      end
......
204 210
    category_id
205 211
    assigned_to_id
206 212
    priority_id
213
    found_version_id
207 214
    fixed_version_id
208 215
    subject
209 216
    description
......
273 280
      errors.add :start_date, :invalid
274 281
    end
275 282
    
283
    if found_version
284
      if !found_assignable_versions.include?(found_version)
285
        errors.add :found_version_id, :inclusion
286
      end
287
    end
288
	
276 289
    if fixed_version
277
      if !assignable_versions.include?(fixed_version)
290
      if !fixed_assignable_versions.include?(fixed_version)
278 291
        errors.add :fixed_version_id, :inclusion
279 292
      elsif reopened? && fixed_version.closed?
280 293
        errors.add_to_base I18n.t(:error_can_not_reopen_issue_on_closed_version)
......
370 383
    users.uniq.sort
371 384
  end
372 385
  
373
  # Versions that the issue can be assigned to
374
  def assignable_versions
375
    @assignable_versions ||= (project.shared_versions.open + [Version.find_by_id(fixed_version_id_was)]).compact.uniq.sort
386
  # Versions that the issue can be assigned as fixed to
387
  def found_assignable_versions
388
    @found_assignable_versions ||= project.shared_versions.locked
389
  end
390
  
391
  # Versions that the issue can be assigned as fixed to
392
  def fixed_assignable_versions
393
    @fixed_assignable_versions ||= project.shared_versions.open
376 394
  end
377 395
  
378 396
  # Returns true if this issue is blocked by another issue that is still open
......
527 545
  # Unassigns issues from +version+ if it's no longer shared with issue's project
528 546
  def self.update_versions_from_sharing_change(version)
529 547
    # Update issues assigned to the version
548
    update_versions(["#{Issue.table_name}.found_version_id = ?", version.id])
530 549
    update_versions(["#{Issue.table_name}.fixed_version_id = ?", version.id])
531 550
  end
532 551
  
......
563 582
                       :joins => Tracker.table_name)
564 583
  end
565 584

  
566
  def self.by_version(project)
585
  def self.by_found_version(project)
586
    count_and_group_by(:project => project,
587
                       :field => 'found_version_id',
588
                       :joins => Version.table_name)
589
  end
590
  
591
  def self.by_fixed_version(project)
567 592
    count_and_group_by(:project => project,
568 593
                       :field => 'fixed_version_id',
569 594
                       :joins => Version.table_name)
......
739 764
        issue.save
740 765
      end
741 766
    end
767
    # Only need to update issues with a found_version from
768
    # a different project and that is not systemwide shared
769
    Issue.all(:conditions => merge_conditions("#{Issue.table_name}.found_version_id IS NOT NULL" +
770
                                                " AND #{Issue.table_name}.project_id <> #{Version.table_name}.project_id" +
771
                                                " AND #{Version.table_name}.sharing <> 'system'",
772
                                                conditions),
773
              :include => [:project, :found_version]
774
              ).each do |issue|
775
      next if issue.project.nil? || issue.found_version.nil?
776
      unless issue.project.shared_versions.include?(issue.found_version)
777
        issue.init_journal(User.current)
778
        issue.found_version = nil
779
        issue.save
780
      end
781
    end
742 782
  end
743 783
  
744 784
  # Callback on attachment deletion
redmine-1.0.4-found-version/app/models/project.rb 2011-01-25 10:41:31.866792900 -0700
587 587
      new_issue = Issue.new
588 588
      new_issue.copy_from(issue)
589 589
      new_issue.project = self
590
      # Reassign fixed_versions by name, since names are unique per
590
      # Reassign versions by name, since names are unique per
591 591
      # project and the versions for self are not yet saved
592
      if issue.found_version
593
        new_issue.found_version = self.versions.select {|v| v.name == issue.found_version.name}.first
594
      end
592 595
      if issue.fixed_version
593 596
        new_issue.fixed_version = self.versions.select {|v| v.name == issue.fixed_version.name}.first
594 597
      end
redmine-1.0.4-found-version/app/models/query.rb 2011-01-25 10:41:31.882417800 -0700
129 129
    QueryColumn.new(:assigned_to, :sortable => ["#{User.table_name}.lastname", "#{User.table_name}.firstname", "#{User.table_name}.id"], :groupable => true),
130 130
    QueryColumn.new(:updated_on, :sortable => "#{Issue.table_name}.updated_on", :default_order => 'desc'),
131 131
    QueryColumn.new(:category, :sortable => "#{IssueCategory.table_name}.name", :groupable => true),
132
    QueryColumn.new(:found_version, :sortable => ["#{Version.table_name}.effective_date", "#{Version.table_name}.name"], :default_order => 'desc', :groupable => true),
132 133
    QueryColumn.new(:fixed_version, :sortable => ["#{Version.table_name}.effective_date", "#{Version.table_name}.name"], :default_order => 'desc', :groupable => true),
133 134
    QueryColumn.new(:start_date, :sortable => "#{Issue.table_name}.start_date"),
134 135
    QueryColumn.new(:due_date, :sortable => "#{Issue.table_name}.due_date"),
......
174 175
    @available_filters = { "status_id" => { :type => :list_status, :order => 1, :values => IssueStatus.find(:all, :order => 'position').collect{|s| [s.name, s.id.to_s] } },       
175 176
                           "tracker_id" => { :type => :list, :order => 2, :values => trackers.collect{|s| [s.name, s.id.to_s] } },                                                                                                                
176 177
                           "priority_id" => { :type => :list, :order => 3, :values => IssuePriority.all.collect{|s| [s.name, s.id.to_s] } },
177
                           "subject" => { :type => :text, :order => 8 },  
178
                           "created_on" => { :type => :date_past, :order => 9 },                        
179
                           "updated_on" => { :type => :date_past, :order => 10 },
180
                           "start_date" => { :type => :date, :order => 11 },
181
                           "due_date" => { :type => :date, :order => 12 },
182
                           "estimated_hours" => { :type => :integer, :order => 13 },
183
                           "done_ratio" =>  { :type => :integer, :order => 14 }}
178
                           "subject" => { :type => :text, :order => 9 },  
179
                           "created_on" => { :type => :date_past, :order => 10 },                        
180
                           "updated_on" => { :type => :date_past, :order => 11 },
181
                           "start_date" => { :type => :date, :order => 12 },
182
                           "due_date" => { :type => :date, :order => 13 },
183
                           "estimated_hours" => { :type => :integer, :order => 14 },
184
                           "done_ratio" =>  { :type => :integer, :order => 15 }}
184 185
    
185 186
    user_values = []
186 187
    user_values << ["<< #{l(:label_me)} >>", "me"] if User.current.logged?
......
197 198
    @available_filters["author_id"] = { :type => :list, :order => 5, :values => user_values } unless user_values.empty?
198 199
    
199 200
    if User.current.logged?
200
      @available_filters["watcher_id"] = { :type => :list, :order => 15, :values => [["<< #{l(:label_me)} >>", "me"]] }
201
      @available_filters["watcher_id"] = { :type => :list, :order => 16, :values => [["<< #{l(:label_me)} >>", "me"]] }
201 202
    end
202 203
  
203 204
    if project
......
206 207
        @available_filters["category_id"] = { :type => :list_optional, :order => 6, :values => @project.issue_categories.collect{|s| [s.name, s.id.to_s] } }
207 208
      end
208 209
      unless @project.shared_versions.empty?
209
        @available_filters["fixed_version_id"] = { :type => :list_optional, :order => 7, :values => @project.shared_versions.sort.collect{|s| ["#{s.project.name} - #{s.name}", s.id.to_s] } }
210
        @available_filters["found_version_id"] = { :type => :list_optional, :order => 7, :values => @project.shared_versions.sort.collect{|s| ["#{s.project.name} - #{s.name}", s.id.to_s] } }
211
        @available_filters["fixed_version_id"] = { :type => :list_optional, :order => 8, :values => @project.shared_versions.sort.collect{|s| ["#{s.project.name} - #{s.name}", s.id.to_s] } }
210 212
      end
211 213
      unless @project.descendants.active.empty?
212
        @available_filters["subproject_id"] = { :type => :list_subprojects, :order => 13, :values => @project.descendants.visible.collect{|s| [s.name, s.id.to_s] } }
214
        @available_filters["subproject_id"] = { :type => :list_subprojects, :order => 14, :values => @project.descendants.visible.collect{|s| [s.name, s.id.to_s] } }
213 215
      end
214 216
      add_custom_fields_filters(@project.all_issue_custom_fields)
215 217
    else
216 218
      # global filters for cross project issue list
217 219
      system_shared_versions = Version.visible.find_all_by_sharing('system')
218 220
      unless system_shared_versions.empty?
219
        @available_filters["fixed_version_id"] = { :type => :list_optional, :order => 7, :values => system_shared_versions.sort.collect{|s| ["#{s.project.name} - #{s.name}", s.id.to_s] } }
221
        @available_filters["found_version_id"] = { :type => :list_optional, :order => 7, :values => system_shared_versions.sort.collect{|s| ["#{s.project.name} - #{s.name}", s.id.to_s] } }
222
        @available_filters["fixed_version_id"] = { :type => :list_optional, :order => 8, :values => system_shared_versions.sort.collect{|s| ["#{s.project.name} - #{s.name}", s.id.to_s] } }
220 223
      end
221 224
      add_custom_fields_filters(IssueCustomField.find(:all, :conditions => {:is_filter => true, :is_for_all => true}))
222 225
      # project filter
redmine-1.0.4-found-version/app/models/version.rb 2011-01-25 10:41:31.898042700 -0700
18 18
class Version < ActiveRecord::Base
19 19
  after_update :update_issues_from_sharing_change
20 20
  belongs_to :project
21
  has_many :found_issues, :class_name => 'Issue', :foreign_key => 'found_version_id', :dependent => :nullify
21 22
  has_many :fixed_issues, :class_name => 'Issue', :foreign_key => 'fixed_version_id', :dependent => :nullify
22 23
  acts_as_customizable
23 24
  acts_as_attachable :view_permission => :view_files,
......
34 35
  validates_inclusion_of :sharing, :in => VERSION_SHARINGS
35 36

  
36 37
  named_scope :open, :conditions => {:status => 'open'}
38
  named_scope :locked, :conditions => {:status => 'locked'}
39
  named_scope :closed, :conditions => {:status => 'closed'}
37 40
  named_scope :visible, lambda {|*args| { :include => :project,
38 41
                                          :conditions => Project.allowed_to_condition(args.first || User.current, :view_issues) } }
39 42

  
redmine-1.0.4-found-version/app/views/issue_moves/new.rhtml 2011-01-25 10:42:44.413203600 -0700
28 28
                                   options_from_collection_for_select(@target_project.assignable_users, :id, :name)) %>
29 29
</p>
30 30

  
31
<% if !@found_versions.empty? %>
32
<p>
33
  <label for="new_found_version_id"><%=l(:field_found_version) %></label>
34
  <%= select_tag('new_found_version_id', "<option value=\"\">#{l(:label_no_change_option)}</option>" + options_from_collection_for_select(@found_versions, :id, :name)) %>
35
</p>
36
<% end %>
37

  
31 38
<p>
32 39
  <label><%= l(:field_status) %></label>
33 40
  <%= select_tag('status_id', "<option value=\"\">#{l(:label_no_change_option)}</option>" + options_from_collection_for_select(@available_statuses, :id, :name)) %>
redmine-1.0.4-found-version/app/views/issues/_attributes.rhtml 2011-01-25 10:41:31.929292500 -0700
18 18
                     :title => l(:label_issue_category_new), 
19 19
                     :tabindex => 199) if authorize_for('issue_categories', 'new') %></p>
20 20
<% end %>
21
<% unless @issue.assignable_versions.empty? %>
22
<p><%= f.select :fixed_version_id, version_options_for_select(@issue.assignable_versions, @issue.fixed_version), :include_blank => true %>
21
<% unless @issue.found_assignable_versions.empty? %>
22
<p><%= f.select :found_version_id, version_options_for_select(@issue.found_assignable_versions, @issue.found_version), :include_blank => true, :required => true %></p>
23
<% end %>
24
<% unless @issue.fixed_assignable_versions.empty? %>
25
<p><%= f.select :fixed_version_id, version_options_for_select(@issue.fixed_assignable_versions, @issue.fixed_version), :include_blank => true %>
23 26
<%= prompt_to_remote(image_tag('add.png', :style => 'vertical-align: middle;'),
24 27
                     l(:label_version_new),
25 28
                     'version[name]', 
redmine-1.0.4-found-version/app/views/issues/bulk_edit.rhtml 2011-01-25 10:41:31.929292500 -0700
36 36
                                options_from_collection_for_select(@project.issue_categories, :id, :name)) %>
37 37
</p>
38 38
<p>
39
	<label><%= l(:field_found_version) %></label> 
40
	<%= select_tag('issue[found_version_id]', content_tag('option', l(:label_no_change_option), :value => '') +
41
                                   content_tag('option', l(:label_none), :value => 'none') +
42
                                   version_options_for_select(@project.shared_versions.locked)) %>
43
</p>
44
<p>
39 45
	<label><%= l(:field_fixed_version) %></label> 
40 46
	<%= select_tag('issue[fixed_version_id]', content_tag('option', l(:label_no_change_option), :value => '') +
41 47
                                   content_tag('option', l(:label_none), :value => 'none') +
redmine-1.0.4-found-version/app/views/issues/index.xml.builder 2011-01-25 10:41:31.944917400 -0700
10 10
		 	xml.author(:id => issue.author_id, :name => issue.author.name) unless issue.author.nil?
11 11
		 	xml.assigned_to(:id => issue.assigned_to_id, :name => issue.assigned_to.name) unless issue.assigned_to.nil?
12 12
		  xml.category(:id => issue.category_id, :name => issue.category.name) unless issue.category.nil?
13
		  xml.found_version(:id => issue.found_version_id, :name => issue.found_version.name) unless issue.found_version.nil?
13 14
		  xml.fixed_version(:id => issue.fixed_version_id, :name => issue.fixed_version.name) unless issue.fixed_version.nil?
14 15
      xml.parent(:id => issue.parent_id) unless issue.parent.nil?
15 16
      
redmine-1.0.4-found-version/app/views/issues/show.rhtml 2011-01-25 10:41:31.960542300 -0700
36 36
    <% end %>
37 37
</tr>
38 38
<tr>
39
    <th class="fixed-version"><%=l(:field_fixed_version)%>:</th><td class="fixed-version"><%= @issue.fixed_version ? link_to_version(@issue.fixed_version) : "-" %></td>
39
    <th class="found-version"><%=l(:field_found_version)%>:</th><td class="found-version"><%= @issue.found_version ? link_to_version(@issue.found_version) : "-" %></td>
40 40
    <% if @issue.estimated_hours %>
41 41
    <th class="estimated-hours"><%=l(:field_estimated_hours)%>:</th><td class="estimated-hours"><%= l_hours(@issue.estimated_hours) %></td>
42 42
    <% end %>
43 43
</tr>
44
<tr>
45
    <th class="fixed-version"><%=l(:field_fixed_version)%>:</th><td class="fixed-version"><%= @issue.fixed_version ? link_to_version(@issue.fixed_version) : "-" %></td>
46
</tr>
44 47
<%= render_custom_fields_rows(@issue) %>
45 48
<%= call_hook(:view_issues_show_details_bottom, :issue => @issue) %>
46 49
</table>
redmine-1.0.4-found-version/app/views/issues/show.xml.builder 2011-01-25 10:41:31.960542300 -0700
8 8
 	xml.author(:id => @issue.author_id, :name => @issue.author.name) unless @issue.author.nil?
9 9
 	xml.assigned_to(:id => @issue.assigned_to_id, :name => @issue.assigned_to.name) unless @issue.assigned_to.nil?
10 10
  xml.category(:id => @issue.category_id, :name => @issue.category.name) unless @issue.category.nil?
11
  xml.found_version(:id => @issue.found_version_id, :name => @issue.found_version.name) unless @issue.found_version.nil?
11 12
  xml.fixed_version(:id => @issue.fixed_version_id, :name => @issue.fixed_version.name) unless @issue.fixed_version.nil?
12 13
  xml.parent(:id => @issue.parent_id) unless @issue.parent.nil?
13 14
  
redmine-1.0.4-found-version/app/views/mailer/_issue_text_html.rhtml 2011-01-25 10:41:31.976167200 -0700
6 6
<li><%=l(:field_priority)%>: <%=h issue.priority %></li>
7 7
<li><%=l(:field_assigned_to)%>: <%=h issue.assigned_to %></li>
8 8
<li><%=l(:field_category)%>: <%=h issue.category %></li>
9
<li><%=l(:field_found_version)%>: <%=h issue.found_version %></li>
9 10
<li><%=l(:field_fixed_version)%>: <%=h issue.fixed_version %></li>
10 11
<% issue.custom_values.each do |c| %>
11 12
  <li><%=h c.custom_field.name %>: <%=h show_value(c) %></li>
redmine-1.0.4-found-version/app/views/mailer/_issue_text_plain.rhtml 2011-01-25 10:41:31.991792100 -0700
6 6
<%=l(:field_priority)%>: <%= issue.priority %>
7 7
<%=l(:field_assigned_to)%>: <%= issue.assigned_to %>
8 8
<%=l(:field_category)%>: <%= issue.category %>
9
<%=l(:field_found_version)%>: <%= issue.found_version %>
9 10
<%=l(:field_fixed_version)%>: <%= issue.fixed_version %>
10 11
<% issue.custom_values.each do |c| %><%= c.custom_field.name %>: <%= show_value(c) %>
11 12
<% end %>
redmine-1.0.4-found-version/app/views/reports/issue_report.rhtml 2011-01-25 10:41:31.991792100 -0700
17 17
</div>
18 18

  
19 19
<div class="splitcontentright">
20
<h3><%=l(:field_version)%>&nbsp;&nbsp;<%= link_to image_tag('zoom_in.png'), :action => 'issue_report_details', :detail => 'version' %></h3>
21
<%= render :partial => 'simple', :locals => { :data => @issues_by_version, :field_name => "fixed_version_id", :rows => @versions } %>
20
<h3><%=l(:field_found_version)%>&nbsp;&nbsp;<%= link_to image_tag('zoom_in.png'), :action => 'issue_report_details', :detail => 'found_version' %></h3>
21
<%= render :partial => 'simple', :locals => { :data => @issues_by_found_version, :field_name => "found_version_id", :rows => @versions } %>
22
<br />
23
<h3><%=l(:field_fixed_version)%>&nbsp;&nbsp;<%= link_to image_tag('zoom_in.png'), :action => 'issue_report_details', :detail => 'fixed_version' %></h3>
24
<%= render :partial => 'simple', :locals => { :data => @issues_by_fixed_version, :field_name => "fixed_version_id", :rows => @versions } %>
22 25
<br />
23 26
<% if @project.children.any? %>
24 27
<h3><%=l(:field_subproject)%>&nbsp;&nbsp;<%= link_to image_tag('zoom_in.png'), :action => 'issue_report_details', :detail => 'subproject' %></h3>
redmine-1.0.4-found-version/config/locales/en.yml 2011-01-25 10:41:32.007417000 -0700
233 233
  field_due_date: Due date
234 234
  field_assigned_to: Assigned to
235 235
  field_priority: Priority
236
  field_found_version: Found in version
236 237
  field_fixed_version: Target version
237 238
  field_user: User
238 239
  field_principal: Principal
redmine-1.0.4-found-version/db/migrate/20100819172913_add_found_version.rb 2011-01-25 10:41:32.023041900 -0700
1
class AddFoundInVersion < ActiveRecord::Migration
2
  def self.up
3
    add_column :issues, :found_version_id, :integer
4
    add_index :issues, :found_version_id
5
  end
6

  
7
  def self.down
8
    remove_index :issues, :found_version_id
9
    remove_column :issues, :found_version_id
10
  end
11
end