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

Listing snapshots of a Project Area and Team Areas

 Hi Everyone,

Using the API, I want to list all snapshots from a Project Area and its children (Team Area Hierarchy).
Can I achieve this with a single search?`
The only solution I found til now is to search in every Team area of the hierarchy and append the results together.

This is my current code:
  public List<IBaselineSetHandle> getSnapshotsFromProcessAreaAndChildren(final IProjectArea projectArea {
    List<IBaselineSetHandle> finalBaselineList = new ArrayList<IBaselineSetHandle>();
    List<ITeamAreaHandle> teamAreas = projectArea.getTeamAreaHierarchy().getTeamAreas();
    for (ITeamAreaHandle iTeamAreaHandle : teamAreas) {
      finalBaselineList.addAll(getSnapshotsFromProcessArea(iTeamAreaHandle));
    }
    finalBaselineList.addAll(getSnapshotsFromProcessArea(projectArea));
    return finalBaselineList;
  }
  public List<IBaselineSetHandle> getSnapshotsFromProcessArea(
      final IProcessAreaHandle processAreaHandle) throws Exception {

    IBaselineSetSearchCriteria searchCriteria = IBaselineSetSearchCriteria.FACTORY.newInstance();
    searchCriteria.setProcessArea(processAreaHandle);
    return getWorkSpaceManager().findBaselineSets(searchCriteria, Integer.MAX_VALUE, monitor);
  }

0 votes



One answer

Permanent link
Hi Diogo,

As far as I know, you need to repeat for each team area like you do. I used to do a same thing. I am guessing you are doing a right way.

0 votes

Your answer

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

Question asked: Nov 17 '15, 10:15 a.m.

Question was seen: 2,287 times

Last updated: Nov 17 '15, 7:03 p.m.

Confirmation Cancel Confirm