Removing surprise feature = autolink of stories while copying

pull/6827/head
Gregor Schmidt 13 years ago
parent 21010311f8
commit 7950fbea14
  1. 14
      lib/backlogs_issue_patch.rb
  2. 1
      spec/models/issue_spec.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)

@ -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

Loading…
Cancel
Save