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

How to get change sets being delivered with baseline using server API

 There are change sets in the repository workplace, upon creation of snapshot a baseline is created inside every component of work space and is visible as outgoing change in the pending changes view. Before creation of baseline change sets were visible in pending changes view, if deliver operation is performed, these change sets can be fetched using below server API

DeliverOperationData data = (DeliverOperationData) operationData;
List<IChangeSetHandle> changeSetHandles = data.getChangeSetHandles();

After creation of snapshot, baseline is visible in the pending changes view as outgoing, if this baseline is expanded we can see change sets being delivered inside that baseline. I have been trying to get baseline being delivered in deliver operation and change sets inside the baseline, with the help of below code I am able to get baselines being delivered as part of deliver operation but I am unable to get change sets being delivered inside the baseline.
List<IBaselineHandle> baselines = data.getBaselines();

Later I converted baseline handles into baselines but I am unable to get change sets being delivered inside these baselines, any pointers or guidance would be of great help.

Thank You

0 votes



2 answers

Permanent link

 I have this example for creating and delivering baselines:



Not sure that is what you are looking for.

0 votes

Comments

Hello Ralph, Your code talks about delivering change sets to stream using java API, I need to get a baseline and change sets inside the baseline as part of deliver operation i.e. deliver operation is performed manually by user then follow up action will execute and get the change sets being delivered inside of baseline

 I can get the change sets being delivered in delivery operation using below code

DeliverOperationData data = (DeliverOperationData) operationData;
List<IChangeSetHandle> changeSetHandles = data.getChangeSetHandles();

But if user creates a baseline before delivery of change sets and delivers the baseline then I am unable to get change sets inside of baseline.

Vikrant,


I have not tried that. Sorry.

How can a user deliver a baseline containing changes that are not yet delivered? I would expect that the baseline can not be delivered unless the outgoing changes (referenced by the baseline) are completed and delivered as well.

Hello Ralph,


It is true that baseline can not be delivered until outgoing changes (referenced by the baseline) are completed and delivered,  we have created custom extension as follow up action on deliver operation. Please look into below screenshot to get better clarity to the my question.   

I cannot provide guidance on the API, but I expect that you will have to do a compare operation between that baseline and the current configuration of the stream, in order to get that list of change sets.   That is because a baseline is effectively a pointer to a change set history entry, and the list of change sets that you want here is not all of the change sets in the history of that baseline, but rather the difference between the change set history of that baseline, and the change set history of the stream (those are the change sets being added to that stream, when you deliver that baseline to that stream).


Permanent link
Image 1 : Delivery of change sets


As shown in above screenshot I can get these change sets using below API as part of follow up action on delivery operation
DeliverOperationData data = (DeliverOperationData) operationData;
List<IChangeSetHandle> changeSetHandles = data.getChangeSetHandles();

Image 2 : Delivery of baselines
As shown in above screenshot if baselines are delivered I am able to get baselines being delivered as part of follow up action on deliver operation but I am not able to get change sets inside these baselines.
List<IBaselineHandle> baselines = data.getBaselines();
Is there a API to get change sets inside of these baselines.

0 votes

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
× 10,938
× 7,495
× 1,202
× 149
× 84

Question asked: Sep 14 '18, 5:40 a.m.

Question was seen: 3,569 times

Last updated: Sep 30 '18, 5:34 a.m.

Confirmation Cancel Confirm