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

Problem creating WorkItem by Java APIs

Hi, i'm new to RTC, and i'm tryng to create a workitem using the examples in "WorkItem Java APIs" section, but i get an exception and a notification like:

Summary: Attribute 'ODC Activity' not set
Description: The 'ODC Activity' attribute needs to be set (work item <04>).

Summary: Attribute 'ODC Trigger' not set
Description: The 'ODC Trigger' attribute needs to be set (work item <04>).

......

Summary: Attribute 'Description' not set
Description: The 'Description' attribute needs to be set (work item <04>).

Obviously the problem is that some attributes are mandatory and i have to set them. So, how can I set an attribute of a workitem? I tried
workItem.setValue(IAttribute attr,Object value); but i don't know how get an IAttribute object. Sorry but i didn't find any documentation.

0 votes



One answer

Permanent link
On 3/15/10 5:08 PM, albjazz wrote:
Hi, i'm new to RTC, and i'm tryng to create a workitem using the
examples in "WorkItem Java APIs" section, but i get an
exception and a notification like:

Summary: Attribute 'ODC Activity' not set
Description: The 'ODC Activity' attribute needs to be set (work item
04>).

Summary: Attribute 'ODC Trigger' not set
Description: The 'ODC Trigger' attribute needs to be set (work item
04>).

.....

Summary: Attribute 'Description' not set
Description: The 'Description' attribute needs to be set (work item
04>).

Obviously the problem is that some attributes are mandatory and i have
to set them. So, how can I set an attribute of a workitem? I tried
workItem.setValue(IAttribute attr,Object value); but i don't know how
get an IAttribute object. Sorry but i didn't find any documentation.

You can get an IAttribute using the following method of IWorkItemClient:

IAttribute findAttribute(IProjectAreaHandle projectArea, String
identifier, IProgressMonitor monitor) throws TeamRepositoryException;

E.g.:
IAttribute descriptionAttribute=
findAttribute(workItem.getProjectArea(), IWorkItem.DESCRIPTION_PROPERTY,
monitor);

--
Regards,
Patrick
Jazz Work Item Team

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
× 10,954

Question asked: Mar 15 '10, 12:07 p.m.

Question was seen: 5,764 times

Last updated: Mar 15 '10, 12:07 p.m.

Confirmation Cancel Confirm