|
|
@ -48,6 +48,7 @@ module Principals |
|
|
|
rewrite_assigned_to(from, to) |
|
|
|
rewrite_assigned_to(from, to) |
|
|
|
rewrite_responsible(from, to) |
|
|
|
rewrite_responsible(from, to) |
|
|
|
rewrite_actor(from, to) |
|
|
|
rewrite_actor(from, to) |
|
|
|
|
|
|
|
rewrite_owner(from, to) |
|
|
|
end |
|
|
|
end |
|
|
|
|
|
|
|
|
|
|
|
def rewrite_custom_value(from, to) |
|
|
|
def rewrite_custom_value(from, to) |
|
|
@ -107,6 +108,12 @@ module Principals |
|
|
|
end |
|
|
|
end |
|
|
|
end |
|
|
|
end |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
def rewrite_owner(from, to) |
|
|
|
|
|
|
|
[::Doorkeeper::Application].each do |klass| |
|
|
|
|
|
|
|
klass.where(owner_id: from.id).update_all(owner_id: to.id) |
|
|
|
|
|
|
|
end |
|
|
|
|
|
|
|
end |
|
|
|
|
|
|
|
|
|
|
|
def rewrite_assigned_to(from, to) |
|
|
|
def rewrite_assigned_to(from, to) |
|
|
|
[WorkPackage].each do |klass| |
|
|
|
[WorkPackage].each do |klass| |
|
|
|
klass.where(assigned_to_id: from.id).update_all(assigned_to_id: to.id) |
|
|
|
klass.where(assigned_to_id: from.id).update_all(assigned_to_id: to.id) |
|
|
|