Index: config/locales/fr.yml =================================================================== --- config/locales/fr.yml (révision 9247) +++ config/locales/fr.yml (copie de travail) @@ -252,6 +252,7 @@ field_due_date: EchĂ©ance field_assigned_to: AssignĂ© Ă  field_priority: PrioritĂ© + field_found_version: DĂ©tĂ©ctĂ© dans Version field_fixed_version: Version cible field_user: Utilisateur field_role: RĂ´le Index: config/locales/en.yml =================================================================== --- config/locales/en.yml (révision 9247) +++ config/locales/en.yml (copie de travail) @@ -244,6 +244,7 @@ field_due_date: Due date field_assigned_to: Assignee field_priority: Priority + field_found_version: Detected version field_fixed_version: Target version field_user: User field_principal: Principal Index: app/helpers/issues_helper.rb =================================================================== --- app/helpers/issues_helper.rb (révision 9247) +++ app/helpers/issues_helper.rb (copie de travail) @@ -172,7 +172,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) Index: app/models/project.rb =================================================================== --- app/models/project.rb (révision 9247) +++ app/models/project.rb (copie de travail) @@ -727,8 +727,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 Index: app/models/query.rb =================================================================== --- app/models/query.rb (révision 9247) +++ app/models/query.rb (copie de travail) @@ -144,6 +144,7 @@ QueryColumn.new(:assigned_to, :sortable => lambda {User.fields_for_order_statement}, :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"), @@ -220,13 +221,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 => :float, :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 }} principals = [] if project @@ -265,7 +266,7 @@ @available_filters["assigned_to_role"] = { :type => :list_optional, :order => 7, :values => role_values } unless role_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 @@ -276,7 +277,8 @@ end versions = project.shared_versions.all unless versions.empty? - @available_filters["fixed_version_id"] = { :type => :list_optional, :order => 7, :values => versions.sort.collect{|s| ["#{s.project.name} - #{s.name}", s.id.to_s] } } + @available_filters["found_version_id"] = { :type => :list_optional, :order => 7, :values => versions.sort.collect{|s| ["#{s.project.name} - #{s.name}", s.id.to_s] } } + @available_filters["fixed_version_id"] = { :type => :list_optional, :order => 8, :values => versions.sort.collect{|s| ["#{s.project.name} - #{s.name}", s.id.to_s] } } end unless project.leaf? subprojects = project.descendants.visible.all @@ -289,7 +291,8 @@ # 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})) end Index: app/models/mail_handler.rb =================================================================== --- app/models/mail_handler.rb (révision 9247) +++ app/models/mail_handler.rb (copie de travail) @@ -269,6 +269,7 @@ 'priority_id' => (k = get_keyword(:priority)) && IssuePriority.named(k).first.try(:id), 'category_id' => (k = get_keyword(:category)) && issue.project.issue_categories.named(k).first.try(:id), 'assigned_to_id' => assigned_to.try(:id), + 'found_version_id' => (k = get_keyword(:found_version, :override => true)) && issue.project.shared_versions.named(k).first.try(:id), 'fixed_version_id' => (k = get_keyword(:fixed_version, :override => true)) && issue.project.shared_versions.named(k).first.try(:id), 'start_date' => get_keyword(:start_date, :override => true, :format => '\d{4}-\d{2}-\d{2}'), 'due_date' => get_keyword(:due_date, :override => true, :format => '\d{4}-\d{2}-\d{2}'), Index: app/models/issue.rb =================================================================== --- app/models/issue.rb (révision 9247) +++ app/models/issue.rb (copie de travail) @@ -23,6 +23,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 => 'Principal', :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' @@ -54,7 +55,8 @@ 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 validates_numericality_of :estimated_hours, :allow_nil => true @@ -164,7 +166,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 @@ -260,6 +266,7 @@ 'category_id', 'assigned_to_id', 'priority_id', + 'found_version_id', 'fixed_version_id', 'subject', 'description', @@ -351,8 +358,15 @@ 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 :base, I18n.t(:error_can_not_reopen_issue_on_closed_version) @@ -456,11 +470,16 @@ 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 + [Version.find_by_id(fixed_version_id_was)]).compact.uniq.sort + end + # Returns true if this issue is blocked by another issue that is still open def blocked? !relations_to.detect {|ir| ir.relation_type == 'blocks' && !ir.issue_from.closed?}.nil? @@ -644,6 +663,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 @@ -680,8 +700,14 @@ :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) end @@ -850,6 +876,22 @@ 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 Index: app/models/version.rb =================================================================== --- app/models/version.rb (révision 9247) +++ app/models/version.rb (copie de travail) @@ -19,6 +19,7 @@ include Redmine::SafeAttributes 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, @@ -36,6 +37,8 @@ named_scope :named, lambda {|arg| { :conditions => ["LOWER(#{table_name}.name) = LOWER(?)", arg.to_s.strip]}} 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) } } Index: app/controllers/versions_controller.rb =================================================================== --- app/controllers/versions_controller.rb (révision 9247) +++ app/controllers/versions_controller.rb (copie de travail) @@ -151,7 +151,7 @@ verify :method => :delete, :only => :destroy, :render => {:nothing => true, :status => :method_not_allowed } def destroy - if @version.fixed_issues.empty? + if @version.found_issues.empty? && @version.fixed_issues.empty? @version.destroy respond_to do |format| format.html { redirect_back_or_default :controller => 'projects', :action => 'settings', :tab => 'versions', :id => @project } Index: app/controllers/issues_controller.rb =================================================================== --- app/controllers/issues_controller.rb (révision 9247) +++ app/controllers/issues_controller.rb (copie de travail) @@ -82,7 +82,7 @@ @issue_count = @query.issue_count @issue_pages = Paginator.new self, @issue_count, @limit, params['page'] @offset ||= @issue_pages.current.offset - @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 => @offset, :limit => @limit) Index: app/controllers/reports_controller.rb =================================================================== --- app/controllers/reports_controller.rb (révision 9247) +++ app/controllers/reports_controller.rb (copie de travail) @@ -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 Index: app/controllers/issue_moves_controller.rb =================================================================== --- app/controllers/issue_moves_controller.rb (révision 9247) +++ app/controllers/issue_moves_controller.rb (copie de travail) @@ -70,13 +70,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 Index: app/views/issues/show.html.erb =================================================================== --- app/views/issues/show.html.erb (révision 9247) +++ app/views/issues/show.html.erb (copie de travail) @@ -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) %> Index: app/views/issues/_attributes.html.erb =================================================================== --- app/views/issues/_attributes.html.erb (révision 9247) +++ app/views/issues/_attributes.html.erb (copie de travail) @@ -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]', Index: app/views/issues/index.api.rsb =================================================================== --- app/views/issues/index.api.rsb (révision 9247) +++ app/views/issues/index.api.rsb (copie de travail) @@ -9,7 +9,8 @@ api.author(:id => issue.author_id, :name => issue.author.name) unless issue.author.nil? api.assigned_to(:id => issue.assigned_to_id, :name => issue.assigned_to.name) unless issue.assigned_to.nil? api.category(:id => issue.category_id, :name => issue.category.name) unless issue.category.nil? - api.fixed_version(:id => issue.fixed_version_id, :name => issue.fixed_version.name) unless issue.fixed_version.nil? + api.found_version(:id => issue.found_version_id, :name => issue.found_version.name) unless issue.found_version.nil? + api.fixed_version(:id => issue.fixed_version_id, :name => issue.fixed_version.name) unless issue.fixed_version.nil? api.parent(:id => issue.parent_id) unless issue.parent.nil? api.subject issue.subject Index: app/views/issues/bulk_edit.html.erb =================================================================== --- app/views/issues/bulk_edit.html.erb (révision 9247) +++ app/views/issues/bulk_edit.html.erb (copie de travail) @@ -40,10 +40,16 @@ <% #TODO: allow editing versions when multiple projects %> <% if @project %>

+ + <%= 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') + - version_options_for_select(@project.shared_versions.open.sort)) %> + version_options_for_select(@project.shared_versions.open)) %>

<% end %> Index: app/views/issues/show.api.rsb =================================================================== --- app/views/issues/show.api.rsb (révision 9247) +++ app/views/issues/show.api.rsb (copie de travail) @@ -7,6 +7,7 @@ api.author(:id => @issue.author_id, :name => @issue.author.name) unless @issue.author.nil? api.assigned_to(:id => @issue.assigned_to_id, :name => @issue.assigned_to.name) unless @issue.assigned_to.nil? api.category(:id => @issue.category_id, :name => @issue.category.name) unless @issue.category.nil? + api.found_version(:id => @issue.found_version_id, :name => @issue.found_version.name) unless @issue.found_version.nil? api.fixed_version(:id => @issue.fixed_version_id, :name => @issue.fixed_version.name) unless @issue.fixed_version.nil? api.parent(:id => @issue.parent_id) unless @issue.parent.nil? Index: app/views/issues/_form_update.html.erb =================================================================== --- app/views/issues/_form_update.html.erb (révision 9247) +++ app/views/issues/_form_update.html.erb (copie de travail) @@ -7,8 +7,8 @@ <% if Issue.use_field_for_done_ratio? %>

<%= f.select :done_ratio, ((0..10).to_a.collect {|r| ["#{r*10} %", r*10] }) %>

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

<%= f.select :fixed_version_id, (@issue.assignable_versions.collect {|v| [v.name, v.id]}), :include_blank => true %>

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

<%= f.select :fixed_version_id, (@issue.fixed_assignable_versions.collect {|v| [v.name, v.id]}), :include_blank => true %>

<% end %> Index: app/views/issue_moves/new.html.erb =================================================================== --- app/views/issue_moves/new.html.erb (révision 9247) +++ app/views/issue_moves/new.html.erb (copie de travail) @@ -29,6 +29,12 @@ <%= select_tag('status_id', "" + options_from_collection_for_select(@available_statuses, :id, :name)) %>

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

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

+<% end %>

Index: app/views/reports/issue_report.html.erb =================================================================== --- app/views/reports/issue_report.html.erb (révision 9247) +++ app/views/reports/issue_report.html.erb (copie de travail) @@ -17,9 +17,12 @@

-

<%=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' %>

<%= render :partial => 'simple', :locals => { :data => @issues_by_subproject, :field_name => "project_id", :rows => @subprojects } %> Index: app/views/mailer/_issue.html.erb =================================================================== --- app/views/mailer/_issue.html.erb (révision 9247) +++ app/views/mailer/_issue.html.erb (copie de travail) @@ -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)%>: <%= issue.found_version %>
  • <%=l(:field_fixed_version)%>: <%=h issue.fixed_version %>
  • <% issue.custom_field_values.each do |c| %>
  • <%=h c.custom_field.name %>: <%=h show_value(c) %>
  • Index: app/views/mailer/_issue.text.erb =================================================================== --- app/views/mailer/_issue.text.erb (révision 9247) +++ app/views/mailer/_issue.text.erb (copie de travail) @@ -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_field_values.each do |c| %><%= c.custom_field.name %>: <%= show_value(c) %> <% end %> Index: db/migrate/20120328183300_add_found_version.rb =================================================================== +++ db/migrate/20120328183300_add_found_version.rb 2011-02-10 17:13:06.393825200 -0700 @@ -0,0 +1,11 @@ +class AddFoundVersion < 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