It's all about the answers!

Ask a question

CSV Import to "Filed Against" field

Joshua Giangrande (2621216) | asked Feb 11 '13, 5:10 p.m.
Hi everyone,

I need to import a number of work items from a CSV file into RTC. The mapping I have created, however, does not seem to work. Lets assume that the value read from the CSV file will be "Test." I noticed in Categories tab that all of my categories fall under a root category called "Unassigned."

To import these values, I have tried:

<value sourceId="Test" targetID="Test" />
<value sourceId="Test" targetID="Unassigned/Test" />

Neither of these seem to work. I tried setting the field manually and exporting the work item's Filed Against field's internal value, but that gave me a value something like _Y0BWgAghEe.

Is this field mapping supposed to map to some sort of path (like the Planned For field) or some internal value such as priority.literal.l11 (the ID for the High priority value), or something else entirely?

- Josh

Accepted answer

permanent link
Brian Fleming (1.6k11928) | answered Feb 11 '13, 8:12 p.m.
Hi Josh

The targetId should be the same value as the name of the Category you see in your Categories tab.  You can ignore the "Unassigned" root,  however, if there is another level between "Unassigned" and "Test", you'll need to include it, i.e. "Parent/Test". 

Is the rest of the mapping xml correct?  Assuming the header for this column in your csv is "Filed Against", the xml should look like:
    <attribute sourceId="Filed Against" targetId="">
        <value sourceId="Test" targetId="Test"/>
Joshua Giangrande selected this answer as the correct answer

Joshua Giangrande commented Feb 13 '13, 11:09 a.m.

Hi Brian,

Alright, I assumed it was supposed to be name of the category. The mapping actually looks something like this (cutting down the number of values):

<attribute sourceId="Component/s" targetId="category">

<value sourceId="Billing" targetID="Billing" />
<value sourceId="OD - Scheduling" targetID="OD - Scheduling" />

I tried using "" instead of just "category" in the attribute tag, but that didn't affect anything. I thought maybe the hyphen was causing a problem, but the "Billing" value also does not work, and I receive no errors from RTC when importing. There are no parent categories - everything is under the Unassigned/Root category I described in my original post. And yes, the rest of the mapping xml is working as intended.

I should also probably specify we are using RTC 4.0.1.

- Josh

Brian Fleming commented Feb 13 '13, 11:50 a.m.

Interesting.  I can reproduce it using the same sourceId "Component/s" as you.  It must be the slash that is causing the problem.  Can you change that to "Component" in both the mapping xml and the header in your csv?  When I used the following it worked:

    <attribute sourceId="Component" targetId="">
        <value sourceId="JKE/RelEng" targetId="JKE/RelEng"/>

Joshua Giangrande commented Feb 13 '13, 11:59 a.m. | edited Feb 13 '13, 12:01 p.m.

Hmm, strange. I have another field named "Fix Version/s" and that field maps properly. I'll try that and see if it works. Thanks!

EDIT: Yep, that was the problem after all. Baffles me that it works when the slash is in the second word. Thanks again!

Your answer

Register or to post your answer.

Dashboards and work items are no longer publicly available, so some links may be invalid. We now provide similar information through other means. Learn more here.