File tree Expand file tree Collapse file tree
modules/backlogs/lib/open_project/backlogs/patches Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -38,16 +38,11 @@ module OpenProject::Backlogs::Patches::CopyServicePatch
3838
3939 module ClassMethods
4040 def copy_dependencies
41- super . tap do |dependencies |
42- index = dependencies . index ( ::Projects ::Copy ::WorkPackagesDependentService )
43- next unless index
44-
45- # Both must precede the work packages so their id maps are ready when the
46- # work packages are copied and their sprint/bucket ids remapped.
47- dependencies . insert ( index ,
48- ::Projects ::Copy ::SprintsDependentService ,
49- ::Projects ::Copy ::BacklogBucketsDependentService )
50- end
41+ # Sprints and backlog buckets must precede the `WorkPackagesDependentService`
42+ # so their id maps are ready when the work packages are copied and their
43+ # sprint/bucket ids remapped.
44+ [ ::Projects ::Copy ::SprintsDependentService ,
45+ ::Projects ::Copy ::BacklogBucketsDependentService ] + super
5146 end
5247 end
5348
You can’t perform that action at this time.
0 commit comments