Executive summary
Sometimes bugs, todo, etc are posted in the wrong tracker and we want to move them around in another tracker (possibly in another project).
Challenge for Tuleap: as trackers can be really different: how do we manage to move things around.
Feature is intended to move an artifact from one tracker to another while keeping the original artifact id and a minimal amount of information to make it useful.
Non goals: support move in any kind of situation where trackers differs completly or scary things like moving a user story with parent epic and bunch of tasks to a sprint tracker.
Proposal
User that attempt to move must be admin of both source and destination trackers. Permissions might be relaxed later on.
First step would support the ability to move across trackers (within or cross project) while keeping:
- Artifact id
- Submitted date
- Submitter user
- Then, based on Semantics (assuming that Semantics are defined in source and destination trackers)
- Title
- Description
- Status
- With duck typing (ie. is strings are matching) otherwise => None
- Assigned to
- Move "as much as possible", if a user is not part of the target group, he is silently ignored.
- Initial effort (as long as source and destination target fields have the same type)
- Both int: take value
- Both fload: take value
- Both selectbox: duck typing (as status)
- Both computed field: take value
- Follow-up comments (with actual comments, not fields changes)
- With contents, user and dates
General note: if for whatever reason the move is not possible, there should be a very clear error message given to user.
All other informations from source artifact will be lost forever.
Edge cases
Constraints on destination, like destination fields that are required but no value on source (also applies for workflow, field dependencies, etc):
- The value is imported "as is".
- Once imported, when someone will try to update the artifact they will have to pick-up a value for required fields that are empty
- It's the same behaviour than when tracker admin set a new constraint on field with existing data in the tracker
Management of links is source of issues. Only cross references are kept (art #id):
- artifact with links (either forward or reverse) cannot be moved.
- artifact connected to FRS releases cannot be moved.
Informations related to artifact are lost
- Notification preferences
- ...
Global ranking (artifacts relative priority) is conserved.
As move is a destructive operation, the limits set on Delete operations (see story #11196) are applied on move. The threshold will count move and delete as same operation.
Need
- Propose a UI to
- Chose move action
- Select the target tracker
- Intermediate screen for move (esp. to show what matches and what will be lost)
Technical & functional details
We intend to leverage on XML export/import, the global process for move should be:
- XML export of artifact (with current computed value for computed fields)
- Delete in DB (need to check current impl to ensure everything is purged, including visited items, computation caches, etc)
- Transform XML to match target tracker structure + limitation set above
- Import XML with existing ID
Those 4 steps enclosed in a transaction to ensure consistency.
Note: the XML export artifact can be saved somewhere (maybe handled by archivedeleteditems plugin) for an possible re-import.