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

How to set the default value for Planned for attribute using java

 Hi All,

The following is my scenario.

I want to set "Unassigned" value to Planned for attribute when the work item is rejected.

When I tried to Loop the iteration I`m able to get only the user defined values but not the deafult value i.e., Unassigned.

My Question is

How to set The Planned for attribute to Unassigned.

0 votes



One answer

Permanent link
 The following is the code snippet for setting the default value fro Planned for attribute

IAttribute plannedforAttribute = workItemServer.findAttribute(workItem.getProjectARea(),IWorkItem.TARGET_PROPERTY,monitor);
the above code is to get the handle for the Planned for Attribute 

IWorkItemCopy workItemCopy = (IWorkItem)workItemServer.findworkItemById(workItem.getId(),IworkItem.FULL_PROFILE,monitor).getWorkingCopy);
This is to get the copy of the current work item which is being saved.

workItemCopy.setValue(plannedForAttribute,null);
workItemServer.saveWorkItem3(workItemCopy,null,null,additionalparameters);

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,938
× 369

Question asked: May 11 '14, 12:18 a.m.

Question was seen: 7,166 times

Last updated: May 12 '14, 4:02 a.m.

Confirmation Cancel Confirm