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

How does one Get and Set value of Work Item's Found-In attribute programmatically?

In RTC 2.0, how do you get and set the value of a work item's Found In attribute using the Java API?

1

1 vote



2 answers

Permanent link
Please have a look at: https://jazz.net/wiki/bin/view/Main/ProgrammaticWorkItemCreation

You can use the operation also to update work items, this saves you trying to work with working copies.

You want to set the value of the attribute: com.ibm.team.workitem.attribute.version the data type is IDeliverables.

Some hint on IDeliverables: https://jazz.net/library/article/807 there are several ways to find them.

0 votes


Permanent link
Forgot: To set an internal attribute:

            IWorkItemClient workItemClient= (IWorkItemClient) teamRepository.getClientLibrary(IWorkItemClient.class);
           
            IAttribute attribute = workItemClient.findAttribute(workItem.getProjectArea(),
                    fAttributeID, monitor);
            if(null!=attribute){
                if(workItem.hasAttribute(attribute))
                    workItem.setValue(attribute, fValue);
            }

To get use gatValue and cast. For custom attributes use hasCustomAttribute  which also works for built in attributes.

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,019

Question asked: Jul 03 '12, 12:01 p.m.

Question was seen: 5,355 times

Last updated: Jul 04 '12, 3:23 a.m.

Confirmation Cancel Confirm