It's all about the answers!

Ask a question

Setting the "plannedFor" attribute of a work item

Ariel Sakin (16185) | asked May 14 '10, 11:37 a.m.
I wrote a function that updates the Category ("Filed Against") of a work item from a String.
I would like to do the same for the "Planned for" field but I can't seem to find a way to get an IIterationHandle object.
I will really appreciate some help with this.

Ariel Sakin (IBM)

The Category function looks like this:

public void setCategory(String categoryName) throws RTCException {

ITeamRepository teamrepo = (ITeamRepository) rtc_item.getOrigin();

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

List<String> path= Arrays.asList(categoryName.split("/"));
ICategoryHandle category;
try {
category = workItemClient.findCategoryByNamePath(projectArea, path, null);

if (category == null) {
throw new RTCException("Category Not Found");

} catch (TeamRepositoryException e) {
throw new RTCException(e.getMessage());

Be the first one to answer this question!

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.