It's all about the answers!

Ask a question

Using Java API to obtain the date a merged change set was added to a stream

Richard Amundson (1111) | asked Mar 27 '15, 10:17 a.m.

I'm using the Java API 5.0.2 to obtain the change sets for a given workspace, as follows:

    IChangeSetSearchCriteria cssc = IChangeSetSearchCriteria.FACTORY.newInstance();

    List<IChangeSetHandle> changeSetHandles = workspaceManager.findChangeSets(cssc, MAX_NUM_CHANGES, progressMonitor);
    for (IChangeSetHandle changeSetHandle : changeSetHandles)

        IChangeSet thisChangeSet = (IChangeSet)itemManager.fetchCompleteItem(changeSetHandle, IItemManager.DEFAULT, progressMonitor);
        Date lastChangeDate = thisChangeSet.getLastChangeDate();


This all appears to works fine, and I can obtain the lastChangeDate for a change set.  What I am really after though, is the time that the change set was delivered to the workspace, which is not necessarily the same.

For example, the change set could have been delivered to "TRUNK" stream on the 10th, and then two days later on the 12th merged to the "BRANCH" stream.  I would like to retrieve the date it was added to the "BRANCH" stream - i.e. the 12th from the API, but as far as I can see there is no way to obtain this from the API.  I have tried using the REST interface, passing in the change set id, as mentioned here, but this also fails to include the date added field.

I understand that this info is available via the Web interface, as discussions with Jazz developers have confirmed this (see below) - viewing the history of a component via the web interface shows an extra "Date Added" column.  This is what I am after via the Java API.

The answer is "yes, the Date Created" field in the history view in 5.0 is misleading. In RTC 5.0.1, there is a new feature called "Quatro" that adds more columns to the history view (a link to how its looking over here)

Be the first one to answer this question!

Register or to post your answer.