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