It's all about the answers!

Ask a question

Retrieval of ChangeSets from CompareBaselineSets Method


vinitha dsouza (14717105) | asked Jun 15 '18, 7:48 a.m.
edited Jun 15 '18, 11:21 a.m. by David Lafreniere (4.8k7)

Dear Team,

We are currently getting Changesets between 2 Snapshots by using below snippet,
 IChangeHistorySyncReport changeSync = workspaceManager.compareBaselineSets(snapshot, snapshotParent,
                null, null);
for (final Object currentEntry : changeSync.outgoingChangeSets()) {
          IChangeSetHandle csHandle = (IChangeSetHandle) currentEntry;
            System.out.println("Found CS '" +((IChangeSet) teamRepository.itemManager().fetchCompleteItem(csHandle, IItemManager.DEFAULT, null)).getComment() + "'");
            matchedCSs.add(csHandle);
        }

My query is ,
On What basis/order Changesets are provided from method OutgoingChangesets i.e like last modified date,created date or any other conditions.

Accepted answer


permanent link
David Lafreniere (4.8k7) | answered Jun 15 '18, 11:19 a.m.
FORUM MODERATOR / JAZZ DEVELOPER
The order would be the order that the change sets appear in the history of the context (whether the context is a component in a workspace/stream or a baseline). I.e. if you were to right-click on the component/baseline and use 'Show' --> 'History', you'll always see the change sets in the same order... which is the order that the change sets were 'added' to that context (most commonly due to the 'deliver' action to a stream for example). So this is not necessarily the last modified date or creation date of a change set (although in practice more often than not this tends to be the 'last modified' date of a change set, which is really the date the change set was completed/closed - which happens during delivery to a stream - but as already mentioned, the order is not 'always' by 'last modified' date, because users can always 'resume' old change sets, or roll-back / discard/suspend change sets, etc.)
vinitha dsouza selected this answer as the correct answer

Your answer


Register or to post your answer.