Jazz Forum Welcome to the Jazz Community Forum Connect and collaborate with IBM Engineering experts and users

How do we stop duplicate categories being created when importing work items from a csv file?

We are successfully importing work items from a csv file but are seeing duplicate categories created. Specifically the import sometimes has items with a category and sometimes with the same category and a sub-category. This is causing the category to be created twice, once as a category with no sub-categories and again as a category with sub-categories. When writing a query there are then 2 identically named categories to chose from which return different work items i.e. those with just the category and those with the category and a sub-category. This looks like a bug? As a work-around we could create a dummy 'Unassigned' sub-category in the csv file so that all items have both a category and sub-category.

0 votes

Comments

Since there are so many versions out now, it is a good practice to mention the one you are using. I am aware that there was a defect where the recognition of the categories did not work as expected. That caused the issue. Your case might be a different one.

sorry forgot to say it is 4.0.6

what is the value of the category in the CSV file? 

a path root/cat/subcat
or just
subcat?

I found that changing the output on the export to the path made the import correct..

on the 'choose attributes to export' dialog, click the dropdown and select Internal Value (we needed to do this for iteration and category)


The import csv contains entries of the form "category" / "sub-category" i.e. no path-root. It does not seem to need the path-root as this format creates the category and sub-category as expected under the path-root. It is just that we end up with separate path-root/category (from imported items that don't have a sub-category) and path-root/category/sub-category (for imported items that do have a sub-category) for the same category. Following your suggestion I can see that the internal-value is a uuid, however that does not help as we are generating the csv from another non-rtc system.

could you show us a sample of the different category strings in the csv file and results.. cause I'm not quite sure I understand..


I have investigated further and it doesn't occur if the single category import item occurs first, but the problem does occur if a single category import item occurs after a category/sub-category item e.g. with the following csv import file 'Category1' is listed twice on the 'Work Item Categories' tab.

"Type","Filed Against","Summary"
"Task","Category1" / "Sub-Category1","task 4"
"Task","Category1" / "Sub-Category2","task 5"
"Task","Category1","task 6"


Sam, Ralph, or Martin, if one of you think that one of the above comment is an answer for this question, please convert your comment to an answer so this question can be marked as answered.

My comment is certainly no answer.

showing 5 of 8 show 3 more comments

Accepted answer

Permanent link
Given Martins comment
I have investigated further and it doesn't occur if the single category import item occurs first, but the problem does occur if a single category import item occurs after a category/sub-category item e.g. with the following csv import file 'Category1' is listed twice on the 'Work Item Categories' tab.

"Type","Filed Against","Summary"
"Task","Category1" / "Sub-Category1","task 4"
"Task","Category1" / "Sub-Category2","task 5"
"Task","Category1","task 6"
I would suggest to make sure to create the categories or to provide work items in an order that creates the categories. I would also suggest to create a defect, as I would expect the categories to be created correctly.

Martin, if this summarizes the matter, please accept.

Martin McAuley selected this answer as the correct answer

0 votes


One other answer

Permanent link
thanks.. I 'thought' I read somewhere in the library that the order had to be parent first.  (but I can't find it now)

Category1
before any child of Category 1

On my project copy utility I build the category tree before import, so don't experience this problem.

0 votes

Your answer

Register or log in 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.

Search context
Follow this question

By Email: 

Once you sign in you will be able to subscribe for any updates here.

By RSS:

Answers
Answers and Comments
Question details
× 12,025

Question asked: Nov 11 '14, 7:36 a.m.

Question was seen: 3,554 times

Last updated: Nov 13 '14, 3:17 a.m.

Confirmation Cancel Confirm