How can I search for a baseline in my snapshots?
Good Morning,
I am using RTC 4.0.0.1.
If I have a component COMP1 that has baselines BL1, BL2, BL3 and during the course of the project I include these various baslines in a number of configurations by using snapshots, is there a way of extracting a list of the snapshots that a given baseline is included in? For example, I want to know which snapshots BL2 is part of. Also, is it possible to have a flow diagram type visualisation of this information?
Thank you and best regards,
Andrew
2 answers
Hi Andrew, I don't see any way of doing this. There are APIs for querying for snapshots, but the available criteria don't seem to allow you to look for particular baselines. It seems one can only search by name, owner, modified date range. I looked at:
com.ibm.team.scm.common.dto.IBaselineSetSearchCriteria
and
com.ibm.team.scm.common.internal.query.BaseBaselineSetQueryModel.BaselineSetQueryModel
Comments
Hello Nick,
Thank you for the response. I took a look at the Insight data model as well and didn't find anything useful.
This would be a great feature to have. Has somebody already opened an enhancement request?
Regards,
Andrew
I found: Would like to search for streams or snapshots that include a baseline (32135)
It doesn't look like it's had much activity in 2 years.
API to support this was added in RTC 6.0.2 (In this work item: Expand IBaselineSetSearchCriteria to allow searching for snapshots containing a baseline (376652))
An example of how to use this API is as follows:
IBaselineHandle b1 = getBaselineHandle();
IBaselineSetSearchCriteria criteria = IBaselineSetSearchCriteria.FACTORY.newInstance();
criteria.getContainsBaselinesOptional().add(b1);
ItemQueryResult result = scmQueryService.findBaselineSets(criteria, 3, null);
IBaselineSetSearchCriteria criteria = IBaselineSetSearchCriteria.FACTORY.newInstance();
criteria.getContainsBaselinesOptional().add(b1);
ItemQueryResult result = scmQueryService.findBaselineSets(criteria, 3, null);
There is no UI to support this however. Such enhancements are tracked in these work items: