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

How to get Project Area History using java API

I want to read/fetch all the history data for project area (Not work item) .  Is this possible thru JAVA API ?

thanks
Akshay P.

0 votes



One answer

Permanent link
private static IProjectArea getFirstProjectAreaState(ITeamRepository repo, IProjectArea projectArea) throws TeamRepositoryException{

List history = repo.itemManager().fetchAllStateHandles(projectArea, null);
List<IProjectArea> projectAreas = (List<IProjectArea>)repo.itemManager().fetchCompleteStates(history, null);
Collections.sort(projectAreas, new Comparator<IProjectArea>(){

public int compare(IProjectArea o1, IProjectArea o2) {
int result = 0;
if (o1.modified().getTime() < o2.modified().getTime()) {
result = -1;
} else {
result = 1;
}
return result;
}
});
    IProjectArea firstHistoryEntry = projectAreas.get(0);
    return firstHistoryEntry;
}

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
× 411

Question asked: Oct 03 '16, 4:01 a.m.

Question was seen: 3,018 times

Last updated: Oct 18 '20, 10:00 a.m.

Confirmation Cancel Confirm