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

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:

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());
}
}

0 votes


Be the first one to answer this question!

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,948

Question asked: May 14 '10, 11:37 a.m.

Question was seen: 4,835 times

Last updated: May 14 '10, 11:37 a.m.

Confirmation Cancel Confirm