Importing WorkItems
Hi,
I want to import/add workitems to Jazz from my bug log file.
I've tried in two ways:
1. Import Bugzilla Bug reports
- I took Xml Example from
https://jazz.net/learn/LearnItem.jsp?href=content/tech-notes/rational-team-concert-1_0-importing-work-items/index.html
<xml>
<bugzilla>
<bug>
<bug_id>123</bug_id>
<creation_ts>2007-03-26 14:48 -0400</creation_ts>
<short_desc>Summary content</short_desc>
<delta_ts>2007-10-18 14:23:52 -0400</delta_ts>
<product>Product</product>
<component>Component</component>
<version>2.0</version>
<rep_platform>PC</rep_platform>
<op_sys>Windows XP</op_sys>
<bug_status>RESOLVED</bug_status>
<resolution>WORKSFORME</resolution>
<keywords>tag1, tag2</keywords>
<priority>P2</priority>
<bug_severity>normal</bug_severity>
<target_milestone>2.1</target_milestone>
<blocked>124</blocked>
<blocked>125</blocked>
<dependson>121</dependson>
<dependson>122</dependson>
<reporter>contributor2</reporter>
<assigned_to>contributor1</assigned_to>
<cc>contributor3</cc>
<cc>contributor4</cc>
<long_desc>
<who>contributor2</who>
<bug_when>2007-03-26 14:48:21 -0400</bug_when>
<thetext>Comment content 0</thetext>
</long_desc>
<long_desc>
<who>contributor1</who>
<bug_when>2007-10-18 14:23:52 -0400</bug_when>
<thetext>Comment content 1</thetext>
</long_desc>
<attachment>
<attachid>file1.txt</attachid>
<desc>Attachment description 1</desc>
</attachment>
<attachment>
<attachid>file2.txt</attachid>
<desc>Attachment description 2</desc>
</attachment>
</bug>
</bugzilla>
- I created 123.xml file and 123 folder with file1.txt and file2.txt
- I created zip file
and tried import by RTC.
I got error:
"Could not create work item from bug 123
'Save Category' failed. Permission denied."
---------------------------------------------------------------------------------
2. Programmatic WorkItem Creation
I tried to run example, which is on this page:
https://jazz.net/wiki/bin/view/Main/ProgrammaticWorkItemCreation
- I changed only login properties. I connect to repository properly.
- In code fragment:
List<String> path= Arrays.asList(categoryName.split("/"));
workItemClient.createCategory(projectArea, categoryName, null);
ICategoryHandle category= workItemClient.findCategoryByNamePath(projectArea, path, null);
if (category == null) {
System.out.println("Category not found.");
return false;
}
I have always "Category not found".
-------------------------------------------------------------------------------
Do you know, what my problem is? What "Category" is? How can I import workItems in another way?
Thank you :)
Anna
I want to import/add workitems to Jazz from my bug log file.
I've tried in two ways:
1. Import Bugzilla Bug reports
- I took Xml Example from
https://jazz.net/learn/LearnItem.jsp?href=content/tech-notes/rational-team-concert-1_0-importing-work-items/index.html
<xml>
<bugzilla>
<bug>
<bug_id>123</bug_id>
<creation_ts>2007-03-26 14:48 -0400</creation_ts>
<short_desc>Summary content</short_desc>
<delta_ts>2007-10-18 14:23:52 -0400</delta_ts>
<product>Product</product>
<component>Component</component>
<version>2.0</version>
<rep_platform>PC</rep_platform>
<op_sys>Windows XP</op_sys>
<bug_status>RESOLVED</bug_status>
<resolution>WORKSFORME</resolution>
<keywords>tag1, tag2</keywords>
<priority>P2</priority>
<bug_severity>normal</bug_severity>
<target_milestone>2.1</target_milestone>
<blocked>124</blocked>
<blocked>125</blocked>
<dependson>121</dependson>
<dependson>122</dependson>
<reporter>contributor2</reporter>
<assigned_to>contributor1</assigned_to>
<cc>contributor3</cc>
<cc>contributor4</cc>
<long_desc>
<who>contributor2</who>
<bug_when>2007-03-26 14:48:21 -0400</bug_when>
<thetext>Comment content 0</thetext>
</long_desc>
<long_desc>
<who>contributor1</who>
<bug_when>2007-10-18 14:23:52 -0400</bug_when>
<thetext>Comment content 1</thetext>
</long_desc>
<attachment>
<attachid>file1.txt</attachid>
<desc>Attachment description 1</desc>
</attachment>
<attachment>
<attachid>file2.txt</attachid>
<desc>Attachment description 2</desc>
</attachment>
</bug>
</bugzilla>
- I created 123.xml file and 123 folder with file1.txt and file2.txt
- I created zip file
and tried import by RTC.
I got error:
"Could not create work item from bug 123
'Save Category' failed. Permission denied."
---------------------------------------------------------------------------------
2. Programmatic WorkItem Creation
I tried to run example, which is on this page:
https://jazz.net/wiki/bin/view/Main/ProgrammaticWorkItemCreation
- I changed only login properties. I connect to repository properly.
- In code fragment:
List<String> path= Arrays.asList(categoryName.split("/"));
workItemClient.createCategory(projectArea, categoryName, null);
ICategoryHandle category= workItemClient.findCategoryByNamePath(projectArea, path, null);
if (category == null) {
System.out.println("Category not found.");
return false;
}
I have always "Category not found".
-------------------------------------------------------------------------------
Do you know, what my problem is? What "Category" is? How can I import workItems in another way?
Thank you :)
Anna
One answer
Hi Anna
Category is the value of the 'Filed Against' field on work items. You can configure categories on the 'Work Item Categories' tab in the Project Area editor of your project area.
The error in your first question means that you (as the user that does the import) does not have the permission to create a category (I think the category is the combination of bugzilla's Product and Component fields, but I am not sure about that). So assigning yourself the necessary permissions should solve the issue.
In 2.: what do you get as result of the
workItemClient.createCategory(projectArea, categoryName, null);
call? it should return the created category...
Regards
Marcel
Jazz Work Item team
Category is the value of the 'Filed Against' field on work items. You can configure categories on the 'Work Item Categories' tab in the Project Area editor of your project area.
The error in your first question means that you (as the user that does the import) does not have the permission to create a category (I think the category is the combination of bugzilla's Product and Component fields, but I am not sure about that). So assigning yourself the necessary permissions should solve the issue.
In 2.: what do you get as result of the
workItemClient.createCategory(projectArea, categoryName, null);
call? it should return the created category...
Regards
Marcel
Jazz Work Item team