ChiliProject is not maintained anymore. Please be advised that there will be no more updates.

We do not recommend that you setup new ChiliProject instances and we urge all existing users to migrate their data to a maintained system, e.g. Redmine. We will provide a migration script later. In the meantime, you can use the instructions by Christian Daehn.

found-version-1.1.0.patch

Ryan Thrash, 2011-04-02 01:35 pm

Download (30.8 kB)

 
redmine-1.1.0-found-version/app/controllers/issue_moves_controller.rb 2011-02-10 17:13:06.175072400 -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.1.0-found-version/app/controllers/issues_controller.rb 2011-02-10 17:13:06.175072400 -0700
81 81
      @issue_count = @query.issue_count
82 82
      @issue_pages = Paginator.new self, @issue_count, @limit, params['page']
83 83
      @offset ||= @issue_pages.current.offset
84
      @issues = @query.issues(:include => [:assigned_to, :tracker, :priority, :category, :fixed_version],
84
      @issues = @query.issues(:include => [:assigned_to, :tracker, :priority, :category, :found_version, :fixed_version],
85 85
                              :order => sort_clause, 
86 86
                              :offset => @offset, 
87 87
                              :limit => @limit)
redmine-1.1.0-found-version/app/controllers/reports_controller.rb 2011-02-10 17:13:06.190697600 -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.1.0-found-version/app/controllers/versions_controller.rb 2011-02-10 17:13:35.144193200 -0700
125 125
  end
126 126

  
127 127
  def destroy
128
    if @version.fixed_issues.empty?
128
    if @version.found_issues.empty? && @version.fixed_issues.empty?
129 129
      @version.destroy
130 130
      redirect_to :controller => 'projects', :action => 'settings', :tab => 'versions', :id => @project
131 131
    else
redmine-1.1.0-found-version/app/helpers/issues_helper.rb 2011-02-10 17:13:06.206322800 -0700
123 123
        value = format_date(detail.value.to_date) if detail.value
124 124
        old_value = format_date(detail.old_value.to_date) if detail.old_value
125 125

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

  
......
216 216
                  l(:field_subject),
217 217
                  l(:field_assigned_to),
218 218
                  l(:field_category),
219
                  l(:field_found_version),
219 220
                  l(:field_fixed_version),
220 221
                  l(:field_author),
221 222
                  l(:field_start_date),
......
243 244
                  issue.subject,
244 245
                  issue.assigned_to,
245 246
                  issue.category,
247
                  issue.found_version,
246 248
                  issue.fixed_version,
247 249
                  issue.author.name,
248 250
                  format_date(issue.start_date),
redmine-1.1.0-found-version/app/models/issue.rb 2011-02-10 17:13:06.221948000 -0700
23 23
  belongs_to :status, :class_name => 'IssueStatus', :foreign_key => 'status_id'
24 24
  belongs_to :author, :class_name => 'User', :foreign_key => 'author_id'
25 25
  belongs_to :assigned_to, :class_name => 'User', :foreign_key => 'assigned_to_id'
26
  belongs_to :found_version, :class_name => 'Version', :foreign_key => 'found_version_id'
26 27
  belongs_to :fixed_version, :class_name => 'Version', :foreign_key => 'fixed_version_id'
27 28
  belongs_to :priority, :class_name => 'IssuePriority', :foreign_key => 'priority_id'
28 29
  belongs_to :category, :class_name => 'IssueCategory', :foreign_key => 'category_id'
......
54 55
  attr_reader :current_journal
55 56

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

  
58 60
  validates_length_of :subject, :maximum => 255
59 61
  validates_inclusion_of :done_ratio, :in => 0..100
......
140 142
      # reassign to the category with same name if any
141 143
      new_category = issue.category.nil? ? nil : new_project.issue_categories.find_by_name(issue.category.name)
142 144
      issue.category = new_category
143
      # Keep the fixed_version if it's still valid in the new_project
145
      # Keep the found version if it's still valid in the new_project
146
      unless new_project.shared_versions.include?(issue.found_version)
147
        issue.found_version = nil
148
      end
149
      # Keep the fixed version if it's still valid in the new_project
144 150
      unless new_project.shared_versions.include?(issue.fixed_version)
145 151
        issue.fixed_version = nil
146 152
      end
......
222 228
    'category_id',
223 229
    'assigned_to_id',
224 230
    'priority_id',
231
    'found_version_id',
225 232
    'fixed_version_id',
226 233
    'subject',
227 234
    'description',
......
307 314
      errors.add :start_date, :invalid
308 315
    end
309 316
    
317
    if found_version
318
      if !found_assignable_versions.include?(found_version)
319
        errors.add :found_version_id, :inclusion
320
      end
321
    end
322
	
310 323
    if fixed_version
311
      if !assignable_versions.include?(fixed_version)
324
      if !fixed_assignable_versions.include?(fixed_version)
312 325
        errors.add :fixed_version_id, :inclusion
313 326
      elsif reopened? && fixed_version.closed?
314 327
        errors.add_to_base I18n.t(:error_can_not_reopen_issue_on_closed_version)
......
411 424
    users.uniq.sort
412 425
  end
413 426
  
414
  # Versions that the issue can be assigned to
415
  def assignable_versions
416
    @assignable_versions ||= (project.shared_versions.open + [Version.find_by_id(fixed_version_id_was)]).compact.uniq.sort
427
  # Versions that the issue can be assigned as fixed to
428
  def found_assignable_versions
429
    @found_assignable_versions ||= project.shared_versions.locked
430
  end
431
  
432
  # Versions that the issue can be assigned as fixed to
433
  def fixed_assignable_versions
434
    @fixed_assignable_versions ||= (project.shared_versions.open + [Version.find_by_id(fixed_version_id_was)]).compact.uniq.sort
417 435
  end
418 436
  
419 437
  # Returns true if this issue is blocked by another issue that is still open
......
569 587
  # Unassigns issues from +version+ if it's no longer shared with issue's project
570 588
  def self.update_versions_from_sharing_change(version)
571 589
    # Update issues assigned to the version
590
    update_versions(["#{Issue.table_name}.found_version_id = ?", version.id])
572 591
    update_versions(["#{Issue.table_name}.fixed_version_id = ?", version.id])
573 592
  end
574 593
  
......
605 624
                       :joins => Tracker.table_name)
606 625
  end
607 626

  
608
  def self.by_version(project)
627
  def self.by_found_version(project)
628
    count_and_group_by(:project => project,
629
                       :field => 'found_version_id',
630
                       :joins => Version.table_name)
631
  end
632
  
633
  def self.by_fixed_version(project)
609 634
    count_and_group_by(:project => project,
610 635
                       :field => 'fixed_version_id',
611 636
                       :joins => Version.table_name)
......
781 806
        issue.save
782 807
      end
783 808
    end
809
    # Only need to update issues with a found_version from
810
    # a different project and that is not systemwide shared
811
    Issue.all(:conditions => merge_conditions("#{Issue.table_name}.found_version_id IS NOT NULL" +
812
                                                " AND #{Issue.table_name}.project_id <> #{Version.table_name}.project_id" +
813
                                                " AND #{Version.table_name}.sharing <> 'system'",
814
                                                conditions),
815
              :include => [:project, :found_version]
816
              ).each do |issue|
817
      next if issue.project.nil? || issue.found_version.nil?
818
      unless issue.project.shared_versions.include?(issue.found_version)
819
        issue.init_journal(User.current)
820
        issue.found_version = nil
821
        issue.save
822
      end
823
    end
784 824
  end
785 825
  
786 826
  # Callback on attachment deletion
redmine-1.1.0-found-version/app/models/mail_handler.rb 2011-02-10 17:13:06.221948000 -0700
265 265
      'priority_id' => (k = get_keyword(:priority)) && IssuePriority.find_by_name(k).try(:id),
266 266
      'category_id' => (k = get_keyword(:category)) && issue.project.issue_categories.find_by_name(k).try(:id),
267 267
      'assigned_to_id' => assigned_to.try(:id),
268
      'found_version_id' => (k = get_keyword(:found_version, :override => true)) && issue.project.shared_versions.find_by_name(k).try(:id),
268 269
      'fixed_version_id' => (k = get_keyword(:fixed_version, :override => true)) && issue.project.shared_versions.find_by_name(k).try(:id),
269 270
      'start_date' => get_keyword(:start_date, :override => true, :format => '\d{4}-\d{2}-\d{2}'),
270 271
      'due_date' => get_keyword(:due_date, :override => true, :format => '\d{4}-\d{2}-\d{2}'),
redmine-1.1.0-found-version/app/models/project.rb 2011-02-10 17:13:06.237573200 -0700
685 685
      new_issue = Issue.new
686 686
      new_issue.copy_from(issue)
687 687
      new_issue.project = self
688
      # Reassign fixed_versions by name, since names are unique per
688
      # Reassign versions by name, since names are unique per
689 689
      # project and the versions for self are not yet saved
690
      if issue.found_version
691
        new_issue.found_version = self.versions.select {|v| v.name == issue.found_version.name}.first
692
      end
690 693
      if issue.fixed_version
691 694
        new_issue.fixed_version = self.versions.select {|v| v.name == issue.fixed_version.name}.first
692 695
      end
redmine-1.1.0-found-version/app/models/query.rb 2011-02-10 17:13:06.253198400 -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?
......
211 212
    @available_filters["assigned_to_role"] = { :type => :list_optional, :order => 7, :values => role_values } unless role_values.empty?
212 213
    
213 214
    if User.current.logged?
214
      @available_filters["watcher_id"] = { :type => :list, :order => 15, :values => [["<< #{l(:label_me)} >>", "me"]] }
215
      @available_filters["watcher_id"] = { :type => :list, :order => 16, :values => [["<< #{l(:label_me)} >>", "me"]] }
215 216
    end
216 217
  
217 218
    if project
......
220 221
        @available_filters["category_id"] = { :type => :list_optional, :order => 6, :values => @project.issue_categories.collect{|s| [s.name, s.id.to_s] } }
221 222
      end
222 223
      unless @project.shared_versions.empty?
223
        @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] } }
224
        @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] } }
225
        @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] } }
224 226
      end
225 227
      unless @project.descendants.active.empty?
226
        @available_filters["subproject_id"] = { :type => :list_subprojects, :order => 13, :values => @project.descendants.visible.collect{|s| [s.name, s.id.to_s] } }
228
        @available_filters["subproject_id"] = { :type => :list_subprojects, :order => 14, :values => @project.descendants.visible.collect{|s| [s.name, s.id.to_s] } }
227 229
      end
228 230
      add_custom_fields_filters(@project.all_issue_custom_fields)
229 231
    else
230 232
      # global filters for cross project issue list
231 233
      system_shared_versions = Version.visible.find_all_by_sharing('system')
232 234
      unless system_shared_versions.empty?
233
        @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] } }
235
        @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] } }
236
        @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] } }
234 237
      end
235 238
      add_custom_fields_filters(IssueCustomField.find(:all, :conditions => {:is_filter => true, :is_for_all => true}))
236 239
    end
redmine-1.1.0-found-version/app/models/version.rb 2011-02-10 17:13:06.268823600 -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.1.0-found-version/app/views/issue_moves/new.rhtml 2011-02-10 17:13:06.284448800 -0700
30 30
  <%= select_tag('status_id', "<option value=\"\">#{l(:label_no_change_option)}</option>" + options_from_collection_for_select(@available_statuses, :id, :name)) %>
31 31
</p>
32 32

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

  
33 40
<p>
34 41
  <label><%= l(:field_priority) %></label>
35 42
  <%= select_tag('priority_id', "<option value=\"\">#{l(:label_no_change_option)}</option>" + options_from_collection_for_select(IssuePriority.all, :id, :name)) %>
redmine-1.1.0-found-version/app/views/issues/_attributes.rhtml 2011-02-10 17:13:06.284448800 -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.1.0-found-version/app/views/issues/_form_update.rhtml 2011-02-10 17:13:06.300074000 -0700
7 7
<% if Issue.use_field_for_done_ratio? %>
8 8
<p><%= f.select :done_ratio, ((0..10).to_a.collect {|r| ["#{r*10} %", r*10] }) %></p>
9 9
<% end %>
10
<% unless @issue.assignable_versions.empty? %>
11
<p><%= f.select :fixed_version_id, (@issue.assignable_versions.collect {|v| [v.name, v.id]}), :include_blank => true %></p>
10
<% unless @issue.fixed_assignable_versions.empty? %>
11
<p><%= f.select :fixed_version_id, (@issue.fixed_assignable_versions.collect {|v| [v.name, v.id]}), :include_blank => true %></p>
12 12
<% end %>
13 13
</div>
14 14
</div>
redmine-1.1.0-found-version/app/views/issues/bulk_edit.rhtml 2011-02-10 17:13:06.315699200 -0700
40 40
<% #TODO: allow editing versions when multiple projects %>
41 41
<% if @project %>
42 42
<p>
43
	<label><%= l(:field_found_version) %></label> 
44
	<%= select_tag('issue[found_version_id]', content_tag('option', l(:label_no_change_option), :value => '') +
45
                                   content_tag('option', l(:label_none), :value => 'none') +
46
                                   version_options_for_select(@project.shared_versions.locked)) %>
47
</p>
48
<p>
43 49
	<label><%= l(:field_fixed_version) %></label> 
44 50
	<%= select_tag('issue[fixed_version_id]', content_tag('option', l(:label_no_change_option), :value => '') +
45 51
                                   content_tag('option', l(:label_none), :value => 'none') +
46
                                   version_options_for_select(@project.shared_versions.open.sort)) %>
52
                                   version_options_for_select(@project.shared_versions.open)) %>
47 53
</p>
48 54
<% end %>
49 55

  
redmine-1.1.0-found-version/app/views/issues/index.api.rsb 2011-02-10 17:13:06.315699200 -0700
9 9
      api.author(:id => issue.author_id, :name => issue.author.name) unless issue.author.nil?
10 10
      api.assigned_to(:id => issue.assigned_to_id, :name => issue.assigned_to.name) unless issue.assigned_to.nil?
11 11
      api.category(:id => issue.category_id, :name => issue.category.name) unless issue.category.nil?
12
      api.found_version(:id => issue.found_version_id, :name => issue.found_version.name) unless issue.found_version.nil?
12 13
      api.fixed_version(:id => issue.fixed_version_id, :name => issue.fixed_version.name) unless issue.fixed_version.nil?
13 14
      api.parent(:id => issue.parent_id) unless issue.parent.nil?
14 15
      
redmine-1.1.0-found-version/app/views/issues/show.api.rsb 2011-02-10 17:13:06.331324400 -0700
7 7
  api.author(:id => @issue.author_id, :name => @issue.author.name) unless @issue.author.nil?
8 8
  api.assigned_to(:id => @issue.assigned_to_id, :name => @issue.assigned_to.name) unless @issue.assigned_to.nil?
9 9
  api.category(:id => @issue.category_id, :name => @issue.category.name) unless @issue.category.nil?
10
  api.found_version(:id => @issue.found_version_id, :name => @issue.found_version.name) unless @issue.found_version.nil?
10 11
  api.fixed_version(:id => @issue.fixed_version_id, :name => @issue.fixed_version.name) unless @issue.fixed_version.nil?
11 12
  api.parent(:id => @issue.parent_id) unless @issue.parent.nil?
12 13
  
redmine-1.1.0-found-version/app/views/issues/show.rhtml 2011-02-10 17:13:06.346949600 -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.1.0-found-version/app/views/mailer/_issue_text_html.rhtml 2011-02-10 17:13:06.346949600 -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.1.0-found-version/app/views/mailer/_issue_text_plain.rhtml 2011-02-10 17:13:06.362574800 -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.1.0-found-version/app/views/reports/issue_report.rhtml 2011-02-10 17:13:06.362574800 -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.1.0-found-version/config/locales/en.yml 2011-02-10 17:13:06.378200000 -0700
239 239
  field_due_date: Due date
240 240
  field_assigned_to: Assignee
241 241
  field_priority: Priority
242
  field_found_version: Found in version
242 243
  field_fixed_version: Target version
243 244
  field_user: User
244 245
  field_principal: Principal
redmine-1.1.0-found-version/db/migrate/20101114115360_add_found_version.rb 2011-02-10 17:13:06.393825200 -0700
1
class AddFoundVersion < 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