Filtering changesets feeding into specific release streams
I have a requirement to pull in the changes for a workitem for a specific code stream. Using the API on ILinkManager today, i am able to fetch all the changesets. There can be multiple changesets on the workitem, each feeding to back to different code streams. In our process, defects are tracked as single work items, whose changes, can be propagated (back porting/forward porting) to other release streams. In that case, the same workitem has multiple changesets, each for a different release.
I wanted to filter changesets for a one such stream.
Additionally,within the Eclipse version of RTC tool, i see a Search Option(Menu->Search->Jazz Source Control->Change sets)
for "Changesets" , where one can specify Component, Location(which can be either release stream or workspace) etc, in addition to other parameters. With this feature, i am thinking, there should some way in the API to figure out changesets for a release stream. Is there a standary way?
I wanted to filter changesets for a one such stream.
Additionally,within the Eclipse version of RTC tool, i see a Search Option(Menu->Search->Jazz Source Control->Change sets)
for "Changesets" , where one can specify Component, Location(which can be either release stream or workspace) etc, in addition to other parameters. With this feature, i am thinking, there should some way in the API to figure out changesets for a release stream. Is there a standary way?
One answer
I am using the following code to query for changesets associated release stream's component:
IChangeSetSearchCriteria changeSetSearchCriteria = IChangeSetSearchCriteria.FACTORY.newInstance();
// Setting the context handle for the workspace corresponding to release stream.
changeSetSearchCriteria.setContext(getWsConn().getContextHandle());
//Setting the component within the release stream.
changeSetSearchCriteria.setComponent(searchComponentHandle);
List<IChangeSetHandle> changeSetHandles = getWsManager().findChangeSets(changeSetSearchCriteria, IWorkspaceManager.MAX_QUERY_SIZE, null);
This list of changeset(s) serves as a master list, to look up for verifying if the workitem related changeset is from the expected release stream.
IChangeSetSearchCriteria changeSetSearchCriteria = IChangeSetSearchCriteria.FACTORY.newInstance();
// Setting the context handle for the workspace corresponding to release stream.
changeSetSearchCriteria.setContext(getWsConn().getContextHandle());
//Setting the component within the release stream.
changeSetSearchCriteria.setComponent(searchComponentHandle);
List<IChangeSetHandle> changeSetHandles = getWsManager().findChangeSets(changeSetSearchCriteria, IWorkspaceManager.MAX_QUERY_SIZE, null);
This list of changeset(s) serves as a master list, to look up for verifying if the workitem related changeset is from the expected release stream.
I have a requirement to pull in the changes for a workitem for a specific code stream. Using the API on ILinkManager today, i am able to fetch all the changesets. There can be multiple changesets on the workitem, each feeding to back to different code streams. In our process, defects are tracked as single work items, whose changes, can be propagated (back porting/forward porting) to other release streams. In that case, the same workitem has multiple changesets, each for a different release.
I wanted to filter changesets for a one such stream.
Additionally,within the Eclipse version of RTC tool, i see a Search Option(Menu->Search->Jazz Source Control->Change sets)
for "Changesets" , where one can specify Component, Location(which can be either release stream or workspace) etc, in addition to other parameters. With this feature, i am thinking, there should some way in the API to figure out changesets for a release stream. Is there a standary way?