It's all about the answers!

Ask a question

Work Item Command Line: Unable to upload attachments while creating Work items


Vijayalaxmi B (11) | asked Oct 15, 1:03 a.m.
edited Oct 15, 8:53 a.m. by Ralph Schoon (57.1k23642)

 Hello Team,

I am trying to import a csv file which contains workitems to Jazz.
Attachments folder is having the folders with ID.
csv contains an attachment column with the row ./Attachments/25207272/safe.png

WCL :
-importworkitems /importdebug password=”” /skipEmailNotification projectArea=”Migration from MKS” /ignoreemptycolumnvalues importFile=”SAFE_attachments.csv” repository=”” user=”” mappingFile=”sample_mapping.xml” encoding=”UTF-8″ delimiter=”,”

Mapping.xml
sourceId=”Attachments” targetId=”com.ibm.team.workitem.linktype.attachment.attachment”/>

The workitem is created but without attachments.
No matching attribute found: ‘com.ibm.team.workitem.section.attachments

How can I create the WI with atatchments? Any configuration I am missing here in the WCL?


Comments
Ralph Schoon commented Oct 15, 1:51 a.m.
FORUM ADMINISTRATOR / FORUM MODERATOR / JAZZ DEVELOPER
How does your CSV file look like?
I have usually tried to do this based on an export from EWM/RTC to be sure. It is not necessary to use a mapping file.

The import complains about com.ibm.team.workitem.section.attachments. This does not look like the ID of the attachments attribute. This looks like the name of the editor presentation. Where did you get that ID?

One answer



permanent link
Ralph Schoon (57.1k23642) | answered Oct 15, 8:40 a.m.
FORUM ADMINISTRATOR / FORUM MODERATOR / JAZZ DEVELOPER
The importer uses the pseudo attribute name/id "Attachments" or "attachments" to identify the attachments column in the CSV. com.ibm.team.workitem.section.attachments or the mapping com.ibm.team.workitem.linktype.attachment.attachment make no sense.

I would suggest you run an export e.g.
wcl -exportworkitems /ignoreErrors repository="https://clm.example.com:9443/ccm" user=myadmin password=myadmin projectArea="JKE Banking (Change Management)" exportFile="C:\Temp\20201015_Export\Test.csv" query="All" columns="workItemType,summary,Attachments" delimiter=;

    
and look at what you get. With respect to using the mapping, I can not really tell how that would look like for attributes at the moment. I would assume that the RTC/EWM side would require to use the attribute name/id 
"Attachments" or "attachments".

Your answer


Register or to post your answer.