It's all about the answers!

Ask a question

How to change the Planned For Attribute of a Work Item using APIs


Vaibhav S (659) | asked Jul 19 '17, 3:40 a.m.
edited Jul 19 '17, 3:44 a.m.

Hi ,

I need to change the "Planned For" Attribute of a Work Item using APIs.

I am using the following code for the same:
   
       String attributName = "Planned For" ;

      IAttribute attribute = new 'className'.getRtcAttribute(workItemClient, iProjectAreaHandle, repositoryObject, monitor, attributName);
              
       item_work.setValue(attribute, "value");
           
       workItemWorkingCopy.save(monitor);

This code works fine with Text box values (e.g. Time  Spent) but not wit Drop Down Values(e.g. Type, Planned For etc....).

Please let me know if anyone has done it before.

Thanks
Vaibhav



One answer



Your answer


Register or to post your answer.