diff -Nur redmine-1.0.4/app/controllers/issue_moves_controller.rb redmine-1.0.4-found-version/app/controllers/issue_moves_controller.rb --- redmine-1.0.4/app/controllers/issue_moves_controller.rb 2010-11-28 13:51:00.000000000 -0700 +++ redmine-1.0.4-found-version/app/controllers/issue_moves_controller.rb 2011-01-25 10:42:12.475908000 -0700 @@ -51,13 +51,14 @@ @target_project ||= @project @trackers = @target_project.trackers @available_statuses = Workflow.available_statuses(@project) + @found_versions = @target_project.shared_versions.locked @notes = params[:notes] @notes ||= '' end def extract_changed_attributes_for_move(params) changed_attributes = {} - [:assigned_to_id, :status_id, :start_date, :due_date, :priority_id].each do |valid_attribute| + [:assigned_to_id, :status_id, :found_version_id, :start_date, :due_date, :priority_id].each do |valid_attribute| unless params[valid_attribute].blank? changed_attributes[valid_attribute] = (params[valid_attribute] == 'none' ? nil : params[valid_attribute]) end diff -Nur redmine-1.0.4/app/controllers/issues_controller.rb redmine-1.0.4-found-version/app/controllers/issues_controller.rb --- redmine-1.0.4/app/controllers/issues_controller.rb 2010-11-28 13:51:00.000000000 -0700 +++ redmine-1.0.4-found-version/app/controllers/issues_controller.rb 2011-01-25 10:41:31.819918200 -0700 @@ -74,7 +74,7 @@ @issue_count = @query.issue_count @issue_pages = Paginator.new self, @issue_count, limit, params['page'] - @issues = @query.issues(:include => [:assigned_to, :tracker, :priority, :category, :fixed_version], + @issues = @query.issues(:include => [:assigned_to, :tracker, :priority, :category, :found_version, :fixed_version], :order => sort_clause, :offset => @issue_pages.current.offset, :limit => limit) diff -Nur redmine-1.0.4/app/controllers/reports_controller.rb redmine-1.0.4-found-version/app/controllers/reports_controller.rb --- redmine-1.0.4/app/controllers/reports_controller.rb 2010-11-28 13:51:00.000000000 -0700 +++ redmine-1.0.4-found-version/app/controllers/reports_controller.rb 2011-01-25 10:41:31.819918200 -0700 @@ -29,7 +29,8 @@ @subprojects = @project.descendants.visible @issues_by_tracker = Issue.by_tracker(@project) - @issues_by_version = Issue.by_version(@project) + @issues_by_found_version = Issue.by_found_version(@project) + @issues_by_fixed_version = Issue.by_fixed_version(@project) @issues_by_priority = Issue.by_priority(@project) @issues_by_category = Issue.by_category(@project) @issues_by_assigned_to = Issue.by_assigned_to(@project) @@ -46,11 +47,16 @@ @rows = @project.trackers @data = Issue.by_tracker(@project) @report_title = l(:field_tracker) - when "version" + when "found_version" + @field = "found_version_id" + @rows = @project.shared_versions.sort + @data = Issue.by_found_version(@project) + @report_title = l(:field_found_version) + when "fixed_version" @field = "fixed_version_id" @rows = @project.shared_versions.sort - @data = Issue.by_version(@project) - @report_title = l(:field_version) + @data = Issue.by_fixed_version(@project) + @report_title = l(:field_fixed_version) when "priority" @field = "priority_id" @rows = IssuePriority.all diff -Nur redmine-1.0.4/app/helpers/issues_helper.rb redmine-1.0.4-found-version/app/helpers/issues_helper.rb --- redmine-1.0.4/app/helpers/issues_helper.rb 2010-11-28 13:51:00.000000000 -0700 +++ redmine-1.0.4-found-version/app/helpers/issues_helper.rb 2011-01-25 10:41:31.835543100 -0700 @@ -121,7 +121,7 @@ value = format_date(detail.value.to_date) if detail.value old_value = format_date(detail.old_value.to_date) if detail.old_value - when ['project_id', 'status_id', 'tracker_id', 'assigned_to_id', 'priority_id', 'category_id', 'fixed_version_id'].include?(detail.prop_key) + when ['project_id', 'status_id', 'tracker_id', 'assigned_to_id', 'priority_id', 'category_id', 'found_version_id', 'fixed_version_id'].include?(detail.prop_key) value = find_name_by_reflection(field, detail.value) old_value = find_name_by_reflection(field, detail.old_value) @@ -200,6 +200,7 @@ l(:field_subject), l(:field_assigned_to), l(:field_category), + l(:field_found_version), l(:field_fixed_version), l(:field_author), l(:field_start_date), @@ -227,6 +228,7 @@ issue.subject, issue.assigned_to, issue.category, + issue.found_version, issue.fixed_version, issue.author.name, format_date(issue.start_date), diff -Nur redmine-1.0.4/app/models/issue.rb redmine-1.0.4-found-version/app/models/issue.rb --- redmine-1.0.4/app/models/issue.rb 2010-11-28 13:51:00.000000000 -0700 +++ redmine-1.0.4-found-version/app/models/issue.rb 2011-01-25 10:43:22.553584500 -0700 @@ -21,6 +21,7 @@ belongs_to :status, :class_name => 'IssueStatus', :foreign_key => 'status_id' belongs_to :author, :class_name => 'User', :foreign_key => 'author_id' belongs_to :assigned_to, :class_name => 'User', :foreign_key => 'assigned_to_id' + belongs_to :found_version, :class_name => 'Version', :foreign_key => 'found_version_id' belongs_to :fixed_version, :class_name => 'Version', :foreign_key => 'fixed_version_id' belongs_to :priority, :class_name => 'IssuePriority', :foreign_key => 'priority_id' belongs_to :category, :class_name => 'IssueCategory', :foreign_key => 'category_id' @@ -52,6 +53,7 @@ attr_reader :current_journal validates_presence_of :subject, :priority, :project, :tracker, :author, :status + validates_presence_of :found_version, :unless => Proc.new { |issue| issue.found_assignable_versions.empty? } validates_length_of :subject, :maximum => 255 validates_inclusion_of :done_ratio, :in => 0..100 @@ -121,7 +123,11 @@ # reassign to the category with same name if any new_category = issue.category.nil? ? nil : new_project.issue_categories.find_by_name(issue.category.name) issue.category = new_category - # Keep the fixed_version if it's still valid in the new_project + # Keep the found version if it's still valid in the new_project + unless new_project.shared_versions.include?(issue.found_version) + issue.found_version = nil + end + # Keep the fixed version if it's still valid in the new_project unless new_project.shared_versions.include?(issue.fixed_version) issue.fixed_version = nil end @@ -204,6 +210,7 @@ category_id assigned_to_id priority_id + found_version_id fixed_version_id subject description @@ -273,8 +280,14 @@ errors.add :start_date, :invalid end + if found_version + if !found_assignable_versions.include?(found_version) + errors.add :found_version_id, :inclusion + end + end + if fixed_version - if !assignable_versions.include?(fixed_version) + if !fixed_assignable_versions.include?(fixed_version) errors.add :fixed_version_id, :inclusion elsif reopened? && fixed_version.closed? errors.add_to_base I18n.t(:error_can_not_reopen_issue_on_closed_version) @@ -370,9 +383,14 @@ users.uniq.sort end - # Versions that the issue can be assigned to - def assignable_versions - @assignable_versions ||= (project.shared_versions.open + [Version.find_by_id(fixed_version_id_was)]).compact.uniq.sort + # Versions that the issue can be assigned as fixed to + def found_assignable_versions + @found_assignable_versions ||= project.shared_versions.locked + end + + # Versions that the issue can be assigned as fixed to + def fixed_assignable_versions + @fixed_assignable_versions ||= project.shared_versions.open end # Returns true if this issue is blocked by another issue that is still open @@ -527,6 +545,7 @@ # Unassigns issues from +version+ if it's no longer shared with issue's project def self.update_versions_from_sharing_change(version) # Update issues assigned to the version + update_versions(["#{Issue.table_name}.found_version_id = ?", version.id]) update_versions(["#{Issue.table_name}.fixed_version_id = ?", version.id]) end @@ -563,7 +582,13 @@ :joins => Tracker.table_name) end - def self.by_version(project) + def self.by_found_version(project) + count_and_group_by(:project => project, + :field => 'found_version_id', + :joins => Version.table_name) + end + + def self.by_fixed_version(project) count_and_group_by(:project => project, :field => 'fixed_version_id', :joins => Version.table_name) @@ -739,6 +764,21 @@ issue.save end end + # Only need to update issues with a found_version from + # a different project and that is not systemwide shared + Issue.all(:conditions => merge_conditions("#{Issue.table_name}.found_version_id IS NOT NULL" + + " AND #{Issue.table_name}.project_id <> #{Version.table_name}.project_id" + + " AND #{Version.table_name}.sharing <> 'system'", + conditions), + :include => [:project, :found_version] + ).each do |issue| + next if issue.project.nil? || issue.found_version.nil? + unless issue.project.shared_versions.include?(issue.found_version) + issue.init_journal(User.current) + issue.found_version = nil + issue.save + end + end end # Callback on attachment deletion diff -Nur redmine-1.0.4/app/models/project.rb redmine-1.0.4-found-version/app/models/project.rb --- redmine-1.0.4/app/models/project.rb 2010-11-28 13:51:00.000000000 -0700 +++ redmine-1.0.4-found-version/app/models/project.rb 2011-01-25 10:41:31.866792900 -0700 @@ -587,8 +587,11 @@ new_issue = Issue.new new_issue.copy_from(issue) new_issue.project = self - # Reassign fixed_versions by name, since names are unique per + # Reassign versions by name, since names are unique per # project and the versions for self are not yet saved + if issue.found_version + new_issue.found_version = self.versions.select {|v| v.name == issue.found_version.name}.first + end if issue.fixed_version new_issue.fixed_version = self.versions.select {|v| v.name == issue.fixed_version.name}.first end diff -Nur redmine-1.0.4/app/models/query.rb redmine-1.0.4-found-version/app/models/query.rb --- redmine-1.0.4/app/models/query.rb 2010-11-28 13:51:00.000000000 -0700 +++ redmine-1.0.4-found-version/app/models/query.rb 2011-01-25 10:41:31.882417800 -0700 @@ -129,6 +129,7 @@ QueryColumn.new(:assigned_to, :sortable => ["#{User.table_name}.lastname", "#{User.table_name}.firstname", "#{User.table_name}.id"], :groupable => true), QueryColumn.new(:updated_on, :sortable => "#{Issue.table_name}.updated_on", :default_order => 'desc'), QueryColumn.new(:category, :sortable => "#{IssueCategory.table_name}.name", :groupable => true), + QueryColumn.new(:found_version, :sortable => ["#{Version.table_name}.effective_date", "#{Version.table_name}.name"], :default_order => 'desc', :groupable => true), QueryColumn.new(:fixed_version, :sortable => ["#{Version.table_name}.effective_date", "#{Version.table_name}.name"], :default_order => 'desc', :groupable => true), QueryColumn.new(:start_date, :sortable => "#{Issue.table_name}.start_date"), QueryColumn.new(:due_date, :sortable => "#{Issue.table_name}.due_date"), @@ -174,13 +175,13 @@ @available_filters = { "status_id" => { :type => :list_status, :order => 1, :values => IssueStatus.find(:all, :order => 'position').collect{|s| [s.name, s.id.to_s] } }, "tracker_id" => { :type => :list, :order => 2, :values => trackers.collect{|s| [s.name, s.id.to_s] } }, "priority_id" => { :type => :list, :order => 3, :values => IssuePriority.all.collect{|s| [s.name, s.id.to_s] } }, - "subject" => { :type => :text, :order => 8 }, - "created_on" => { :type => :date_past, :order => 9 }, - "updated_on" => { :type => :date_past, :order => 10 }, - "start_date" => { :type => :date, :order => 11 }, - "due_date" => { :type => :date, :order => 12 }, - "estimated_hours" => { :type => :integer, :order => 13 }, - "done_ratio" => { :type => :integer, :order => 14 }} + "subject" => { :type => :text, :order => 9 }, + "created_on" => { :type => :date_past, :order => 10 }, + "updated_on" => { :type => :date_past, :order => 11 }, + "start_date" => { :type => :date, :order => 12 }, + "due_date" => { :type => :date, :order => 13 }, + "estimated_hours" => { :type => :integer, :order => 14 }, + "done_ratio" => { :type => :integer, :order => 15 }} user_values = [] user_values << ["<< #{l(:label_me)} >>", "me"] if User.current.logged? @@ -197,7 +198,7 @@ @available_filters["author_id"] = { :type => :list, :order => 5, :values => user_values } unless user_values.empty? if User.current.logged? - @available_filters["watcher_id"] = { :type => :list, :order => 15, :values => [["<< #{l(:label_me)} >>", "me"]] } + @available_filters["watcher_id"] = { :type => :list, :order => 16, :values => [["<< #{l(:label_me)} >>", "me"]] } end if project @@ -206,17 +207,19 @@ @available_filters["category_id"] = { :type => :list_optional, :order => 6, :values => @project.issue_categories.collect{|s| [s.name, s.id.to_s] } } end unless @project.shared_versions.empty? - @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] } } + @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] } } + @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] } } end unless @project.descendants.active.empty? - @available_filters["subproject_id"] = { :type => :list_subprojects, :order => 13, :values => @project.descendants.visible.collect{|s| [s.name, s.id.to_s] } } + @available_filters["subproject_id"] = { :type => :list_subprojects, :order => 14, :values => @project.descendants.visible.collect{|s| [s.name, s.id.to_s] } } end add_custom_fields_filters(@project.all_issue_custom_fields) else # global filters for cross project issue list system_shared_versions = Version.visible.find_all_by_sharing('system') unless system_shared_versions.empty? - @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] } } + @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] } } + @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] } } end add_custom_fields_filters(IssueCustomField.find(:all, :conditions => {:is_filter => true, :is_for_all => true})) # project filter diff -Nur redmine-1.0.4/app/models/version.rb redmine-1.0.4-found-version/app/models/version.rb --- redmine-1.0.4/app/models/version.rb 2010-11-28 13:51:00.000000000 -0700 +++ redmine-1.0.4-found-version/app/models/version.rb 2011-01-25 10:41:31.898042700 -0700 @@ -18,6 +18,7 @@ class Version < ActiveRecord::Base after_update :update_issues_from_sharing_change belongs_to :project + has_many :found_issues, :class_name => 'Issue', :foreign_key => 'found_version_id', :dependent => :nullify has_many :fixed_issues, :class_name => 'Issue', :foreign_key => 'fixed_version_id', :dependent => :nullify acts_as_customizable acts_as_attachable :view_permission => :view_files, @@ -34,6 +35,8 @@ validates_inclusion_of :sharing, :in => VERSION_SHARINGS named_scope :open, :conditions => {:status => 'open'} + named_scope :locked, :conditions => {:status => 'locked'} + named_scope :closed, :conditions => {:status => 'closed'} named_scope :visible, lambda {|*args| { :include => :project, :conditions => Project.allowed_to_condition(args.first || User.current, :view_issues) } } diff -Nur redmine-1.0.4/app/views/issue_moves/new.rhtml redmine-1.0.4-found-version/app/views/issue_moves/new.rhtml --- redmine-1.0.4/app/views/issue_moves/new.rhtml 2010-11-28 13:51:00.000000000 -0700 +++ redmine-1.0.4-found-version/app/views/issue_moves/new.rhtml 2011-01-25 10:42:44.413203600 -0700 @@ -28,6 +28,13 @@ options_from_collection_for_select(@target_project.assignable_users, :id, :name)) %>

+<% if !@found_versions.empty? %> +

+ + <%= select_tag('new_found_version_id', "" + options_from_collection_for_select(@found_versions, :id, :name)) %> +

+<% end %> +

<%= select_tag('status_id', "" + options_from_collection_for_select(@available_statuses, :id, :name)) %> diff -Nur redmine-1.0.4/app/views/issues/_attributes.rhtml redmine-1.0.4-found-version/app/views/issues/_attributes.rhtml --- redmine-1.0.4/app/views/issues/_attributes.rhtml 2010-11-28 13:51:00.000000000 -0700 +++ redmine-1.0.4-found-version/app/views/issues/_attributes.rhtml 2011-01-25 10:41:31.929292500 -0700 @@ -18,8 +18,11 @@ :title => l(:label_issue_category_new), :tabindex => 199) if authorize_for('issue_categories', 'new') %>

<% end %> -<% unless @issue.assignable_versions.empty? %> -

<%= f.select :fixed_version_id, version_options_for_select(@issue.assignable_versions, @issue.fixed_version), :include_blank => true %> +<% unless @issue.found_assignable_versions.empty? %> +

<%= f.select :found_version_id, version_options_for_select(@issue.found_assignable_versions, @issue.found_version), :include_blank => true, :required => true %>

+<% end %> +<% unless @issue.fixed_assignable_versions.empty? %> +

<%= f.select :fixed_version_id, version_options_for_select(@issue.fixed_assignable_versions, @issue.fixed_version), :include_blank => true %> <%= prompt_to_remote(image_tag('add.png', :style => 'vertical-align: middle;'), l(:label_version_new), 'version[name]', diff -Nur redmine-1.0.4/app/views/issues/bulk_edit.rhtml redmine-1.0.4-found-version/app/views/issues/bulk_edit.rhtml --- redmine-1.0.4/app/views/issues/bulk_edit.rhtml 2011-01-21 17:41:27.794706700 -0700 +++ redmine-1.0.4-found-version/app/views/issues/bulk_edit.rhtml 2011-01-25 10:41:31.929292500 -0700 @@ -36,6 +36,12 @@ options_from_collection_for_select(@project.issue_categories, :id, :name)) %>

+ + <%= select_tag('issue[found_version_id]', content_tag('option', l(:label_no_change_option), :value => '') + + content_tag('option', l(:label_none), :value => 'none') + + version_options_for_select(@project.shared_versions.locked)) %> +

+

<%= select_tag('issue[fixed_version_id]', content_tag('option', l(:label_no_change_option), :value => '') + content_tag('option', l(:label_none), :value => 'none') + diff -Nur redmine-1.0.4/app/views/issues/index.xml.builder redmine-1.0.4-found-version/app/views/issues/index.xml.builder --- redmine-1.0.4/app/views/issues/index.xml.builder 2010-11-28 13:51:00.000000000 -0700 +++ redmine-1.0.4-found-version/app/views/issues/index.xml.builder 2011-01-25 10:41:31.944917400 -0700 @@ -10,6 +10,7 @@ xml.author(:id => issue.author_id, :name => issue.author.name) unless issue.author.nil? xml.assigned_to(:id => issue.assigned_to_id, :name => issue.assigned_to.name) unless issue.assigned_to.nil? xml.category(:id => issue.category_id, :name => issue.category.name) unless issue.category.nil? + xml.found_version(:id => issue.found_version_id, :name => issue.found_version.name) unless issue.found_version.nil? xml.fixed_version(:id => issue.fixed_version_id, :name => issue.fixed_version.name) unless issue.fixed_version.nil? xml.parent(:id => issue.parent_id) unless issue.parent.nil? diff -Nur redmine-1.0.4/app/views/issues/show.rhtml redmine-1.0.4-found-version/app/views/issues/show.rhtml --- redmine-1.0.4/app/views/issues/show.rhtml 2010-11-28 13:51:00.000000000 -0700 +++ redmine-1.0.4-found-version/app/views/issues/show.rhtml 2011-01-25 10:41:31.960542300 -0700 @@ -36,11 +36,14 @@ <% end %> - <%=l(:field_fixed_version)%>:<%= @issue.fixed_version ? link_to_version(@issue.fixed_version) : "-" %> + <%=l(:field_found_version)%>:<%= @issue.found_version ? link_to_version(@issue.found_version) : "-" %> <% if @issue.estimated_hours %> <%=l(:field_estimated_hours)%>:<%= l_hours(@issue.estimated_hours) %> <% end %> + + <%=l(:field_fixed_version)%>:<%= @issue.fixed_version ? link_to_version(@issue.fixed_version) : "-" %> + <%= render_custom_fields_rows(@issue) %> <%= call_hook(:view_issues_show_details_bottom, :issue => @issue) %> diff -Nur redmine-1.0.4/app/views/issues/show.xml.builder redmine-1.0.4-found-version/app/views/issues/show.xml.builder --- redmine-1.0.4/app/views/issues/show.xml.builder 2010-11-28 13:51:00.000000000 -0700 +++ redmine-1.0.4-found-version/app/views/issues/show.xml.builder 2011-01-25 10:41:31.960542300 -0700 @@ -8,6 +8,7 @@ xml.author(:id => @issue.author_id, :name => @issue.author.name) unless @issue.author.nil? xml.assigned_to(:id => @issue.assigned_to_id, :name => @issue.assigned_to.name) unless @issue.assigned_to.nil? xml.category(:id => @issue.category_id, :name => @issue.category.name) unless @issue.category.nil? + xml.found_version(:id => @issue.found_version_id, :name => @issue.found_version.name) unless @issue.found_version.nil? xml.fixed_version(:id => @issue.fixed_version_id, :name => @issue.fixed_version.name) unless @issue.fixed_version.nil? xml.parent(:id => @issue.parent_id) unless @issue.parent.nil? diff -Nur redmine-1.0.4/app/views/mailer/_issue_text_html.rhtml redmine-1.0.4-found-version/app/views/mailer/_issue_text_html.rhtml --- redmine-1.0.4/app/views/mailer/_issue_text_html.rhtml 2010-11-28 13:51:00.000000000 -0700 +++ redmine-1.0.4-found-version/app/views/mailer/_issue_text_html.rhtml 2011-01-25 10:41:31.976167200 -0700 @@ -6,6 +6,7 @@

  • <%=l(:field_priority)%>: <%=h issue.priority %>
  • <%=l(:field_assigned_to)%>: <%=h issue.assigned_to %>
  • <%=l(:field_category)%>: <%=h issue.category %>
  • +
  • <%=l(:field_found_version)%>: <%=h issue.found_version %>
  • <%=l(:field_fixed_version)%>: <%=h issue.fixed_version %>
  • <% issue.custom_values.each do |c| %>
  • <%=h c.custom_field.name %>: <%=h show_value(c) %>
  • diff -Nur redmine-1.0.4/app/views/mailer/_issue_text_plain.rhtml redmine-1.0.4-found-version/app/views/mailer/_issue_text_plain.rhtml --- redmine-1.0.4/app/views/mailer/_issue_text_plain.rhtml 2010-11-28 13:51:00.000000000 -0700 +++ redmine-1.0.4-found-version/app/views/mailer/_issue_text_plain.rhtml 2011-01-25 10:41:31.991792100 -0700 @@ -6,6 +6,7 @@ <%=l(:field_priority)%>: <%= issue.priority %> <%=l(:field_assigned_to)%>: <%= issue.assigned_to %> <%=l(:field_category)%>: <%= issue.category %> +<%=l(:field_found_version)%>: <%= issue.found_version %> <%=l(:field_fixed_version)%>: <%= issue.fixed_version %> <% issue.custom_values.each do |c| %><%= c.custom_field.name %>: <%= show_value(c) %> <% end %> diff -Nur redmine-1.0.4/app/views/reports/issue_report.rhtml redmine-1.0.4-found-version/app/views/reports/issue_report.rhtml --- redmine-1.0.4/app/views/reports/issue_report.rhtml 2010-11-28 13:51:00.000000000 -0700 +++ redmine-1.0.4-found-version/app/views/reports/issue_report.rhtml 2011-01-25 10:41:31.991792100 -0700 @@ -17,8 +17,11 @@
    -

    <%=l(:field_version)%>  <%= link_to image_tag('zoom_in.png'), :action => 'issue_report_details', :detail => 'version' %>

    -<%= render :partial => 'simple', :locals => { :data => @issues_by_version, :field_name => "fixed_version_id", :rows => @versions } %> +

    <%=l(:field_found_version)%>  <%= link_to image_tag('zoom_in.png'), :action => 'issue_report_details', :detail => 'found_version' %>

    +<%= render :partial => 'simple', :locals => { :data => @issues_by_found_version, :field_name => "found_version_id", :rows => @versions } %> +
    +

    <%=l(:field_fixed_version)%>  <%= link_to image_tag('zoom_in.png'), :action => 'issue_report_details', :detail => 'fixed_version' %>

    +<%= render :partial => 'simple', :locals => { :data => @issues_by_fixed_version, :field_name => "fixed_version_id", :rows => @versions } %>
    <% if @project.children.any? %>

    <%=l(:field_subproject)%>  <%= link_to image_tag('zoom_in.png'), :action => 'issue_report_details', :detail => 'subproject' %>

    diff -Nur redmine-1.0.4/config/locales/en.yml redmine-1.0.4-found-version/config/locales/en.yml --- redmine-1.0.4/config/locales/en.yml 2010-11-28 13:52:00.000000000 -0700 +++ redmine-1.0.4-found-version/config/locales/en.yml 2011-01-25 10:41:32.007417000 -0700 @@ -233,6 +233,7 @@ field_due_date: Due date field_assigned_to: Assigned to field_priority: Priority + field_found_version: Found in version field_fixed_version: Target version field_user: User field_principal: Principal diff -Nur redmine-1.0.4/db/migrate/20100819172913_add_found_version.rb redmine-1.0.4-found-version/db/migrate/20100819172913_add_found_version.rb --- redmine-1.0.4/db/migrate/20100819172913_add_found_version.rb 1969-12-31 17:00:00.000000000 -0700 +++ redmine-1.0.4-found-version/db/migrate/20100819172913_add_found_version.rb 2011-01-25 10:41:32.023041900 -0700 @@ -0,0 +1,11 @@ +class AddFoundInVersion < ActiveRecord::Migration + def self.up + add_column :issues, :found_version_id, :integer + add_index :issues, :found_version_id + end + + def self.down + remove_index :issues, :found_version_id + remove_column :issues, :found_version_id + end +end