Get all possible values for Planned for attribute when creating a new work item?
Accepted answer
I believe that the following should work however I've not tested it:
URI projectAreaUri = ...
IProcessClientService processClient = (IProcessClientService) repository.getClientLibrary(IProcessClientService.class);
IAuditableClient auditableClient = (IAuditableClient) repository.getClientLibrary(IAuditableClient.class);
IProjectArea projectArea = (IProjectArea) processClient.findProcessArea(projectAreaUri, null, null);
IDevelopmentLineHandle[] developmentLineHandles = projectArea.getDevelopmentLines();
for(IDevelopmentLineHandle developmentLineHandle : developmentLineHandles) {
IDevelopmentLine developmentLine = auditableClient.resolveAuditable(developmentLineHandle, ItemProfile.DEVELOPMENT_LINE_DEFAULT, null);
for(IIterationHandle iterationHandles : developmentLine.getIterations()) {
IIteration iteration = auditableClient.resolveAuditable(iterationHandles, ItemProfile.ITERATION_DEFAULT, null);
System.out.println(iteration.getName());
}
}
If you're only interested in the main project timeline you can call IProjectArea#getProjectDevelopmentLine() instead.
Comments
Ralph Schoon
FORUM ADMINISTRATOR / FORUM MODERATOR / JAZZ DEVELOPER Aug 02 '12, 6:21 a.m.