It's all about the answers!

Ask a question

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


vikrant kamble (132559) | asked Sep 14 '18, 5:40 a.m.

 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

2 answers



permanent link
Ralph Schoon (57.1k23642) | answered Sep 14 '18, 7:18 a.m.
FORUM ADMINISTRATOR / FORUM MODERATOR / JAZZ DEVELOPER
edited Sep 14 '18, 7:19 a.m.

 I have this example for creating and delivering baselines:



Not sure that is what you are looking for.


Comments
vikrant kamble commented Sep 14 '18, 7:52 a.m.

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


vikrant kamble commented Sep 14 '18, 7:54 a.m.

 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.


Ralph Schoon commented Sep 14 '18, 8:09 a.m. | edited Sep 14 '18, 8:09 a.m.
FORUM ADMINISTRATOR / FORUM MODERATOR / JAZZ DEVELOPER

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.


vikrant kamble commented Sep 14 '18, 9:12 a.m. | edited Sep 14 '18, 9:28 a.m.

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.   


Geoffrey Clemm commented Sep 30 '18, 5:34 a.m.
FORUM ADMINISTRATOR / FORUM MODERATOR / JAZZ DEVELOPER

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
vikrant kamble (132559) | answered Sep 14 '18, 9:50 a.m.
edited Sep 14 '18, 9:52 a.m.
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.

Your answer


Register or to post your answer.