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

How can I retrieve date added property from change sets using server api?

Hi @ all,

I try to get the date added property of a change set in workspaces.

For clients following code is working:

        IWorkspaceConnection repoWorkspace = findWorkspace(repositoryWorkspaceName);

List<IComponentHandle> components = repoWorkspace.getComponents();

for (IComponentHandle componentHandle : components) {
IChangeHistory changeHistory = repoWorkspace.changeHistory(componentHandle);

IComponent component = (IComponent) repository.itemManager().fetchCompleteItem(componentHandle,
IItemManager.REFRESH, null);
System.out.println("Component: " + component.getName());
System.out.println("==========================================================");

List<IChangeHistoryEntryChange> historyEntries = changeHistory.recent(monitor);

System.out.println("Comment" + " \t" + "Date Creaded" + " \t" + "Added By" + " \t" + "Date Added");
for (IChangeHistoryEntryChange changeHistoryEntry : historyEntries) {
IChangeSet changeSet = (IChangeSet) repository.itemManager().fetchCompleteItem(
changeHistoryEntry.changeSet(), IItemManager.REFRESH, null);
IContributor user = (IContributor) repository.itemManager().fetchCompleteItem(
changeHistoryEntry.createdBy(), IItemManager.REFRESH, null);

System.out.println(changeSet.getComment() + " \t" + changeSet.getLastChangeDate() + " \t" + user.getName()
+ " \t" + changeHistoryEntry.creationDate());
}
}

However I want to retrieve the date added without client api. So I didn't have the client classes. For example there is no IWorkspaceConnection and IChangeHistory class in the server api.

Is there someone who can help me to get IChangeHistoryEntryChange objects without using client classes?
Or is there another way to get the date added from change sets in workspaces?

Thanks in advance.

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,935
× 411
× 169

Question asked: Jul 20 '17, 8:50 a.m.

Question was seen: 1,997 times

Last updated: Jul 20 '17, 8:50 a.m.

Confirmation Cancel Confirm