create duplicate nodes
Allow an author to create a duplicate node: Node->Duplicate Node. Creates an identical copy of the node, including copies of the text, node rules, links and link rules, plus any conditions and actions on those rules. New node should be named same as old node plus " copy". (Not sure about naming of contained links, rules, conditions and actions...)
Blueprint information
- Status:
- Complete
- Approver:
- None
- Priority:
- Medium
- Drafter:
- None
- Direction:
- Needs approval
- Assignee:
- teongleong
- Definition:
- New
- Series goal:
- Accepted for 2.2
- Implementation:
- Implemented
- Milestone target:
- 2.2a6
- Started by
- teongleong
- Completed by
- teongleong
Related branches
Related bugs
Sprints
Whiteboard
Note: this has been put down as a feature for 2.2, try to implement if there's time.
{ Documentation of duplication use of single offset }
Duplication use the one used by import to assign object ID so as to avoid conflict of objectID of the new duplicated ID.
The idea that we should offset the whole set of objects' ID by a fixed number comes from the fact that we needed to make sure new links point to the new nodes instead of the existing objects whatever they are when we import or duplicate.
For example...
Two nodes with a link in between them would be duplicated such that the new link, created alongside the two new nodes, still joins the two new nodes (instead of pointing to the old node that we are duplicating)
suppose we have used up ID up till the number 10 and we are importing a file with node A with ID (1) node B with ID (2) and link C with ID (3) going from nodeA to nodeB
To ensure we have ID that do not conflict we simply add 10 to all of them so that nodeA (11) nodeB (12) linkC (13) and more importantly, linkC's destination is easily determined to be 12
However if we just create new nodes and link, we have no idea which node took the ID 11 and 12 so we do no know what is the destination.
That is the key use of the single offset, with it we know for sure their ID relative to each other.
{ action flow }
We should decide how to map keys or actions to this procedure. For now it is in the Edit menu bar for duplicating node.
There is no way of duplicating links, rules, actions, conditions individually, we should think about how that should be achieved through the UI.
{ Future work }
As of now there is no way of doing multiple selection therefore, duplication (as of now) would not allow us to duplicate multiple objects such as the case above.
Note: Follow link action is also the only action so far that requires us to redirect the target of the action (similar to import)