Jazz Forum Welcome to the Jazz Community Forum Connect and collaborate with IBM Engineering experts and users

How to collect all Snapshots(BaselineSets) linked with Baseline?

How to collect all Snapshots(BaselineSets) linked with Baseline?

 

I have a Stream and i have created Baseline for Component In ALM.

I have created more than one Snapshot with the same reference of baseline(Baseline UUID).

 

In that case, how to collect all the BaselineSet which linked with Baseline(Baseline UUID)?

 

Note: Usually we can collect all the Baselines from BaselineSet.

But this is like reverse case, from Baseline collecting all the linked BaselineSets(Snapshots).

0 votes


Accepted answer

Permanent link
The following API can be used to find all snapshots that contain a specific baseline:

IBaselineSetSearchCriteria.getContainsBaselinesOptional() (Note: You would first 'get' the list, then add the desired IBaselineHandle to that list)

Note: This API was added in RTC 6.0.2, so hopefully your RTC version is equal or greater to that version.
Vijayanand Karunanithi selected this answer as the correct answer

0 votes

Comments

I have tried that and it is not working for me.
Please find the code which i have used to identify all snapshot.

 - Created object for IBaselineSetSearchCriteria
 - Got List<IBaselineHandle> using getContainsBaselinesOptional and add my bselineHandle object into it.
 - Have set ProcessArea for IBaselineSearchCriteria
 - Called "findBaselineSets" method from WorkspaceManager class along with input parameter of IBaselineSetSearchCriteria.

This snippet is always returning empty list.

Kindly help me to resolve the issue.

Thanks in advance!!

By setting the [optional] process area in the IBaselineSetSearchCriteria, it means you are only finding snapshots that are owned by a stream, where that stream is owned by that process area. This means the result will never return a snapshot that is owned by a repository workspace, or snapshots owned by a stream, which is owned by a different process area.
Can you try 'not' setting the process area in the IBaselineSetSearchCriteria and see if this fixes your issue?

I suppose the other question is: "Are you 100% sure there is even a snapshot that contains the baseline? There's no reason to assume a random baseline is contained in a snapshot in the repository".

Your answer

Register or log in to post your answer.

Dashboards and work items are no longer publicly available, so some links may be invalid. We now provide similar information through other means. Learn more here.

Search context
Follow this question

By Email: 

Once you sign in you will be able to subscribe for any updates here.

By RSS:

Answers
Answers and Comments
Question details
× 7,503
× 1,700
× 1,204
× 84
× 74

Question asked: May 30 '18, 1:31 a.m.

Question was seen: 1,614 times

Last updated: Jun 20 '18, 11:10 a.m.

Confirmation Cancel Confirm