Setting the "plannedFor" attribute of a work item
Hi,
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.
Thanks!
Ariel Sakin (IBM)
The Category function looks like this:
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.
Thanks!
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");
}
rtc_item.setCategory(category);
} catch (TeamRepositoryException e) {
throw new RTCException(e.getMessage());
}
}