From 7950fbea14369a2cf6534a71438b53dce9d49525 Mon Sep 17 00:00:00 2001 From: Gregor Schmidt Date: Tue, 11 Oct 2011 15:31:17 +0200 Subject: [PATCH] Removing surprise feature = autolink of stories while copying --- lib/backlogs_issue_patch.rb | 14 -------------- spec/models/issue_spec.rb | 1 - 2 files changed, 15 deletions(-) diff --git a/lib/backlogs_issue_patch.rb b/lib/backlogs_issue_patch.rb index 1000a92d44..9d5525e1f2 100644 --- a/lib/backlogs_issue_patch.rb +++ b/lib/backlogs_issue_patch.rb @@ -9,7 +9,6 @@ module Backlogs base.class_eval do unloadable - alias_method_chain :move_to_project_without_transaction, :autolink alias_method_chain :recalculate_attributes_for, :remaining_hours before_validation :backlogs_before_validation, :if => lambda {|i| i.project && i.project.module_enabled?("backlogs")} @@ -74,19 +73,6 @@ module Backlogs end module InstanceMethods - def move_to_project_without_transaction_with_autolink(new_project, new_tracker = nil, options = {}) - newissue = move_to_project_without_transaction_without_autolink(new_project, new_tracker, options) - - if !!newissue and self.project_id == newissue.project_id and self.is_story? and newissue.is_story? and self.id != newissue.id - relation = IssueRelation.new :relation_type => IssueRelation::TYPE_DUPLICATES - relation.issue_from = self - relation.issue_to = newissue - relation.save - end - - return newissue - end - def journalized_update_attributes!(attribs) init_journal(User.current) update_attributes!(attribs) diff --git a/spec/models/issue_spec.rb b/spec/models/issue_spec.rb index aff701e107..e5b0239f4f 100644 --- a/spec/models/issue_spec.rb +++ b/spec/models/issue_spec.rb @@ -4,7 +4,6 @@ describe Issue do describe 'behavior for #3200' do before(:each) do @example = Issue.new - @example.stub(:move_to_project_without_transaction_without_autolink).and_return(false) end it do