It's all about the answers!

Ask a question

Using the API to determine when a changeset was delivere


Michael Baylis (1832618) | asked Jul 08 '09, 8:48 a.m.
retagged Dec 16 '13, 5:34 p.m. by David Lafreniere (4.1k7)
Hi,
I'm using the jazz plain client to read the contents of a stream or workspace. I use the following API calls to get there:-

IWorkspaceManager.findWorkspacesByName
IWorkspaceManager.getWorkspaceConnection
IWorkspaceConnection.getComponents
IWorkspaceConnection.configuration
IConfiguration.childEntriesForRoot

Once I work through the heirachy I end up with a load of IFolder and IFileItem.

From IFileItem/IFolder how can I find out the last changeset to modify that file and most importantly, in my case, when that changeset was delivered to my stream/workspace?

Cheers,

Michael Baylis
IBM Hursley

3 answers



permanent link
Andrew Niefer (6385) | answered Jun 10 '14, 4:25 p.m.
JAZZ DEVELOPER
To find the changeSets that affected a particular file or folder, you use IWorkspaceConnection.changeHistory(component) to get an IChangeHistory object.
IChangeHistory.getHistoryFor will return IChangeHistoryEntryChange objects that reference the changeSets that modify the file/folder.

Unfortunately the entries returned here do not give you the date the changeSet was introduced to the workspace or stream.

Starting in 5.0.1 Sprint 1 which will be available in the next week or so, Story 304215 introduces changes so that when you use IWorkspaceConnection.changeHistory(), the IChangeHistory.recent, getHistoryDescriptor and getHistoryDescriptors will return IChangeHistoryEntryChange objects that do contain the dates the changeSet was introduced to the stream.

Here, you would first use getHistoryFor to find the changeSet id, and then search through the history returned from getHistoryDescriptors to find that changeSet and get the delivery date from there.

permanent link
Michael Baylis (1832618) | answered Jul 09 '09, 7:17 a.m.
Scratch this, I think I am going about this the wrong way.

permanent link
Michael Baylis (1832618) | answered Jul 09 '09, 9:42 a.m.
Nope, still need this, but only a bit of it.

Given the IFileItem or IfileItemHandle, how can I get to the change set. I need the uuid or orther id of the changeset that last modified the file. (Same for the folders of course)

Cheers,

Michael Baylis
IBM Hursley

Comments
Yehiel Glass commented Nov 13 '13, 9:41 a.m.

Hi Michael,

Do you have an answer for your question ?

I'm looking for the same thing..


Michael Baylis commented Nov 15 '13, 5:06 a.m.

 To be honest,  it was so long ago I can't remember where I got to with this.  Sorry.

Your answer


Register or to post your answer.