Work package cloning incorrectly clones module related custom activities linked to the original module
The functionality should clone custom activities with no module links.
It should then carefully copy module related custom activities converting the module link to the new module.
Currently it will duplicate activities in the original work package.
#7 Updated by Colin Turner about 2 years ago
- % Done changed from 0 to 20
- Target version changed from 1.2.0 to 2.0.0
- Estimated time changed from 1.50 h to 4.00 h
Dialog box for cloning needs to include:
- Activities not within modules or automatically generated (Custom, manual activities)
- Modules (and sub choices for ModuleStaff and Module related Activities)
- List all Activities generated by a Generator (not Project), allow each to be copied, with select all or deselect all options
(this last point needs some research to see how it can be done in Django).
The algorithm for the clone should:
- Copy Activities not associated with a Module or an ActivitySet
- Copy the Modules
- For each Module, copy across linked Activities, correcting their linked Module key
- For each Module, copy across linked ModuleStaff allocations, correcting their linked Module key
- For each Module, copy across selected generated activities, copy the activity, relinking the package and module and creating another ActivitySet?
- Do the same for generated activities not linked to a Module.
Likely issues, this requires reordering of the Python Django model classes, and I'm worried it will create a circular dependency. Can we resolve this by devolving some cloning activities to other models? No, because we'd have to reference the other Model...