How to list all project areas in IBM Rational Team Concert (RTC) or (Rational Quality Manager) along with the creation dates using the Plain Java Client?
// get all project areas
IProcessItemService processItemService = (IProcessItemService)teamRepository.getClientLibrary(IProcessItemService.class);
List<?> list = processItemService.findAllProjectAreas(IProcessClientService.ALL_PROPERTIES, null);
//for each project area from the list above, get the list of handles for all recorded states List<IProjectArea> states = teamRepository .itemManager().fetchAllStateHandles(project, null);
//get complete states for all the handles states = teamRepository.itemManager().fetchCompleteStates(states, null); long firstModified = Long.MAX_VALUE; //go through all the states... for (int i = 0; i < states.size(); ++i) { //...and find the one with the earliest modification date //note that they appear on the list in random order, so you need to go through them all IProjectAreaHandle projectState = states.get(i); ProjectAreaImpl fullState = (ProjectAreaImpl) projectState.getFullState(); if (fullState != null) { //check if the modification date of the current state is earlier than the earliest recorded so far Date modified = fullState.getModified(); if (modified.getTime() < firstModified) { //if so, this is the new earliest known modification firstModified = modified.getTime(); } } } //print results: System.out.print(project.getName() + " "); System.out.print(new Date(firstModified));
Ralph Schoon selected this answer as the correct 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.