I'm looking to migrate some links from one link module to another, because when the links were originally created, the project didn't think it through and kind of just threw them all in one link module. Now that we're trying to do some link analysis via DXL attributes we find that it's very difficult to isolate the test links we want for the analysis. Therefore, I was hoping to migrate all of the test links to a separate link module.
My script for migrating the links does the following:
I'm pretty sure this implementation is wrong, because I'm only creating/deleting links in the current versions of the formal modules in steps 3/4, but I just wanted to verify. Would I lose all baseline specific links created via baseline sets? If I were to skip Step 5 of deleting old linksets in the old link module, would all my baseline-specific links still live in the old link module, while the current links would live in the new link module?
I feel like I'm not quite understanding where Links actually live, is it in the link module or in the formal module? If they live in the link module, then how come when you load linksets in the link module, it seems you can't view link information for older baselines? Do the baseline-specific links not live in the link module?
Any help on these questions would be appreciated!
I assume you use DOORS 9.6.1 or later. In earlier versions, the behavior was, well, sort of "better", but partly inconsistent and difficult to understand, so IBM reworked it.
When you try to soft-delete the old link module, you get the warning "The Link module 'old lm' contains baselined linksets. Deleting this module may make some baselined links invisible." Still, after deletion the links are still visible in both, the baseline (sets) and the current module (should not all links have been moved to the new link module). Purging the old link module gives you the warning "The selection contains one or more Link modules. Purging will destroy all associated links." And in DOORS 9.6ff., this is exactly what happens, at least on the GUI and in DXL: links in baselines using the old link module cannot be accessed any more.
In "reality", i.e. on database level, the links still exist, because the links themselves are actually stored in the outgoing module, not in the link module, the information about the used link module is only a textual reference to the name of the link module. So, in earlier versions of DOORS you could still see that links existed and iterate over them, but nowadays, this information is inaccessible for you. You can still see a remembrance of what "really" happens when you try to delete a link set in the module explorer of a link set, the warning says "You are about to delete linkset xx -> yy. This will delete all links between the current version of the source module and any version of the target module, including link attributes"
So, since it is DOORS' philosophy that frozen baselines cannot be changed and thus, it shall also not be possible to change link information for baselines, your approach should be to