It's all about the answers!

Ask a question

How to map "Planned For" values in the xml mapping file for CSV import of work items ?


Udaya Puthuraya (8811421) | asked Sep 18 '13, 12:29 a.m.
edited Sep 18 '13, 12:32 a.m.
This link https://jazz.net/help-dev/clm/index.jsp?re=1&topic=/com.ibm.team.workitem.doc/topics/t_importing_work_items_csv_file.html&scope=null    says
Planned For : The values of the Planned For attribute come from the project area iterations. Look up these identifiers in the properties dialogs of timelines and iterations on the project area editor's Overview tab. Replace each target ID with a path using forward slashes as separators, starting with a slash followed by the timeline's ID as the first segment, followed by segments of iteration IDs. For example: /main_dev/milestone_3/stable.
Tip: If a source value is not mapped to a target value, the import operation creates new iterations or timelines for those source values.

Seems any mapping for Planned For values as below, does not seem to be working as intended.

    <attribute sourceId="Planned For" targetId="com.ibm.team.workitem.attribute.target" name="Planned For">
        <value sourceId="/development/Test/Test Iteration 4" targetId="/development/Test/Test Iteration 4"/>
        <value sourceId="/development/Test" targetId="/development/Test"/>
        <value sourceId="*" targetId="" name="Unassigned"/>
    </attribute>

All the values used are identifiers.  Whenever value mappings as above are used for csv import,  "Planned For" get set as Unassigned in the imported work items.  CSV file has the value "/development/Test" for the "Planned For" attribute for few work items and  never gets translated and set even though  "/development/Test"  exist in the Target project area where the CSV import is done.

RTC 4.0.2 version used   for both server and client.

Is the value mapping not allowed for "Planned For" attribute ?   or Is this a defect  and any work around solution for this ?

Accepted answer


permanent link
Eric Jodet (6.3k5111120) | answered Sep 18 '13, 4:24 a.m.
JAZZ DEVELOPER
 Hello,
this should work as expected.
Sample Planned for mapping should look like:
<attribute sourceId="Planned For" targetId="com.ibm.team.workitem.attribute.target">
<value sourceId="/development/4.0.5" targetId="/development/4.0.5"/>
<value sourceId="/development/4.0.5/4.0.5M2" targetId="/development/4.0.5/4.0.5M2"/>
</attribute>

I am currently testing this use case and will come back to you.

Thanks,
Eric
Udaya Puthuraya selected this answer as the correct answer

Comments
Eric Jodet commented Sep 18 '13, 5:17 a.m.
JAZZ DEVELOPER

 ok, I found the root cause of this issue - a little problem in our code (IterationMapper)

that I will continue to investigate, and possibly open a defect for it.

To solve your issue, remove the leading slash / in value's targetId's
example:
change "/development/4.0.5"
to "development/4.0.5"

This should solve your issue.
Please confirm.

Eric.


Eric Jodet commented Sep 18 '13, 6:10 a.m.
JAZZ DEVELOPER

Udaya Puthuraya commented Sep 18 '13, 10:47 a.m.

Eric,
First thanks for quick response and action on this.
After removing the leading slash (/) in the targetId's mapping as you suggested, mapping seems to be working ok for the import.


Eric Jodet commented Sep 18 '13, 11:14 a.m.
JAZZ DEVELOPER

 glad to help here


Eric.

One other answer



permanent link
Tiia Laitinen (524) | answered Nov 21 '13, 5:42 a.m.
Thanks for your answer. This resolved our problem.
Could you please update your help about this information.

Comments
Eric Jodet commented Nov 22 '13, 1:25 a.m.
JAZZ DEVELOPER

 Hello Tiia,

given that once referenced defect fixed, behavior will be ok,
I don't think there is a need to update our doc.
Meanwhile, this entry might be used as a reference.

Thanks,
Eric

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.