It's all about the answers!

Ask a question

Migrating Items from one project area to another: Linking new items to the old ones

Daniel Llin Ferrero (3128) | asked Nov 18 '16, 5:32 a.m.
edited Nov 18 '16, 5:33 a.m.
we have an old project area and a new project area on the same server.
Now we want to migrate some items from the old one into the new one.

The basic concept is to export the wanted items via a query into a CSV file, and to import them into the new area by the help of a mapping file that translates between the different attribute names and some values.

To keep a better traceability, we want to automatically create a link from the new items to the old one. The concept was to export the Id and to map the Id attribute to a relation attribute like:

<attribute sourceId="Id" targetId=""/>
The problem now is, that RTC exports the IDs without a leading # but expects a leading # for imported link-IDs. If I add the leading #'s by hand in the exported CSV file, everything works.

So, the question is: How can I tell RTC to either export the item IDs with a leading # or to accept the IDs of the link targets without a leading #?

Maybe there also exists a solution to do something like this in the mapping files. Is it - for example - possible, to do define RegExs to map the a value from the source to the target? (That would be a great feature anyway....)

Thanks and Regards,

2 answers

permanent link
Ralph Schoon (62.3k33643) | answered Nov 18 '16, 6:52 a.m.
As far as I can tell, there is no automation to add the #. You have to do that yourself.

Daniel Llin Ferrero commented Nov 18 '16, 7:03 a.m.

 Hi Ralph,

thanks for the quick reply. Little bit sad that doesn't work. I could imagine that this is a standard use case for teams moving to another area.

BTW: I also tried to use "your" WCL to do the import but it stops to create any links to existing items when a mapping file is used. I just get something like
No matching attribute found:
then. Without a mapping file, it works...

Ralph Schoon commented Nov 18 '16, 7:13 a.m. | edited Nov 18 '16, 8:59 a.m.

 You can write an enhancement request. (For RTC) I am not sure if this is a standard use case, really. I think you might be able to use some automation to modify the file.

The WCL export, import lacks testing. It is really meant to be something that you can take and modify to your needs or to look up API examples.

If you use a mapping file it should still work. I used mapping files internally. 

I haven't tested mapping the link types and maybe WCL does not look up the link type from the ID. I would try to specify the mapping of the link type to column name of the export.

permanent link
Ruben Scheja (111) | answered Nov 18 '16, 8:47 a.m.
 The mapping with WCL works if you ommit the first part of the URI
just map to

WCL only has the last part stored in its map

Ralph Schoon commented Nov 18 '16, 8:53 a.m.

 Thanks Ruben!

Your answer

Register or to post your answer.