It's all about the answers!

Ask a question

how to get worktitem attribute value which customized by me


yansheng li (1175) | asked Oct 18 '11, 12:40 p.m.
I extended workitem and add a field ,how to get the value with JAVA api ,maybe like .get(xxx).

One answer



permanent link
Jorge Iglesias (8176) | answered Oct 24 '11, 5:16 a.m.
I extended workitem and add a field ,how to get the value with JAVA api ,maybe like .get(*).


Hi,

Try this:

IWorkItemClient workItemClient = (IWorkItemClient) teamRepository
.getClientLibrary(IWorkItemClient.class);

URI uri = URI.create(prop.getProjectAreaName().trim().replaceAll(" ", "%20"));
IProjectArea projectArea = (IProjectArea) processClient
.findProcessArea(uri, null, null);

IAttribute attEnv = workItemClient.findAttribute(projectArea,
{your workitem attribute id}, null);


Cheers!!

Jorge

Your answer


Register or 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.